Hello guys and gals!
I'm facing a bit of a problem here with my Mac. I installed the FTDI drivers so I could use the Arduino software, but something very very strange is happening.
I can write to the Serial /dev/tty.somethinghere and the Arduino responds well, but I can't Read from it. Any signals from the Arduino are not shown back.
Did anyone face something like that?
I'm having a really hard time here... and the exact same issue happens to the PL2303 adapter I have... if I connect it to an 3COM router, it will send commands to it, but no response at all will be shown back.
HOW are you reading/writing to the Arduino?
In the Arduino I made an very simple program that opens the serial ( Serial.begin (9600) in the Setup() ) and if it gets anything during the loop, it prints it to the same serial:
if (Serial.available() > 0){
iByte = Serial.Read();
Serial.println(iByte, DEC);
}
If I plug the Arduino to an Windows Machine, open the Hyper Terminal and connect to the Arduino trough 9600 8N1, and then press some keys it will return me the ASCII code for that key on the Hyper Terminal screen.
In the Mac I'm using Screen (terminal app) to connect to the Arduino using 9600bps. If I press some keys, I'll get nothing as response.
I then tried to put an LED on pin 13 and 12 and added some code to turn it on when receiving/sending data from/to the Serial. Turns out the LED blinks showing me the Arduino is getting the message and sending something back (as I can see in the Windows machine), but in the Mac the screenk stays blank :o
I can't even upload software to the Arduino trough the MAC (I think it's because that issue), but I can do it from the PC using the same cable and stuff.
By the way.. to be sure that the Arduino is getting the correct data from the Mac, I put some logic in the software to recognize keystrokes and turn on/off some LEDs, so I'm sure the Arduino IS getting right what I'm typing from the Mac.
You dont need this...
if (Serial.available() > 0)
..only this...
if (Serial.available())
What happens if you send a character using the Serial Monitor in the Arduino IDE?
If it's in Windows, it will work just fine: blink the LEDs for seding/receiving data, turn on the LED I sent the command to and return and print in the console the ASCII value.
If it's in the Mac, just blank screen :-/