How to create an Android application to control Arduino via Wi-Fi?

I have an Arduino Mega board. I connected the WiFly module to it and established a connection with my Android phone. Now I want to create a simple program for my Android, where I press the button and the Wi-Fi LED indicator and turn it on to illuminate the Arduino LED?

+6
source share
2 answers

It really depends on the types of inputs that the Arduino board expects. What does the Arduino documentation say about Wi-Fi connectivity? I believe reading this would be a good place to start.

It looks like you are communicating with Arduino through HTTP . This makes things very easy. One quick way to do this (I have not tested this) is to do something like the following:

URL url = new URL(arduinoCommandURl); InputStream is = new InputStreamReader(url.openStream(), "UTF-8")); is.read(); 
+3
source

To avoid re-creating the wheel, see www.pfod.com.au , which has a general-purpose Android application for controlling microdevices via bluetooth or wifi with additional 128 bit protection. Control via SMS is under development. What is displayed on your mobile phone is fully microcode-specific. Android is not required at all.

Lots of sample projects and the free pfodDesigner application that allows you to create your own menus and then generates Arduino code for you that displays the menu on pfodApp. One pfodApp processes each menu you create. No Android encoding required.

pfodApp will also record and print data sent from your micro in CSV format. Again, the plots are completely controlled by your micro code. No changes are required in pfodApp.

+1
source

Source: https://habr.com/ru/post/911461/


All Articles