ESP8266 on Blue Pill

Post here first, or if you can't find a relevant section!
Post Reply
peeknot
Posts: 24
Joined: Thu Dec 14, 2017 3:08 pm

ESP8266 on Blue Pill

Post by peeknot » Sat Jan 06, 2018 5:20 am

Does using this module in blue pill same as using it in arduino microcontrollers? Any thoughts

Best Regards

Kevin

csnol
Posts: 31
Joined: Thu Aug 24, 2017 12:57 pm

Re: ESP8266 on Blue Pill

Post by csnol » Sat Jan 06, 2018 2:15 pm

If you know how use STM32 on Arduino IDE. No difference.
and good news is they are same power 3.3V. better than ATMEGA 328P(Arduino UNO) is 5V.
:D

User avatar
mrburnette
Posts: 2193
Joined: Mon Apr 27, 2015 12:50 pm
Location: Greater Atlanta
Contact:

Re: ESP8266 on Blue Pill

Post by mrburnette » Sat Jan 06, 2018 4:08 pm

peeknot wrote:
Sat Jan 06, 2018 5:20 am
Does using this module in blue pill same as using it in arduino microcontrollers? Any thoughts

Best Regards

Kevin
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.
Forum: http://www.esp8266.com/viewforum.php?f=25
Core & Documentation: https://github.com/esp8266/Arduino

I have some ESP8266 Arduino examples on my project page.


Ray

User avatar
mrburnette
Posts: 2193
Joined: Mon Apr 27, 2015 12:50 pm
Location: Greater Atlanta
Contact:

Re: ESP8266 on Blue Pill

Post by mrburnette » Sat Jan 06, 2018 4:12 pm

csnol wrote:
Sat Jan 06, 2018 2:15 pm
If you know how use STM32 on Arduino IDE. No difference.
and good news is they are same power 3.3V. better than ATMEGA 328P(Arduino UNO) is 5V.
:D
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.

Ray

peeknot
Posts: 24
Joined: Thu Dec 14, 2017 3:08 pm

Re: ESP8266 on Blue Pill

Post by peeknot » Mon Jan 15, 2018 1:56 pm

mrburnette wrote:
Sat Jan 06, 2018 4:08 pm
I have some ESP8266 Arduino examples on my project page.


Ray
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.

User avatar
mrburnette
Posts: 2193
Joined: Mon Apr 27, 2015 12:50 pm
Location: Greater Atlanta
Contact:

Re: ESP8266 on Blue Pill

Post by mrburnette » Mon Jan 15, 2018 2:44 pm

peeknot wrote:
Mon Jan 15, 2018 1:56 pm
<...>
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

Good luck.

Ray

MarkB
Posts: 11
Joined: Sun Oct 02, 2016 11:40 pm

Re: ESP8266 on Blue Pill

Post by MarkB » Mon Jan 15, 2018 3:04 pm

peeknot wrote:
Mon Jan 15, 2018 1:56 pm
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.
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://nodelua.org/
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.

Post Reply