-->
Page 1 of 1

Use ESP8266 to control multiple LED's

PostPosted: Thu Aug 24, 2017 7:16 pm
by swandroid
Hi All

I'm very new to this and after many hours of searching, plenty of learning and plenty of hair loss I've resorted to asking for help.

Basically I want create an Android app to toggle for 3 LED's connected to WemosD1 over wireless LAN.

For something as simple as this, would you use ESP as a TCP server or use a HTTP server and what are the most appropriate libraries?

A person's advice who has developed anything similar or any links to a similar project would be most appreciated and also any pitfalls I may encounter.

Thanks in advance

Droid

Re: Use ESP8266 to control multiple LED's

PostPosted: Sat Aug 26, 2017 11:19 pm
by gdsports
Various ways to use a web server running on an ESP8266 to control 1 LED. No need to create an Android app if you use a web server. This assumes you want to use ESP8266 Arduino.

https://gist.github.com/bbx10/5a2885a700f30af75fc5
https://gist.github.com/bbx10/8863d90ebb08ecd9f5fd
https://gist.github.com/bbx10/667e3d4f5f2c0831d00b

Re: Use ESP8266 to control multiple LED's

PostPosted: Tue Aug 29, 2017 9:42 am
by swandroid
Thanks gdsports for the response.

I have checked the links.

I should've mentioned before posting that I have already set Wemos as web server and created arduino code that toggles led's using a web browser by calling a url on my LAN via PC (different pages for different states)

What I wish to achieve is to make a button using Android Studio that simply calls a html page. This page is created from my arduino webserver code (feedback is not necessary from wemos server for now).

If I can call say, 192.0.0.5/led1on, that would be suffice.

Maybe I should start a new thread with 'android' in the post title?

Thanks again,

Droid

Re: Use ESP8266 to control multiple LED's

PostPosted: Wed Aug 30, 2017 3:55 am
by Dennild
What kind og LED?
i am doing something similar but i need the Wemos to start runing a code for a WS2812B Strip.
Im currently looking into Mqtt as a protocol to send and recieve the commands with.

If its just a Relay or a single LED you need to turn on or of there is quite good videos on Youtube try and search for "Mqtt Led" or something the like.