diff --git a/README.md b/README.md index 0a3e2d4..2cb2654 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,8 @@ # ssis:bit AIO solution for SSIS students +![T8 running CircuitPython](docs/ssis.bit_2022-01-06.jpg) + ## Hardware CircuitPython supports [more than 200 different boards](https://circuitpython.org/downloads). Locally available is the [TTGO T8 ESP32-S2 ST7789](https://circuitpython.org/board/lilygo_ttgo_t8_s2_st7789/) at several online stores. The board includes the powerful 240MHz CPU, 4MB Flash and 8MB PSRAM, a 1.14" ST7789 display, a microSD card slot for virtually unlimited local data storage, battery connector 1.25mm JST with charge controller and regular USB-C connector. And buildin WiFi, of course. diff --git a/docs/T8-pinmap.jpg b/docs/T8-pinmap.jpg new file mode 100644 index 0000000..ad1dd93 Binary files /dev/null and b/docs/T8-pinmap.jpg differ diff --git a/docs/history.md b/docs/history.md index 46ff4eb..9763ec8 100644 --- a/docs/history.md +++ b/docs/history.md @@ -1,4 +1,5 @@ # ssis:bit + AIO solution for SSIS students ## Hardware @@ -44,6 +45,8 @@ Please update. Start of development of the ssis:bit project based on CircuitPython and the T8 ST7789 from Lilygo. +![T8 running CircuitPython](ssis.bit_2022-01-06.jpg) + ## 2020 The idea is born with a T-Display. But to control the display you need a fast ST7789 library, needs to be integrated into the binary of MicroPython. Feasable, but still not easy enouth for students. @@ -58,7 +61,7 @@ ASA Arduino club at AIS. ## 2017 -Visit to SSIS for the [VTC 2017]() Vietnam Tech Conference. Students presented their Arduino projects on Friday. +Visit to SSIS for the [VTC 2017](https://2017.vietnamtechconference.org/) Vietnam Tech Conference. Students presented their Arduino projects on Friday. ## 2016 diff --git a/docs/index.md b/docs/index.md index 98ace9c..df97684 100644 --- a/docs/index.md +++ b/docs/index.md @@ -1,6 +1,9 @@ # ssis:bit + AIO microcomputer solution with CircuitPython, display and battery for SSIS students. +![T8 running CircuitPython](ssis.bit_2022-01-06.jpg) + ## Hardware CircuitPython supports [more than 200 different boards](https://circuitpython.org/downloads). Locally available is the [TTGO T8 ESP32-S2 ST7789](https://circuitpython.org/board/lilygo_ttgo_t8_s2_st7789/) at several online stores. The board includes the powerful 240MHz CPU, 4MB Flash and 8MB PSRAM, a 1.14" ST7789 display, a microSD card slot for virtually unlimited local data storage, battery connector 1.25mm JST with charge controller and regular USB-C connector. And buildin WiFi, of course. @@ -15,6 +18,80 @@ The planned adapterplate adds a 3-way button for input, place to hold the little The ssis:bit runs [CircuitPython](https://circuitpython.org/) and can be easily programmed with the [Mu Editor](https://codewith.mu/en/). There is a lot to learn on [Adafruit with CircuitPython]() and with their great libraries there is less frustration getting things started. +## GPIO + +This document from LilyGO documents the pins of the T8. + +![T8 pinmap](T8-pinmap.jpg) + +In CircuitPython the following pins are available" + +``` py +import board +dir(board) +['__class__', '__name__', 'BATTERY', 'DISPLAY', 'IO0', 'IO1', 'IO11', 'IO12', 'IO13', 'IO15', 'IO16', 'IO17', 'IO18', 'IO19', 'IO2', 'IO20', 'IO21', 'IO3', 'IO39', 'IO4', 'IO40', 'IO41', 'IO42', 'IO45', 'IO46', 'IO5', 'IO6', 'IO7', 'IO8', 'IO9', 'LCD_BCKL', 'LCD_CLK', 'LCD_CS', 'LCD_D_C', 'LCD_MOSI', 'LCD_RST', 'PE_POWER', 'RX', 'RX1', 'SD_CLK', 'SD_CS', 'SD_MISO', 'SD_MOSI', 'TX', 'TX1', 'board_id'] +``` + +To find he assigned pins we running +``` +"""CircuitPython Essentials Pin Map Script""" +import microcontroller +import board + +board_pins = [] +for pin in dir(microcontroller.pin): + if isinstance(getattr(microcontroller.pin, pin), microcontroller.Pin): + pins = [] + for alias in dir(board): + if getattr(board, alias) is getattr(microcontroller.pin, pin): + pins.append("board.{}".format(alias)) + if len(pins) > 0: + board_pins.append(" ".join(pins)) +for pins in sorted(board_pins): + print(pins) +``` + +And get + +``` +board.BATTERY board.IO9 +board.IO0 +board.IO1 +board.IO11 board.SD_MOSI +board.IO12 board.SD_CLK +board.IO13 board.SD_MISO +board.IO15 +board.IO16 +board.IO17 board.TX1 +board.IO18 board.RX1 +board.IO19 +board.IO2 +board.IO20 +board.IO21 +board.IO3 +board.IO39 +board.IO4 +board.IO40 +board.IO41 +board.IO42 +board.IO45 +board.IO46 +board.IO5 +board.IO6 +board.IO7 +board.IO8 +board.LCD_BCKL +board.LCD_CLK +board.LCD_CS +board.LCD_D_C +board.LCD_MOSI +board.LCD_RST +board.PE_POWER +board.RX +board.SD_CS +board.TX +``` + ## History -More will be updated in the [docs/history](docs/history.md) document, but the idea is from 2020 with the [t-display](https://github.com/kreier/t-display) board. Similar idea: Not just the Microcomputer but included power supply (LiPo), display (just 240x135 color) and input device (not keyboard, but 3 buttons) to have it always with you and ready to use. +More will be updated in the [docs/history](./history) document, but the idea is from 2020 with the [t-display](https://github.com/kreier/t-display) board. Similar idea: Not just the Microcomputer but included power supply (LiPo), display (just 240x135 color) and input device (not keyboard, but 3 buttons) to have it always with you and ready to use. diff --git a/docs/io_pins.xlsx b/docs/io_pins.xlsx new file mode 100644 index 0000000..14133ca Binary files /dev/null and b/docs/io_pins.xlsx differ diff --git a/docs/ssis.bit_2022-01-06.jpg b/docs/ssis.bit_2022-01-06.jpg new file mode 100644 index 0000000..742e83b Binary files /dev/null and b/docs/ssis.bit_2022-01-06.jpg differ