Go Down

Topic: interfacing arduino mega 2560 with Flash [firmata+AS3Glue 1.6] (Read 2364 times) previous topic - next topic

Alain_cor

Hello
I'm beginning to use Arduino for a project for a Adobe AIR application.

For that project I need 20 Digital Inputs and 4 Digital Outputs, and I can't use pins over 14.

So my question is :
is there a limit in Firmata or in AS3Glue ?
what can I do to solve my problem ?

is there and other solution for interfacing Flash/Adobe AIR with an arduino board ?

johnmchilton

Iif your Arduino doesn't have enough pins, you can get a bigger Arduino (easy solution)
http://arduino.cc/en/Main/ArduinoBoardMega2560

I don't know what Firmata or AS3Glue are, but the first person that comes along that does is going to ask:

Is there a limit for what?

Alain_cor

Hello,
I'm using an arduino 2560 because this model has more than 24 pins.
So it's not a hardware problem.

AS3Glue is an actionScript class (for Flash or Adobe AIR),
with this class Flash and Arduino can communicate together.

I am inspired by this tutorial for my project
http://www.kasperkamperman.com/blog/arduino/arduino-flash-communication-as3/

My project is a box with 20 buttons (my 20 inputs) and 4 lights (my 4 outputs)
when a button is pushed down arduino sends an order to my Adobe Air application
then the application shows a message on the screen (wrong) or (right).
If the message is right the Adobe Air application sends a message to the board which turns the light on.

I did a first test with one button and one light and it works fine
when I'm going over the pin 14 that don't work.

I'm going to try to connect firmata and processing to my arduino mega2560
in order to know if the problem isdue to firmata or as3glue.

Alain_cor

#3
Jun 07, 2011, 06:46 am Last Edit: Jun 07, 2011, 07:31 am by Alain_cor Reason: 1
So I did a test with firmata and processing.

I can send an order since the pin 2 to the pin 21 when I use Processing and StandardFirmata.
I'm so close...
why doesn't it work until the 25th pin ?
=(

Update
I found this topic which seems to be linked to my problem
http://arduino.cc/forum/index.php/topic,56850.0.html

mocheffendi

this is my problem too,

the problem is from the as3glue class because it has limited pin for writeDigitalPin(), it only support pin 2-13.

i need help...

thanks in advance

mocheffendi

I've updated the Flash Library arduino.as and now it is compatible with the Arduino Mega 2560 writeDigitalPin above 13.

I've tested and it works (pin 22 .. 53)

may be useful.

sorry for my bad english

this is link for download

http://www.box.net/shared/8640ythgs66uvdxlu4h9

kasperkamperman.com

I've included the changes from Mochammad on the as3glue site and in the bundle (including a modified example):
http://code.google.com/p/as3glue/downloads/detail?name=arduino_as3glue_bundle_v20.zip


Go Up