I’m having trouble communicating over serial with my Viewsonic projector and photon. I have a sparkfun RS232 shifter wired between the projector’s RS232 port and the hardware serial pins on the photon. The documentation is fairly sparse and a bit confusing to me:
Here are the bits of code that I think are relevant. I’m just trying to send the Power On command. The documentation does describe the serial parameters and they are the defaults apart from the baud rate.
byte onMsg[10] = {0x06, 0x14, 0x00, 0x04, 0x00, 0x34, 0x11, 0x00, 0x00, 0x5D};
Setup:
Serial1.begin(115200);
Triggering:
if (!strcmp(p, "ON")){
delay(500);
Serial1.write(onMsg, 10);
delay(500);
RGB.color(0, 255, 0);
I know the photon is sending some signal because a) the led turns green and b) the leds on the RS232 shifter data lines blink.
Am I writing the bytes correctly? Anything else I could be doing wrong? I wish I could test this independently but I don’t have a usb converter laying around.