# LabVIEW Noob... Joystick POV hats help!

I have just started programming for my team we have lost our programmer and I have stepped in to learn LabVIEWfor the team and its going well so far. our team (1802) has been getting help from teams like 1986 in Kansas and they are great classes but only got me started. I will post a screen shot of the code if you can help I would be so thankful! This is what the code is trying to do…

1. Arcade Drive (Easy that’s the RoboRIO template)
2. Move two independent motors to spin one way and another. On an Xbox controller one motor will use button A and B and the other will use X and Y buttons
3. Use the POV Directional buttons on a joystick to move the two independent motors together at the same time.

I thought what I had would work, I see where I went wrong but I cannot thing of the solution. I was going off what I learned from the LabVIEW Training from the other day. Hope to hear you soon thank you very much hope you can help I am still very new to the language and desperately trying to learn all that I can before the season starts.

Here’s the code
http://i.imgur.com/xUw2vmL.png?1

Thanks,
Piper High School Team Stealth 1802
Programmer, Financial Director

The POV output gives you a number from -1 to 360 based on which direction it is being pressed. No direction is -1, forward is 0, and it increases clockwise, outputting the angle from forwards. If you want to see if the POV is being pressed forward, get the first POV number from the array and check if it equals 0. If you want to see if it is being pushed backwards, check if that same POV number equals 180.

If you are going to use… Up to control something, it is advisable to “OR” all of the possible “UP” directions as many POV hats are tough to tell if you are up, or up&left or Up&Right…

This is a vi E2 wrote to turn POV to Boolean, see the or’s for the top, left, right, down outputs.

Hey my team has been made some Labview programming tutorials that you might find useful. I think the button drive one will answer you questions about how to drive two different motors at the same time. Let me know if you have any question or if you would like a video on something else