Skip to content

Commit

Permalink
Merge pull request #5 from ssisbit/kreier-patch3
Browse files Browse the repository at this point in the history
GPIO documentation
  • Loading branch information
SSIS programming 2021 authored Jan 7, 2022
2 parents c622aaa + 3616dd2 commit a4d9ee4
Show file tree
Hide file tree
Showing 6 changed files with 84 additions and 2 deletions.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -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.
Expand Down
Binary file added docs/T8-pinmap.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
5 changes: 4 additions & 1 deletion docs/history.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
# ssis:bit

AIO solution for SSIS students

## Hardware
Expand Down Expand Up @@ -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.
Expand All @@ -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

Expand Down
79 changes: 78 additions & 1 deletion docs/index.md
Original file line number Diff line number Diff line change
@@ -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.
Expand All @@ -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.
Binary file added docs/io_pins.xlsx
Binary file not shown.
Binary file added docs/ssis.bit_2022-01-06.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit a4d9ee4

Please sign in to comment.