Giter VIP home page Giter VIP logo

inkplate10-poc's Introduction

inkplate10-poc

This is a proof of concept to get a selected set of the features of the Inkplate 10 working. The aim was for me to focus on getting the features of the hardware and software stack working before worrying about a real project.

This is my first time writing C/C++ and my first time working with hardware like this so don't assume any of this code is best practice or optimal. Feedback is welcome!

Features

The working features are:

  • Wi-Fi
    • Static IP Address (to keep wake time to a minimum)
  • Custom Fonts
  • Partial Display Updates
  • Lower Power Mode
    • Waking Up Using Button
  • Real Time Clock
  • Writing to Files
  • Logging
  • HTTP Requests
  • JSON Parsing
  • Development and Production Builds

The excluded features are:

  • Touchscreen
  • Bluetooth
  • Two-Way Serial Communication
  • HTTPS Requests
    • My follow on project will use a local server to reduce the number of network requests the Inkplate has to made, so HTTPS won't be needed.
  • Debugging
    • As far as I can tell debugging for the Inkplate is limited to serial messages due to the version of the ESP32 used. The ESP32-S2 and ESP32-S3 have a built in JTAG interface but the ESP32-D0WD-V3 used by my Inkplate 10 does not.
  • Detect when charging
  • Updated Partition Map
    • I have not needed this yet.
  • Tests
    • They seem unnecessary when the Inkplate is mostly just displaying things
  • Storing WiFi credentials in flash
    • The esp_wifi_set_storage API call looks interesting but not worth writing a whole WiFi client for.

Build Flags

The project has the following build flags.

Flag Description
BATTERY_LOG_FILE A CSV file to record battery voltages to.

Wireless Network Configuration

The WirelessConfig.h should be updated to set your WiFi configuration.

Macro Description
WIFI_SSID The SSID of a Wi-Fi network to connect to.
WIFI_PASSWORD The Password of a Wi-Fi network to connect to.
WIFI_IP_ADDRESS An IP address to use if not using DHCP
WIFI_GATEWAY The gateway to use if not using DHCP.
WIFI_SUBNET The subnet mask to use if not using DHCP.
WIFI_DNS1 The first DNS server to use if not using DHCP.
WIFI_DNS1 The second DNS server to use if not using DHCP.

Building fontconvert

The build requires the fontconvert binary to be on the PATH.

Here are instructions on how to build it on macOS:

  1. Install gcc and freetype library using Homebrew.

    brew install gcc freetype
    
  2. Put the Homebrew gcc on the PATH ahead of the Apple one:

    sudo ln -s $(which gcc-13) /usr/local/bin/gcc
    
  3. Checkout the Adafruit GFX Library.

    git clone https://github.com/adafruit/Adafruit-GFX-Library.git
    
  4. Edit fontconvert/Makefile and change:

    CFLAGS = -Wall -I/usr/local/include/freetype2 -I/usr/include/freetype2 -I/usr/include
    LIBS   = -lfreetype
    

    to:

    CFLAGS = -Wall -I/opt/homebrew/include/freetype2
    LIBS   = /opt/homebrew/lib/libfreetype.dylib
    
  5. Build the binary.

    cd Adafruit-GFX-Library/fontconvert
    make
    

Downloading fonts

If you have certificate errors when convert_fonts.py tries to download the source font files either set platformio-ide.useBuiltinPython to false or run the script outside of the PlatformIO build chain once to download the files.

References

inkplate10-poc's People

Watchers

David Webb avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.