Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   Control System (http://www.chiefdelphi.com/forums/forumdisplay.php?f=177)
-   -   Using the TI LaunchPad from your KoP (http://www.chiefdelphi.com/forums/showthread.php?t=132061)

ILAMtitan 01-04-2015 01:46 PM

Using the TI LaunchPad from your KoP
 
As many readers here at CD may know, Texas Instruments is a diamond level supplier to FIRST, but you haven’t seen our name in your KoP before. TI works hard in the background to supply the silicon that goes into the control systems components, but we wanted to put our technology directly into your hands this year. To this end, we've included a new MSP430 LaunchPad in every single KoP.

Now, you can go ahead and use it for whatever you like (plenty of examples and information avaliable here: http://www.ti.com/ww/en/launchpad/launchpad.html), but our flagship purpose for this year is as a custom operator interface for your driver’s station. A solution was developed by software engineers at TI so that all you have to do is flash the board, and it will show up as a USB HID Gamepad, ready for input. This has been fully tested and vetted by our best guys, so you know it won’t stop working in the middle of a match.

We also worked closely with NI to make sure that it’s as easy as possible for you to get started, and get some cool new features out of it. You may have already noticed the “Game Pad Tool” in your NI update. This is a dedicated application to make programming easy; just select your pinout and hit program, no additional downloads needed.

Our engineers also worked with NI to add digital outputs to the HID specification available to you via the driver station. You can now use the LaunchPad to set digital indicators or anything else you can think of, straight from the driver’s station using new WPILib API calls.

Since there is a limit to the number of pins available, we worked out three configurations that should have you guys covered:
  1. 8x analog, 11 digital inputs, and 11 digital outputs,
  2. 8x analog, 16 digital inputs, and 6 digital outputs,
  3. 8x analog, 20 digital inputs, and 2 digital outputs
Feel free to let us know if you want something else though.

For more information on the solution, with some fun examples of what you can do with a custom operator’s interface, check out our wiki page here: http://processors.wiki.ti.com/index....cs_Competition

In addition to our activity here on CD, we’ve also set up a dedicated FRC support hotline that will let you contact TI engineers directly at FRCSupport@list.ti.com. Everyone on this list is not only a TI engineer, but also a dedicated FRC mentor, so try not to send us too many emails during week 6 :)

We have a lot of other ideas for using the LaunchPad on your robots as well (an LED controller is at the top of our list) so keep an eye out for more examples to come!

billbo911 01-04-2015 02:12 PM

Re: Using the TI LaunchPad from your KoP
 
FIRST off, thank you!

We on 2073 love to do custom controls, this will give us a FANTASTIC option to add to our bag if tricks.

Is there a way we can get a second, or even third, board? We often build multiple identical robots, and having two, or more, identical drivers stations would be an added bonus.

taichichuan 01-04-2015 02:52 PM

Re: Using the TI LaunchPad from your KoP
 
Here at FRC 116, we implement custom OI controls for each of our robots over the past several years. We find that it's more effective to have a dedicated switch labeled "Deploy" than it is to try to remember which button on a joystick is mapped to the same feature. So, during the beta test cycle, the ability to create outputs ala LEDs was one of the many questions that got submitted.

Thank you for working with NI to make this happen.

Mike

ILAMtitan 01-04-2015 05:48 PM

Re: Using the TI LaunchPad from your KoP
 
Quote:

Originally Posted by billbo911 (Post 1421089)
FIRST off, thank you!

We on 2073 love to do custom controls, this will give us a FANTASTIC option to add to our bag if tricks.

Is there a way we can get a second, or even third, board? We often build multiple identical robots, and having two, or more, identical drivers stations would be an added bonus.

The easiest option would probably be to get extras from the TI e-store ( https://store.ti.com/msp-exp430f5529lp.aspx ) since we have free shipping. Since the LaunchPad isn't a dedicated FIRST part, you can rest assured that we will not run out of stock. If you do have problems purchasing extras (we know how hard purchasing can be from a school account), feel free to drop me a PM or email our support list and we'll see what we can do.

taichichuan 01-05-2015 09:02 AM

Re: Using the TI LaunchPad from your KoP
 
Quote:

Originally Posted by ILAMtitan (Post 1421277)
The easiest option would probably be to get extras from the TI e-store ( https://store.ti.com/msp-exp430f5529lp.aspx ) since we have free shipping. Since the LaunchPad isn't a dedicated FIRST part, you can rest assured that we will not run out of stock. If you do have problems purchasing extras (we know how hard purchasing can be from a school account), feel free to drop me a PM or email our support list and we'll see what we can do.

We've already got a couple more on order from the TI store. We're looking forward to getting some cool controls whipped up as soon as the build team figures out what we're controlling.

billbo911 01-05-2015 11:13 AM

Re: Using the TI LaunchPad from your KoP
 
Quote:

Originally Posted by ILAMtitan (Post 1421277)
The easiest option would probably be to get extras from the TI e-store ( https://store.ti.com/msp-exp430f5529lp.aspx ) since we have free shipping. Since the LaunchPad isn't a dedicated FIRST part, you can rest assured that we will not run out of stock. If you do have problems purchasing extras (we know how hard purchasing can be from a school account), feel free to drop me a PM or email our support list and we'll see what we can do.

2 more ordered last night. 1 for our second DS, and one for ...... well...... me to play with.
Uhhhh, I mean, to experiment with so that we can get even better at utilizing it's possibilities. Yeah, that's my story and I'm sticking to it.

ILAMtitan 01-05-2015 02:08 PM

Re: Using the TI LaunchPad from your KoP
 
Awesome to hear you guys are jumping right in!

I know it's robot season, so there isn't much time left over for personal tinkering, but the community over at 43oh is a really great resource for people starting out. You might want to check out their projects forum for some ideas on what the board can do.

taichichuan 01-05-2015 02:45 PM

Re: Using the TI LaunchPad from your KoP
 
Quote:

Originally Posted by ILAMtitan (Post 1422057)
Awesome to hear you guys are jumping right in!

I know it's robot season, so there isn't much time left over for personal tinkering, but the community over at 43oh is a really great resource for people starting out. You might want to check out their projects forum for some ideas on what the board can do.

Personal time during build season? What's that? ;-). But, I will cruise over to the link and have a look. In the mean time, I'm trying to find info on the HID output features. Not much available in the docs so far. So, it looks like it's going to be interesting to noodle it out.

How can you tell the pioneers? They're the ones with the arrows in their backs. :yikes:

ILAMtitan 01-05-2015 03:25 PM

Re: Using the TI LaunchPad from your KoP
 
Quote:

Originally Posted by taichichuan (Post 1422098)
Personal time during build season? What's that? ;-). But, I will cruise over to the link and have a look. In the mean time, I'm trying to find info on the HID output features. Not much available in the docs so far. So, it looks like it's going to be interesting to noodle it out.

How can you tell the pioneers? They're the ones with the arrows in their backs. :yikes:

What additional information are you looking for?

Currently, the output is just driving a pin high (3.3V) or low from the MSP430. Essentially, you can set it in WPILib, and it will get transferred to the HID device on the following USB poll cycle (every 20ms). I'll get my software cohort to elaborate a bit more for you guys on this.

The max a single pin can source is 10mA, and the device total is 100mA.

When I made the example panels on the wiki, I just used the indicator pins output to directly drive the LEDs. No problems so far.

wt200999 01-05-2015 03:39 PM

Re: Using the TI LaunchPad from your KoP
 
1 Attachment(s)
Quote:

Originally Posted by taichichuan (Post 1422098)
In the mean time, I'm trying to find info on the HID output features. Not much available in the docs so far. So, it looks like it's going to be interesting to noodle it out.

On the robot side I have only had a chance to work with the LabVIEW WPILib API, but I assume it is similar in both Java and C++. The idea is you pass a boolean array to WPI_JoystickSetOutput.vi which is sent to the LaunchPad, which then sets/clears the appropriate indicator. See attached from the LabVIEW context help (you can ignore the rumble outputs).

If you load one of the three default firmware images it becomes straight forward to set/clear the indicator outputs using the API, which you can then use to drive an LED or other indicator.

In addition, we are working on the documentation for the source code provided on our github page, beyond what is commented in the code (including setup instructions). So if you want to do something else with the output data outside of what the 3 preconfigured binaries provide, you can.

Joe Ross 01-05-2015 03:47 PM

Re: Using the TI LaunchPad from your KoP
 
Quote:

Originally Posted by taichichuan (Post 1422098)
In the mean time, I'm trying to find info on the HID output features. Not much available in the docs so far.:

Look in the Joystick class, SetOutput and SetOutputs.

taichichuan 01-05-2015 03:56 PM

Re: Using the TI LaunchPad from your KoP
 
Quote:

Originally Posted by Joe Ross (Post 1422137)
Look in the Joystick class, SetOutput and SetOutputs.

Thanks! I'll take a look at that.

sanddrag 01-05-2015 04:09 PM

Re: Using the TI LaunchPad from your KoP
 
Thank you TI! As the lead mentor of a team who experienced losing a match in the elimination rounds due to a different product with a similar function flaking out on us, I am very glad to see this change. Having a well-vetted board for custom driver station inputs included in the KOP is something I mentioned for briefly to one of the FIRST personnel at the event and he put it in his notes, and it's something I mentioned for again in the end-of-season survey.

I'm not sure if others lobbied for this to happen, but I feel like my detailed suggestions to FIRST on the matter were given very serious and detailed consideration, and FIRST and TI acted on those suggestions.

It's nice to feel as if I've influenced positive changes in FIRST on a global scale.

Thank you FIRST and TI!

billbo911 01-08-2015 10:12 AM

Re: Using the TI LaunchPad from your KoP
 
Quote:

Originally Posted by ILAMtitan (Post 1421065)
As many readers here at CD may know, Texas Instruments is a diamond level supplier to FIRST, but you haven’t seen our name in your KoP before. TI works hard in the background to supply the silicon that goes into the control systems components, but we wanted to put our technology directly into your hands this year. To this end, we've included a new MSP430 LaunchPad in every single KoP.

Now, you can go ahead and use it for whatever you like (plenty of examples and information avaliable here: http://www.ti.com/ww/en/launchpad/launchpad.html), but our flagship purpose for this year is as a custom operator interface for your driver’s station. A solution was developed by software engineers at TI so that all you have to do is flash the board, and it will show up as a USB HID Gamepad, ready for input. This has been fully tested and vetted by our best guys, so you know it won’t stop working in the middle of a match.

We also worked closely with NI to make sure that it’s as easy as possible for you to get started, and get some cool new features out of it. You may have already noticed the “Game Pad Tool” in your NI update. This is a dedicated application to make programming easy; just select your pinout and hit program, no additional downloads needed.

Our engineers also worked with NI to add digital outputs to the HID specification available to you via the driver station. You can now use the LaunchPad to set digital indicators or anything else you can think of, straight from the driver’s station using new WPILib API calls.

Since there is a limit to the number of pins available, we worked out three configurations that should have you guys covered:
  1. 8x analog, 11 digital inputs, and 11 digital outputs,
  2. 8x analog, 16 digital inputs, and 6 digital outputs,
  3. 8x analog, 20 digital inputs, and 2 digital outputs
Feel free to let us know if you want something else though.

For more information on the solution, with some fun examples of what you can do with a custom operator’s interface, check out our wiki page here: http://processors.wiki.ti.com/index....cs_Competition

In addition to our activity here on CD, we’ve also set up a dedicated FRC support hotline that will let you contact TI engineers directly at FRCSupport@list.ti.com. Everyone on this list is not only a TI engineer, but also a dedicated FRC mentor, so try not to send us too many emails during week 6 :)

We have a lot of other ideas for using the LaunchPad on your robots as well (an LED controller is at the top of our list) so keep an eye out for more examples to come!

Thanks Bart!

I received my two extra boards yesterday. It was very simple to follow the instructions at http://processors.wiki.ti.com/index....cs_Competition to get the board configured as a Gamepad.

Once I verified the DS saw it as a controller, I wanted to explore the code behind the magic, maybe even edit it.

I was able to get Energia installed, but now I see that it does not support USB HID devices.

Code Composer Studio looks to be the best alternative. What I would like to know is, it looks like the free use license for use with this model of the LaunchPad has a 16K code size limit. Is this a realistic size for the code we are currently using? Additionally, what folder(s) on the Github contain the example Gamepad projects?

wt200999 01-08-2015 12:22 PM

Re: Using the TI LaunchPad from your KoP
 
Quote:

Originally Posted by billbo911 (Post 1424243)
I was able to get Energia installed, but now I see that it does not support USB HID devices.

Energia support for this is something we tried to push for, and would love to see in the future. It just wasn't going to happen for this release.

Quote:

Originally Posted by billbo911 (Post 1424243)
Code Composer Studio looks to be the best alternative. What I would like to know is, it looks like the free use license for use with this model of the LaunchPad has a 16K code size limit. Is this a realistic size for the code we are currently using?

The gamepad code comes out to be around 10K, so it is cutting it close, but it should not be a problem for most modifications.

Quote:

Originally Posted by billbo911 (Post 1424243)
Additionally, what folder(s) on the Github contain the example Gamepad projects?

The root folder is the whole project, the three different options are selected based on build properties in CCS. The important files are the source files in the root, and the files in the USB_config and USB_app folders.

CCS is Eclipse based and needs a workspace set up before importing projects. To set up CCS to work on the project, clone the MSP430-Gamepad repo into your workspace folder. From there you should be able to import and run the code.

I will be posting more detailed documentation soon.


All times are GMT -5. The time now is 03:45 AM.

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