![]() |
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. |
| All times are GMT -5. The time now is 08:11 AM. |
Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi