Arduino based project running on my custom made board
Go to file
2019-04-05 16:42:07 +02:00
documentation Small app class diagram update 2019-04-03 08:00:02 +02:00
schematic Adding board schematic 2019-02-23 16:07:27 +01:00
src Added new api functions, fixed a memory leak (file open, but not closed on failure), reworked the way data is read and sent, now using chunks, minor other fixes 2019-04-04 17:58:13 +02:00
.gitignore Updated gitignore and Added hardware_test.ino 2019-03-03 12:33:57 +01:00
README.md Mettre à jour 'README.md' 2019-04-05 16:42:07 +02:00

ESP8266_swiss_army_board

Arduino based project running on my custom made board

The hardware :

The board :

The modules :

Hardware pin mapping :

(This image wasn't done by me)

So we have :

  • I2C (for OLED screen and RTC)
    • GPIO4 --> SDA
    • GPIO5 --> SCL
  • SPI (for µSDCard)
    • GPIO13 --> MOSI
    • GPIO12 --> MISO
    • GPIO14 --> CLK
    • GPIO2 --> µSDCard CHIP_SELECT

Here is a list of the components needed in order to build such a board :

  • 1x 1N4001 reverse voltage protection diode
  • 1x AMS1117 5v voltage regulator
  • 1x AMS1117 3.3v voltage regulator
  • 2x 22µf electrolytic capacitors
  • 2x 0.1µf (code 104) tantalum capacitors
  • 1x jumper
  • 1x 2 pins male header
  • 1x On/Off switch
  • 2x push buttons
  • 1x ESP8266 E12
  • 1x 19 pins female header
  • 1x 2 screws terminal
  • 1x micro USB socket
  • 1x 100 ohm resistor
  • 2x 1k ohm resistor
  • 1x 6.8k ohm resistor
  • 1x 3.9k ohm resistor
  • 1x 22k ohm resistor
  • 2x 10k ohm resistor
  • 1x 33k ohm resistor
  • 1x 4.7k ohm resistor
  • 1x 7cmx5cm pcb

The software :

I2C Hardware addresses :

  • OLED screen : 0x3C
  • RTC DS3231 : 0x68

External librairies used :

  • Adafruit_SSD1306 (not my work) link
  • Adafruit-GFX (not my work) link
  • RTClib-master (not my work) link
  • AT24CXX-master (not my work) link

SD Card structure (subject to changes) :

/
|_CONFIG
|   AP.CFG
|   STA.CFG
|_FTP
|_LOGS
|_WWW

Example of a config file structure (.CFG) :

#This line is a comment and will be ignored
#All comments should be at the top of the file
#The parameter names are case sensitive /!\

this_is_the_parameter_name : this_is_a_numeric_value
'this is the parameter name' : this_is_a_numeric_value
this_is_the_parameter_name : 'this is a string value'
'this is the parameter name' : 'this_is_a_string_value'

For AP.CFG it would be :

#This config file stores the configuration needed to set the AP
#up for the ESP8266SwissArmyBoad
#If this file is not present or if there is an error at parsing time
#default values will be used instead.
#If the password is an empty string aka '', the network will be open

SSID : 'ESP8266SwissArmyBoard'
PASSWORD : 'APassWord'
CHANNEL : 1
SSID_HIDDEN : 'true'
AP_MAX_CONNECTION : 4

For STA.CFG it would be :

#This config file stores the configuration needed to connect the board
#to a wifi hotspot
#If this file is not present or if there is an error at parsing time
#only the AP functionality will be enabled

SSID : 'MyHotspotSSID'
PASSWORD : 'MySuperSecuredPassword'

System WEB api :

Here is a list of the available api calls for the board :

  • /sab/web/apitester
    • HTTP request method : ALL
    • Description : Test if the api system is available
    • Response format : JSON
      • OK : { "status" : "ok", "API" : "available" }
      • FAIL : NOTHING
  • /sab/view/next
    • HTTP request method : GET
    • Description : Display the next view on the screen
    • Response format : JSON
      • OK : { "status" : "ok", "ViewUID" : "UID" }
      • FAIL : { "status" : "failed", "message" : "REASON" }
  • /sab/view?UID=x
    • HTTP request method : GET
    • Description : Display the view with the corresponding id
    • Response format : JSON
      • OK : { "status" : "ok", "ViewUID" : "UID" }
      • FAIL : { "status" : "failed", "message" : "REASON" }
        /sab/rtc/get/datetime
        /sab/sdcard/eject
        /sab/sdcard/insert
        /esp/restart
        /esp/reset

Things to do :

  • Screen Manager ✓
  • µSDcard File System ✓
  • File Config Parser ✓
  • Templated Dictionary Class ✓
  • RTC Manager ✓
  • RTC FLASH Manager
  • FTP Service
  • WEB ServerManager ✓
  • GPIO Util