diff options
| author | Daniel Thompson <daniel@redfelineninja.org.uk> | 2020-03-07 11:48:17 (GMT) |
|---|---|---|
| committer | Daniel Thompson <daniel@redfelineninja.org.uk> | 2020-03-07 11:48:17 (GMT) |
| commit | 1b334f7ad9d585fc757246bfddcced2e9945deb3 (patch) | |
| tree | 0dc5fe2ba274a79eee9417216c2cabdc525b3476 /wasp/boards/pinetime/watch.py | |
| parent | e5f455b5ba9e2230b1de13cb5038196bc095ce67 (diff) | |
wasp: pinetime: Enable the cst816s by default
Diffstat (limited to 'wasp/boards/pinetime/watch.py')
| -rw-r--r-- | wasp/boards/pinetime/watch.py | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/wasp/boards/pinetime/watch.py b/wasp/boards/pinetime/watch.py index 9415101..7e4ee6f 100644 --- a/wasp/boards/pinetime/watch.py +++ b/wasp/boards/pinetime/watch.py @@ -7,11 +7,13 @@ rtc.counter.start() import os import time +from machine import I2C from machine import Pin #from machine import Signal from machine import SPI from drivers.battery import Battery +from drivers.cst816s import CST816S from drivers.signal import Signal from drivers.st7789 import ST7789_SPI from drivers.vibrator import Vibrator @@ -55,8 +57,10 @@ battery = Battery( Pin('BATTERY', Pin.IN), Signal(Pin('CHARGING', Pin.IN), invert=True), Signal(Pin('USB_PWR', Pin.IN), invert=True)) -vibrator = Vibrator(Pin('MOTOR', Pin.OUT, value=0), active_low=True) button = Pin('BUTTON', Pin.IN) +i2c = I2C(1, scl='I2C_SCL', sda='I2C_SDA') +touch = CST816S(i2c) +vibrator = Vibrator(Pin('MOTOR', Pin.OUT, value=0), active_low=True) # Mount the filesystem flash = FLASH(spi, (Pin('NOR_CS', Pin.OUT, value=1),)) |
