Hello ladies and gentleman,
i looking for an answer of my problem. I want to control a Nec Beamer with a Arduino – Power On / Off. So i bought a RS232 to TTL Converter at Amazon and connected it with my Arduino. But it seems that it doesn't works. I don't know why.
I tested it with a USB-RS232-Adapter and CoolTerm for OSX and sended the HEX-String "02 00 00 00 00 02" for Power ON and "02 01 00 00 00 03" for Power OFF – It works (send_data_usbadapter_to_projector _ WORKS).
When i connect my Arduino over RS232 to my RS232-USB-Adapter, it receives Data like in the attachment (send_data_arduino_to_usbadapter.png): 200002200002200002
Because it is a Loop, see the Arduino-Code:
#include <SoftwareSerial.h>
const int rx = 10; // rx pin of Arduino, SO(serial out)of TRex.
const int tx = 11; // tx pin of Arduino, SI(serial in)of TRex.SoftwareSerial mySerial (rx, tx); // RX to SO of Trex, TX to SI of Trex
void setup() {
Serial.begin(9600);
mySerial.begin(9600);}
void loop() {
delay(1000);
mySerial.print(0x02,HEX);
mySerial.print(0x00,HEX);
mySerial.print(0x00,HEX);
mySerial.print(0x00,HEX);
mySerial.print(0x00,HEX);
mySerial.print(0x02,HEX);delay(1000);
if (mySerial.peek() == -1) {
Serial.println("no response");
}
while (mySerial.peek() != -1) {
Serial.println(mySerial.read());
}
}
I also tested it with Serial.print and the RX, TX-Pins, but it doesn't work to.
Who knows the problem and help me? ![]()
Best regards
Benni

