![]() |
CRIO ARDUINO INTERFACE
Hey, i got bored and wrote this:
Code:
package com.shadowh511.mayor.utils;Hook up an arduino to the serial port and have it run a program that toggles pin number 13. Bind a button to sending h and a button to sending l. have fun pushing the buttons, you just made a polyglot robot! :D |
Re: CRIO ARDUINO INTERFACE
I like the whole idea of this!
I had an idea like this in march, but it was far more complex. Can I play around with it? I'd like to possibly help improve on this. |
Re: CRIO ARDUINO INTERFACE
all my code is gpl'd so go at it. It doesn't reliably work ATM, so can you help me fix it please?
|
Re: CRIO ARDUINO INTERFACE
I'll be glad to help. I can do some testing in starting in July.
Maybe we can have a working version by the 2011 Build Season! What seems to be the problem? Just a thought... Does your team use CAN? If yes, I think that this could interfere with that. Maybe have an alternate mode using the ADC and the DIO. Using 2 12 bit channels of the ADC, we can have a simple protocol to convert the returned int(or is it double?) into a char. |
Re: CRIO ARDUINO INTERFACE
This goes directly through the serial port on the Robot.
I am working on a bit of Arduino code that will let me see if the serial port is being used for anything. I think the following will work: Code:
void setup() { |
Re: CRIO ARDUINO INTERFACE
That sounds like a good idea. Ill post some code of the alternate comms when I get the chance.
|
Re: CRIO ARDUINO INTERFACE
here is a rough idea of the constructor
Code:
public void robotInit() {int inChannel - Digital-the recieving pin Analog-The input pin Serial-Not Needed I2C-The address on the bus int OutChannel-Digital only- the sending pin long BaudRate - Serial Only, self explanatory I'll write something up in the library to show you how the constructors would work |
Re: CRIO ARDUINO INTERFACE
About the unreliability, could you please explain this?
Is it timing? Maybe we can do something like a signal set HIGH to indicate an incomming serial transmission and vice versa for the cRio. I'm not sure about the levels of the Serial port on the cRio, but maybe the levels are different. A solution to this could be using the MAX233 level converter IC. How is the 'duino powered? Maybe your USB port has some problem. How about make a power adaptor(PD-Board to 3.5mm Barrel Jack). And maybe a filter cap to smooth out any signal problems caused by rapidly dropping voltage due to a motor starting up or similar. The regulator on the arduino can handle the 12 volts as long you aren't powering a current-hog(servos, lot's of led's, etc). If you are using the LCD as you said, maybe that is drawing abnormally large amounts of current(just a thought) Also, can we move this to PM's or email? Perferably email. PM me if yes:D |
Re: CRIO ARDUINO INTERFACE
Don't move to PM's. Other people want to add an Arduino interface to the cRio. Like me. Thanks!
|
Re: CRIO ARDUINO INTERFACE
Quote:
-Tanner |
Re: CRIO ARDUINO INTERFACE
Well, our pm convo isn't alive anymore.
As far as the interface goes, I need people to help me test it (no changes since release 0) can someone also post a copy of the serial output of the cRIO booting? (I have no serial port :( ) |
Re: CRIO ARDUINO INTERFACE
I'd like to get some javadoc stuff done before i get my new Arduino, so...
----- Can someone bring up the rule(s) about custom circuitry? I recall a section on this. I know that as long as it is commercially available, code and circuitry are legal, but what about the arduino perhipherals(protoshields)? What if I want to make a custom shield that logs data on a microSD card and indicate various things with bright LED's(hypothetical) PS The shield mentioned above exists here PPS This shield has a prototyping area, ruling on that please! PPPS There are other (simpler) alternatives to the hypothetical question(cRio Flash, DIO, etc), I realize this ----- What about the arduino code? what if you wrote a Serial/I2C read-/write-er and LCD interface? Does this apply in the "Available to All Teams" rule?(Forgive me, I don't remember rule numbers, just the rules.) ----- What if I use a custom variant of the arduino board? Like a perfboard barebones? I'm pretty sure the basic schematic of the barebones is available on the site... ----- Not doubting this project, I just want to document this with any rules users may run into. |
Re: CRIO ARDUINO INTERFACE
Quote:
Phototyping is always good for LEDs and whatever else you could want. Quote:
Note to self: I should work on this, I've got a arduino that needs a project. We should set up a github to share code and manage it as it is being worked on. -Tanner |
Re: CRIO ARDUINO INTERFACE
Tanner, Thanks for the quick rulings.
Also, I think that it is a great idea to set up a github! |
Re: CRIO ARDUINO INTERFACE
Robototes2412,
You have a google account right? You can set up a Google Code account to host this project. |
Re: CRIO ARDUINO INTERFACE
Quote:
I think using Git is better for version control, but that's just me. Cheers -Tanner |
Re: CRIO ARDUINO INTERFACE
Personally, I like bazaar.
|
Re: CRIO ARDUINO INTERFACE
Quote:
But that's just me. Back on topic: Project Hosting? Where? Any improvements? |
Re: CRIO ARDUINO INTERFACE
Ya'll are welcome to choose whichever system/site as I'm just a contributor at this point, but I probably will not be able to contribute to code if it is hosted by Google (job prevents me from getting a Google account which is what you need afaik). I can do GitHub (hence my suggestion), but it's a bit different and slightly complicated, so it could be a bit tough to learn. There's a lot of good resources out there about it though.
-Tanner |
Re: CRIO ARDUINO INTERFACE
I have no problem learning github, if Robotes2414 chooses it. I'm just happy to contribute
|
Re: CRIO ARDUINO INTERFACE
I have written several changes to the code while on vacation in the Philippines,
I wish I could post it, but I have no WiFi:( and the internet cafe I am currently typing this from has a no USB drive policy:( Changes: Digital comms I2C comms I have also started writing a library for the arduino. If you already have written one, I can stop. I will post them when i return stateside on the 23rd. |
Re: CRIO ARDUINO INTERFACE
I haven't worked on it, ive been too busy with finals, as kanye said, go nuts go ape $h1+
|
Re: CRIO ARDUINO INTERFACE
Here's what I have done over the last few weeks:
I commented some parts. I highlighted the comment with the list of changes. I have created the methods, but nothing in them yet... Code:
package com.shadowh511.mayor.utils;Apologies for not being specific, but I don't remember numbers :P |
Re: CRIO ARDUINO INTERFACE
it says you can't use any custom circuits to do command signals, but as far as, say, an LCD goes were good.
|
Re: CRIO ARDUINO INTERFACE
Can someone point me to the pinout of the I2C Port on the Digital Sidecar?
I'm making some cables, but I have no access to a robot until school starts. I believe it is a 4 or 5 pin Male header on the Digital Sidecar. Much appreciated, Jeremy |
Re: CRIO ARDUINO INTERFACE
|
| All times are GMT -5. The time now is 10:35. |
Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi