Go to Post I highly doubt the game has anything to do with water... - rotolomi [more]
Home
Go Back   Chief Delphi > Technical > Programming
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Closed Thread
 
Thread Tools Rating: Thread Rating: 2 votes, 5.00 average. Display Modes
  #1   Spotlight this post!  
Unread 23-02-2015, 19:51
Katie_UPS's Avatar
Katie_UPS Katie_UPS is offline
Registered User
AKA: Katie Widen
no team
Team Role: Engineer
 
Join Date: Feb 2008
Rookie Year: 2008
Location: Wisconsinite lost in Texas
Posts: 957
Katie_UPS has a reputation beyond reputeKatie_UPS has a reputation beyond reputeKatie_UPS has a reputation beyond reputeKatie_UPS has a reputation beyond reputeKatie_UPS has a reputation beyond reputeKatie_UPS has a reputation beyond reputeKatie_UPS has a reputation beyond reputeKatie_UPS has a reputation beyond reputeKatie_UPS has a reputation beyond reputeKatie_UPS has a reputation beyond reputeKatie_UPS has a reputation beyond repute
Re: Issues with Serial Comm roboRio to RioDuino

I haven't used this set up before, but I've done a serial thing or two before. I found the WPI Library so I'm just going off that and what I know.

readString takes in the number of characters to read, not bytes, which is probably a non-issue, but I recommend using it without any parameters to see if there is more in the buffer for some reason. For troubleshooting, the writeString function returns the number of bytes written. I recommend printing that out.
  #2   Spotlight this post!  
Unread 23-02-2015, 20:01
seg9585's Avatar
seg9585 seg9585 is offline
Registered User
AKA: Eric
FRC #4276 (Surf City Vikings)
Team Role: Engineer
 
Join Date: Feb 2006
Rookie Year: 2001
Location: Boeing (Seal Beach, CA)
Posts: 520
seg9585 has a reputation beyond reputeseg9585 has a reputation beyond reputeseg9585 has a reputation beyond reputeseg9585 has a reputation beyond reputeseg9585 has a reputation beyond reputeseg9585 has a reputation beyond reputeseg9585 has a reputation beyond reputeseg9585 has a reputation beyond reputeseg9585 has a reputation beyond reputeseg9585 has a reputation beyond reputeseg9585 has a reputation beyond repute
Re: Issues with Serial Comm roboRio to RioDuino

Quote:
Originally Posted by Katie_UPS View Post
I haven't used this set up before, but I've done a serial thing or two before. I found the WPI Library so I'm just going off that and what I know.

readString takes in the number of characters to read, not bytes, which is probably a non-issue, but I recommend using it without any parameters to see if there is more in the buffer for some reason. For troubleshooting, the writeString function returns the number of bytes written. I recommend printing that out.
I use the defaults on both sides. I know the arduino is no parity, 1 stop bit. I don't know what the default is on the roboRio. If it's different I could definitely envision some issues. Any idea what the roboRio defaults are?

The characters are ASCII characters, which is in itself a single byte per character. For readString, if I removed the numBytes param, I get the same value repeating many times (as expected -- I output the variable to serial on the arduino at 10Hz with no newline and no spaces).

Will look at the writeString function return, but not sure what it would tell me -- if more than 1 byte written, *why*? If exactly 1 byte written, what I expect but still no solution to this issue. All the values I see are between 0 and 255 so I know I'm pretty sure they're 1 byte in length
__________________
My FIRST legacy:

Team 204 Student 2001, 2002 (Voorhees, NJ)
Team 1493 College Mentor 2006 - 2008 (Troy, NY)
Team 2150 Intern/Professional Mentor 2007, 2009 (Palos Verdes)
Team 4123 Lead Engineering Mentor 2012 (Bellflower, CA)
Team 4276 Engineering Mentor 2012-2016 (Huntington Beach, CA)
  #3   Spotlight this post!  
Unread 23-02-2015, 20:44
Katie_UPS's Avatar
Katie_UPS Katie_UPS is offline
Registered User
AKA: Katie Widen
no team
Team Role: Engineer
 
Join Date: Feb 2008
Rookie Year: 2008
Location: Wisconsinite lost in Texas
Posts: 957
Katie_UPS has a reputation beyond reputeKatie_UPS has a reputation beyond reputeKatie_UPS has a reputation beyond reputeKatie_UPS has a reputation beyond reputeKatie_UPS has a reputation beyond reputeKatie_UPS has a reputation beyond reputeKatie_UPS has a reputation beyond reputeKatie_UPS has a reputation beyond reputeKatie_UPS has a reputation beyond reputeKatie_UPS has a reputation beyond reputeKatie_UPS has a reputation beyond repute
Re: Issues with Serial Comm roboRio to RioDuino

Quote:
Originally Posted by seg9585 View Post
I use the defaults on both sides. I know the arduino is no parity, 1 stop bit. I don't know what the default is on the roboRio. If it's different I could definitely envision some issues. Any idea what the roboRio defaults are?
The WPI Library here says that it defaults at no parity and 1 stop bit, so that can't be it.

You eliminated all of my initial hunches, so I'm out of ideas. I guess post more information if you have any, and hopefully someone else will be able to help.
  #4   Spotlight this post!  
Unread 23-02-2015, 21:11
Alan Anderson's Avatar
Alan Anderson Alan Anderson is offline
Software Architect
FRC #0045 (TechnoKats)
Team Role: Mentor
 
Join Date: Feb 2004
Rookie Year: 2004
Location: Kokomo, Indiana
Posts: 9,113
Alan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond repute
Re: Issues with Serial Comm roboRio to RioDuino

If you remove the Arduino and tie the MXP TX and RX pins together, do you get back what you send on the roboRIO?

Do both devices agree on the voltages being used for 1s and 0s?
  #5   Spotlight this post!  
Unread 24-02-2015, 00:30
seg9585's Avatar
seg9585 seg9585 is offline
Registered User
AKA: Eric
FRC #4276 (Surf City Vikings)
Team Role: Engineer
 
Join Date: Feb 2006
Rookie Year: 2001
Location: Boeing (Seal Beach, CA)
Posts: 520
seg9585 has a reputation beyond reputeseg9585 has a reputation beyond reputeseg9585 has a reputation beyond reputeseg9585 has a reputation beyond reputeseg9585 has a reputation beyond reputeseg9585 has a reputation beyond reputeseg9585 has a reputation beyond reputeseg9585 has a reputation beyond reputeseg9585 has a reputation beyond reputeseg9585 has a reputation beyond reputeseg9585 has a reputation beyond repute
Re: Issues with Serial Comm roboRio to RioDuino

Quote:
Originally Posted by Alan Anderson View Post
If you remove the Arduino and tie the MXP TX and RX pins together, do you get back what you send on the roboRIO?

Do both devices agree on the voltages being used for 1s and 0s?
Alan --
Good tips so far, I tied the TX and RX pins together and got the data I was expecting on the roboRio, so that's a good sign. Regarding voltages, the roboRio and Arduino are both running off the battery. When I plugged my laptop in to view Serial output data, I grounded the rioDuino to the roboRio grounds to ensure consistency

Still no luck on reading serial data on the rioDuino though -- using the same roboRio code above (works correctly when shorting the Tx/Rx), I get gibberish from the Serial.read() in the arduino code, mostly values of "255" or "204", etc. Serial.ParseInt(); returns nothing as well if I send a single integer
__________________
My FIRST legacy:

Team 204 Student 2001, 2002 (Voorhees, NJ)
Team 1493 College Mentor 2006 - 2008 (Troy, NY)
Team 2150 Intern/Professional Mentor 2007, 2009 (Palos Verdes)
Team 4123 Lead Engineering Mentor 2012 (Bellflower, CA)
Team 4276 Engineering Mentor 2012-2016 (Huntington Beach, CA)
Closed Thread


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -5. The time now is 01:44.

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi