Skip to content
Branch: master
Find file History
Permalink
Type Name Latest commit message Commit time
..
Failed to load latest commit information.
_examples
_projects
assets
config
lib
pinouts add moisture pins Jan 2, 2019
util
wwwesp
README.CS_cz.md
README.md
boot.py
boot_prepare.py
create_tar.sh
deploy.bat fix display_segment Dec 17, 2018
deploy.sh
deploy8266.bat
main.py
prepare.bat
prepare.sh

README.md

For czech readme, use the following link:
Pro české readme použijte následující link:
https://github.com/octopusengine/octopuslab/blob/master/esp32-micropython/README.CS_cz.md

MicroPython - ESP32 - ROBOTboard / IoTboard


https://www.instagram.com/p/Boo4LTRALBZ/?taken-by=octopusengine

https://boneskull.com/micropython-on-esp32-part-1/

PINout:

oeLAB-esp32 (DoIt) 2x15 pins:                                [ROBOT Board]:::
                           -----------     (GPIO)
                       EN -           - D23 (23)  MOSI       [SPI_MOSI_PIN] 
[PIN_ANALOG]     (36)  VP -           - D22 (22)  SCL(I2C)   [I2C_SCL_PIN]
[I39_PIN]        (39)  VN -           - TXD (1)   D2
[I34_PIN]             D34 -           - RXD (3)   D3
[I35_PIN]             D35 -           - D21 (21)  SDA(I2C)   [I2C_SDA_PIN]
[ONE_WIRE_PIN]   DEV1 D32 -           - D19 (19)  MISO       [SPI_MISO_PIN]
              T8 DEV2 D33 -  (ESP32)  - D18 (18)  SCLK       [SPI_CLK_PIN]
[MOTOR_12EN]          D25 -           - D5  (5)   CS0        [SPI_CS0_PIN]
[MOTOR_1A]            D26 -           - TX2 (17)             [PIN_PWM1] /Servo1
[MOTOR_4A]    T7      D27 -           - RX2 (16)             [PIN_PWM2] /Servo2
[MOTOR_3A]    T6      D14 -           - D4  (4)          T0  [PIN_PWM3] /Servo3
[MOTOR_2A]    T5      D12 -           - D2  (2)          T2  [BUILT_IN_LED]
[MOTOR_34EN]  T4      D13 -           - D15 (15)         T3  [WS_LED_PIN] //v1(13)     
                      GND -           - GND
                      VIN -           - 3V3 +
                           -----------

Windows:

  • install Python3 - https://www.python.org/downloads/
  • download MicroPython - https://micropython.org/download#esp32
  • install esptool - https://github.com/espressif/esptool
  • install ampy - https://github.com/adafruit/ampy
  • connect ESP32 and detect COM port
  • erase FLASH - During this phase the BOOT button needs to be pressed down until connection is established.
    esptool.py --chip esp32 -p /COM6 erase_flash
  • upload Micropython bin:
    esptool.py --chip esp32 -p /COM6 write_flash -z 0x1000 ./down/esp32-_FileVersion_.bin
  • Now choose one of these options:
    • Prepare
        - requires fewer initial files(1)
        - copies only files necesarry for initial setup
        - finishes quicker than Deploy
      You can pass your port ID (for instance COM3) as first parameter
        if you're running the script from command line.
    • Deploy
        - requires whole directory
        - copies all files from root director
        - takes longer than Prepare
      You can pass your port ID (for instance COM3) as first parameter
        if you're running the script from command line.
    • webrepl1
    • blockly and webrepl

(1) Files required for Prepare are as follows: (directories included)

 boot_prepare.py
 /config/device.json
 /util/setup.py
 /util/sys_info.py
 /util/wifi_connect.py

Initial setup

  • Prepare

    • Once booted in by Putty (or similar software), run setup()
        ==============================
                S E T U P
        ==============================
         [ds]  - device setting
         [sw]  - set wifi
         [cw]  - connect wifi
         [st]  - set time
         [sd]  - system download >
         (initial octopus modules)
         [si]  - system info
         [e]   - exit setup
        ==============================
    • select ds (device setting), then choose which board you're using
    • select sw (set wifi) to assign wifi credentials
    • select cw (connect wifi) to reach the internets!
    • select sd (system downloads) to download and apply the rest of files
  • Deploy

    • Once booted in by Putty (or similar software), run Octopus()
        ==============================
          O C T O P U S    M E N U
        ==============================
         SYSTEM & SETTINGS
         [i] - device & system info
         [s] - setup machine and wifi
         [w] - wifi test
         [f] - file info/dir
         [c] - clear terminal
        ==============================
    • select s (setup machine and wifi) to open further options (same menu as in Prepare)
    • select ds (device setting), then choose which board you're using
    • select sw (set wifi) to assign wifi credentials
    • select cw (connect wifi) to reach the internets!

File structure

root
 ╟─ boot.py
 ╟─ main.py
 ║
 ╠═ assets
 ║
 ╠═ config (json config files - device/wifi/...)
 ║
 ╠═ lib
 ║
 ╠═ pinouts (boards and soc type)
 ║
 ╠═ util ═╦═ setup
 ║        ╠═ led/buzzer
 ╠═ ...   ╠═ ...
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.