Previous Post: tinyMonster AIO Robot (part-1)
In the previous post I have mentioned all the important hardware and software required for this robot. In this post I am sharing System Block Diagram, required libraries and how to setup them. How to program ESP and Nucleo Board in Arduino IDE. Also I will share how to store and use files in SPIFFS of ESP-12E (part of ESP8266 family).
System Block Diagram
It is showing the programming function implemented inside nucleo and esp module. Also it is also indicating how different hardware modules will work together in FIG:1. Similarly main hardware modules of RF remote are shown in FIG:2.
.
FIG 1: tinyMonster Robot Block Diagram
FIG:2 RF Remote Block Diagram
Board Manager
To program ESP and NUCLEO board using arduino IDE please follow the following guides:
Required Libraries
- ESP-12E
- ESP8266WiFi
- ESPUI
- Adafruit_MQTT
- Adafruit_MQTT_Client
- Ticker
- ESP8266mDNS
- ArduinoOTA
- FS
- Hash
- ESPAsyncTCP
- ESPAsyncWebServer
- SPIFFSEditor
- Arduino
- ArduinoJson
- stdlib_noniso
- NUCLEO
- LiquidCrystal
- IRremote
- Ultrasonic
- SPI
- nRF24L01
- RF24
- printf
* IMPORTANT: use only stable version of ArduinoJson 5.13.3. Do not use beta version it will not work with ESP code.
{gallery} Arduino Libraries |
---|
IMAGE TITLE: Arduino Libraries Manager |
IMAGE TITLE: ArduinoJson (only use stable version not the latest beta version) |
IMAGE TITLE: AdafruitMQTT |
IMAGE TITLE: ESPAsyncTCP and ESPAsyncWebserver (important for ESPUI) |
IMAGE TITLE: ESPUI (for more detail: https://github.com/s00500/ESPUI ) |
IMAGE TITLE:IRremote |
IMAGE TITLE: RF24 |
IMAGE TITLE: Ultrasonic |
Board Setting
I am using generic ESP-12E module. To program it using Arduino IDE first of install its core using Arduino board manager. After that you can select ESP board. Other setting to program generic ESP module are shown in FIG.3. Here COM-13 is port at which my USB to Serial is connected to program ESP-12E. You need to select COM port at which your ESP module is connected. Similarly after installing STM32 core using board manager you will be able to select NUCLEO board and other required settings are shown in FIG.4.
FIG.3: ESP-12E module setting
FIG.4: NUCLEO STM32F411RE setting
ESP8266 SPIFFS
When we use ESP module as a web server there are two ways of saving webpages:
1) Program Memory (1M)
2) SPIFFS (3M)
To host small data we can use program memory but to host few HTML pages with CSS style and JavaScript it is better to use SPIFFS memory to store website data. Data store in SPIFFS remain there even if u program it. You can access and edit SPIFFS file through code. Usually this part of memory is used to store static data (No or Very rare changing). Web pages are static data only so its better to store it in SPIFFS memory.
There is a Arduino tool to directly store data in SPIFFS memory of ESP without any programming. Complete guide how to install it in Arduino IDE is given in link below OR you can directly download it from Download page and after extraction the jar file should be placed at following path <sketchbook directory>/tools/ESP8266FS/tool/esp8266fs.jar>.
GUIDE
DOWNLOAD
After successfully installing ESP data uploader you will be able to see this option in Arduino menubar >> Tools >> ESP8266 Sketch Data Upload as shown in FIG.5.
.
.
.
............