- This topic has 2 replies, 2 voices, and was last updated 1 year, 6 months ago by .
- You must be logged in to reply to this topic.
Home › Forums › The libraries hosted on the site › EByte LoRa e220 UART devices LLCC68 › TimeStamp not working
Tagged: E220 structured message
Have struct Message{
int switchState;
String timeStamp;
}message;
SwitchState is sent to E220 receiver. TimeStamp only prints non-printable characters to E220 receiver. TimeStamp is populated on E220 sender by the getDateTime functio variable dtStamp. I can print message.timeStamp and see a properly formatted time stamp on the E220 sender. Have worked this issue for hours; help would be much appreciated.
Regards,
William
Hi William,
if you want to use a Structure, you must use fixed size variables. String is dynamic, and the receiver can’t know the correct size.
Try to use something like this.
Have struct Message{
int switchState;
char[13] timeStamp;
}message;
Bye Renzo
Thank you Renzo; have it working now.
New project is a remote battery monitor with NTP timestamp transmitter to E220 receiver. Have nearly all of the project compeled; except for a “Timeout!!” message on Serial Monitor I did not code, sketch continues to run. Is this a warning from the E220 library? Message occurs between a httpClient function and logBattery function. Have removed all delays; no change.
Project logs timestamp, adc reading, and voltage to LittleFS. Going to try and find out how long battery lasts compared to the number of requests made using an automated method of generating GET requests.. conditonal statement determine how often request are made to AsycWebServer. Server switches on live video camera for a predetermined period using a once Ticker timer method.
Plan to use a voltage divider of 1 meg ohm and 2 meg ohm; need to aquire the parts. Getting together a shopping list for your shields too. Thanks for creating the shields and your community support!
Regards,
William
Waveshare ESP32-C3 Zero: high-resolution pinout, datasheet, and specs
25 September 2025
More