Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   C/C++ (http://www.chiefdelphi.com/forums/forumdisplay.php?f=183)
-   -   Getting data from RoboRealm into C++ (http://www.chiefdelphi.com/forums/showthread.php?t=126532)

EmmettNervend 15-02-2014 19:16

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?

bvisness 16-02-2014 19:31

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");
So in your case, it would probably be something like:

Code:

double distance = SmartDashboard::GetNumber("DISTANCE");

BradAMiller 23-02-2014 08:56

This is for java but should be easy to translate. http://wpilib.screenstepslive.com/s/...with-roborealm


All times are GMT -5. The time now is 12:11.

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