Go Down

Topic: one Arduino with 2 IRS + Flash, help! (Read 387 times) previous topic - next topic

jay_k

Nov 24, 2009, 09:13 am Last Edit: Nov 24, 2009, 09:18 am by jykim2 Reason: 1
hi guys, i confronted a bit complex problem when i was working on
a small project. it's using 2 irs connected with one arduino board,
and i'm trying to send 2 values that i got from 2 irs via board to Flash.


a part of code for arduino below

-----------------

firstSensor = analogRead(0);
   delay(10);
   Serial.print(firstSensor, DEC);
   Serial.print(0, BYTE);          
 
 delay (50);

-------------------------

as you see, one irs input connected with num. 0 socket,

and a part of flash script below

-----------------------------

serialServer = new XMLSocket ();  
serialServer.connect ("127.0.0.1", 9001);

serialServer.onData = function (data) {

     //   'data' contains the value received from arduino,
}

---------------------------------


with this code,
i have no problem with just one IRS ,  sent value to Flash and receive it and use it.

but what i wonder is ,
how can i send 2 IRS values from one Arduino board and receive it with FLASH?

i can't figure out the conception of receiving 2 seperated values in Flash from one Arduino board via Serial ..
:-(


plz give me a lesson  :'(


Go Up
 

Quick Reply

With Quick-Reply you can write a post when viewing a topic without loading a new page. You can still use bulletin board code and smileys as you would in a normal post.

Warning: this topic has not been posted in for at least 120 days.
Unless you're sure you want to reply, please consider starting a new topic.

Note: this post will not display until it's been approved by a moderator.
Name:
Email:

shortcuts: alt+s submit/post or alt+p preview