Go to Post If all else fails, just ask the judges to turn off the gravity! :D - [more]
Home
Go Back   Chief Delphi > Technical > Programming
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Reply
Thread Tools Rate Thread Display Modes
  #46   Spotlight this post!  
Unread 07-06-2016, 11:07
beckster1999's Avatar
beckster1999 beckster1999 is offline
Becky the robotic cat *prrrrr beep*
AKA: Becky
FRC #2877 (Ligerbots)
Team Role: Electrical
 
Join Date: Feb 2016
Rookie Year: 2013
Location: Newton
Posts: 28
beckster1999 is an unknown quantity at this point
Re: swerve drive with arduino mega 2560

and it just appeared
__________________
becky the robotic gerbil (btw anyone wanna help me make on starting next school year? i need a team and many years which is why I am starting in high school)
Reply With Quote
  #47   Spotlight this post!  
Unread 07-06-2016, 11:12
beckster1999's Avatar
beckster1999 beckster1999 is offline
Becky the robotic cat *prrrrr beep*
AKA: Becky
FRC #2877 (Ligerbots)
Team Role: Electrical
 
Join Date: Feb 2016
Rookie Year: 2013
Location: Newton
Posts: 28
beckster1999 is an unknown quantity at this point
Re: swerve drive with arduino mega 2560

its not wrking
__________________
becky the robotic gerbil (btw anyone wanna help me make on starting next school year? i need a team and many years which is why I am starting in high school)
Reply With Quote
  #48   Spotlight this post!  
Unread 07-06-2016, 11:38
beckster1999's Avatar
beckster1999 beckster1999 is offline
Becky the robotic cat *prrrrr beep*
AKA: Becky
FRC #2877 (Ligerbots)
Team Role: Electrical
 
Join Date: Feb 2016
Rookie Year: 2013
Location: Newton
Posts: 28
beckster1999 is an unknown quantity at this point
Re: swerve drive with arduino mega 2560

Basically, the sketch is right and i verified it, but when i uploaded it and everything, it said "uploading" and when it was done, acted as though it was an empty sketch and did nothing
__________________
becky the robotic gerbil (btw anyone wanna help me make on starting next school year? i need a team and many years which is why I am starting in high school)
Reply With Quote
  #49   Spotlight this post!  
Unread 07-06-2016, 15:06
tr6scott's Avatar
tr6scott tr6scott is online now
Um, I smell Motor!
AKA: Scott McBride
FRC #2137 (TORC)
Team Role: Mentor
 
Join Date: Dec 2007
Rookie Year: 2005
Location: Oxford, MI
Posts: 508
tr6scott has a reputation beyond reputetr6scott has a reputation beyond reputetr6scott has a reputation beyond reputetr6scott has a reputation beyond reputetr6scott has a reputation beyond reputetr6scott has a reputation beyond reputetr6scott has a reputation beyond reputetr6scott has a reputation beyond reputetr6scott has a reputation beyond reputetr6scott has a reputation beyond reputetr6scott has a reputation beyond repute
Re: swerve drive with arduino mega 2560

Sounds like it may not have the right com port selected.

On menu, go to "tools" then "port" and select port.
Then on menu, go to "tools" then "Get Board info" and see if it returns "Mega"
If not then go back to "ports" and select a different "port"
Then try to "Get board info"

Assuming the mega is plugged into the computer via usb cable, one of the ports will respond correctly.

Use that one, and try to upload again.

When uploading you will see LED activity on Mega board, rx and tx flickering.
__________________
The sooner we get behind schedule, the more time we have to catch up.


Last edited by tr6scott : 07-06-2016 at 15:07. Reason: added led activity.
Reply With Quote
  #50   Spotlight this post!  
Unread 08-06-2016, 10:33
beckster1999's Avatar
beckster1999 beckster1999 is offline
Becky the robotic cat *prrrrr beep*
AKA: Becky
FRC #2877 (Ligerbots)
Team Role: Electrical
 
Join Date: Feb 2016
Rookie Year: 2013
Location: Newton
Posts: 28
beckster1999 is an unknown quantity at this point
Re: swerve drive with arduino mega 2560

it's definitely the right port, the "blink" example worked
__________________
becky the robotic gerbil (btw anyone wanna help me make on starting next school year? i need a team and many years which is why I am starting in high school)
Reply With Quote
  #51   Spotlight this post!  
Unread 08-06-2016, 10:37
beckster1999's Avatar
beckster1999 beckster1999 is offline
Becky the robotic cat *prrrrr beep*
AKA: Becky
FRC #2877 (Ligerbots)
Team Role: Electrical
 
Join Date: Feb 2016
Rookie Year: 2013
Location: Newton
Posts: 28
beckster1999 is an unknown quantity at this point
Re: swerve drive with arduino mega 2560

i used the sweep example under servo
__________________
becky the robotic gerbil (btw anyone wanna help me make on starting next school year? i need a team and many years which is why I am starting in high school)
Reply With Quote
  #52   Spotlight this post!  
Unread 08-06-2016, 11:29
Alan Anderson's Avatar
Alan Anderson Alan Anderson is offline
Software Architect
FRC #0045 (TechnoKats)
Team Role: Mentor
 
Join Date: Feb 2004
Rookie Year: 2004
Location: Kokomo, Indiana
Posts: 9,112
Alan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond repute
Re: swerve drive with arduino mega 2560

Quote:
Originally Posted by beckster1999 View Post
it's definitely the right port, the "blink" example worked
You're giving us mixed messages.


The last thing you said was basically "its not wrking". You're going to have to go into a lot more detail than that if you want us to help you make it do what you think it should be doing.

What is "it" that should be working? What do you expect it to be doing? Once you tell us that, there will be more questions about how you have "it" connected and what else you have connected to "it".
Reply With Quote
  #53   Spotlight this post!  
Unread 08-06-2016, 11:47
tr6scott's Avatar
tr6scott tr6scott is online now
Um, I smell Motor!
AKA: Scott McBride
FRC #2137 (TORC)
Team Role: Mentor
 
Join Date: Dec 2007
Rookie Year: 2005
Location: Oxford, MI
Posts: 508
tr6scott has a reputation beyond reputetr6scott has a reputation beyond reputetr6scott has a reputation beyond reputetr6scott has a reputation beyond reputetr6scott has a reputation beyond reputetr6scott has a reputation beyond reputetr6scott has a reputation beyond reputetr6scott has a reputation beyond reputetr6scott has a reputation beyond reputetr6scott has a reputation beyond reputetr6scott has a reputation beyond repute
Re: swerve drive with arduino mega 2560

Quote:
Originally Posted by beckster1999 View Post
it's definitely the right port, the "blink" example worked
Ok, did you wire pin(9) of the Mega to the PWM signal of the motor controller?
Did you wire GND of the Mega to the PWM Gnd of the motor controller?
You can wire the PWM Red to +5v of the Mega, but I am pretty sure it is not required.

The Sweep servo program uses pin(9) in the sketch.

*As a debug tool, you could add code to turn on, or blink the LED on pin 13, so you would know that the program is running.
__________________
The sooner we get behind schedule, the more time we have to catch up.


Last edited by tr6scott : 08-06-2016 at 11:53. Reason: Added note about the LED.
Reply With Quote
  #54   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
  #55   Spotlight this post!  
Unread 09-06-2016, 10:50
tr6scott's Avatar
tr6scott tr6scott is online now
Um, I smell Motor!
AKA: Scott McBride
FRC #2137 (TORC)
Team Role: Mentor
 
Join Date: Dec 2007
Rookie Year: 2005
Location: Oxford, MI
Posts: 508
tr6scott has a reputation beyond reputetr6scott has a reputation beyond reputetr6scott has a reputation beyond reputetr6scott has a reputation beyond reputetr6scott has a reputation beyond reputetr6scott has a reputation beyond reputetr6scott has a reputation beyond reputetr6scott has a reputation beyond reputetr6scott has a reputation beyond reputetr6scott has a reputation beyond reputetr6scott has a reputation beyond repute
Re: swerve drive with arduino mega 2560

FYI, not all Arudino Outputs are PWM compatible.

Code:
PWM: 2 to 13 and 44 to 46. Provide 8-bit PWM output with the analogWrite() function
Mike's direction is good.
__________________
The sooner we get behind schedule, the more time we have to catch up.

Reply With Quote
  #56   Spotlight this post!  
Unread 11-06-2016, 21:40
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

Scott - I believe the Servo library uses a timer and software to generate the PWM signal, so it is independent of the hardware generated PWM pins.

Becky – Getting back to one of your older questions. You don’t have to have a steering sensor if you are only going to run it in a “tele-operated” like mode if you want to keep things simple, although it will still be useful if you want it to drive in some modes. However, if you want to do autonomous driving, then you will definitely need a sensor to know the actual wheel position. I’ve had good luck with these. Specifically the 6127V1A360L.5FS. For mounting you really need these to be 1:1 with your wheel modules so the analog value will directly relate to a direction on the wheels. Since your steering motor uses a smaller sprocket than the swerve module, I’d install another shaft with the same size sprocket on one of the other wheels and attach the position sensor to that. This should be fairly easy since you have the double sprockets at each wheel. One thing to remember is that these sensors generally do not like high side loads, so I wouldn't recommend putting the sprocket directly on the sensor shaft.

Mike
Reply With Quote
  #57   Spotlight this post!  
Unread 13-06-2016, 18:11
teslalab2's Avatar
teslalab2 teslalab2 is offline
RogueBotix LLC
VRC #8091
Team Role: Mentor
 
Join Date: Feb 2015
Rookie Year: 2014
Location: Austin MN
Posts: 109
teslalab2 will become famous soon enoughteslalab2 will become famous soon enough
Re: swerve drive with arduino mega 2560

If you are having trouble you can use the library I wrote to control FRC motor controllers. check the link below, and consult the wiki for help.
__________________
I need a jaguar development board for reprogramming a jaguars bootloader. if you have one that you want to sell, pm me. thanks

Run you CanJaguars on arduino with ArduRIO, you can also easily control Talons, Victors,Jaguars and Sparks on PWM. https://sourceforge.net/projects/ardurio/
Reply With Quote
  #58   Spotlight this post!  
Unread 13-06-2016, 21:22
Alan Anderson's Avatar
Alan Anderson Alan Anderson is offline
Software Architect
FRC #0045 (TechnoKats)
Team Role: Mentor
 
Join Date: Feb 2004
Rookie Year: 2004
Location: Kokomo, Indiana
Posts: 9,112
Alan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond repute
Re: swerve drive with arduino mega 2560

Quote:
Originally Posted by teslalab2 View Post
If you are having trouble you can use the library I wrote to control FRC motor controllers. check the link below, and consult the wiki for help.
It's kind of you to offer, but it would help more if there were actually a link to click.
Reply With Quote
  #59   Spotlight this post!  
Unread 13-06-2016, 23:01
teslalab2's Avatar
teslalab2 teslalab2 is offline
RogueBotix LLC
VRC #8091
Team Role: Mentor
 
Join Date: Feb 2015
Rookie Year: 2014
Location: Austin MN
Posts: 109
teslalab2 will become famous soon enoughteslalab2 will become famous soon enough
Re: swerve drive with arduino mega 2560

Attached Thumbnails
Click image for larger version

Name:	adsf.JPG
Views:	25
Size:	73.5 KB
ID:	20852  
__________________
I need a jaguar development board for reprogramming a jaguars bootloader. if you have one that you want to sell, pm me. thanks

Run you CanJaguars on arduino with ArduRIO, you can also easily control Talons, Victors,Jaguars and Sparks on PWM. https://sourceforge.net/projects/ardurio/
Reply With Quote
  #60   Spotlight this post!  
Unread 14-06-2016, 16:05
Aren Siekmeier's Avatar
Aren Siekmeier Aren Siekmeier is offline
on walkabout
FRC #2175 (The Fighting Calculators)
Team Role: Mentor
 
Join Date: Apr 2008
Rookie Year: 2008
Location: 대한민국
Posts: 735
Aren Siekmeier has a reputation beyond reputeAren Siekmeier has a reputation beyond reputeAren Siekmeier has a reputation beyond reputeAren Siekmeier has a reputation beyond reputeAren Siekmeier has a reputation beyond reputeAren Siekmeier has a reputation beyond reputeAren Siekmeier has a reputation beyond reputeAren Siekmeier has a reputation beyond reputeAren Siekmeier has a reputation beyond reputeAren Siekmeier has a reputation beyond reputeAren Siekmeier has a reputation beyond repute
Re: swerve drive with arduino mega 2560

Quote:
Originally Posted by teslalab2 View Post
He may have signatures turned off.

https://sourceforge.net/projects/ardurio/
Reply With Quote
Reply


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -5. The time now is 06:32.

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


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