Hot answers tagged

3

void frameInfo(File track, char frame[4], uint32_t ltwo[4], int32_t frsz) { The way you did it, frsz is passed by value (ie. a copy is made, and you have changed the copy, not the original). To make it change outside the function you need to pass it by reference: void frameInfo(File track, char frame[4], uint32_t ltwo[4], int32_t &frsz) { Note the ...


3

This is not a bug. It's just that you are working with signed 16 bit integers on an 8 bit microcontroller. The maximum an int can store is 32767, and literals are 16 bit signed by default. Your three prints are: Serial.println(feedLimit); Print 30. Serial.println(feedLimit*60*1000); Multiply feedLimit by 60 = 1800. Multuply 1800 by 1000 = 1800000. Fit ...


2

In EE_ReadUsername(), you wrote: char c = EEPROM.read(dataAddress + i); This variable (c) is set but never used. You may want to add that character to the data character array. Also, the array has to be terminated with a NUL byte.


2

The problem was that a task with higher priority interrupts the process. I increased the priority to this task and the problem is solved. xTaskCreatePinnedToCore(_cloudRXServiceTask, "_cloudRXServiceTask", 2048, this, 20, &_cloudRXServiceWorker_handle,0);


2

In C order is important. Everything is parsed sequentially, and header file inclusions are replaced literally with the header contents at compile time. Things must be defined before they can be used, and that includes anything that is defined in the Arudino.h header file - that file must be included before anything that uses it - and of course that means ...


1

Giving this thread some more value while taking into consideration @Edgar Bonet's help (the accepted answer for this thread); I'm answering my own question with my full header class code (more EEPROM features) for further reference for myself and other users, who might be learning. Note(s): The regions are there for a backup reference purpose. Feel free to ...


1

For measuring the time for each parking lot: Declare an array of unsigned long with one element per parking lot (so 5 in this case) and initialize it with zeros: #define N_PARKING_LOTS 5 unsigned long timestamps[N_PARKING_LOTS] = {0}; Then go to the place in your code where a new car arrives in its parking lot. You need the number of the used parking lot. ...


Only top voted, non community-wiki answers of a minimum length are eligible