mod edit (@harrisonhjones): Solution: See next post down
Hi!
Trying to pass a pointer to an array but I only get the fist 4 elements in the array. I’m going crazy trying to debug this…
unsigned int DAIKIN_OFF[] = {9996, 25068, 3488, 1716, 444, 1288, 456, 408, 452, 416, 444, 424, 448};
void setup() {
}
void sendIR(unsigned int *IR_OUT) {
// This returns correct "52"
Particle.publish("DAIKIN_OFF", String(sizeof(DAIKIN_OFF), DEC));
// This only returns "4"
Particle.publish("IR_OUT", String(sizeof(IR_OUT), DEC));
}
void loop() {
sendIR(DAIKIN_OFF);
delay(5000);
}