|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
| Thread Tools | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
Adding a sensor reading to the dashboard
How would I add a numeric indicator to the dashboard that would read the distance from an ultrasonic sensor? I can program the sensor itself I just have no idea how to make a visible reading for it.
|
|
#2
|
|||
|
|||
|
Re: Adding a sensor reading to the dashboard
Or do I even have to change/add anything for the dashboard? If I don't I think I figured out how it works
|
|
#3
|
|||||
|
|||||
|
Re: Adding a sensor reading to the dashboard
The default project has examples in Teleop.vi
These are all writes that are sending values to the Dashboard.
|
|
#4
|
|||
|
|||
|
Quote:
Ok but how would I make, like an ultrasonic sensor appear on the dashboard, I've been trying to make it work with a custom dashboard but I have no idea what I'm doing on the custom dashboard, any ideas? |
|
#5
|
|||
|
|||
|
Re: Adding a sensor reading to the dashboard
Use SD Write Value to send the value to the dashboard. It will show up under the Variables tab without having to change it. If you want it displayed, create an indicator with the same name as you gave the SD Write Value.
|
|
#6
|
|||||
|
|||||
|
Re: Adding a sensor reading to the dashboard
Here's an example:
The left screenshot is of Periodic Tasks in the default robot code. The right screenshot is of the default Dashboard front panel and block diagram. Last edited by Mark McLeod : 31-01-2015 at 12:22. |
|
#7
|
|||
|
|||
|
Re: Adding a sensor reading to the dashboard
Awesome! Thank you both very much!
|
|
#8
|
|||
|
|||
|
Actually wait, how would I wire the indicator in the custom dashboard?
|
|
#9
|
|||||
|
|||||
|
Re: Adding a sensor reading to the dashboard
No wiring is actually required.
Just the name has to exactly match. You can see "My Number" on the bottom right of the Dashboard block diagram and that's all that is needed. If you want to, you can explicitly read the value (just the opposite of the Write) and wire the read to the indicator. |
|
#10
|
|||
|
|||
|
Re: Adding a sensor reading to the dashboard
Quote:
|
|
#11
|
|||
|
|||
|
Re: Adding a sensor reading to the dashboard
Quote:
|
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|