BrightSign meets Arduino (TTL Serial Communication)
Hello Roku,
i ceceived my BrightSign HD410 and everything works fine, it starts a Projector via RS232 smoothly and plays content on the push of a button.
But now i want to control the Player via the 5V TTL serial port using a Atmel328 Microcontroller (Arduino) and cant get it working.
This ist the script on the Player:
1 serial = CreateObject("roSerialPort", 1, 9600) p = CreateObject("roMessagePort") serial.SetByteEventPort(p) serial.SetMode("8N1") gpio = CreateObject("roGpioControlPort") gpio.SetPort(p) i = CreateObject("roImagePlayer") i.DisplayFile("s0.jpg") wait_for_serial: msg = wait(0, p) if msg = &H00 then i.DisplayFile("s2.jpg") goto wait_for_serial endif if msg = &H01 then i.DisplayFile("s3.jpg") goto wait_for_serial endif if msg = &H02 then i.DisplayFile("s4.jpg") goto wait_for_serial endif if msg = &H03 then i.DisplayFile("s5.jpg") goto wait_for_serial endif i.DisplayFile("s1.jpg") goto wait_for_serial [/code] And this is the Code running on the Arduino Microcontroller: 1 void setup() { Serial.begin(9600); } void loop() { Serial.print(0x02, BYTE); delay(3000); } [/code]
The SetByteEventPort Event is thrown, but the content of the Byte is confused. They don't fit together. The SetLineEventPort does not work at all. Maybe the bytes that are sent are misinterpreted.
In this article they talked about the signals to be »inverted«
http://forums.roku.com/viewtopic.php?t=23094&highlight=both+serial+ports
In which way do they have to be inverted? What do the Stop-, Start and Databits actually look like, are they HIGH or LOW? Or do i have to use a special Baudrate?
It would be a great feature to get the Atmel working with the BrightSign player but at the moment you got me at a loss.