Arduino Digital/Analog interface board

Zatnikitelman

Addon Developer
Addon Developer
Joined
Jan 13, 2008
Messages
2,302
Reaction score
6
Points
38
Location
Atlanta, GA, USA, North America
I asked on another forum for a computer digital interface so I can't take credit for finding this, but it looks like it could be used to accept switch inputs and such. It'd probably take writing some interface code, but it looks doable. What attracted me is the fact is they have plans so you can build one yourself.
http://arduino.cc/
 

xanthein

New member
Joined
May 27, 2009
Messages
2
Reaction score
0
Points
0
Hi,

The Arduino is a very capable microcontroller board based on the Atmel AVR architecture - it'll give you digital inputs and outputs as well as analog in, all programmed from a dedicated IDE in a C-like language (which hides most of the complexity of programming the AVR series).

All comms with the host PC is via a virtual serial port provided over USB. The board can also be powered by USB or a dedicated 5V PSU.

As well as the official boards there are also various 'Freeduino' clones - either direct copies, which are allowed under the board's Creative Commons license - or simpler/more complex/different form factor varients.

I have a relatively recent-ish board up in the roof somewhere - haven't had a chance to play with it for a while, and hadn't even considered using it with Orbiter (which I've only discovered very recently).
 

yagni01

Addon Developer
Addon Developer
Donator
Joined
Feb 8, 2008
Messages
463
Reaction score
0
Points
16
Location
Atlanta, GA
Interesting. Relatively inexpensive per I/O (Cheaper than Phidgets). The downside being it appears you need to learn a new language. It does have an ethernet library so it could connect through Orb:Connect.

Be nice if someone tries it and reports back.
 

tl8

Addon Developer
Addon Developer
Tutorial Publisher
Joined
Oct 16, 2007
Messages
3,645
Reaction score
25
Points
88
Location
Gold Coast QLD
Interesting. Relatively inexpensive per I/O (Cheaper than Phidgets). The downside being it appears you need to learn a new language. It does have an ethernet library so it could connect through Orb:Connect.

Be nice if someone tries it and reports back.

It has its own C libraries. Not very hard to learn. I am thinking of using RS-232 or USB to connect it to the PC. Not sure that I would use it for orbiter though :p
 

tblaxland

O-F Administrator
Administrator
Addon Developer
Webmaster
Joined
Jan 1, 2008
Messages
7,320
Reaction score
25
Points
113
Location
Sydney, Australia
Not sure that I would use it for orbiter though :p
regen_poster_bw.jpg
 

Juanelm

Addon Developer
Addon Developer
Donator
Joined
Nov 15, 2008
Messages
229
Reaction score
0
Points
16
Arduino is excellent. I have worked with the Bluetooth one and the Arduino Nano, and they are really easy to use and program. The programming language is similar to C and is really simple (see the entire language reference at this page: http://arduino.cc/en/Reference/Extended ). As part of an university project I made a rover that moved around autonomously, sensing its surroundings, and sent the data to the computer through bluetooth, where a map of the place was created in real time using MatLab. The module controlled servos, and took measurements from different sensors.
 

HarvesteR

Member
Joined
Apr 22, 2008
Messages
386
Reaction score
15
Points
18
Arduino is excellent. I have worked with the Bluetooth one and the Arduino Nano, and they are really easy to use and program. The programming language is similar to C and is really simple (see the entire language reference at this page: http://arduino.cc/en/Reference/Extended ). As part of an university project I made a rover that moved around autonomously, sensing its surroundings, and sent the data to the computer through bluetooth, where a map of the place was created in real time using MatLab. The module controlled servos, and took measurements from different sensors.

it's not similar to C, it IS C :)

I've worked with these before, they're just awesome!

By default, all comms with the computer are done through a serial interface, but there is a separate Ethernet Shield you can buy that adds networking abilities to it (and all the libraries needed too).

Plus, it's very well documented, and has a very active and friendly community doing all sorts of crazy things with it.

The simplest interface method is to talk to a program through serial... I have done this using a small app in Processing, that read the serial stream from the board, and sent out OSC messages to other apps like GlovePIE...

Another way I did it, which requires less programming on the computer side, but is more limited, is to install PPJoy, which is a virtual joystick driver that has a serial joystick monitor, and send out a serial feed to this. This method is limited to 8 axes and 8 buttons, if I'm not mistaken...

But the holy grail of communications with the arduino is to use the Ethernet Shield to send OSC messages directly from the Arduino, and read them in GlovePIE, which can then perform macros, update virtual joysticks, and even send OSC messages back to the board, so it can also provide feedback in the form of LEDs and stuff.

I would strongly suggest this latter method... you do need the Ethernet Shield, and IDK if there is an OSC library already available for it... but it should provide the a very flexible and easy to use interface, that isn't even limited to a single computer :D (OSC is an UDP protocol, so you can send out messages and have different computers listening for those they can use, and ignore those that are not meant for them).

I'd love to see this implemented!! I might very well get to it myself :cheers:

Cheers
 

Thanatox

New member
Joined
Mar 2, 2011
Messages
10
Reaction score
0
Points
1
I've been kicking around the idea of building a simpit for orbiter. but I'm not sure I'll have time. Anyway, as phase one I am considering building a custom control panel with a few of the more common functions and interfacing it with orbiter.

When researching this I found the Arduino Mega 2560 which according to sparkfun "Uses the ATmega8U2 for USB-serial conversion. This allows for faster transfer rates, no drivers needed for Linux or Mac (inf file needed for Windows), and the ability to have the board show up as a keyboard, mouse, joystick, etc."

I was wondering if anyone with more arduino / orbiter experience knows anything about making this arduino work as a joystick. If that could work then it's joy2key and your home free right?

Also, it seems like you could still use the Ethernet shield to receive information form orb:connect or something if your trying use indicator lights.

Here are the links:

http://arduino.cc/en/Main/ArduinoBoardMega2560

http://www.sparkfun.com/tutorials/148
 

tl8

Addon Developer
Addon Developer
Tutorial Publisher
Joined
Oct 16, 2007
Messages
3,645
Reaction score
25
Points
88
Location
Gold Coast QLD
When researching this I found the Arduino Mega 2560 which according to sparkfun "Uses the ATmega8U2 for USB-serial conversion. This allows for faster transfer rates, no drivers needed for Linux or Mac (inf file needed for Windows), and the ability to have the board show up as a keyboard, mouse, joystick, etc."

I was wondering if anyone with more arduino / orbiter experience knows anything about making this arduino work as a joystick. If that could work then it's joy2key and your home free right?

If you don't know a lot about Arduino or embedded systems, the I wouldn't go down the joystick emulation. I don't think it has been done yet (I think the keyboard has been done) and it is a nice way to brick your board.

Your best bet might be to just use the inbuilt com port and make a simple orbiter add on that changes the serial coms to button presses (Using VESSEL::SendBufferedKey)
 

HarvesteR

Member
Joined
Apr 22, 2008
Messages
386
Reaction score
15
Points
18
It's not so easy to brick an Arduino as it is to brick a raw AVR chip... The Arduino runs all it's code on it's own firmware, which is essentially a dumb-proof layer that keeps the arduino from frying...

That said, burned out/bricked arduinos are not unheard of... but that kind of thing mostly happens due to bad wiring rather than bad code...

@ Thanatox: I didn't know the Mega was able to report itself as keyboard or joystick... That looks pretty cool, I'll definitely look into it.

Cheers
 

tl8

Addon Developer
Addon Developer
Tutorial Publisher
Joined
Oct 16, 2007
Messages
3,645
Reaction score
25
Points
88
Location
Gold Coast QLD
It's not so easy to brick an Arduino as it is to brick a raw AVR chip... The Arduino runs all it's code on it's own firmware, which is essentially a dumb-proof layer that keeps the arduino from frying...

That said, burned out/bricked arduinos are not unheard of... but that kind of thing mostly happens due to bad wiring rather than bad code...

@ Thanatox: I didn't know the Mega was able to report itself as keyboard or joystick... That looks pretty cool, I'll definitely look into it.

Cheers


That is true, but the chip that does USB (AVR 8 USB) and hence allows the user to make it look like a keyboard does not have Arduino firmware. It also does not have a programming header by default.

Also this is only valid for the Uno spec Arduinos (Uno and Mega256) the older ones use the FTDL chip.
 
Top