Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.


EC Salinity Probe Interface for Micropython

The examples only differ from the documentation in the class initialization; ec = ecsalinity(4, 5) creates a new I2C instance using SDA pin 4 and SCL pin 5.

This library was developed on the ESP32 platform using a generic board. There isn't enough memory to run the shell file on an ESP8266. Other platforms haven't been tested.

Visit the MicroPython site and download the firmware.

To get started with the basic example:

  • pip install esptool
  • pip install adafruit-ampy
  • esptool.py --port [/dev/ttyUSB0|COM1] erase_flash
  • esptool.py --chip esp32 --port [/dev/ttyUSB0|COM1] write_flash -z 0x1000 [firmware file]
  • git clone https://github.com/u-fire/ECSalinity.git --depth=1
  • cd ECSalinity/python/MicroPython
  • ampy --port /dev/ttyUSB0 put ecsalinity.py
  • ampy --port [/dev/ttyUSB0|COM1] put basic.py
  • putty -serial [/dev/ttyUSB0|COM1] -sercfg 115200, 8, n, 1 or other serial program

Within the serial terminal:

import basic

To run the shell example:

  • ampy --port [/dev/ttyUSB0|COM1] put cmd.py
  • ampy --port /dev/ttyUSB0 put shell.py
  • putty -serial [/dev/ttyUSB0|COM1] -sercfg 115200, 8, n, 1 or other serial program

Within the serial terminal

import shell

Please submit Issues or Pull Requests for any problems or fixes.