-
Notifications
You must be signed in to change notification settings - Fork 1
Initial hardware setup
Christian Fobel edited this page Nov 6, 2019
·
2 revisions
These notes describe the process to configure the latest ESP32 pump driver.
- Set up Conda environment according to here, which includes required firmwares, host Python and MicroPython packages.
- Install MicroPython development tools according to here.
- Flash the atmega8.hex file from the releases page of
the
base-nodeGitHub repository to each Grove I2C motor driver board using the ISP header.- Firmware is also available at
%CONDA_PREFIX%\share\platformio\bin\base-node\atmega8\firmware.hex
- Firmware is also available at
- Follow the instructions below (taken from here) to push
the MicroPython libraries
libdirectory, theappdirectory, and theboot.pyfile to the ESP 32 using thempy-repl-toolpackage:# Bootstrap with code python -m there ls # Copy files to `build` directory. Copy-Item -Recurse .\app\* -Destination build\app Copy-Item -Recurse .\lib\* -Destination build\lib # Add Sci-Bots Conda-packaged MicroPython libraries. cmd /C robocopy "$env:CONDA_PREFIX/share/platformio/micropython-lib" build/lib /s copy boot.py build python -m there push -r build /
- Plug each Grove I2C motor driver board into the M5Core one at a time and
execute the initialize function to set the respective I2C address,
default pin modes and states, and optionally a UUID field.
- Note that the UUID field is slightly glitchy on the atmega8, where it seems, every other bite is written as zero. However, this should still be sufficient to uniquely identify a given board.
- Example (to execute on ESP32 MicroPython environment, see here for
the configuration fields that may be passed to
grove_i2c_motor.initialize()):
import grove_i2c_motor as gm grove_motor = gm.BaseDriver(i2c, addr=70) gm.initialize(grove_motor, i2c_address=<new address>) gc.collect() - Launch the pump UI Jupiter notebook.
- Modify the list of pumps and valves to indicate the appropriate I2C address, and output pin for each pump and valve.
- Honeywell SSC Series MicroPython driver, with usage example