Skip to content

Commit

Permalink
Examples: updated to clear both layers
Browse files Browse the repository at this point in the history
  • Loading branch information
thirdr committed Oct 9, 2024
1 parent 7dfe8c1 commit 3f971f9
Show file tree
Hide file tree
Showing 6 changed files with 48 additions and 1 deletion.
8 changes: 8 additions & 0 deletions examples/multi-sensor-breakout/double_tap.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,14 @@

WIDTH, HEIGHT = display.get_bounds()

# Clear all layers first
display.set_layer(0)
display.set_pen(BLACK)
display.clear()
display.set_layer(1)
display.set_pen(BLACK)
display.clear()

# Define our own pen here
BG = display.create_pen(70, 130, 180)

Expand Down
9 changes: 8 additions & 1 deletion examples/multi-sensor-breakout/double_tap_async.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,16 @@
import asyncio
import sys


WIDTH, HEIGHT = display.get_bounds()

# Clear all layers first
display.set_layer(0)
display.set_pen(BLACK)
display.clear()
display.set_layer(1)
display.set_pen(BLACK)
display.clear()

# Define our own pen for the background
BG = display.create_pen(70, 130, 180)

Expand Down
8 changes: 8 additions & 0 deletions examples/multi-sensor-breakout/explorer_sensor_stick_demo.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,14 @@
from breakout_bme280 import BreakoutBME280
import time

# Clear all layers first
display.set_layer(0)
display.set_pen(BLACK)
display.clear()
display.set_layer(1)
display.set_pen(BLACK)
display.clear()

try:
ltr = BreakoutLTR559(i2c)
lsm = LSM6DS3(i2c)
Expand Down
8 changes: 8 additions & 0 deletions examples/multi-sensor-breakout/shake.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,14 @@

WIDTH, HEIGHT = display.get_bounds()

# Clear all layers first
display.set_layer(0)
display.set_pen(BLACK)
display.clear()
display.set_layer(1)
display.set_pen(BLACK)
display.clear()

BG = display.create_pen(70, 130, 180)

try:
Expand Down
8 changes: 8 additions & 0 deletions examples/multi-sensor-breakout/step_counter.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,14 @@

WIDTH, HEIGHT = display.get_bounds()

# Clear all layers first
display.set_layer(0)
display.set_pen(BLACK)
display.clear()
display.set_layer(1)
display.set_pen(BLACK)
display.clear()

# Some colours we'll need later on
BG = display.create_pen(255, 99, 71)

Expand Down
8 changes: 8 additions & 0 deletions examples/multi-sensor-breakout/weather_station.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,14 @@
from pimoroni_explorer import display, i2c, BLACK, WHITE, RED
import jpegdec

# Clear all layers first
display.set_layer(0)
display.set_pen(BLACK)
display.clear()
display.set_layer(1)
display.set_pen(BLACK)
display.clear()

try:
bme = BreakoutBME280(i2c, address=0x76)
except RuntimeError:
Expand Down

0 comments on commit 3f971f9

Please sign in to comment.