RGB led control and button monitor - Need advice
Posted: Fri Jul 24, 2015 11:30 pm
Hi, I am a couple of weeks into working with ESP8266 SP-1 + Arduino Uno for a project and it has been a frustrating experience to say the least getting everything working as I would like. I am a complete noob when it comes to electronics but I have been dutifully following these forums, diagrams and how-tos to the best of my ability.
My goal - I have 2 devices on a lan network. An ESP/Arduino setup with buttons and RGB leds and a second device that is more or less a PC running Ubuntu. There are two functions:
1) The Ubuntu device can issue a GET request toESP/Arduino and switch on an RGB color combo depending on the name/value pair on the request. This will be done at random times, with no less than 3-5 seconds in between requests.
2) The Ubuntu device will send a GET request at regular intervals to query if a button is being pressed at that very moment. My thought was a user would press and hold a button - and while Ubuntu is sending a GET request once per second, the ESP/Arduino would return a set of 1s and 0s to communicate if buttons are being pressed at that moment in time. Up to 4 digits, i.e. '0010'
My current setup:
- ESP 8266 ESP-1
- Arduino Uno
- Arduino boots and sends AT commands to ESP to set it up as a client for my router and then as a webserver
- To the best of my knowledge I have external power source going to an 'LM1117' voltage regulator for powering the ESP 8266 - and I have a resistors in place to 'split the voltage?' for TX of Arduino going to RX of the ESP.
Current results:
- Initial bootup and ESP setup works fine.
- First 1-2 GET requests to ESP/Arduino work well
- Subsequent requests are met with 'busy' response
- I typically have to do a hard reset to get the ESP module back to a working state - at which time I can do 1-2 requests and then it locks up again.
--
I need to find a reliable solution where I can do a GET request once per second as well as random get requests spaced anywhere from 5 to 50 seconds apart.
Questions:
- Is the ESP-01 capable of handling this volume of requests as a web server? Right now it seems not.
- Based on these forums, I have been looking at the ESP-12 as a standalone device to handle web server + RGB led control + button monitor - would this device be compatible with the volume of requests I am trying to do and act as a microcontroller without Arduino?
- If I do get the ESP-12 - it seems like I have an option to use the new Arduino IDE + C method to code it or NodeMCU + lua - does either one perform better than the other for a web server setup I have described?
Thanks in advance for any feedback -
Steve
My goal - I have 2 devices on a lan network. An ESP/Arduino setup with buttons and RGB leds and a second device that is more or less a PC running Ubuntu. There are two functions:
1) The Ubuntu device can issue a GET request toESP/Arduino and switch on an RGB color combo depending on the name/value pair on the request. This will be done at random times, with no less than 3-5 seconds in between requests.
2) The Ubuntu device will send a GET request at regular intervals to query if a button is being pressed at that very moment. My thought was a user would press and hold a button - and while Ubuntu is sending a GET request once per second, the ESP/Arduino would return a set of 1s and 0s to communicate if buttons are being pressed at that moment in time. Up to 4 digits, i.e. '0010'
My current setup:
- ESP 8266 ESP-1
- Arduino Uno
- Arduino boots and sends AT commands to ESP to set it up as a client for my router and then as a webserver
- To the best of my knowledge I have external power source going to an 'LM1117' voltage regulator for powering the ESP 8266 - and I have a resistors in place to 'split the voltage?' for TX of Arduino going to RX of the ESP.
Current results:
- Initial bootup and ESP setup works fine.
- First 1-2 GET requests to ESP/Arduino work well
- Subsequent requests are met with 'busy' response
- I typically have to do a hard reset to get the ESP module back to a working state - at which time I can do 1-2 requests and then it locks up again.
--
I need to find a reliable solution where I can do a GET request once per second as well as random get requests spaced anywhere from 5 to 50 seconds apart.
Questions:
- Is the ESP-01 capable of handling this volume of requests as a web server? Right now it seems not.
- Based on these forums, I have been looking at the ESP-12 as a standalone device to handle web server + RGB led control + button monitor - would this device be compatible with the volume of requests I am trying to do and act as a microcontroller without Arduino?
- If I do get the ESP-12 - it seems like I have an option to use the new Arduino IDE + C method to code it or NodeMCU + lua - does either one perform better than the other for a web server setup I have described?
Thanks in advance for any feedback -
Steve