Skip to content

frutabruta/GolemioEsp32

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

46 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

GolemioEsp32

Project to show Prague Integrated System (http://www.pid.cz) departures from GolemioAPI using ESP32 and 128x64 graphic OLED or 20x4 character LCD display.

Tested boards are MH-ET LIVE ESP32 MiniKIT and LaskaKit ESPwled. Should be possible to use generic ESP32 S2 and ESP32 C3 board respectively.

Required libraries

WiFiManager by tzapu (2.0.17) https://github.com/tzapu/WiFiManager/tree/master

For LCD version (2.0.2): LiquidCrystal I2C MultiLingual by Loc P.LE 2.0.2 https://github.com/locple/LCDI2C_Multilingual

For OLED version: U8g2 by oliver (2.35.30) https://github.com/olikraus/u8g2

ArduinoJson by BenoitBlanchon (7.2.0) https://github.com/bblanchon/ArduinoJson

ESP32 3.0.7 board added in board manager

Wiring

pin numbers SDA SCL
MH-ET ESP32Minikit 16 17
LaskaKit ESPwled (uŠup) 10 8

For MH-ET ESP32Minikit, external button on pin 27 is required.

Setup

  • select options in configuration.h

    • uncomment one board
  • select display

    • to use 20x4 LCD uncomment #define USE_LCD 1
    • to use 128x64 OLED uncomment #define USE_OLED 1
  • Tools -> Board : select correct ESP32 version

    • ESP32 C3 Dev module for Laskakit ESPwled
  • Tools -> Partiotioning scheme -> Minimal SPIFFS

  • upload code

  • connect to WI-FI hotspot created by ESP32

    • password and SSID should be shown on the display
    • GolemioSetup, password
  • open the Configuration page

  • if you want to change parameters in the future, press the FLASH/BOOT button on the ESP32 or external button to create Wi-Fi hotspot again

  • Wireless update using tzapu webmanager works

    • export binary using Arduino IDE - Sketch -> Export compiled binary
      • it is the sketch_folder/build/board_name/GolemioEsp32.ino.bin
    • start webportal on ESP by pressing a button
    • Android
      • transport compliled binary to the phone/tablet
      • connect to GolemioSetup Wi-Fi
      • on the captive portal select three dots - use network as is
      • in web browser navigate to 192.168.4.1
      • select update in menu
      • wait for update finished message

Custom BDF font export

The fonts are based on BDF files provided by Pražská integrovaná doprava. To fix number bounding box, -b 1 parameter might be needed.

bdfconv -v -f 1 -b 1 -m "0-127,128-255,256-383,688-767,8201, 9855, 9992, 10052" ZIS_12_bold.bdf -o ZIS_12_bold.h -n ZIS_12_bold -d ZIS_12_bold.bdf
bdfconv -v -f 1 -b 1 -m "0-127,128-255,256-383,688-767,8201, 9855, 9992, 10052" ZIS_12_normal.bdf -o ZIS_12_normal.h -n ZIS_12_normal -d ZIS_12_normal.bdf
bdfconv -v -f 1 -b 1 -m "0-127,128-255,256-383,688-767,8201, 9855, 9992, 10052" ZIS_17_normal.bdf -o ZIS_17_normal.h -n ZIS_17_normal -d ZIS_17_normal.bdf
bdfconv -v -f 1 -b 1 -m "0-127,128-255,256-383,688-767,8201, 9855, 9992, 10052" ZIS_17_bold.bdf -o ZIS_17_bold.h -n ZIS_17_bold -d ZIS_17_bold.bdf

ASCII printable: 32–127 Latin-1 Supplement: 160–255 (á, é, í, ó, ú, ý) Latin Extended-A: 256–383 (ě, ř, č, š, ť, ž, ď, ň, ů) Arrows: 8592–8601 (← ↑ → ↓ ↖ ↗ ↘ ↙) Extras: thin space (8201), ♿ (9855), ✈ (9992), ✴ (10052)

Optimised commands:

bdfconv -v -f 1 -b 1 -m "32-127,160-255,256-383,8592-8601,8201,9855,9992,10052" ZIS_12_normal.bdf -o ZIS_12_normal.h -n ZIS_12_normal -d ZIS_12_normal.bdf
bdfconv -v -f 1 -b 1 -m "32-127,160-255,256-383,8592-8601,8201,9855,9992,10052" ZIS_12_bold.bdf   -o ZIS_12_bold.h   -n ZIS_12_bold   -d ZIS_12_bold.bdf
bdfconv -v -f 1 -b 1 -m "32-127,160-255,256-383,8592-8601,8201,9855,9992,10052" ZIS_17_normal.bdf -o ZIS_17_normal.h -n ZIS_17_normal -d ZIS_17_normal.bdf
bdfconv -v -f 1 -b 1 -m "32-127,160-255,256-383,8592-8601,8201,9855,9992,10052" ZIS_17_bold.bdf -o ZIS_17_bold.h -n ZIS_17_bold -d ZIS_17_bold.bdf

https://stncrn.github.io/u8g2-unifont-helper/

Changelog

  • 20260221_1103

    • fixed header in periodic update for 256x128
    • added photo to description
  • 20260125_1655

    • new configuration optin RABIN to allow to use development server (requires development API key)
    • handleResponse
      • fixed storing global infotext as running when MEMSAVE is active
    • oled
      • oledPeriodicDisplayUpdate
        • added clearBuffer when departures are present to fix errors not vanishing
  • 20260102_2010

    • added MEMSAVE config option to disable global infotexts and allow using standard partitioning scheme
  • 20260101_1558

    • oled
      • moved some constants from function to top
      • oledVykresliRadekOdjezdu, oledVykresliRadekOdjezduMega
        • atributes changed to Departure struct
      • oledPeriodicDisplayUpdate
        • added handling of long destination names for 128x64
    • handleResponse
      • moved to destination array struct
      • longest destination measurement
  • 20251231_225

    • added handling of general infotexts
      • new function oledSetGlobalInfotext
    • Minimal SPIFFS partition might be needed from this version even for 128x64 display
  • 20251231_1817

    • indentation refactoring
    • oledSetTextPage rewrite
  • 20251231_1620

    • 128x64 fix
    • making text positions global constants
    • oled refactoring
      • removal of non-u8g2 code
      • splitting ov vykresliRadek and vykresliRadekMega
  • 20251231_1402

    • moved BIGOLED definition to fix date on 256x128
  • 20251231_1322

    • 256x128
      • added arrows to fonts
      • show directions when 1 stop is selected
    • conversion tables moved to a separate .h file
  • 20251230_2226

    • fixed fonts number 1 width
      • ZIS_12_bold.h
      • ZIS_12_normal.h
  • 20251230_1626

    • 3D files
      • added long version of display pole
    • oledVykresliSpodniRadekInfotext
      • time display fix
    • oledVykresliSpodniRadekDatum
      • size fixes
  • 20251223_2246

    • czfonts
      • number 1 bounding box fix
  • 20251223_1643

    • fonts: added narrow space
    • handleResponse
      • added wheelchair and air conditioning
      • added platform
    • oled.h
      • added blinking colon
      • many rewrites
      • fix of 128x64 part
  • 20251207_0041

    • first application of 256x128 layouts
      • to use uncomment #define MEGAOLED 1
  • 20251206_1712

    • first working version of 256x128
  • 20250714_1846

    • version number fix
  • 20250530_2231

    • first infotexts beta
      • might need to change partition scheme to Minimal SPIFFS
  • 20250309_1601

    • dalight saving time fix
  • 20250226_2217

    • LCD version debug text fix 3rd row
    • added pin numbers in the description
  • 20250225_2336

    • improved debug messages on OLED
    • version during boot
  • 20250217_1716

    • move back to PID Departure Boards (v2)
    • fix date alignment
    • improve minutes 1
  • 20250217_1429

    • reconnect fix
  • 20250215_2336

    • error -11 fix (timeout value)
    • error 400 fix (content-length)
    • setting moved to file configuration.h
    • added .3mf files of the case
    • optimized for LaskaKit ESP WLED
  • 20241224_1935

    • migrated OLED library to u8g2
    • now supports czech language on SSD1309 2.42inch OLED display from LaskaKit
    • added custom font for display
  • 20241224_1532

    • added LaskaKit ESP32-C3-LPKit support
    • readme.md manual modification
    • wifiName changed to GolemioSetup
    • LPkit enable uSup power after boot
  • 20241215_1911

    • migrated to tzapu wifi manager, now stable
    • added golemio key back, because even publci API now requires API key
  • 20241111_2150

    • migrated all files back to ESP_WiFiManager_Lite
  • 20240803_1310

    • wifi not connected on display
    • overwriting unused rows when numbr of departures is smaller than number of available rows
  • 20240728_2250

    • can be compiled to ESP8266, works only with 2 departures
  • 20240728_2135

    • added images to description
  • 20240728_2059

    • fix OLED screen clear code
  • 20240728_2001

    • code cleanup
  • 20240714_1205

    • first running example of key-less public API
  • 20240714_1025

    • added constant to disable debugging output
    • LCD
      • removed display blinking on refresh
  • 20240713_2302

    • basic version working with DO-IT ESP32 without crashing
    • swapped LCD library
    • OLED and LCD parts are separated by '#ifdef'
  • 20231114_1802

    • modification of documentation

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors