IoTuz driver for ESP32 based LCA 2017 IoTuz board, also can be used as a demo on an espressif WROVER
Switch branches/tags
Nothing to show
Clone or download

README.md

IoTuz

This is a library for driving the different hardware on the ESP32 based LCA 2017 IoTuz board: https://github.com/CCHS-Melbourne/iotuz-esp32-hardware

Please see my blog post about the origin of the board and more screenshots/videos: http://marc.merlins.org/perso/arduino/post_2017-01-16_IoTuz-Driver-for-our-ESP32-board-built-at-Open-Hardware-Miniconf-at-Linux_Conf_au-2017.html

Now, this code has a lot of dependencies. You should be able to gather them all and make it work, but if you want a shortcut, see the release page for a precompiled binary (you'll still need to have your arduino environment setup with an up to date arduino-esp32 environment and be able to compile/upload some hello world before trying this method): https://github.com/marcmerlin/IoTuz/releases (there is more help below on how to setup the environment).

tassie

Supported hardware:

  • TFT (hw SPI)
  • Touchscreen (hw SPI)
  • Replacement touchscreen support (calibration option in case your touchscreen is reversed or has different calibration)
  • Rotary Encoder via pin interrupt driven driver
  • Support for A and B buttons "hidden" behind the I2C IO multiplexer
  • Joystick
  • Color LEDs
  • Accelerometer
  • BME280 (temperature, humidity, pressure)
  • IO expander (pcf8574)
  • Infrared receiver

Unused/Unsupported:

  • SD Card (should be working in very recent arduino-esp driver)
  • microphone (miswired on the original board)
  • audio (requires a non trivial driver and wouldn't be useful without sdcard support)
  • IR TX LED (I had no use for it)

TFT Driver from the standard Adafruit driver in github HEAD now supports accelerated SPI on ESP32 (added by me-no-dev), make sure you have a recent git version that includes this patch from me: https://github.com/adafruit/Adafruit_ILI9341/pull/26

This library however require a recent esp32 compiler suite (if you installed it during LCA 2017, that one is way too old): https://github.com/espressif/arduino-esp32#installation-instructions

Note that the esp32/tools/esptool binary did not work for me on debian, I had to symlink esptool.py to esptool to replace the binary, and then things worked.

Please make sure you setup the exception decoder, it will make your life much easier when you get a crash dump on your serial port:

WROVER Support

Very few people got an IoTuz board, so I ported this code to work on a WROVER board from expressif. While functionality will be limited without a touch screen, if you add a 2 axis joystick with a push button, you'll be able to use most of the code.

See this blog post: http://marc.merlins.org/perso/arduino/post_2017-04-16_IoTuz-Driver-ported-to-Expressif-WROVER-board.html

Instead of a joystick, you can also use a rotary encoder with push button. I've tested with these:

Note #1: you must uncomment WROVER in IoTuz.h as well as check the pin mappings there to connect at least a rotary encoder with push button, or a joystick.

Note #2: the joystick is likely not centered, which will mess up the main menu. I recommend you try examples/EncoderTestPinIntrButt.ino first (with serial output enabled) to get your rotary encoder and/or joystick configured.
If the joystick is reversed, please see void IoTuz::read_joystick in Iotuz.cpp and you'll likely also want to edit fulldemo/joystick.cpp for the 2 games.

Note #3: If you have a newer WROVER board with ST7789V chipset, the 2 games will not work because they use a custom TFT2 library. You can fix this by porting them to the Adafruit API and they'll work with WROVER/ST7789V .

Required External libraries

While I wrote all the menu system, IoTuz library and some of the driver support, fulldemo calls external demo code written by others, this includes 2 games, and DemoSauce:

See a few screenshots and videos: image image image image image image image

Short 2mn Video Summary: IoTuz 2mn Demo

Longer Video Demo: https://www.youtube.com/watch?v=562T4j7Pr1Q

Credits

In addition to the original LCA team who built IoTuz, I owe big thanks to: