How to send commands from Android app to Arduino And vice versa

Hi all

I'm new to Arduino, I want to know the possible ways to send commands from Android app to Arduino And vice versa

I mean how to control the Arduino using two different networks

and if you have any tutorials or article that will help I will be appreciated

You have not told us how you want to communicate between the Android device and the Arduino - WiFi or Bluetooth?

If using Bluetooth then for receiving data in the Arduino have a look at Serial Input Basics - simple reliable ways to receive data.

...R

Robin2:
You have not told us how you want to communicate between the Android device and the Arduino - WiFi or Bluetooth?

If using Bluetooth then for receiving data in the Arduino have a look at Serial Input Basics - simple reliable ways to receive data.

...R

Thanks Robin for your replay

I meant to control the arduino using Android by WiFi

but is there a way to send commands but with different networks ?

for example if the android phone connect to network 1 and arduino connect to network 2
is that possible?

I don't know enough about WiFi networks to offer advice.

...R

Kernel:
but is there a way to send commands but with different networks ?

It may be possible, or maybe not.

It depends on the networks, their routers and firewalls.

If your question was can you expect to always be able to connect two devices in the way you describe across any two networks then the answer is no.

You need to be a lot more forthcoming about what you really want to do. At the moment it is just vague hypotheses for a result that is probably nonsense.

You can control Arduino by a raft of different means - wireless, wired, bluetooth, Ethernet, WiFi, phone, internet. anything you can think of, including smoke signals, and yes two different ones - at the same time even.

Nick_Pyner:
You need to be a lot more forthcoming about what you really want to do. At the moment it is just vague hypotheses for a result that is probably nonsense.

You can control Arduino by a raft of different means - wireless, wired, bluetooth, Ethernet, WiFi, phone, internet. anything you can think of, including smoke signals, and yes two different ones - at the same time even.

the idea is that I want to turn On/Off light bulb using the android app not just light bulb a lot of device (Home AUTOMATION )

so I saw some projects doing that using Bluetooth , WiFi shield but all of these solutions you have to be in close range in Bluetooth shield or connect to same network in WiFi shield

Thank you

Kernel:
or connect to same network in WiFi shield

What you can or can't do on a WiFi network has little or nothing to do with the specifics of an Arduino or an Android device. I think you need to learn how things connect to the internet and there must be thousands of online web pages about that.

I reckon it is easier to learn how to do network things using a PC because most of the examples will be about using a PC. When you know how to do it with a PC it should be straightforward to transfer your knowledge to the Arduino / Android problem.

...R

start reading here:

you will find prebuild hardware, flash software of the community, and you will be able to switch on/off something with your smarthphone.

One day, when you are experienced enough, you can write your own software (even with the Arduino IDE).