![]() |
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.
|
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
|
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.
|
Re: Adding a sensor reading to the dashboard
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? |
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.
|
Re: Adding a sensor reading to the dashboard
2 Attachment(s)
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. |
Re: Adding a sensor reading to the dashboard
Quote:
|
Re: Adding a sensor reading to the dashboard
Quote:
|
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. |
Re: Adding a sensor reading to the dashboard
Quote:
|
Re: Adding a sensor reading to the dashboard
Quote:
|
| All times are GMT -5. The time now is 08:52. |
Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi