I amm dealing with Arduino cpp and I have a problem to set a variable (in structure) with a value. The variable is:
struct cronStructure {
unsigned long every; // every
...
}
...
cronStructure cron[] = {...
and the assignemet is generated by this fragment:
unsigned long ss;
sscanf(workBuffer+1,"%u",&ss); // workBuffer contains d5
cron[iEvent].every = ss;
events.listEvents(cron);
sprintf(printfBuffer," changed to %d\n", ss);
Serial.println(printfBuffer); // this shows: changed to 5
Serial.println(cron[iEvent].every); // this shows: 3827367941
Thanks