Arduino microcontroller interface with Revolution
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller
Arduino microcontroller interface with Revolution
Hi,
Is it possible to interface with an Arduino microcontroller through Revolution? I can do it through Flash but to be honest I hate Flash and Rev would be so much better for the type of projects I'd like to do.
Many Thanks in Advance.
Jim H
Is it possible to interface with an Arduino microcontroller through Revolution? I can do it through Flash but to be honest I hate Flash and Rev would be so much better for the type of projects I'd like to do.
Many Thanks in Advance.
Jim H
-
- VIP Livecode Opensource Backer
- Posts: 977
- Joined: Sat Apr 08, 2006 7:47 am
- Contact:
If this is a USB device, you may be able to connect to it; and if there's a .DLL to communicate with it, you could wrap that with an external.
Jan Schenkel.
Jan Schenkel.
Quartam Reports & PDF Library for LiveCode
www.quartam.com
www.quartam.com
RE: Arduino microcontroller interface with Revolution
Nice Make interface. I have some Teleo microcontrollers from Making Things (who make the Make controller) but they're obsolete and don't work with my Intel Mac so I decided to switch to the much cheaper Arduino. Like the old Teleos the Arduino uses serial Proxy to communicate with Flash etc because it's actually a serial device. I think it's way too complicated for me to work out how to code anything to allow Rev to interface with the Arduino but I hoped someone else might have?
Thanks
Jim H
Thanks
Jim H
Thanks. I picked up the Make board for about $100 at the Maker Faire earlier this year. I had the rev ethernet interface running in a week, but got stumped on the USB port until I realized their driver wants a trailing cr. And then ignores it...
My understanding of the Arduino board is that you write a program for it to run and then download it to the board over the usb port. So the rev interface might just be a script editor and and a downloading section. Unless you wanted to write an emulator, which would be way cool...
My understanding of the Arduino board is that you write a program for it to run and then download it to the board over the usb port. So the rev interface might just be a script editor and and a downloading section. Unless you wanted to write an emulator, which would be way cool...
-
- VIP Livecode Opensource Backer
- Posts: 10043
- Joined: Sat Apr 08, 2006 7:05 am
- Contact:
Mark, I looked at your Make interface and it's pretty cool. But I didn't find where it actually communicates with the external device. Did I miss something obvious, or is there a DLL or some other component that it's dependent on.
I'm totally ignorant about this sort of stuff, so please be patient if I missed something that would be obvious to anyone who knows what they're doing. That's not me, at least not yet, but lately I've found myself itching to play with robotics so this may be something I'll be using down the road.
As a side note, I just want to say: Damn! You have some fun stuff in your RevOnline collection. At the last RevCon I was impressed by the goodies you showed me, but looking through your stuff in RO it's even clearer how much great stuff you do.
I'm totally ignorant about this sort of stuff, so please be patient if I missed something that would be obvious to anyone who knows what they're doing. That's not me, at least not yet, but lately I've found myself itching to play with robotics so this may be something I'll be using down the road.
As a side note, I just want to say: Damn! You have some fun stuff in your RevOnline collection. At the last RevCon I was impressed by the goodies you showed me, but looking through your stuff in RO it's even clearer how much great stuff you do.
Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn
Um... thanks... now I have to go look at what kind of stuff I put in my revOnline folder...
anyway, there's no special dll or driver or anything like that. The Make board registers itself as a COM port on Windows and as a usbmodem type on OSX. In the libOSC substack you'll find a command called OSC.Open that figures out whether to use ethernet or usb and then treats the usb port as a serial device. I hardcoded COM3 into the library since that's what came up for me, but it's easily changeable and will only be different if COM3 is already in use for some other usb device.
...and if you need to do any usb network troubleshooting on Windows (sorry - I can't find an OSX equivalent) there's an absolutely wonderful one that solved my usb problems in ten minutes at AGGSoft
http://www.aggsoft.com/usb-port-monitor.htm
anyway, there's no special dll or driver or anything like that. The Make board registers itself as a COM port on Windows and as a usbmodem type on OSX. In the libOSC substack you'll find a command called OSC.Open that figures out whether to use ethernet or usb and then treats the usb port as a serial device. I hardcoded COM3 into the library since that's what came up for me, but it's easily changeable and will only be different if COM3 is already in use for some other usb device.
...and if you need to do any usb network troubleshooting on Windows (sorry - I can't find an OSX equivalent) there's an absolutely wonderful one that solved my usb problems in ten minutes at AGGSoft
http://www.aggsoft.com/usb-port-monitor.htm
Mwieder, Thanks for the reply.
OSX 10.5.5 Intel Macbook Pro using RunRev Studio 2.8.1.
I've got the Arduino working nicely with Flash using Kasper Kamperman's arduino_flash.pde and Serial Proxy.
I just don't have the slightest idea what script to use in RunRev to communicate via Serial Proxy. Presumably a different config file is necessary for Serial Proxy also?
Best
Jim H
OSX 10.5.5 Intel Macbook Pro using RunRev Studio 2.8.1.
I've got the Arduino working nicely with Flash using Kasper Kamperman's arduino_flash.pde and Serial Proxy.
I just don't have the slightest idea what script to use in RunRev to communicate via Serial Proxy. Presumably a different config file is necessary for Serial Proxy also?
Best
Jim H
I used MacOS Tiger and then Leopard.
What you need is:
1 - download and install from the Arduino site (http://www.arduino.cc) the Arduino SDK.
2 - download and install from the Arduino site or the FTDI site (http://www.ftdichip.com) the driver to see the Arduino USB as a serial port.
3 - connect the arduino board to an USB port of your Mac.
You will see is a new entry in the list of serial devices.
You can get the list reading the "driverNames" property: ex.
put the driverNames into field "serialPorts".
You can get a useful stack to test serial communication at
http://www.troz.net/Rev/tutorials.php
The stack is SerialTest.rev
What you need is:
1 - download and install from the Arduino site (http://www.arduino.cc) the Arduino SDK.
2 - download and install from the Arduino site or the FTDI site (http://www.ftdichip.com) the driver to see the Arduino USB as a serial port.
3 - connect the arduino board to an USB port of your Mac.
You will see is a new entry in the list of serial devices.
You can get the list reading the "driverNames" property: ex.
put the driverNames into field "serialPorts".
You can get a useful stack to test serial communication at
http://www.troz.net/Rev/tutorials.php
The stack is SerialTest.rev
From what I can gather from http://arduino.cc/en/Guide/MacOSX you simply download a program to the Arduino and turn it loose.
Now that you've got the serial communications part working, I don't think anything else in my Make board controller is going to help you much - the Arduino is a more autonomous board, while the Make board can be controlled from a program running in an outside source. And the Make board uses OSC as its programming language while the Arduino's language is based on Wiring.
I'd try sending the sample LED flasher program to the board and see what happens. I've found a great USB port traffic watcher for Windows but don't have an equivalent program for OSX.
Now that you've got the serial communications part working, I don't think anything else in my Make board controller is going to help you much - the Arduino is a more autonomous board, while the Make board can be controlled from a program running in an outside source. And the Make board uses OSC as its programming language while the Arduino's language is based on Wiring.
I'd try sending the sample LED flasher program to the board and see what happens. I've found a great USB port traffic watcher for Windows but don't have an equivalent program for OSX.