Skip to content

Instantly share code, notes, and snippets.

@chaeplin
Created February 5, 2016 00:29
Show Gist options
  • Select an option

  • Save chaeplin/fb39deae2a9c2986246a to your computer and use it in GitHub Desktop.

Select an option

Save chaeplin/fb39deae2a9c2986246a to your computer and use it in GitHub Desktop.
struct data_size
typedef struct {
uint32_t _salt;
uint16_t volt;
int16_t data1;
int16_t data2;
uint8_t devid;
} data;
data sensor_data;
void setup() {
Serial.begin(115200);
Serial.println("");
Serial.println(sizeof(sensor_data));
}
void loop() {
}
@chaeplin

chaeplin commented Feb 5, 2016

Copy link
Copy Markdown
Author

me-no-dev:
AVR is 8 bit
ESP is 32bit
on the esp it goes in 4 byte steps.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment