Go to Post Help me Chief Delhpi forums, you're my only hope. - Sev [more]
Home
Go Back   Chief Delphi > FIRST > General Forum
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Reply
 
Thread Tools Rating: Thread Rating: 2 votes, 5.00 average. Display Modes
  #1   Spotlight this post!  
Unread 17-07-2013, 10:16
evanperryg's Avatar
evanperryg evanperryg is offline
IT'S THE BUMP N' DUMP
AKA: Evan Grove
FRC #4536 (The Minutebots)
Team Role: Mentor
 
Join Date: Apr 2013
Rookie Year: 2011
Location: Minneapolis, MN
Posts: 657
evanperryg has a reputation beyond reputeevanperryg has a reputation beyond reputeevanperryg has a reputation beyond reputeevanperryg has a reputation beyond reputeevanperryg has a reputation beyond reputeevanperryg has a reputation beyond reputeevanperryg has a reputation beyond reputeevanperryg has a reputation beyond reputeevanperryg has a reputation beyond reputeevanperryg has a reputation beyond reputeevanperryg has a reputation beyond repute
Re: Legality of Arduino Programming

Quote:
Originally Posted by Aaron.Graeve View Post
This has already been stated, but yes, Arduinos can be used as co-processors on the robot. You mentioned using the Arduino to control LEDs. This was the system we used to control our AdaFruit lights this year. We had a simple C program that was wipped up by one of the members to respond to a few robot inputs and output the robot state in LED form for our drivers(We just used a few Digital outs and ran them to a few Arduino pins).

We briefly discussed using the serial port on the cRIO for this, but we decided a few lost outputs compensated for the removed protocol pain.

If you are familiar with Java, C is not that different. Also, why is the FRC support of a language important to you?

I hope this helps.
I am guessing FRC language support is important because he wants to be able to use his knowledge of Arduino Java as a basis for learning FRC Java, or vice versa. But yes, you definitely make a good point when saying Java is very similar to C. Personally, I prefer C because it is used more often in the real world. Our programming team uses labview, though we will be changing over to Java or C within 2 years. The cRio's serial port didn't even cross our minds (If you saw how buried the cRio was on our bot you could guess why) but I really like that idea. It would be a neat learning curve for the electrical team and programming team!

Our new-for-IRI arduino lights are just 12 orange LEDs soldered together in a strip . I am strongly considering getting some of the adafruit RGBLED strips for our next bot (I think these are the ones you are talking about). Can you post your code, please? I am very interested in how your system works, as from what I can tell it works completely different from most other bots.
__________________
FRCDesigns Contributor | "There is only one corner of the universe you can be certain of improving, and that's your own self." -Aldous Huxley
2012-2016 | FRC Team 2338: Gear it Forward
2013
Wisconsin Regional Winner 2014 Midwest Regional Finalist 2015 Midwest Regional Chairman's Award, Finalist, Archimedes Division Champion, IRI Semifinalist 2016 Midwest Regional Chairman's Award, Finalist, Archimedes Division Gracious Professionalism Award, R2OC Winner
2015 | FTC Team 10266: Mach Speed
2015
Highland Park Qualifier Winner, Motivate Award
2017-???? | FRC Team 4536: The Minutebots

Thanks to the alliances and friends I've made along the way: 33 74 107 111 167 171 234 548 1023 1089 1323 1625 1675 1732 1756 2064 2077 2122 2202 2358 2451 2512 2826 3936 3996 4039 4085 4241 5006 5401 5568 5847 5934
Reply With Quote
  #2   Spotlight this post!  
Unread 17-07-2013, 11:43
jwallace15's Avatar
jwallace15 jwallace15 is offline
What am I going to do with my life?
AKA: Wally
FRC #0068 (Truck Town Thunder)
Team Role: College Student
 
Join Date: Aug 2012
Rookie Year: 2013
Location: Michigan
Posts: 435
jwallace15 has much to be proud ofjwallace15 has much to be proud ofjwallace15 has much to be proud ofjwallace15 has much to be proud ofjwallace15 has much to be proud ofjwallace15 has much to be proud ofjwallace15 has much to be proud ofjwallace15 has much to be proud ofjwallace15 has much to be proud ofjwallace15 has much to be proud of
Re: Legality of Arduino Programming

As Evan said, it would be best to get the MEGA 2560 or the Due because of more outputs. I just bought a 2560 because my UNO was too small.

However, if you have an UNO and have shields for it, please note that not all shields for the UNO work on the MEGA.

However, the UNO may work for you. 33 has an uno controlling their LED's.

The UNO has 5 PWM outputs that serve as part of the 13 digital outputs, wheras the MEGA 2560 has 13 PWM outputs in which 2 serve as part of the 32(?) digital outputs.

If by chance you would want to have it so that, say if your shooter is at 2000+ rpm and you want some LED's to turn on, there are 6 analog inputs on the UNO and 16 on the MEGA.

I can't help you on writing Java or C programs for it, though. I just use whatever language that is in the Arduino software (95% sure it's called Sketch).
Attached Thumbnails
Click image for larger version

Name:	Jamespic06211449.jpg
Views:	58
Size:	535.5 KB
ID:	15083  Click image for larger version

Name:	Jamespic06211448.jpg
Views:	52
Size:	444.2 KB
ID:	15084  
__________________
J Wallace IV
Truck Town Thunder
Just a college student now.
Reply With Quote
  #3   Spotlight this post!  
Unread 17-07-2013, 16:13
apalrd's Avatar
apalrd apalrd is offline
More Torque!
AKA: Andrew Palardy (Most people call me Palardy)
VRC #3333
Team Role: College Student
 
Join Date: Mar 2009
Rookie Year: 2009
Location: Auburn Hills, MI
Posts: 1,347
apalrd has a reputation beyond reputeapalrd has a reputation beyond reputeapalrd has a reputation beyond reputeapalrd has a reputation beyond reputeapalrd has a reputation beyond reputeapalrd has a reputation beyond reputeapalrd has a reputation beyond reputeapalrd has a reputation beyond reputeapalrd has a reputation beyond reputeapalrd has a reputation beyond reputeapalrd has a reputation beyond repute
Re: Legality of Arduino Programming

Quote:
Originally Posted by jwallace15 View Post
However, the UNO may work for you. 33 has an uno controlling their LED's.
The LED's are Shift Brite's from SparkFun.

They are essentially 32-bit shift registers with 10-bit per color 3 color PWM controls (and 2 extra bits). So we chain them together and use 3 Arduino pins for all of the LED's. We have the software setup for a 4x32bit chain, and there are 8 LED's, so the second half of the string is a 1-cycle old mirror of the first half of the string.

The cRio uses 3x digital lines (relay 6,7,8 forward channel) to send a 3-bit command word to the Arduino. The lines are driven via a shift register in the DSC, and are high side driven, so we have pulldown resistors added also. I believe the arduino uses the 6v power supply on the digital sidecar but I could be wrong.

The cRio runs a state machine to get the command word (0-7) and outputs it on the 3 bit output. The Ardiuno turns the command word back into a number. The color of each of the 4 LEDs is defined for each mode, there is no further logic in the arduino now, although mode 0 used to fade between colors during disabled mode.
__________________
Kettering University - Computer Engineering
Kettering Motorsports
Williams International - Commercial Engines - Controls and Accessories
FRC 33 - The Killer Bees - 2009-2012 Student, 2013-2014 Advisor
VEX IQ 3333 - The Bumble Bees - 2014+ Mentor

"Sometimes, the elegant implementation is a function. Not a method. Not a class. Not a framework. Just a function." ~ John Carmack
Reply With Quote
  #4   Spotlight this post!  
Unread 17-07-2013, 11:43
Aaron.Graeve Aaron.Graeve is offline
Registered User
FRC #1477 (Texas Torque)
Team Role: Alumni
 
Join Date: Jan 2012
Rookie Year: 2012
Location: College Station, Texas
Posts: 103
Aaron.Graeve is a name known to allAaron.Graeve is a name known to allAaron.Graeve is a name known to allAaron.Graeve is a name known to allAaron.Graeve is a name known to allAaron.Graeve is a name known to all
Re: Legality of Arduino Programming

I was not the member who spearheaded the lights this year, but my close friend did. I will talk to him and our lead mentor to see if we are releasing the full code and scematics and, if so, when. I will get back to you on that soon.

Also, yes, those were the lights in question.
__________________

2016:
Alamo, Bayou, and Lone Star Regional FTAA
2015:
Dallas, Alamo, Bayou, and Lone Star Regional FTAA
2014:
Alamo, Dallas, and Lone Star Regional FTAA
Alamo Regional Robot Inspector
2013:
Einstein Champion and 2013 World Champion (Thanks 1241 & 610), Galileo Division Champion, Razorback Regional Winner, Alamo Regional Semifinalist, Bayou Regional Semifinalist, Lone Star Regional Quarterfinialist
2012:
Curie Division Semifinalist, Lone Star Regional Finalist, Bayou Regional Winner, Alamo Regional Winner
Reply With Quote
  #5   Spotlight this post!  
Unread 17-07-2013, 12:34
otherguy's Avatar
otherguy otherguy is offline
sparkE
AKA: James
FRC #2168 (The Aluminum Falcons)
Team Role: Mentor
 
Join Date: Feb 2010
Rookie Year: 2009
Location: CT
Posts: 432
otherguy is a splendid one to beholdotherguy is a splendid one to beholdotherguy is a splendid one to beholdotherguy is a splendid one to beholdotherguy is a splendid one to beholdotherguy is a splendid one to beholdotherguy is a splendid one to behold
Re: Legality of Arduino Programming

As evanperryg mentioned there are multiple ways of connecting the LEDs to the arduino.

If you only want to turn a few LEDs on and off, then wiring them directly to an arduino is the easiest way to go. Unfortunately it's the most labor intensive as far as wiring goes. THe down side being that you'll need 1 output pin on the arduino per LED unless you design some interfacing electronics to go with it.

If you want multicolor with lots of different patterns then you're going to want to use an LED strip which is talked to over a serial protocol (like I2C for example). THis is the easiers option in my oppinion, especialyl since there are already libraries which handle the majority of the software. Wiring is simple, just 3 wires to conenct between the strip and the arduino.
Edit: I link to this in the other thread, but if you do go this route, there are plenty of good code examples for arduino alread.

I've described how to wire everything up in another thread recently

Quote:
I can't help you on writing Java or C programs for it, though. I just use whatever language that is in the Arduino software (95% sure it's called Sketch).
The arduino programming language is based on C/C++. Sketches are what the project/program files are referred to.
__________________
http://team2168.org

Last edited by otherguy : 17-07-2013 at 13:56. Reason: Added link to code examples.
Reply With Quote
  #6   Spotlight this post!  
Unread 17-07-2013, 13:05
Aaron.Graeve Aaron.Graeve is offline
Registered User
FRC #1477 (Texas Torque)
Team Role: Alumni
 
Join Date: Jan 2012
Rookie Year: 2012
Location: College Station, Texas
Posts: 103
Aaron.Graeve is a name known to allAaron.Graeve is a name known to allAaron.Graeve is a name known to allAaron.Graeve is a name known to allAaron.Graeve is a name known to allAaron.Graeve is a name known to all
Re: Legality of Arduino Programming

Our driver and elecrical captain saw my previous posts and pointed out an Arduino use I forgot. This past year, we used an Arduino UNO and a stripped out RC controller to make a USB RC car controller for our driver. We used the Arduino as a form of a reverse USB Chicklet from the IFI days. The driver station recognised it as a PS3 controller, and programming was unaffected. I think we are putting together and Instructables How-to on it.

Using an Arduino in place of the Cypress board can remove some of the hassle. We are looking into other ways of using an Arduino for things other than LEDs. They are incredibly usefull as co-processors of all forms.
__________________

2016:
Alamo, Bayou, and Lone Star Regional FTAA
2015:
Dallas, Alamo, Bayou, and Lone Star Regional FTAA
2014:
Alamo, Dallas, and Lone Star Regional FTAA
Alamo Regional Robot Inspector
2013:
Einstein Champion and 2013 World Champion (Thanks 1241 & 610), Galileo Division Champion, Razorback Regional Winner, Alamo Regional Semifinalist, Bayou Regional Semifinalist, Lone Star Regional Quarterfinialist
2012:
Curie Division Semifinalist, Lone Star Regional Finalist, Bayou Regional Winner, Alamo Regional Winner
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 18:00.

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