Pages: [1]   Go Down
Author Topic: I2C and Flash AS3 -NEED HELP  (Read 1851 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 3
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hello everyone. This is my first post one the forum.I need your help.

I'm making a project for school. I have 8 PCA9555 expanders connected to my Arduino Mega board via I2C bus (pin 20 and 21). I can use them with help of wire.h library. My problem is that: I have no idea how to comunicate them with flash AS3. I tried using AS3Glue and serProxy with no result.

How can I control I2C devices from AS3. Any idea? Please it;s very important to me.

« Last Edit: January 20, 2013, 07:49:23 pm by gabrielk » Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 3
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I forget to add that everything will be running locally, SWF file and arduino board on the same PC
Logged

Offline Offline
Sr. Member
****
Karma: 7
Posts: 292
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

You forgot a lot of other things as well ;-)

For example what is the overall goal of the project ? What do you want it to do ?

For example how is the Arduino connected to the PC ?
 A schematic would be helpful!
Logged


Offline Offline
Newbie
*
Karma: 0
Posts: 3
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Maybe i should start new topic about project in another forum.

Ok so from the begining. I'm graphic designer in Poland and it will be my graduation project. I'm making  some kind of board ( link to the blog: http://projectpompeii.blogspot.com/) As you can see (below) it will be a linear type of game. You will spin a wheel and move your pawn.


On the electronics side there will be:
1. motors which hide and show figurines and stuff, moving gates (controlled by arduino digital and analog ouputs)
2. smoke generators in volcano and air pump. I used 2 ecigarettes heaters (controlled by arduino digital oupts with relays)
3. spinning wheel-(3 digital inputs)
4.something about 100 playing fields with LED backlight ( I2C bus)

Everything will be hooked up to arduino Mega 1280 (or 2560 I have both) which will be connected to the pc with touchsreen for GUI.
 I want to use Adobe Flash for interface because I was a web developer for past few year and I'm very familiar with that environment and Action Script programming. It's also very simple and fast in animation type of things which I must do a lot in this project.

 For playing fields backlight I made PCB with 8 PCA9555 expanders (http://www.nxp.com/documents/data_sheet/PCA9555.pdf)
and SMD resistors for diodes. Which gives me 128 pin INPUTS/OUTPUTS controlled via I2C. PCB is working great that's not an issue. I tested it with wire.h library.


Now to the point.
I managed to connect ActionScript to arduino with AS3Glue and SerProxy.. I can send/receive digital and analog data from Adobe Flash.
But I don't know how to controll I2C transmission from AS3. (how to control SDA and SCL) No idea. Maybe I should use something else not as3glue and serporxy.

I have basic knowledge about transmission and protocols

Please help me. If something is not clear I will try to explain it more.
thanks in advance, Gabriel
 


Logged

Offline Offline
Sr. Member
****
Karma: 7
Posts: 292
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

From what I understand AS3glue uses the Firmata protocol and Firmata can communicate with the I2C bus. Just google Firmata I2C example and see if your find some information that will help you complete your project. I've found several examples and also this thread http://arduino.cc/forum/index.php?topic=103.0 that may help you.
Logged


Offline Offline
Newbie
*
Karma: 0
Posts: 2
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Friend, you have a beautiful design! I'm about to start my university of industrial design projects and thus are an inspiration to people like me! Keep it up, and if I can help you only need to ask!
Logged

Pages: [1]   Go Up
Jump to: