Skip to content

Commit

Permalink
Merge pull request #1032 from pimoroni/inky-patches
Browse files Browse the repository at this point in the history
Patches for Inky on SDK 2.1.0 + MicroPython edge
  • Loading branch information
Gadgetoid authored Dec 3, 2024
2 parents be3e7ba + 9290243 commit 1991fdd
Show file tree
Hide file tree
Showing 62 changed files with 10 additions and 3,805 deletions.
6 changes: 5 additions & 1 deletion .github/workflows/cmake.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,12 @@ jobs:

env:
PICO_SDK_PATH: $GITHUB_WORKSPACE/pico-sdk

steps:
- name: Compiler Cache Fixup
run: |
mkdir -p /home/runner/.ccache
- name: Compiler Cache
uses: actions/cache@v4
with:
Expand Down
2 changes: 0 additions & 2 deletions .github/workflows/micropython.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,6 @@ jobs:
board: RPI_PICO_W
- name: stellar_unicorn
board: RPI_PICO_W
- name: inky_frame
board: PICO_W_INKY

env:
# MicroPython version will be contained in github.event.release.tag_name for releases
Expand Down
2 changes: 1 addition & 1 deletion ci/micropython.sh
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ function micropython_clone {
function micropython_build_mpy_cross {
cd micropython/mpy-cross
ccache --zero-stats || true
CROSS_COMPILE="ccache " make
CROSS_COMPILE="ccache " USER_C_MODULES= make
ccache --show-stats || true
cd ../../
}
Expand Down
22 changes: 0 additions & 22 deletions micropython/board/PICO_W_INKY/board.json

This file was deleted.

15 changes: 0 additions & 15 deletions micropython/board/PICO_W_INKY/manifest.py

This file was deleted.

17 changes: 0 additions & 17 deletions micropython/board/PICO_W_INKY/mpconfigboard.cmake

This file was deleted.

23 changes: 0 additions & 23 deletions micropython/board/PICO_W_INKY/mpconfigboard.h

This file was deleted.

30 changes: 0 additions & 30 deletions micropython/board/PICO_W_INKY/pins.csv

This file was deleted.

109 changes: 1 addition & 108 deletions micropython/examples/inky_frame/README.md
Original file line number Diff line number Diff line change
@@ -1,110 +1,3 @@
# Pico Inky Frame MicroPython Examples <!-- omit in toc -->

- [PicoGraphics](#picographics)
- [Examples](#examples)
- [Button Test](#button-test)
- [Carbon Intensity](#carbon-intensity)
- [Daily Activity](#daily-activity)
- [Dithering](#dithering)
- [Image Gallery](#image-gallery)
- [LED PWM](#led-pwm)
- [News](#news)
- [PlaceKitten](#placekitten)
- [Quote of the Day](#quote-of-the-day)
- [Random Joke](#random-joke)
- [RTC Demo](#rtc-demo)
- [SD Card Test](#sd-card-test)
- [XKCD Daily](#xkcd-daily)

## PicoGraphics

You can draw on Inky Frame using our tiny PicoGraphics display library.
- [PicoGraphics MicroPython function reference](../../modules/picographics)

## Examples

The wireless examples need `network_manager.py` and `WIFI_CONFIG.py` from the `common` directory to be saved to your Pico W. Open up `WIFI_CONFIG.py` in Thonny to add your wifi details (and save it when you're done).

You'll also need to install the `micropython-urllib.urequest` library using Thonny's 'Tools' > 'Manage Packages' or `common/lib/urllib` which contains a compiled `.mpy` version that uses less RAM. You should place this directory in `lib` on your Pico W.

### Button Test
[button_test.py](button_test.py)

Inky Frame's buttons (and the RTC alarm, busy signal from the screen and external trigger from the hack header) are connected to a shift register to help conserve pins, and to allow these inputs to wake the board up from sleep.

This example demonstrates a simple way of reading when a button has been pushed by reading the shift register and checking if the bit in a specific position is 0 or 1.

### Carbon Intensity
[carbon_intensity.py](carbon_intensity.py)

This example connects to the Carbon Intensity API to give you a regional forecast of how your (UK) electricity is being generated and its carbon impact.

Find out more at https://carbonintensity.org.uk/

### Daily Activity
[inky_frame_daily_activity.py](inky_frame_daily_activity.py)

Generate a random activity from Bored API.

### Dithering
[inky_frame_dithering.py](inky_frame_dithering.py)

A basic example showing automatic dithering in action, as PicoGraphics tries to use Inky Frame's limited colour palette to match arbitrary colours.

### Image Gallery
[/image_gallery](../inky_frame/image_gallery)

This photo frame example displays local images on Inky Frame and lets you switch between them with the buttons. Use `image_gallery.py` if your images are stored on your Pico, or `image_gallery_sd.py` if the images are on your SD card.

### LED PWM
[led_pwm.py](led_pwm.py)

A basic example showing how you can control the brightness of Inky Frame's LEDs using PWM.

### News
[inky_frame_news.py](inky_frame_news.py)

Display headlines from BBC News.

### PlaceKitten
[inky_frame_placekitten.py](inky_frame_placekitten.py)

Download a random (from a small subset) image from PlaceKitten.

### Quote of the Day
[inky_frame_quote_of_the_day.py](inky_frame_quote_of_the_day.py)

Load the WikiQuotes Quote of the Day and display it.

### Random Joke
[inky_frame_random_joke.py](inky_frame_random_joke.py)

Load a random joke from JokeAPI.dev and display it.

Jokes are rendered into images "offline" by our feed2image service for two reasons:

1. Saves the Pico W having to process them
2. JokeAPI.dev needs TLS1.3 which Pico W does not support!

For bugs/contributions or to complain about a joke, see: https://github.com/pimoroni/feed2image

### RTC Demo
[inky_frame_rtc_demo.py](inky_frame_rtc_demo.py)

A basic example that sets the time/date from an NTP server, syncs the Inky and Pico RTCs and and makes Inky Frame wake up on a timer.

### SD Card Test
[sd_test.py](sd_test.py)

This simple example shows how to read and write from the SD card on Inky Frame.

### XKCD Daily
[inky_frame_xkcd_daily.py](inky_frame_xkcd_daily.py)

Download and display the daily webcomic from https://xkcd.com/

The webcomic is rendered "offline" by our feed2image service since xkcd.com requires TLS1.3!

For bugs/contributions see: https://github.com/pimoroni/feed2image


Moved to: [https://github.com/pimoroni/inky-frame/tree/main/examples](https://github.com/pimoroni/inky-frame/tree/main/examples)
86 changes: 0 additions & 86 deletions micropython/examples/inky_frame/button_demo.py

This file was deleted.

Loading

0 comments on commit 1991fdd

Please sign in to comment.