Using android to read data from Arduino MEGA adk

Hi all,

I am new to arduino Mega ADK but have some considerable amount of experience in android programming, i need to read values from the arduino board using an android device then output it out on the android device itself.

Now i have a switch connected to one of the digital pin in arduino mega adk, i just need to determine whether its logic 1 or 0. May i know how do i go about doing that? Thanks in advance.

Regards
Wei Sheng

Use digitalRead().

PaulS:
Use digitalRead().

Thanks for taking the time to reply, may i know how do i use digitalRead()? are there any examples?

may i know how do i use digitalRead()?

No, I'm sorry, it's a secret. Don't even think of going to the Reference page and looking.

are there any examples?

I'm sure there are. About 40 bazillion of them.

PaulS:

may i know how do i use digitalRead()?

No, I'm sorry, it's a secret. Don't even think of going to the Reference page and looking.

are there any examples?

I'm sure there are. About 40 bazillion of them.

Thanks... found them :3