Hi,
I have a strange problem on a simple code. I try to send an ir hex code(in pronto format) to trigger shutter on a sony camera. I found a library here which seems to do the job, the code below work good for the first send however when I try again nothing happen. Using my cellphone camera to see if the ir on my board effectively working I notice that the first burst is sent correctly and triggers my camera however next bursts are shorter like if no data were transmitted...
Is anything wrong with my code? Did anyone have successfully use this library before?
#include <Pronto.h>
Pronto pronto(9);
uint16_t shutter[46] = {0x0000, 0x0068, 0x0000, 0x0015, 0x0060, 0x0018, 0x0030, 0x0018, 0x0018, 0x0018, 0x0030, 0x0018, 0x0030, 0x0018, 0x0018, 0x0018, 0x0030, 0x0018, 0x0018, 0x0018, 0x0018, 0x0018, 0x0030, 0x0018, 0x0018, 0x0018, 0x0030, 0x0018, 0x0030, 0x0018, 0x0030, 0x0018, 0x00018, 0x0018, 0x0018, 0x0018, 0x0018, 0x0018, 0x0030, 0x0018, 0x0030, 0x0018, 0x0030, 0x0018, 0x0030, 0x01C8};
int switchState;
void setup() {
pinMode(2, INPUT);
}
void loop() {
switchState = digitalRead(2);
if (switchState == HIGH) {
pronto.ir_start(shutter);
}
}
Thanks for your help!