Hello, we are currently having a problem with programming the motor controllers. This is all of our code I think it should be working but the LEDs on the sparks aren’t responding.
Some steps I would take:
Start with hardware: Is the SPARK receiving power and is connected properly to the PWM port that you selected in the code (0 and 1). Be sure to verify that the cable is in the correct orientation, as it might be 180º off.
I would then use a shipping example first to discard any custom code. You can find one for motors in: LabVIEW Help tab > Find Examples…
Does it behave the same way with the example?
Driver Station: Do you see any errors in the Driver Station messages when your code runs?
Tripple checked all the connections from the robo rio and the spark motors and everything seems good. The problem is that only the right joystick is being detected. There are also no error messages in drivestation or labview
So I figured out how to add them both and now they are both showing up. Only problem is one is only registering on the x axis and one is only registering on the y. Im trying to get both of them to control the y axis. Is there a place or variable in the code that I can change to change the x to a y?
What model Joysticks?
You can see the joystick axis on the Driver Station by highlighting each one, like Oscar highlighted his USB 0 joystick above.
Then when you move the joystick the direction you want to use, the indicators to the right will move with it telling you what the reference number for that axis is.
In Oscar’'s case he has a three axis flightstick of some sort and axis 1 is the y direction.
So, in Teleop where you pull the axis from the joystick via an index array, you can right-click on the corresponding index array input node to choose Create->Constant and assign it “1” to get the y axis from that joystick.
Then the same on the second joystick.
I changed the value but I wasn’t able to test it because Everytime I deploy I get this error message “Connection failed. The network address might be invalid it the target is not responding.” The computer is connected to the robot via WiFi, drive station is open, I’ve power cycled the robot and the wifi about 5 times as well as labview and the drive station
Probably need to reimage your rio. Then deploy code