|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
|
|
Thread Tools | Rate Thread | Display Modes |
|
|
|
#1
|
||||
|
||||
|
Selecting Autonomous with TI LaunchPad?
Hi,
We are going to make a nice control box with random buttons and potentiometers using the TI MSP430 LaunchPad. We want to be able to select an autonomous mode with a dial using one of the potentiometers through the LaunchPad. The problem is, how do I send what the choice is to the robot if the LaunchPad is seen as a gamepad? Should I write a pygame script and use pynetworktables to send the choice from it? Or is there a much simpler way that I am overlooking? How do other teams do it? Any help would greatly be appreciated! |
|
#2
|
|||
|
|||
|
Re: Selecting Autonomous with TI LaunchPad?
You can just read the value of the "joystick axis" that corresponds to the potentiometer analog input and use that to determine the choice.
|
|
#3
|
||||
|
||||
|
Re: Selecting Autonomous with TI LaunchPad?
Why not simply use a multiposition button? They look like potentiometers but have different settings you can snap to rather than an analog output.
Apart from that, reading it as a joystick or just running some kind of direct voltage reading would work. |
|
#4
|
|||
|
|||
|
Re: Selecting Autonomous with TI LaunchPad?
This is how 1065 has selected auto modes for years now. 1 or 2 multi position dial and a toggle switch if needed. This year for instance we used the dial to select what we where driving over and position and then used a 3 position switch to determine if we would shoot high, low or do nothing once we got to the batter.
|
|
#5
|
||||
|
||||
|
Re: Selecting Autonomous with TI LaunchPad?
Quote:
NetworkTables would work just fine for sending the choice. Alternately your code could read the joystick axis in a periodic function, or in disabled, and then use the value from there in autonomous. |
|
#6
|
||||
|
||||
|
Re: Selecting Autonomous with TI LaunchPad?
At the beginning of autonomous, the FPGA latches the most recent joystick values received. So you can read joystick values in autonomous as long as you have set them properly before autonomous.
|
|
#7
|
|||
|
|||
|
Re: Selecting Autonomous with TI LaunchPad?
Quote:
(our biggest problem has been with the physical construction of our wiring to the buttons coming undone - we should redo it) |
|
#8
|
||||
|
||||
|
Re: Selecting Autonomous with TI LaunchPad?
Quote:
|
|
#9
|
|||||
|
|||||
|
Re: Selecting Autonomous with TI LaunchPad?
In the "old days" when the joystick values were all returned during autonomous as neutral with no buttons pressed, the typical tactic was for the user program to read and save the values while the robot was disabled before the match began, then use the saved values during autonomous. That is now done for you by the system.
|
|
#10
|
||||
|
||||
|
Re: Selecting Autonomous with TI LaunchPad?
Quote:
|
|
#11
|
||||
|
||||
|
Re: Selecting Autonomous with TI LaunchPad?
My team was considering doing this. Would the TI LaunchPad Evaluation kit work? Also, how would you make it work? Would you wire it to the RoboRio or to a different module?
|
|
#12
|
|||||
|
|||||
|
Re: Selecting Autonomous with TI LaunchPad?
Quote:
|
|
#13
|
|||
|
|||
|
Re: Selecting Autonomous with TI LaunchPad?
If you're open to an alternative method... We set our options this year by creating custom buttons/drop boxes on the dashboard. Our drive team would configure auto as required at the setup and network tables would sent the info to the robot. This can make things a tad simpler at times (we had at least three options to set this year).
|
|
#14
|
||||
|
||||
|
Re: Selecting Autonomous with TI LaunchPad?
Quote:
|
|
#15
|
|||
|
|||
|
Re: Selecting Autonomous with TI LaunchPad?
We put a multiposition selector switch right on the robot. It's a 12-position dial (with a nice solid click-click-click action) and a built in LED that lights up which position is selected. Internally it is a resistor ladder so you read it as an analog input on the RoboRio. Worked very well for us. The drive team literally dials in which autonomous they want to run before each match.
|
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|