Arduino Flash communication AS3 – As3Glue bundle

Video tutorial on how to setup communication between Arduino and Flash (Actionscript 3.0) with Firmata, As3Glue and Serialproxy. You can download a bundle with examples and the libraries/software.

I’ve created a Flash monitor application with As3Glue to make it easier to start with Flash Arduino communication.

Glue is an ActionScript 3.0 library that enables communication between Flash and Arduino boards with Firmata. Since Flash cannot interface the serial port directly we’ll use Serialproxy in between. Serialproxy converts incoming serial data the XMLsocket data.

The monitor is useful to check if all the connections are working good. You can monitor directly all the sensors and actuators connected to your Arduino board.

The example code file is a start point to program your own things controlled by Arduino. Its support the normal Arduino board and the Arduino Mega.

Included files :

  • AS3Glue files (.net.eriksjodin.arduino)
  • Tinkerproxy osx (renamed to serproxy)
  • Serialproxy windows (renamed to serproxy)
  • as3glue_standalone_monitor.app
  • as3glue_standalone_monitor.exe
  • as3glue_standalone_monitor.fla
  • as3glue_program-example.fla

The Firmata library is included with Arduino itself. Make sure you use Arduino 018 or higher, because the Firmata library included in version 017 is not stable.

  • Update (12-05-10, v1.3): I’ve updated the code for the support of two servo motors (pin 9 and pin 10).
  • Update (17-09-10, v1.5): Program example simplified. Now executables included and hosted on Google code.
  • Update (11-02-11, v1.6): Program example included state-change example. Arduino UNO connection example in serialproxy.cfg.
  • Update (20-10-11, v2.0): Included support for the Arduino Mega in the program example. Thanks to Mochammad Effendi.

Download the zip-file : arduino_as3glue_bundle_v2.0


</a

  • Hi Kasper,

    I just discovered this little tool you made. This is great stuff! I will use it with my students to troubleshoot their projects. Thanks for making it available to the community.

    Cheers!

  • By the way, you can also bypass security settings on an swf file by going to this address and authorizing the file, its parent folder or a whole drive:

    http://www.macromedia.com/support/documentation/en/flashplayer/help/settings_manager04.html

    I realized by watching your video that the same result could be achieved by publishing the .fla as a projector. I just never thought of doing that… Thanks again.

  • David Daniel

    Hi Kasper, thanks for the amazing video tutorial and code. It has been really helpful.

    I wonder whether this code can be used with the USB Host shield from circuits@home (www.circuitsathome.com)? I’m trying to use a playstation3 sixaxis controller for its accelerometer and gyro inputs but don’t seem to be having much luck. I’m guessing maybe because the hostshield has its own custom library, but when I follow your tutorial the standalone montior shows successfully connected but the graph stays more or less static and I don’t seem to be able to receive any data from the controller. Is there any way to use as3glue in this way? Or is there something I’m missing?

    Many thanks,

    David

  • Hi David,

    I think its will be difficult since you don’t work with the normal I/O pins from the Arduino. Of course you can send serial data ( with serial.print ) to Flash. I have a AS3 script that listens to normal serial data send by the Arduino. Didn’t have time yet to publish it here. Send me a mail and I will reply it to you.

  • Hi Jean-Phillippe,

    Thanks for the remarks and the Serialproxy 0.1.4 version.

    The ‘advanced settings’ wouldn’t open anymore with right-click on my mac, so I thought it wasn’t supported anymore. Also because I was reading that Flash 9 and beyond have more restricted security settings and that you’ll need a ‘socket policy file server’.

    See : http://bit.ly/as3glue-examples-cs247_securityreadme

    Another disadvantage with the security settings preferences is that you’ll need an internet connection to change them.

  • Jim

    Hello,

    Great tool! But I was wondering how to control a servo with Glue. Using a PWM port makes the servo behave very strange and unpredictable so I was wondering if it’s possible to use the servo library from Arduino. Or maybe there is another way to do it :)

    Many thanks,
    Jim

  • Hi Jim,

    I think that standardFirmata has servo support. As3glue supports 2 servo motors.

    This you have to put in the ‘onReceiveFirmware function’ :

    arduino.setupServo(pin,angle): Initialize servo timer routines on a pin. Pin must be 9 or 10 in the current implementation.
    between 0 and 180.

    From the timerEvent function you can use :

    arduino.writeAnalogPin(pin, angle): Write a servo angle (in degrees) to an output pin. value has to be a number between 0 and 180. Pin must have been initialized with setupServo() before.

    For more info see the As3Glue reference :
    http://protolab.pbworks.com/As3glueReference

    Let me know if it works, maybe I can modify my example files for servo support.

  • Jim

    I managed to get it to work, thanks! I imported the ArduinoWithServo file which worked great combined with the code you posted.

  • I’ve put the AS3 script with explanation online :
    http://www.kasperkamperman.com/blog/arduino-flash-communication-as3-messenger/

  • Great tutorial. I am using Arduino with 3 Potentiometers to talk to Flash for an interactive media project for my thesis. I was thinking of trying out ArduinoProcessingFlash with processing as the middleware from Kan Yan Li, http://a.parsons.edu/~lik43/doc/?p=859.

    Do you know any advantage to this? I don’t think I need to use Processing really except for displaying a video onscreen as Arduino’s pot. inputs trigger/respond to events in Flash/AS3.
    Is it more robust to just cut out Processing (the middleware)?

    /Vinny

  • Hi Vincent,

    I couldn’t open that website, but I think its using Processing for the serial to Xmlsocket conversion. In my version Serialproxy is used for that.

    You need the middleware since Flash cannot communicate directly with the serialport.

    Another option as middleware could be funnel.cc.

    I prefer Serialproxy for most of my projects and teaching, since its the most basic option.

    Kasper

  • Ruben Gonçalves

    Hello kasperkamperman, where can I get “as3glue_standalone_monitor.fla” and “as3glue_program-example.fla” ? Thanks for all :)

  • They are in the zip-file.

  • Hi kasperkamperman.

    I wired a push button switch.
    I’m monitoring each of the pins from 2 – 13 as digitalIn.
    The monitor displays two inputs at the same time when my push button is connected to one pin only.
    For example: Push button sends the signal to pin 8 and the monitor displays that 7 and 8 are being pressed.

    ¿Why is this?
    I already tried this with two different Arduinos.

  • I was using tty instead of cu on my serial port. I don’t know what’s the difference but apparently it was that what caused the false positives.

    Although I still get some when the push button bounces.

  • Since there is nothing connected to pin 7 (no ground, no 5V) it can change due electrical noise. If you watch the analog inputs you see the same effect. Change one input, and they probably change all.

    The solution is to wire the unused pins to ground. However, that would be just for the looks. If you didn’t connect something to pin 7, you don’t want to listen to it in Flash. It doesn’t matter that it changes, if you don’t use the values of that pin.

  • True.
    When Flash is listening to pins 7 and 8 with two different buttons there is no noise.

  • Hiya,
    thanks for the reply.
    Yes that site was in downtime last I checked. But I figured out what I wanted to make/do. So I went with Tinkerproxy and as3glue as you recommeneded.
    Having quite a lot of fun with making the Flash App and dynamic filters from pixel bender.

    Best regards
    V

  • Kadri

    Hi Kasper,
    first of all thanks for this tutorial. It is very easy and good explained.
    I have a problem with my Arduino Mega. I don´t get no response. I followed all your steps. I loaded Firmata to the board. Then i configurated the serproxy as in your discription. After starting the flash program, there are no errors displayed. But on the board there is no signal on pin 13.
    After following your steps a couple of times i took a duemilanove Board and it works perfectly.
    Do you have any idea why does´nt work the Arduino Mega Board?
    Thanks for your answer!
    Cheers,
    kadri

  • Said

    I agree with you Kadri. I also have trouble about that. In addition, when I pressed reset button there is no anything change, the loaded program still works. what a difference could be between mega and duemilanove?

  • I don’t have time to dive into it now. I think you’ll have to search if Firmata supports the Arduino Mega in the same way as the duemilanove. I think not, because it has different outputs.

  • mipu

    hi, thank you for your tutorial. i am a beginner and have the following issue:

    serproxy is running and telling me “server thread launched” and “server(6) – thread started” so i guess i did the configuration of serproxy right.

    when i start the standalone monitor and i want to turn pin 13 on, i have to press several times until finally the led is on. if i want to turn it off i also have to press several times until it does what i want.

    do you have any idea what my problem is? pleas help! thanx

  • I don’t know which Arduino board you have, but with the Arduino Uno I’ve encountered the same issues. I think it has to do something with the new serial chip. If you can get an Arduino Duemilanove or older I would go for that.

    I posted a topic in the Arduino forum about this as well: Uno Firmata as3glue

  • milton ortiz

    hi. i’m confused and can’t find any documentation.
    i have arduino with hmc6352 compass sensor, i can see the degrees oanduino monitorbut in flash i don’t see anything, even in your monitor, any help around?

  • The monitor only works with Firmata. I think your compass sensor uses a script in Arduino. Try to send the values to Flash with the code in my other post:

    http://www.kasperkamperman.com/blog/arduino-flash-communication-as3-messenger/

  • BOOFY

    Any time to work out all the digital ins and outs for the Mega? Or maybe post some hints to look at to figure it out? I am able to successfully test all inputs and outputs with the Arduino 0021 StandardFirmata and http://www.pjrc.com/teensy/firmata_test/ program. Any help would be appreciated.

  • Nope. I’ve no time for that now.

  • Seems that its was an issue with the Firmata included in Arduino 0021. The version included in Arduino 0022 seems to work fine. By the way an nice tool to test and monitor Firmata without Serialproxy is Firmata_test : http://www.firmata.org/

  • Charles Law

    Hi I have successfully got this to work thanks.

    If I wanted to read an RFID cards through an Arduino reader through Flash do you have any suggestions?

  • Use the messenger library (see a different post on my page). As3Glue is for Firmata, that makes Arduino act like a sensor board.

    http://www.kasperkamperman.com/blog/arduino-flash-communication-as3-messenger/

  • Lex

    Hi,

    thanx for the cool library.

    I’m trying to connect 4 or more servos to the Arduino.
    The current AS3Glue can only work with servos on pins 9 & 10.

    Where should I be looking at to tweak this to >2 servos?
    AS3Glue? SerProxy? Firmata?

    Thank you.

  • Hi Lex,

    I think you should look if Firmata supports it. If Firmata supports more servo’s, you could rewrite as3glue.

    Serialproxy is just to convert serialport messages to net socket.

    You can do it without Firmata easier I think. Since Arduino the Arduino servo library supports 12 servo’s for sure. Just send a serial string with 4 servo positions like this for example: 180, 90, 0, 90

    To do serial communication with your own “protocol” check my other post: http://www.kasperkamperman.com/blog/arduino-flash-communication-as3-messenger/

  • Hi,

    I’ll give you my warmest congratulations, the application is very useful and works very well.
    I was looking for something like this for a long time for my project with Arduino. Congratulations!

  • Tomas Del Bianco

    Thanks, very useful!
    this is my first connection whit flash: http://www.youtube.com/watch?v=0148Qeq61fM :)

  • The new version works with Arduino Mega now.

  • Connection with Serproxy established. Wait one moment.
    …. after that noting come.. i wait for long time….. can you please tell me what is the problem…
    please send me email on mitesh_patel98@yahoo.com

  • You watched the tutorial, read the readme.rtf file. Probably serproxy doesn’t see your Arduino. You’ve uploaded Firmata and edited the .cfg file with you serialport name?

  • millerboy220

    Wonderful app, I have loved flash since Flash 5…this is great for testing. I had this working yesterday, made some changes to get the Chambers Blink sketch to work, which it does, went back to yours because it is so much better, and set the .cfg for proxy apparently correct, and it hangs on the connection…I can go right back to another flash program and connect, what small thing am I missing here…I really want to use this…thanks so much.

  • millerboy220

    nevermind, im an idiot, found the prob…

  • Great that you’ve could solve it. A colleague of me is developing a new version, with even more stability with unplugging, plugging and error handling. Will publish that if its ready.

  • ddawkins

    I’m sorry to bother you but I am having a problem getting Flash to hear my RFID reader.  I have tried almost all of your Flash Arduino toolkits and I just can’t get any of them to hear the serial output from the RFID reader (Parallax USB RFID reader).

    I have been able to verify that the Arduino script is sending the RFID tag ID.  I get the data on the Arduino serial monitor.  It looks great.  But . . . Flash never gets the data.  I have put trace statements in all of the pertinent functions and the onReceiveData funtions never go off.  I never see a trace from them.

    I am using a Mega 2560 board and have tried adjusting the pinouts but still no go.  Again, the RFID reader code is working and the Serial.Print or Serial.Println statements are outputing to the serial monitor.  Serproxy is working, it sends data to your GUI.  I don’t know what I am doing wrong.  Any help would really be appreciated.  Thank you in advance.

  • Well, AS3Glue only works with Firmata. So thats the code you’ll have to use on the Arduino. Firmata is like a sensorbox. 

    In this case you work other software on the Arduino, that sends serial data. 

    Check out my other post: http://www.kasperkamperman.com/blog/arduino-flash-communication-as3-messenger/

    If you want to read serial commands in Flash.

  • ddawkins

    Thank you very much for your quick reply.  I have also tried the Messenger toolkit and in that case, the trace statement in the onArduinoData function never fires (it never shows up in the output window) even though I have inserted a Serial.Print statement in the arduino code to make sure something is being sent.

    Is there some special way I need to send the serial information (I am just sending a test string) or something I need to do to force a send over Serproxy to Flash?  Thank you.

  • Try to check if you Serproxy configuration is good. You could test this with the Firmata As3Glue bundle. Remember you’ll always need Serproxy in order to let Flash/Arduino communicate.

    A serial.print should work good, but pay attention to the Baudrate (the number after Serial.begin( )), this should be the same as in the Serproxy program (for As3Glue configured as 57600).

  • ddawkins

    Yes.  Serproxy seems to be OK.  I can confirm the connection and I have been able to trace data sent TO the Arduino from Flash, so I think it is working.  I am using 57600 and I get, what seem to be, normal messages in the Serproxy window about waiting . . . connecting . . . and disconnecting when I shut down the Flash app.

    I suspected Serproxy but it seems to be communicating from Flash to the Arduino.  Is there some other test I should do to verify that Serproxy is not blocking data from Arduino to Flash?  Thank you.

  • The only thing I can think of is the test the As3Glue bundle with Firmata. If thats working, then you know for sure that 2-way communication is working. Its not so much work, just upload standardfirmata to your Arduino (included with Arduino examples) and fire up the standalone monitor application.

  • ddawkins

    Sorry, I forgot to mention that I have run the AS3Glue standalone application successfully.  I don’t have all of the sensors hooked up but the monitor shows the wave graphs moving and the bar heights change over time.  It looks like everything is working in the monitor (without real sensors connected).

    So, I think Serproxy is working.  I have tried to use Serial.print(“Hello world!) as a test but it doesn’t seem to cause any activity in Flash.  Thank you.

  • ddawkins

    I have been able to get data to flow from Arduino to Flash.  The change I made was to remark out the code that enabled and set up the serial port for the RFID reader.  I will need to put that code back in to make the system work.  I am using Serial2 as the serial port for the RFID and leaving Serial available for Serproxy.

    Should I be able to use both serial ports (Serial2 communicating the RFID data to the Arduino and Serial to communicate with Flash via Serproxy)?

    Do you think I need some kind of special code to allow them both to work?  Thank you.

  • Yes, I think you have to search on SoftSerial in combination with the hardware serial port. The computer only communicates only with the hardware serial port, so you have to create a softserial to communicate with your RFID reader I think.

    I have no further in experience in that subject though.

    http://arduino.cc/hu/Reference/SoftwareSerial

    Kasper

  • ddawkins

    OK.  I think I have the Arduino communicating with Flash using your code.  It looks like the problem was that I was calling sendInputsToFlash AND calling Serial.print from inside the Loop.  I removed the reference to sendInputsToFlash and the data started to flow.

    I am using a Mega 2560 board.  Unlike the Uno, it has four physical serial ports addressed as Serial (the standard pins 0 and 1), Serial1 (pins 18, 19), Serial2 (pins 16, 17) and Serial3 (pins 14, 15).  It is allowing me to call the setup for each port separately like this:

         Serial.begin(57600);  // start Serproxy serial port (USB connection to PC)
         Serial2.begin(2400);  // start RFID serial port (in this case, connected to RFID reader)
     
    Now, I just have to work out displaying and/or using the RFID data to trigger some action in Flash.
     
    Thank you very, very much for responding and helping with this problem.  I really appreciate it.

  • Good to hear.

  • dhidee

    hey im using a windows computer when i want to upload firmata into my arduino board i have learn that we have to choose a port 3 or 7 for windows computer but in my case i cant seem to find port 3 or 7. theres only port 1. any ideas? 

  • Did you install also the drivers for your board.
    Did you try to upload an example sketch (blink) for example and checked if that worked?

    Please read the troubleshouting section on arduino.cc first, because I think your problem is not firmata related.

  • dhidee

    Hey. Thanks for the reply. The problem have been solve. thankyou. But after i did everything the serproxy showed me that refused connection. i already disable the firewall. Could it be the code? But the code i am using is the as3glue code. 

  • Please configure it well. I suppose you did something wrong in the .cfg file, so please read carefully an decomment the right things.
    This is not related to the as3glue code yet.

  • Hey, i’m using arduino BT, currently every thing is alright, but whenever i test it on the standalone_monitor, the socket closes immediately. I will see connection refused on the serproxy.cfg even though configuration of ports and baudrate are same as firmata.. any ideas??

    # Example configuration file for serproxy – PC Version# For use with Firmata 2.0# Note: in this example, Arduino uses COM3 – this is reflected in the line comm_ports=3 #and net_port3=5331 below. # If your board is on COM4, you’d have to change those lines to #comm_ports=4andnet_port4=5331. # Do not Transform newlines coming from the serial port into nilsnewlines_to_nils=false# Comm ports usedcomm_ports=7net_port7=5331# Default settingscomm_baud=57600comm_databits=8comm_stopbits=1comm_parity=none# Idle time out in secondstimeout=300

  • You removed the comment symbols (#) in front of the lines?
    You connected by Bluetooth or with the serial port? I don’t have experience or an idea if it works by Bluetooth. Check out the maximum baudrate for bluetooth, this can be different. 

  • yup. i connected by bluetooth. had no idea how to check the baudrate for bluetooth at all.. first time doing flash projects with arduino..

  • Well read the documentation. Arduino has pretty good hardware descriptions on their site. If this is your first experiment I would suggest to try it first with an USB cable over the serial connection. Then make the step to Bluetooth. 

  • Alright. I settled the baud rate for bluetooth etc to 56700 as stated in firmata already. But still facing the error of socket error : 127.0.0.1, i’ve checked the localhost in my computer already and they both matches.. however serproxy wouldn’t work..

  • 昶衡 賴

    hi, i have a problem with communicate between arduino and AS3

    my arduino ‘Leonardo’

    on win7 64bit, test the communicate with flash, but every time when i compiler my AS3 Glue the bundle ,It only show as this picture:

    http://images.plurk.com/580f7bcd9c536330bbfadb3a74f459ef.jpg

    “Connection with Serproxy established. Wait one moment.”

    What’s happend with this?  if in Mac OSX is’t all ok but not work out in windows.

    Could you please help me with this problem?  thank you.

  • I don’t work on windows so I can’t reproduce it now. Do you get some information in the Serproxy application?

    You say it works with OSX so there is no problem that its the Leonardo? Maybe you have to install drivers on Windows? Did you try to upload Firmata with Arduino on the windows PC.

  • 昶衡 賴

    sir I try 
    upload Firmata with Arduino and install drivers on the windows PC.But,Problems still exist

  • dina Amin

    Hi! I am new to arduino n all this, so please bare with me :) I am making an interactive game for my final project, using arduino + flash AS3. I already managed to use serproxy to communicate with my arduino uno, and i can see from the monitor that when i turn pin13 on the LED lights. But from there i have no clue on how this act. works! May i please request a for dummies tutorial on how it works afterwards?

    Thanks!

  • I am using windows xp and arduino uno. I also did the correct changes in serproxyCFG file but
    when i open serproxy it said
     Connection with Serproxy established. Wait one moment….. after that noting come.. i wait for long time…..
    it’s also not ask for incoming network connection.
    thanks

  • Make sure you read the readme good. Dit you install the drivers for Arduino on your computer, and did you upload Firmata to the Arduino print?

  • Deive Alves

    Hi All,  I’m trying to get a reading from my SR04 sensor into Flash. How do I do that as3glue.
    thank you
     

  • Thats quite difficult, since its not an ordinary digital or analog sensor.
    Maybe this library is handy: http://code.google.com/p/arduino-new-ping/
    Then check out the Flash communication post over here: http://www.kasperkamperman.com/blog/arduino-flash-communication-as3-messenger/
    As3Glue works with Firmata, but thats most util with normal analog/digital sensors.

  • Hi. Not sure if anyone has already asked.. Not sure you covered it in your video, is there a way to wrap the flash and SerProxy together and auto detect the USB port/IO so that this can be run as a standalone final application?

  • Not that I’m aware of. The problem is that every Arduino has a unique serial port number (depends also which chip the Arduino contains).

  • Deive Alves

    there is a sensor to calculate distance that matches the as3glue?
    thanks again

  • You can use all types of sensors. For example Sharp distance sensors are really useful. http://www.acroname.com/robotics/info/articles/sharp/sharp.html

  • Olierook

    It works! however I cannot open the source files; Unexpected file format.
    I have Flash 8, could that be the reason?

  • Hi, i don’t know what is wrong, my arduino is 0022 version and i have a flash cs5, i did every thing and when i open as3glue_standalone_monitor in flash it says “connection stablished. wait” and nothing happens

  • Did you upload Firmata, install the drivers etc. Please watch the video and check all the items in the readme file.

  • Oscar Limón

    Hi!, how can I do to use the pulseIn function in AS3 with Firmata? I need to read the information of an ultrasonic sensor HC-SR04 in my actionscript file. I hope you can help me. Thanks!

  • A collegue of my is busy with a major rewrite to support more Firmata possibilities in AS3.
    I’ll ask if this is supported, maybe I can send you the code so you can test this.

  • Oscar Limón

    Wonderfull! Do you know if does exist another way to read the information send from arudino serial intro flash?

  • Yes, see my other post: http://www.kasperkamperman.com/blog/arduino-flash-communication-as3-messenger/

    You just can send data with Serial.println().

  • This could be a useful library as well:
    http://code.google.com/p/arduino-new-ping/

  • ArduiNoob

    Good day, wonderful site and information!

    Any updated info on pulseIn? Trying to read 20 steady pulses at 50ms intervals. I know the hardware that is sending the pulses is spot on, and I know that the flash timer isn’t perfect, so its hard to capture each and every pulse that comes in. Or even some idea on a buffer to ensure that each pulse is read.

    Thanks

  • ArduiNoob

    Also, this might be a noob question, but I have 3 digital inputs one pin (2), (7) and (8). I notice when I read pin (2), pin (7) gets triggered as well, and vice versa, when I read pin (7), pin (2) gets read when they are supposed to have separate functions / buttons.

    Is this because they are on the same I/O block? This was also the case when I just had 2 inputs, one on pin (5) and one on pin (7). I had to separate the inputs to the two I/O blocks (pin (7) and pin (8)) in order for each not to trigger each other. Just curious if anyone has run into this issue.

    Thanks.

  • It’s just noisy. If you don’t have anything connected it can measure anything. If you want them to stay 0 put them to the ground. However mostly this is not necessary, just don’t do anything with those values of the pins you don’t use is enough.

  • ArduiNoob

    Thanks Kasper!

    And actually I (kind of) figured out a solution to my “pulseIn” question. Using the following, I can successfully detect input from any pin (push button or 300ms pulse) without running a refreshTimer:

    function onReceiveDigitalData(e:ArduinoEvent):void {

    trace(“Digital pin ” + e.pin + ” on port: ” + e.port +” = ” + e.value + ” pulse “+pulseCount+ ” bcount “+bounceCount);

    }

    a.addEventListener(ArduinoEvent.DIGITAL_DATA, onReceiveDigitalData);

    I had to write a 50ms delay timer between pulses to get a more accurate result (100% success rate).

    Thanks again for this great package!

  • Nik Blasdale

    Hi,
    I believe I have followed the instructions in the read me correctly.
    I am running arduino 1.0.5 for windows & have uploaded the standard firmatta & old standard firmatta, these both upload successfully but do not respond when pressing send in the serial monitor as it does in your video. I have a Leonardo R3 board.
    I have changed the serial port to 5 on both lines of the config file in the windows section & the terminal window opens with “waiting for clients” as the message.
    When I then run the monitor exe the terminal window declares “server thread launched” & “server(5) – thread started” the flash exe opens (flash player 10) with the message ” Connection with Serproxy established. Wait one moment” after this nothing happens.
    I am running windows 7 64bit SP1.
    Thanks for any help you can offer.
    Nik

  • Nik Blasdale

    I have just tried on a mac & it works fine, could still do with working out why it doesn’t work on the PC though. Thanks

  • I never tested it with an Arduino Leonardo. Maybe a driver issue on Windows?

  • Nik Blasdale

    I can upload sketch’s to the Leonardo from the PC so I can only assume that part is ok. is there a way to see where communication is getting to in each direction? Thanks

  • You could test with the test program on firmata.org. I googled and found that someone had problems with Serproxy and Windows7. Below you can find an updated version. Can you let me know if it works, than I can add it to the bundle or this page:

    http://lj9.mexinetica.com/bloginetica/comentarios.shtml?2011.04.12.10.09.22.+01.

  • jb coulter

    I got the monitor working. Very nice! i am trying to make a GUI with flash that sends instructions to stepper motors.

    Can you tell me how to set up AS3glue to see stepper motors attached to a Adafruit stepper motor shields (it has i2C)? http://www.adafruit.com/products/1438

    The shield is mounted onto an Uno.

    I have a sketch that ican send to you that has the needed code that can control each motor.

    Thanks you.
    jbc

  • Krisjanis Urcs

    Hi Kasper,

    I am using Arduino LilyPad USB (Atmega32U4) and latest Firmata version on Windows7 and I did everything from the tutorial.

    However when I open monitor.exe it shows “Connection with Serproxy established. Wait one moment.” and nothing happens.

    Is there any solution for this?

    Thanks,

    Krisjanis

  • Maybe the firmata version is different. I didn’t test it with a lilypad and don’t have one to try things out. Just try different steps. You can also try a normal Arduino, if that works it’s probably at the side of the Lilypad.

  • jim

    Hi Kasper, trying the standalone monitor and get the message ‘Failed to open comm port – connection refused’ in the terminal. Any suggestions to debug?

  • Martín Bursesi

    Hi, Kasper.. how could we send a rgb value from as3 to arduino in order to iluminate a led rgb with the color provided? I’m using this but the led is not turned on:

    a.writeAnalogPin(9,55);

    a.writeAnalogPin(10,35);

    a.writeAnalogPin(11,90);

  • Did you also use values of 255? In the configuration array you also need to configure the pins as analog outputs.

  • Colm McGettrick

    Hi,
    First thanks for this resource, its been a while since I played with an Arduino, and ran through your As3glue v14 and v 2 options with an Arduino Uno, both worked fine on OS X 10.6.8 as long as i substituted the cu.usbmodem option for the cu.usbserial option and edited the serproxy config file to match the 1.0.5 Arduino IDE. Is the reason for this because the Uno no longer uses an FTDI chip ? Note cu.usbserial was not an available option when Arduino 1.0.5 was installed. Are there benifits that I am not seeing to using the cu.usbserial option ( installing the extra drivers) when interacting between and Uno and Flash.( is it possible) Your advice appreciated.
    Regards Colm

  • Is the reason for this because the Uno no longer uses an FTDI chip ?

    Indeed.

    I don’t really get your other part of the question.

    This is how the config file should be.

    In Arduino the /dev/tty part is selected, but we will use the /dev/cu part below

    example Arduino Duemilanove and older:
    serial_device1=/dev/cu.usbserial-A6008rZN

    example Arduino UNO:
    serial_device1=/dev/cu.usbmodem641

  • Colm McGettrick

    Thanks for the reply and your answer, which has covered both questions, the 2nd question was worded after being reliable informed of one person interacting with an Uno via a cu.usbserial option which was not something I could replicate. I need to reintroduce myself to the Arduino :-) Thanks Colm

  • ArduiNoob

    Hi Kasper,

    How can I receive info on Pin 0 (RX) from a device (coin acceptor) that is connected via USB that creates a SERIAL connection?

    Thanks!

  • You can’t. You can use SoftSerial for a software serialport and connect the coin acceptor to that. Or you can upload an empty script to Arduino and just use the serial from the device.

    You can’t use this with Firmata though. See this info to receive serial strings:

    http://www.kasperkamperman.com/blog/arduino-flash-communication-as3-messenger/

  • Fabio Curtidor

    need help to connect the flash bluetooth..con through serproxi

  • Chris

    Hi Kasper,

    I am actually developing some kind of graphical user interface in flash like drag and drop flowchart. all I want is per symbol like servo motor if i drag it to the flow chart. It will produce a code and Can actually upload that code directly in arduino using flash..

    Is it possible?

  • Syed Asim Ali

    Hi, jim i got into the same problem but figured it out that windows firewall was blocking the port 5331, here is the link you can follow i know it’s toooooo late but may be it can help others :)

    http://www.thewindowsclub.com/block-open-port-windows-8-firewall

    I am using windows 10 and it’s working , what a great work kasperkamperman did in 2010 that i am still using it and it’s worth it.
    thank Kasperkamperman

  • Shammi Seth

    Hi how do you enable this using wifi. did you use serproxy. So correct me if i am wrong your arduino is still connected to the computer via USB. So the wifi on the computer lets you control it via mobile. Is there no direct communication via a andino shied and mobile. will it be possible via a Arduino Flash communication AS3 – Messenger library?

  • If you would like to take the WiFi road, you probably have to find another source of information. You have to let Flash communicate over TCP/UDP (there is a bridge for that). I’d recommend looking to OSC communication. There are different libraries for that (Arduino/Processing) and maybe Flash.

  • Shammi Seth

    How about Bluetooth. There are several Bluetooth ANE available. Should I try that.