I'm going to be writing an NTP client of sorts and I'm wondering the endianness of arduino. I wrote a test sketch to check endianness but I wont be able to run it until tomorrow when I get home :-/
void setup () {
Serial.begin(9600);
uint8_t packet_buffer[64];
uint8_t packet_buffer_len=48;
uint32_t* variable = (uint32_t*)(packet_buffer);
memcpy(packet_buffer,"\x24\x02\x04\xee\0\0\x29\x2c\0\0\x04\x4f\x11\x48\x85\x36\xca\xc2\x2f\xc7\x2a\x03\x92\x5b\0\0\0\0\0\0\0\0\xca\xc2\x30\x3c\xf5\x0a\xcc\x0b\xca\xc2\x30\x3c\xf5\x0f\x62\x73",48);
uint32_t timestamp = ((packet_buffer[40] << 24) + (packet_buffer[41] << 16) + (packet_buffer[42] << 8) + (packet_buffer[43]));
Serial.print("Machine Endian: ");
Serial.println(variable[10],DEC);
Serial.println(variable[10],HEX);
Serial.print("Big Endian: ");
Serial.println(timestamp,DEC);
Serial.println(timestamp,HEX);
}
void loop() {
}