Line: 1 to 1 | ||||||||
---|---|---|---|---|---|---|---|---|
The IoT Node and its Processor | ||||||||
Changed: | ||||||||
< < | As already indicated in the introduction an IoT node consist of an Internet enabled processor with interfaces to external sensor and actuator hardware. On the Internet side connections can be made through | |||||||
> > | As already indicated in the introduction an IoT node consists of an Internet-enabled processor with interfaces to external sensor and actuator hardware. On the Internet side connections can be made through | |||||||
| ||||||||
Line: 21 to 21 | ||||||||
![]() | ||||||||
Changed: | ||||||||
< < | You can use this card as a USB to serial converter for your PC allowing you easy communication with the ESP01 serial line. In order to re-program the ESP01 however, you must make a minor modification to the board. | |||||||
> > | You can use this card as a USB to serial converter for your PC allowing you easy communication with the ESP01 serial line. A minor modification to the board is needed however if we want to program its flash. | |||||||
Here is the ESP01 pinout: | ||||||||
Line: 33 to 33 | ||||||||
You can now easily put the ESP01 into programming mode inserting the jumper and into normal running mode when taking the jumper off. | ||||||||
Changed: | ||||||||
< < | I tried programming the device first erasing all the flash with esptool which you can find here: https://github.com/espressif/esptool.![]() | |||||||
> > | I tried programming the device first erasing all the flash with esptool, which you can find here: https://github.com/espressif/esptool.![]() | |||||||
esptool --port /dev/ttyUSB0 --baud 115200 erase_flash | ||||||||
Line: 47 to 47 | ||||||||
https://iotworkshop.africa/pub/AFNOG/TheNopIoTNode/microPython-ESP32.bin | ||||||||
Changed: | ||||||||
< < | Here is a screen dump of the messages sent by esptool.py during flash erase and programming: | |||||||
> > | Here is a screen dump of the messages sent by esptool.py during flash-erase and programming: | |||||||
![]() esptool chip_id or reading the MAC address with esptool read_mac. | ||||||||
Changed: | ||||||||
< < | When flashing micro Python first insert the jumper at the back of the programmer and insert the programmer into the PC'S USB slot with the ESP01 connected. Erase the flash as seen in the screen dump above. Take the programmer out of the USB socket, wait a few seconds and then pug it in again. Flash the micro Python code as shown above. Take the programmer out again and remove the jumper. Plug the programmer with the ESP01 as piggyback in again. | |||||||
> > | When flashing micropython, first insert the jumper at the back of the programmer and insert the programmer into the PC'S USB slot with the ESP01 connected. Erase the flash as seen in the screen dump above. Take the programmer out of the USB socket, wait a few seconds and then plug it in again. Flash the micropython code as shown above. Take the programmer out again and remove the jumper. Plug the programmer with the ESP01 as piggyback in again. | |||||||
Start minicom or another serial terminal emulator and press return. You should get the Python prompt and you can now happily use the newly installed Python interpreter: |
Line: 1 to 1 | ||||||||
---|---|---|---|---|---|---|---|---|
The IoT Node and its Processor | ||||||||
Line: 9 to 9 | ||||||||
| ||||||||
Changed: | ||||||||
< < | There are plenty of processors available on the market, many of which are ARM based devices with a big variety of external interfaces. There are however two extremely popular processor families which we want to have a look into:
| |||||||
> > | There are plenty of processors available on the market, many of which are ARM-based devices with a big variety of external interfaces. There are however two extremely popular processor families which we want to have a look into:
| |||||||
The ESP01 | ||||||||
Changed: | ||||||||
< < | Although the ESP01 is designed as a WiFi interface with which a host processor communicates through AT commands over a serial line, this device features a powerful ESP8266 processor with 8 MBytes of flash which can be programmed. Of course you will loose the AT firmware but you can easily re-install it if needed. One nice feature of the ESP01 is that several sensor boards have been designed onto which you can simply plug this processor card. .... and then there is the price: The whole node, processor, Internet connection and sensor will cost you less than 5 Euros. Here are two examples: | |||||||
> > | Although the ESP01 is designed as a WiFi interface with which a host processor communicates through AT commands over a serial line, this device features a powerful ESP8266 processor with 8 MBytes of flash which can be programmed. Of course you will loose the AT firmware but you can easily re-install it if needed. One nice feature of the ESP01 is that several sensor boards have been designed onto which you can simply plug this processor card. ... and then there is the price: The whole node, processor, Internet connection and sensor will cost you less than 5 Euros. Here are two examples: | |||||||
| ||||||||
Line: 27 to 27 | ||||||||
![]() | ||||||||
Changed: | ||||||||
< < | In order to put the ESP01 into programming mode you must short circuit GPIO0 to ground when powering the machine. I did this by adding a removable jumper connection to the ESP01 programmer board as shown in this photo: | |||||||
> > | In order to put the ESP01 into programming mode, you must short-circuit GPIO0 to ground when powering the machine. I did this by adding a removable jumper connection to the ESP01 programmer board as shown in this photo: | |||||||
![]() | ||||||||
Line: 53 to 53 | ||||||||
I had to take the programmer out in order to reset the ESP01 after each command I sent with esptool. This was true for erasing but also when getting the chip id with esptool chip_id or reading the MAC address with esptool read_mac. | ||||||||
Changed: | ||||||||
< < | When flashing micro Python first insert the jumper at the back of programmer and insert the programmer into the PC'S USB slot with the ESP01 connected. Erase the flash as seen in the screen dump above. Take the programmer out of the USB socket, wait a few seconds and then pug it in again. Flash the micro Python code as shown above. Take the programmer out again and remove the jumper. Plug the programmer wit the ESP01 as piggy back in again. | |||||||
> > | When flashing micro Python first insert the jumper at the back of the programmer and insert the programmer into the PC'S USB slot with the ESP01 connected. Erase the flash as seen in the screen dump above. Take the programmer out of the USB socket, wait a few seconds and then pug it in again. Flash the micro Python code as shown above. Take the programmer out again and remove the jumper. Plug the programmer with the ESP01 as piggyback in again. | |||||||
Changed: | ||||||||
< < | Start minicom or another serial terminal emulator and press return. You should the the Python prompt and you can now happily use the newly installed Python interpreter: | |||||||
> > | Start minicom or another serial terminal emulator and press return. You should get the Python prompt and you can now happily use the newly installed Python interpreter: | |||||||
![]() |
Line: 1 to 1 | ||||||||
---|---|---|---|---|---|---|---|---|
The IoT Node and its Processor | ||||||||
Line: 67 to 67 | ||||||||
| ||||||||
Deleted: | ||||||||
< < | The Wemos D1 miniWe have seen that the ESP01 can be programmed with micro Python and that there are add-on sensor boards available. However, when we connect the sensor board we loose the serial connection to the PC. This can be corrected by soldering extra connectors to the top of the ESP01 board but this is fiddly and needs good soldering equipment and good soldering skills. A better and only slightly more expensive solution (we are talking about ~ 3.5 US$ instead of 2.5 US$) is the Wemos D1 mini board.![]() ![]()
| |||||||
Accessing micro Python on the IoT node | ||||||||
Line: 109 to 92 | ||||||||
| ||||||||
Deleted: | ||||||||
< < |
| |||||||
| ||||||||
Deleted: | ||||||||
< < |
| |||||||
|
Line: 1 to 1 | |||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
The IoT Node and its Processor | |||||||||||||||||||
Line: 12 to 12 | |||||||||||||||||||
There are plenty of processors available on the market, many of which are ARM based devices with a big variety of external interfaces. There are however two extremely popular processor families which we want to have a look into:
| |||||||||||||||||||
Changed: | |||||||||||||||||||
< < | The Raspberry Pi | ||||||||||||||||||
> > |
| ||||||||||||||||||
The ESP01Although the ESP01 is designed as a WiFi interface with which a host processor communicates through AT commands over a serial line, this device features a powerful ESP8266 processor with 8 MBytes of flash which can be programmed. Of course you will loose the AT firmware but you can easily re-install it if needed. One nice feature of the ESP01 is that several sensor boards have been designed onto which you can simply plug this processor card. .... and then there is the price: The whole node, processor, Internet connection and sensor will cost you less than 5 Euros. Here are two examples: | |||||||||||||||||||
Line: 67 to 67 | |||||||||||||||||||
| |||||||||||||||||||
Added: | |||||||||||||||||||
> > | The Wemos D1 miniWe have seen that the ESP01 can be programmed with micro Python and that there are add-on sensor boards available. However, when we connect the sensor board we loose the serial connection to the PC. This can be corrected by soldering extra connectors to the top of the ESP01 board but this is fiddly and needs good soldering equipment and good soldering skills. A better and only slightly more expensive solution (we are talking about ~ 3.5 US$ instead of 2.5 US$) is the Wemos D1 mini board.![]() ![]()
| ||||||||||||||||||
Accessing micro Python on the IoT node | |||||||||||||||||||
Line: 88 to 105 | |||||||||||||||||||
| |||||||||||||||||||
Changed: | |||||||||||||||||||
< < |
| ||||||||||||||||||
> > |
| ||||||||||||||||||
| |||||||||||||||||||
Added: | |||||||||||||||||||
> > |
|
Line: 1 to 1 | ||||||||
---|---|---|---|---|---|---|---|---|
The IoT Node and its Processor | ||||||||
Line: 37 to 37 | ||||||||
esptool --port /dev/ttyUSB0 --baud 115200 erase_flash | ||||||||
Changed: | ||||||||
< < | and the program program it with a micro-python interpreter in file esp8266-20180219-v1.9.3-332-g27fa9881.bin | |||||||
> > | and then to program it with a micro-python interpreter in file microPython-ESP8266.bin | |||||||
Changed: | ||||||||
< < | esptool.py --port /dev/ttyUSB0 --baud 115200 write_flash --flash_size=detect --verify 0 esp8266-20180219-v1.9.3-332-g27fa9881.bin | |||||||
> > | esptool.py --port /dev/ttyUSB0 --baud 115200 write_flash --flash_size=detect --verify 0 microPython-ESP8266.bin The micro Python binaries are attached to this page: https://iotworkshop.africa/pub/AFNOG/TheNopIoTNode/microPython-ESP8266.bin https://iotworkshop.africa/pub/AFNOG/TheNopIoTNode/microPython-ESP32.bin | |||||||
Here is a screen dump of the messages sent by esptool.py during flash erase and programming: | ||||||||
Line: 83 to 89 | ||||||||
| ||||||||
Added: | ||||||||
> > |
|
Line: 1 to 1 | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
The IoT Node and its Processor | |||||||||||
Line: 45 to 45 | |||||||||||
![]() | |||||||||||
Changed: | |||||||||||
< < | I had to take the programmer out of the USB socket to reset the ESP01 after erase. | ||||||||||
> > | I had to take the programmer out in order to reset the ESP01 after each command I sent with esptool. This was true for erasing but also when getting the chip id with esptool chip_id or reading the MAC address with esptool read_mac. | ||||||||||
Changed: | |||||||||||
< < | Once the flash re-programmed I can now happily use the newly installed Python interpreter: | ||||||||||
> > | When flashing micro Python first insert the jumper at the back of programmer and insert the programmer into the PC'S USB slot with the ESP01 connected. Erase the flash as seen in the screen dump above. Take the programmer out of the USB socket, wait a few seconds and then pug it in again. Flash the micro Python code as shown above. Take the programmer out again and remove the jumper. Plug the programmer wit the ESP01 as piggy back in again. Start minicom or another serial terminal emulator and press return. You should the the Python prompt and you can now happily use the newly installed Python interpreter: | ||||||||||
![]() | |||||||||||
Added: | |||||||||||
> > | To make things even simpler I wrote a Python script that automates the procedure.
https://iotworkshop.africa/pub/AFNOG/TheNopIoTNode/flashMicroPython
This should work for any of the ESP8266 or EPS32 boards (except the ESP01)
| ||||||||||
Accessing micro Python on the IoT node
-- ![]() | |||||||||||
Line: 67 to 78 | |||||||||||
| |||||||||||
Added: | |||||||||||
> > |
|
Line: 1 to 1 | ||||||||
---|---|---|---|---|---|---|---|---|
The IoT Node and its Processor | ||||||||
Line: 61 to 61 | ||||||||
| ||||||||
Added: | ||||||||
> > |
|
Line: 1 to 1 | ||||||||
---|---|---|---|---|---|---|---|---|
The IoT Node and its Processor | ||||||||
Line: 47 to 47 | ||||||||
![]() | ||||||||
Added: | ||||||||
> > | Accessing micro Python on the IoT node | |||||||
-- ![]() Comments |
Line: 1 to 1 | |||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
The IoT Node and its Processor | |||||||||||||
Line: 11 to 11 | |||||||||||||
| |||||||||||||
Changed: | |||||||||||||
< < |
| ||||||||||||
> > |
The Raspberry PiThe ESP01Although the ESP01 is designed as a WiFi interface with which a host processor communicates through AT commands over a serial line, this device features a powerful ESP8266 processor with 8 MBytes of flash which can be programmed. Of course you will loose the AT firmware but you can easily re-install it if needed. One nice feature of the ESP01 is that several sensor boards have been designed onto which you can simply plug this processor card. .... and then there is the price: The whole node, processor, Internet connection and sensor will cost you less than 5 Euros. Here are two examples:
![]() ![]() ![]() ![]() ![]() | ||||||||||||
-- ![]() Comments | |||||||||||||
Added: | |||||||||||||
> > |
|
Line: 1 to 1 | ||||||||
---|---|---|---|---|---|---|---|---|
Added: | ||||||||
> > |
The IoT Node and its ProcessorAs already indicated in the introduction an IoT node consist of an Internet enabled processor with interfaces to external sensor and actuator hardware. On the Internet side connections can be made through
![]() Comments |