Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Android app esp8266

Status
Not open for further replies.

abdi110

Member level 3
Joined
Mar 5, 2015
Messages
60
Helped
1
Reputation
2
Reaction score
1
Trophy points
1,288
Activity points
1,728
Hi everyone
I designed an electronic circuit includes atmega16 to control some processes.
I am going to upgrade this system to a wifi model with a esp8266 connected to the atmega16 via uart pins. Therefore I need to create an android app to be able to send commands to the esp8266 in order to feed atmega16 by this data via uart pins
Could you please help me how I can create this app.
Is App inventor 2 capable for this?
 

Something like this ?


This might make life easy to do the programming ESP8266 side -



Here is example of capability and simplicity of using Tuniot (ignore the type of problem, example
just to show how easy to code up a complex problem) -


The blocks translated into Arduino code and you use Arduino to program the ESP8266.

Tuniot online version free to use, a downloaded version is not free.


Regards, Dana.
 
Last edited:

Strictly, you don't need 2 microcontrollers at all. Just the ESP866 working as standalone CPU is able to run Arduino inside, just like you do with baremetal programming with the advantage of not needing to have any specific hardware to upload the code into the board. Regarding MIT App Inverntor 2, I've used a lot for long, you can even see some extensions I shared here on the Edaboard Blog's section. In the case of the ESP8266 not meet your pin count requirements, you can consider the ESP32 instead.
 
Last edited:
Strictly, you don't need 2 microcontrollers at all. Just the ESP866 working as standalone CPU is able to run Arduino inside, just like you do with baremetal programming with the advantage of not needing to have any specific hardware to upload the code into the board. Regarding MIT App Inverntor 2, I've used a lot for long, you can even see some extensions I shared here on the Edaboard Blog's section. In the case of the ESP8266 not meet your pin count requirements, you can consider the ESP32 instead.
First of all thanks for your reply,
Regarding to use of 2 microcontrollers I need that because I am going to have one PCB for both version (with and without WIFI)
Therefore I have a PCB for non WIFI model (with ATmega16) which is capable to add a esp8266-12f module in order to be a WIFI model.
Regarding to the extension you shared please kindly let me know how I can find some information and examples to learn how it works.
Is there any document or example to study and learn about the ClientTCP1 blocks how to communicate the android app with the esp826612-f module?
 




Some example projects.

Regards, Dana.
 
you should only make one model. with wifi.
it's completely overkill to use 2 controllers for that.
if it's a money problem, or licence for your device, then disconnect the esp8266 wifi by program
on your "non-wifi" version.
but make only one board with one esp8266.
it will be more difficult to deal with 2 controllers than only one.

you can make the esp8266 behave like a web server, so no app is needed on the android, only a web browser
html has enough tags available to make a nice user interface without the need of a dedicaced app.
 



Some example projects.

Regards, Dana.
Thanks dear friend
The examples you send are about web server
How and where can I find some explanations and examples about ClientTCP1?
--- Updated ---

you should only make one model. with wifi.
it's completely overkill to use 2 controllers for that.
if it's a money problem, or licence for your device, then disconnect the esp8266 wifi by program
on your "non-wifi" version.
but make only one board with one esp8266.
it will be more difficult to deal with 2 controllers than only one.

you can make the esp8266 behave like a web server, so no app is needed on the android, only a web browser
html has enough tags available to make a nice user interface without the need of a dedicaced app.
Thanks, I need to give my customer an android app, therefore I think it is better that we use ESP8266 as a tcp server not a web server.
 

Hi everyone
I designed an electronic circuit includes atmega16 to control some processes.
I am going to upgrade this system to a wifi model with a esp8266 connected to the atmega16 via uart pins. Therefore I need to create an android app to be able to send commands to the esp8266 in order to feed atmega16 by this data via uart pins
Could you please help me how I can create this app.
Is App inventor 2 capable for this?
I strongly suggest you use flutter. https://flutter.dev/
It's free, and you can write the code once and port it on several platforms.
If you want to control your ESP8266 or ESP32, then I suggest you use Bluetooth classic.
You can use this package for flutter: https://pub.dev/packages/flutter_bluetooth_serial
and you can use the Bluetooth serial from EspressIf for the ESP32/ ESP8266 explained very well here:
https://randomnerdtutorials.com/esp32-bluetooth-classic-arduino-ide/

This solution is very reliable in my opinion but will work only on Android Phones and Windows.
If you want to use iPhone as well, then you need to use BLE.
There is a library for flutter for BLE: https://pub.dev/packages/flutter_blue
but in my opinion, this library is not stable enough for iPhone.

Good luck,
Francesco
[moderator action: removed link to personal web site]
 
Last edited by a moderator:

    abdi110

    Points: 2
    Helpful Answer Positive Rating
Thanks dear friend
I have to use wifi because of the customer order, therefore the Bluetooth doesn't work for my case.
Actually I need an app for setting variables for temperature and some other data in the app and then send the amounts of these variables for esp8266 via wifi.
Esp8266 should send these data to atmega16 via uart pins.
Then in atmega16 C code we will get the variables data and use them to control a thermostat system.
Waiting for any comments since I am newbie in wifi communications.
Thanks again,
 

Strictly, you don't need 2 microcontrollers at all. Just the ESP866 working as standalone CPU is able to run Arduino inside, just like you do with baremetal programming with the advantage of not needing to have any specific hardware to upload the code into the board. Regarding MIT App Inverntor 2, I've used a lot for long, you can even see some extensions I shared here on the Edaboard Blog's section. In the case of the ESP8266 not meet your pin count requirements, you can consider the ESP32 instead.
Dear Andre
I decided to use esp32 for my project as you commented.
Could you please let me know if the esp32-WROOM is a good choice?
I need to immigrate from Atmega 16 to esp32-WROOM.
Therefore I need to change my c code to the arduino one; for example i need to use timer interrupts,
ADC, and etc in ardiono IDE which I am less familier with it.
Could you please advise some comments foe that?
 

Hi everyone
I designed an electronic circuit includes atmega16 to control some processes.
I am going to upgrade this system to a wifi model with a esp8266 connected to the atmega16 via uart pins. Therefore I need to create an android app to be able to send commands to the esp8266 in order to feed atmega16 by this data via uart pins
Could you please help me how I can create this app.
Is App inventor 2 capable for this?
for me, I use android studio to do the apps and it has given out the best outcome. I think I would advise you to use the same. I started by reading through this article https://www.hackster.io/thanksmister/android-to-esp8266-comunication-a84f50 before proceeding to the development of the app
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top