|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
| Thread Tools | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
Getting data from RoboRealm into C++
We're trying to create a targeting program for this year's competition using RoboRealm. We have been able to create a .robo that accurately reads distance from a hot goal. It includes the Network_Tables layer and we have told it to send our value for distance to the SmartDashboard according to this guide:
http://www.roborealm.com/help/Network_Tables.php We didn't have any success with this tutorial or any of the others we found. Have any of you been able to get values from RoboRealm into C++ code? Are there any good tutorials out there? |
|
#2
|
||||
|
||||
|
Re: Getting data from RoboRealm into C++
As soon as RoboRealm starts putting values on the Network Tables, then you should see them on the SmartDashboard. Once it's displayed on the SmartDashboard, all you have to do is use this line of code:
Code:
SmartDashboard::GetNumber("YOUR_VARIABLE_NAME");
Code:
double distance = SmartDashboard::GetNumber("DISTANCE");
|
|
#3
|
|||
|
|||
|
This is for java but should be easy to translate. http://wpilib.screenstepslive.com/s/...with-roborealm
|
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|