View Single Post
  #13   Spotlight this post!  
Unread 08-06-2016, 22:02
Mike Bortfeldt Mike Bortfeldt is offline
Registered User
FRC #1126 (& 1511)
Team Role: Mentor
 
Join Date: Oct 2004
Rookie Year: 2004
Location: Rochester, NY
Posts: 119
Mike Bortfeldt has much to be proud ofMike Bortfeldt has much to be proud ofMike Bortfeldt has much to be proud ofMike Bortfeldt has much to be proud ofMike Bortfeldt has much to be proud ofMike Bortfeldt has much to be proud ofMike Bortfeldt has much to be proud ofMike Bortfeldt has much to be proud of
Re: swerve drive with arduino mega 2560

Becky,

Assuming you still have the speed controllers wired up the same way you had in your picture earlier, I think Scott is on the right track. It looks like you have your speed controllers wired near the pin 0 / pin 14 area. (I would move the wires if you use pin 0 or pin 1 as those are also used for the USB connection.) In order for the speed controllers to work, they each need two wires; a signal wire (which I think is your white wire) and ground wire (the black wire). You can use most any pin for the signal - you just need to change the sketch to attach to the one you use, but you also need a the ground. A ground connection can be found next to pin 13 as well as on the opposite side of the mega in the "power" section. You may already have the ground running from across the board, but it is hard to see in the picture. If you actually have the ground connected, then just change the "9" in the myservo.attach(9) statement in the Sweep example to the pin number you are actually using (not 0 or 1). If you do not the ground connected, and you have a standard 3 pin connector on the end of your PWM cable, then it would be easier to plug one cable direcly to pins 12 (white), 13 (red) & gnd (black). Then change the "9" in the myservo.attach(9) to "12". (just verify that the black wire does indeed go to the ground connection on the Talon).

Mike
Reply With Quote