Home Elements Boards Recipes

ESP32-C3 micro board with OLED display

This is very small board based on EPS32-C3 with an 0.42" onboard OLED display and a single NeoPixel.

ESP32-C3 micro board with LCD

This board is not supported by Adafruit library. Some small modifications must be made that can be found in https://github.com/mathertel/Adafruit_SSD1306.

This board comes with

WS2812 RGB LED

{
  "neo": {
    "bar": {
      "pin": "2",
      "value": "red",
      "count": 1
    }
  }
}

System configuration

This env.json file can be used as a starting point for configuring this board type.

It contains the onboard special hardware initialization for the IO09 button, the OLED display and the neopixel.

{
  "device": {
    "0": {
      "name": "microc3",
      "description": "micro esp32c3 with OLED display and Neopixel.",
      "loglevel": "2",
      "button": "9",
      "logfile": 2,
      "safemode": "false",
      "homepage": "/board.htm",
      "cache": "max-age=600",
      "i2c-SDA": "5",
      "i2c-SCL": "6"
    }
  },
  "ota": {
    "0": { }
  },
  "ntptime": {
    "0": {
      "zone": "CET-1CEST,M3.5.0,M10.5.0/3"
    }
  },
  "DisplaySSD1306": {
    "0": {
      "address": "60",
      "brightness": "128",
      "width": 72,
      "height": 40,
      "rotation": 0
    }
  },
  "neo": {
    "bar": {
      "pin": "2",
      "value": "red",
      "count": 1
    }
  }
}

Device configuration

The config.json file will contain the functionality of the device. This is a minimal configuration that

{
  "displaytext": {
    "time": {
      "x": 0,
      "y": 0,
      "value": "21:08",
      "fontsize": 24
    }
  },
  "value" : {
    "bright": {
      "min": 0,
      "max": 100,
      "value": 8,
      "onvalue": "DisplaySSD1306/0?brightness=$v"
    }
  },

  "time": {
    "clock": {
      "onminute": "displaytext/time?value=$v"
    }
  },
  "digitalin": {
    "9": {
      "pin": 9,
      "pullup": "true"
    }
  }
}

See Also

define LED_PIN 2 : WS2812B

Tags

Board