Post here first, or if you can't find a relevant section!
7 posts • Page 1 of 1
You do realize that there is an Arduino core for the ESP8266 so that you do not have to utilize it in "modem" mode but rather can just compile your Arduino program and have a self-contained system ... no auxiliary microcontrollers required. If you need more power than the ESP8266, move to the ESP32 with 2 cores.
Core & Documentation: https://github.com/esp8266/Arduino
I have some ESP8266 Arduino examples on my project page.
Well, strictly speaking, the AVR 8-bit chips can run at 3.3V at 12MHz. For strict compliance to spec, the 8 MHz 328P mini board is a natural:
https://www.aliexpress.com/item/1pcs-lo ... 33602.html
However, I have used 16MHz minis for years at 3.3V ... just remove the 5V regulator ... but no guarantee.
I see some examples using esp8266 from your link , so my question sir is how can I send a sensor reading from the "bluepill" pass it to a webserve via wifi module? Sorry for this noobee question but I`m confused right now.
The ESP8266 module can act as a client, a server, and Access Point. So, an ESP8266 configured as a client can log-into an AP on your local network. From there, connectivity on the LAN to a web-server is available. There are a variety of methods to post the data to a webserver.
An example may be in order: https://www.hackster.io/detox/send-esp8 ... nds-7ebfec
Another example: https://www.hackster.io/rayburne/esp826 ... xml-aa78f1
And yet another: https://www.hackster.io/rayburne/nodemc ... ets-5956c4
It's important to understand that there are several different approaches to using the ESP8266. The most appropriate may depend upon the specifics of your project. If you were to describe your "sensor", the specific ESP8266 board you have in hand, and your use case (how you expect your project to work) you could get more specific guidance.
1) Use the AT command interface. This means the ESP acts as a serial modem attached to another microcontroller (e.g. bluepill). The host microcontroller sends AT commands to configure the ESP module and then exchanges data over the wifi network using serial commands. Many ESP modules come configured to be used in this mode. ESP modules can be flashed with different firmware, that is erase the AT command interface and install a different program, so it can be programmed directly, much as the bluepill. As the ESP8266 includes a powerful processor (comparable to the STM32) in it's own right, there often is little need for a host microcontroller in a project.
2) Use the Arduino environment on the ESP8266. This is the approach used in most (all?) of the projects on Ray's page. In this approach the Arduino IDE is used to develop code that is installed directly on the ESP8266 so one does not need a second microcontroller. This is generally appropriate if the ESP8266 supports the sensors one wants to use. This is well documented here: http://arduino-esp8266.readthedocs.io/en/latest/.
3) Use a scripted language running on the ESP8266. There are a number of high level languages that have been ported to ESP8266. In this approach an interpreter is flashed on the ESP8266. The developer installs a script on the ESP8266 and the ESP8266 interprets the script directly. The most important of these are NodeLua and MicroPython. There are a number of vendors selling "NodeMCU" boards which typically come flashed with NodeLua, so one needs only to connect to the board via USB port and start developing. MicroPython runs on similar hardware and it is straightforward to flash that image onto a NodeMCU board. The disadvantage of these is that the scripted languages are typically slower than compiled code (the Arduino environment) if that matters for a particular project. These also require more flash memory (generally 1 MByte minimum) than is found on some of the low end ESP8266 boards.
https://docs.micropython.org/en/latest/ ... intro.html
Without knowing the specifics of your project, my first inclination in January of 2018, is to use MicroPython unless the specifics of the project dictate a different approach. The reason is that the language is (or should become) familiar to most people doing web development, the environment has reached a high level of maturity, and the tutorials and documentation are superb.