You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: badger_os/README.md
+45-28Lines changed: 45 additions & 28 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,7 +1,9 @@
1
-
# Badger 2040 W MicroPython Examples <!-- omit in toc -->
2
-
3
-
-[About Badger 2040 W](#about-badger-2040-w)
4
-
-[Badger 2040 W and PicoGraphics](#badger-2040-w-and-picographics)
1
+
# Badger 2040 MicroPython Examples <!-- omit in toc -->
2
+
3
+
These MicroPython examples demonstrate a variety of applications and are distributed as a sort of "OS" for Badger 2040.
4
+
5
+
They should help you get started quickly and give you something to modify for your own requirements.
6
+
5
7
-[Examples](#examples)
6
8
-[Badge](#badge)
7
9
-[Clock](#clock)
@@ -17,25 +19,6 @@
17
19
-[Weather](#weather)
18
20
-[Other Resources](#other-resources)
19
21
20
-
21
-
## About Badger 2040 W
22
-
23
-
Badger 2040 W is a programmable E Paper/eInk/EPD badge with 2.4GHz wireless connectivity, powered by Raspberry Pi Pico W. It can go into a deep sleep mode between updates to preserve battery.
24
-
25
-
-:link:[Badger 2040 W store page](https://shop.pimoroni.com/products/badger-2040-w)
26
-
27
-
Badger 2040 W ships with MicroPython firmware pre-loaded, but you can download the most recent version at the link below (you'll want the `pimoroni-badger2040w` .uf2). If you download the `-with-examples` file, it will come with examples built in.
The easiest way to start displaying cool stuff on Badger is by using our `badger2040w` module (which contains helpful functions for interacting with the board hardware) and our PicoGraphics library (which contains a bunch of functions for drawing on the E Ink display).
35
-
36
-
-[Badger 2040 W function reference](../../modules/badger2040w/README.md)
37
-
-[PicoGraphics function reference](../../modules/picographics/README.md)
38
-
39
22
## Examples
40
23
41
24
Find out more about how to use these examples in our Learn guide:
@@ -47,40 +30,74 @@ Find out more about how to use these examples in our Learn guide:
47
30
48
31
Customisable name badge example.
49
32
33
+
Loads badge details from the `/badges` directory on the device, using a file called `badge.txt` which should contain:
34
+
35
+
* Company
36
+
* Name
37
+
* Detail 1 title
38
+
* Detail 1 text
39
+
* Detail 2 title
40
+
* Detail 2 text
41
+
* Badge image path
42
+
43
+
For example:
44
+
45
+
```txt
46
+
mustelid inc
47
+
H. Badger
48
+
RP2040
49
+
2MB Flash
50
+
E ink
51
+
296x128px
52
+
/badges/badge.jpg
53
+
```
54
+
55
+
The image should be a 104x128 pixel JPEG. Any colours other than black/white will be dithered.
56
+
50
57
### Clock
51
58
[clock.py](examples/clock.py)
52
59
53
60
Clock example with (optional) NTP synchronization and partial screen updates.
54
61
62
+
Press button B to switch the clock into time set mode.
63
+
64
+
On Badger 2040 this allows you to set the internal RTC, but it will not survive a sleep/wake cycle even with a connected battery.
65
+
66
+
On Badger 2040 W it will set the external RTC and the time will persist even after sleep/wake.
67
+
55
68
### Ebook
56
69
[ebook.py](examples/ebook.py)
57
70
58
71
View text files on Badger.
59
72
73
+
Currently reads an abridged copy of "The Wind in the Willows" out of the `/books` directory.
74
+
60
75
### Fonts
61
76
[fonts.py](examples/fonts.py)
62
77
63
-
View all the builtin fonts.
78
+
A basic example that lets you preview how all of the built-in fonts will appear on the display.
64
79
65
80
### Help
66
81
[help.py](examples/help.py)
67
82
68
-
How to navigate the launcher.
83
+
Gives instructions on to navigate the launcher.
69
84
70
85
### Image
71
86
[image.py](examples/image.py)
72
87
73
-
Display .jpegs on Badger.
88
+
Display JPEG images. Images are read out of the `/images` directory on device.
89
+
90
+
Press button B to show/hide the image filename.
74
91
75
92
### Info
76
93
[info.py](examples/info.py)
77
94
78
-
Info about Badger 2040 W.
95
+
Info about Badger 2040.
79
96
80
97
### List
81
98
[list.py](examples/list.py)
82
99
83
-
A checklist to keep track of to-dos or shopping.
100
+
A checklist to keep track of to-dos or shopping. Use A/C and Up/Down to navigate and B to check/uncheck items.
0 commit comments