Go to Post Maybe it just seemed like five hours...I had freshmen in my vehicle! - Qbot2640 [more]
Home
Go Back   Chief Delphi > Technical > Programming
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Closed Thread
 
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 04-02-2016, 12:02
Team DRIFT Team DRIFT is offline
Registered User
FRC #4091
 
Join Date: Jan 2015
Location: Santo Domingo, Dominican Republic
Posts: 20
Team DRIFT is an unknown quantity at this point
How to Write From SmartDashboard

This sounds like a really stupid question, and it is. Quite simply, we can't figure out how to use the SmartDashboard to input information into our program. Our SmartDashboard.putNumber() works perfectly fine, but when we try using the .getNumber() or .getBoolean(), or any of the gets, nothing happens. If we don't set a default value, no value is set.

For printing on the SmartDashboard, we are simply using the methods in our code, and the corresponding widgets are automatically created.
  #2   Spotlight this post!  
Unread 04-02-2016, 12:21
Ben Wolsieffer Ben Wolsieffer is offline
Dartmouth 2020
AKA: lopsided98
FRC #2084 (Robots by the C)
Team Role: Alumni
 
Join Date: Jan 2011
Rookie Year: 2011
Location: Manchester, MA (Hanover, NH)
Posts: 520
Ben Wolsieffer has much to be proud ofBen Wolsieffer has much to be proud ofBen Wolsieffer has much to be proud ofBen Wolsieffer has much to be proud ofBen Wolsieffer has much to be proud ofBen Wolsieffer has much to be proud ofBen Wolsieffer has much to be proud ofBen Wolsieffer has much to be proud of
Re: How to Write From SmartDashboard

You have to first put the value to the SmartDashboard before you can get its updated value. So, you call SmartDashboard.putNumber("this is a number", some_default_value), which causes the field to appear on the SmartDashboard. Then you can edit this number in the SmartDashboard GUI, and when you call SmartDashboard.getNumber("this is a number"), it will return the updated value.
__________________



2016 North Shore District - Semifinalists and Excellence in Engineering Award
2015 Northeastern University District - Semifinalists and Creativity Award
2014 Granite State District - Semifinalists and Innovation in Control Award
2012 Boston Regional - Finalists
  #3   Spotlight this post!  
Unread 04-02-2016, 22:13
snekiam snekiam is offline
Registered User
FRC #3322 (Eagle Imperium)
Team Role: Programmer
 
Join Date: Dec 2015
Rookie Year: 2010
Location: SE Michigan
Posts: 91
snekiam has a spectacular aura aboutsnekiam has a spectacular aura aboutsnekiam has a spectacular aura about
Re: How to Write From SmartDashboard

You also may need to hit tab for the value to be set in the dashboard
  #4   Spotlight this post!  
Unread 05-02-2016, 12:10
Team DRIFT Team DRIFT is offline
Registered User
FRC #4091
 
Join Date: Jan 2015
Location: Santo Domingo, Dominican Republic
Posts: 20
Team DRIFT is an unknown quantity at this point
Re: How to Write From SmartDashboard

We got it to work! Thanks, lopsided98. That was extremely simple, but we tried so hard to figure it out. You made our lives a lot easier.
Closed Thread


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -5. The time now is 00:42.

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


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