propeller to arduino serial communication
chronoglass
Posts: 15
in Propeller 1
So i've done some searching, but not running across anything useful(for me)
http://forums.parallax.com/discussion/159939/wanting-to-pass-info-from-arduino-to-prop
is an example
basically it's SEEMING like it's
arduino tx -> 3.9k+ res -> chosen rx port on PAB
arduino rx -> chosen tx port on PAB
ground to ground
make sure the speeds are the same and go for it!
what I'm seeing however is that the arduino "hears" the PAB, but the PAB is getting garbage back from the arduino.
on the PAB side I am using code that is known to be able to chat with another propeller board
long version available from the creators repo
https://github.com/chrisl8/ArloBot/blob/master/Propeller C Code for ArloBot/ROS Interface for ArloBot.c
short version
duino code:
full available at my github here: https://github.com/chronoglass/arlo-arduino-sensor_board/blob/master/ArlobotSensors-0.3.ino
retVal is a string
each of the formats are strings
i is an int
pcm is an int
anyone have any guesses on what i might be checking?
I'll be searching for any line noise in the time being, haha
http://forums.parallax.com/discussion/159939/wanting-to-pass-info-from-arduino-to-prop
is an example
basically it's SEEMING like it's
arduino tx -> 3.9k+ res -> chosen rx port on PAB
arduino rx -> chosen tx port on PAB
ground to ground
make sure the speeds are the same and go for it!
what I'm seeing however is that the arduino "hears" the PAB, but the PAB is getting garbage back from the arduino.
on the PAB side I am using code that is known to be able to chat with another propeller board
long version available from the creators repo
https://github.com/chrisl8/ArloBot/blob/master/Propeller C Code for ArloBot/ROS Interface for ArloBot.c
short version
propterm = fdserial_open(QUICKSTART_RX_PIN, QUICKSTART_TX_PIN, 0, 115200); while (1) { pause(10); dprint(propterm, "i"); if (fdserial_rxReady(propterm) != 0) { count = 0; while (count < bufferLength) { buf[count] = readChar(propterm); if (buf[count] == '.') break; count++; } if (buf[0] != 'p' && buf[0] != 'i') dprint(term, "%c\n", buf[0]); }
duino code:
full available at my github here: https://github.com/chronoglass/arlo-arduino-sensor_board/blob/master/ArlobotSensors-0.3.ino
setup : Serial.begin(115200); retVal = retValFormat1+i+retValFormat2+pcm+retValFormat3; Serial.print(retVal);
retVal is a string
each of the formats are strings
i is an int
pcm is an int
anyone have any guesses on what i might be checking?
I'll be searching for any line noise in the time being, haha
Comments
halving the speed seems to make everything great.. must be noise, or the duino having an issue with the speed.
It gets much easier to run down problems if you have a good series of test proceedures.
1. Test a loop back of each device.
2. Test a loop back that includes the cable.
3. If failures have not been located, try a slower baud rate until you get one that works well.
then on a whim i decided to use the software serial library, rather than letting hardware handle it, and moving over to pins 10 and 11 I can reliably get 115200 now.. the rest of the circuit remained the same.