typedef struct {
unsigned long timestamp; // Timestamp when the event was generated
int reason; // The reason why the event was added
int state; // The LED state, wake, sleep etc.
unsigned long rotations; // Number of rotations the wheel has done
unsigned int on_time; // Number of seconds the device has been awake
unsigned int half_on_time; // Number of seconds the lights have been half on
unsigned int full_on_time; // Number of seconds the lights have been fully on
float voltage; // The battery voltage
unsigned int messages_sent; // The number of messages the device has sent
unsigned int messages_failed; // The number of messages that were attempted but failed
float temperature; // The temperature
int moving; // Whether we're moving
unsigned int event_number; // The event number
double lat; // Current latitude
double lng; // Current longitude
unsigned int sats; // Number of satelites involved
unsigned int age; // Milliseconds since last fix
} Events;
This looks like data for ONE event, not for multiple events Why does the struct have a plural name?
char post_data[7000];// = "1234567890123456789012345678901234567890abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyz&1234567890123456789012345678901234567890abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyz&1234567890123456789012345678901234567890abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyz&1234567890123456789012345678901234567890abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyz&1234567890123456789012345678901234567890abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyz&1234567890123456789012345678901234567890abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyz&1234567890123456789012345678901234567890abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyz&1234567890123456789012345678901234567890abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyz&1234567890123456789012345678901234567890abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyz&1234567890123456789012345678901234567890abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyz&";
Lose the stupid comment.
if (asyncbee.getStep() == 12) {
asyncbee.addPOSTdata(post_data);
You haven't written anything to post_data. Passing an empty array to the method seems pointless.