Skip to content

Commit

Permalink
Merge pull request #263 from pimoroni/moar-badger-examples
Browse files Browse the repository at this point in the history
Add simple LED example and readme tweaks
  • Loading branch information
Gadgetoid authored Mar 4, 2022
2 parents 2528b94 + 7d7c495 commit 60a9e93
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 4 deletions.
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -75,8 +75,9 @@ We also maintain a C++/CMake boilerplate with GitHub workflows configured for te

## RP2040 Boards

* Plasma 2040 - https://shop.pimoroni.com/products/plasma-2040
* Interstate 75 - HUB75 driver https://shop.pimoroni.com/products/interstate-75
* Plasma 2040 (LED strip driver) - https://shop.pimoroni.com/products/plasma-2040
* Interstate 75 (HUB75 driver) - https://shop.pimoroni.com/products/interstate-75
* Badger 2040 (E Ink badge) - https://shop.pimoroni.com/products/badger-2040

## Breakouts

Expand Down
10 changes: 8 additions & 2 deletions micropython/examples/badger2040/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
- [Function Examples](#function-examples)
- [Battery](#battery)
- [Button Test](#button-test)
- [LED](#LED)
- [Application Examples](#application-examples)
- [Badge](#badge)
- [Checklist](#checklist)
Expand All @@ -25,6 +26,11 @@ An example of how to read the battery voltage and display a battery level indica

An example of how to read Badger2040's buttons and display a unique message for each.

### LED
[led.py](led.py)

Blinks Badger's LED on and off.


## Application Examples

Expand All @@ -45,7 +51,7 @@ A checklist application, letting you navigate through items and tick each of the
### Clock
[clock.py](clock.py)

A simple clock showing the time and date, that uses the EInk's fast speed to update every second
A simple clock showing the time and date, that uses the E Ink's fast speed to update every second

### E-Reader
[e-reader.py](e-reader.py)
Expand All @@ -67,4 +73,4 @@ python3 convert.py --binary --resize image_file_1.png image_file_2.png image_fil
### Launcher
[Launcher.py](launcher.py)

A launcher style application, that gives a menu of other applications that can be loaded, as well as information such as battery level.
A launcher style application, that gives a menu of other applications that can be loaded, as well as information such as battery level.
12 changes: 12 additions & 0 deletions micropython/examples/badger2040/led.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# Blinky badger fun!

import badger2040
import time

badger = badger2040.Badger2040()

while True:
badger.led(255)
time.sleep(1)
badger.led(0)
time.sleep(1)

0 comments on commit 60a9e93

Please sign in to comment.