![]() |
Arduino Ethernet with roboRIO
2 years back, one of our mentors helped us to use network tables to have the cRIO talk to our Arduino Ethernet for controlling LEDs. We abandoned the project last year due to time, but this year we were hoping to have the same Arduino talk to the roboRIO, but we have not been able to find out how to do it, even after doing extensive research. Our java code can read the serial outputs from the Arduino, but we do not know how to have the Arduino read from our java code (we hope to have different LED patterns for certain situations such as autonomous or which alliance we are on).
If any of you guys have been able to do this with the roboRIO, help would be appreciated! Thanks. |
Re: Arduino Ethernet with roboRIO
We don't have any experience using a Ethernet interface on an Arduino for command and control. However, we are using a Arduino this year to control LEDs as well. Our implementation is fairly simple. We have 4 separate LED patterns which our Arduino can run. To tell the Arduino which pattern to show, we connected two digital outputs from the roboRIO to digital inputs on the Arduino.
The Arduino just monitors the digital inputs to see which LED pattern to show. We just use two DigitalOutput objects on the roboRIO side to tell the Arduino which pattern we want it to display. It's not the most sophisticated system, but it works well and is simple to implement when it's late in the season and you want to get your LEDs lit. Good Luck. |
Re: Arduino Ethernet with roboRIO
Quote:
Thanks in advance. |
Re: Arduino Ethernet with roboRIO
I didn't actually write the code on the LED side (we have a lot of kids on the team and gave that task to a group of them).
However, I'm pretty sure the following code fragment demonstrates how to detect the current LED mode (4 choices: 0, 1, 2 and 3) and whether the mode has just changed: Code:
// Change to the I/O pins you used |
| All times are GMT -5. The time now is 08:59 AM. |
Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi