f0c3fe4db8
Use context managers to ensure deinit of audiocore and sd
2025-05-20 22:04:27 +02:00
d02776eea8
Add basic application for playback based on NFC tags
...
Copy and clean up test.py to main.py. Add app module (currently on
app.py, maybe make it a directory later) for application classes.
Implement app.TimerManager to allow scheduling of delayed events in the
micropython async framework.
Implement app.TagPlaybackManager which handles playing back MP3 files
based on the NFC tag reader. Currently, simply plays all MP3 files in a
folder, for which the folder name matches the tag id, in order. Resume,
random and other features not yet supported.
2025-05-20 22:04:27 +02:00
fb496b6991
nfc: Add tag change notification callback
2025-05-20 22:04:27 +02:00
1b683358d1
micropython: upgrade to 1.25.0 plus necessary changes and fixes.
...
Build RPi Pico firmware image / Build-Firmware (push) Successful in 3m6s
Check code formatting / Check-C-Format (push) Successful in 7s
Check code formatting / Check-Python-Flake8 (push) Successful in 9s
Check code formatting / Check-Bash-Shellcheck (push) Successful in 5s
Run unit tests on host / Run-Unit-Tests (push) Successful in 8s
Upgrade and cherry-picks were necessary due to a compilation issue
introduced with gcc 15.1 regarding unterminated string literals. For more
details see https://github.com/micropython/micropython/pull/17269.
Still hot and untested...
2025-05-20 20:13:24 +02:00
91af2087b2
Merge pull request '15-create-filesystem-image-with-firmware' ( #17 ) from 15-create-filesystem-image-with-firmware into main
...
Build RPi Pico firmware image / Build-Firmware (push) Successful in 3m22s
Check code formatting / Check-C-Format (push) Successful in 32m11s
Check code formatting / Check-Python-Flake8 (push) Successful in 9s
Check code formatting / Check-Bash-Shellcheck (push) Successful in 4s
Run unit tests on host / Run-Unit-Tests (push) Successful in 8s
Reviewed-on: #17
Reviewed-by: Stefan Kratochwil <kratochwil-la@gmx.de >
2025-04-29 17:37:11 +00:00
7f8282315e
Restructure sources
...
Build RPi Pico firmware image / Build-Firmware (push) Successful in 5m29s
Check code formatting / Check-C-Format (push) Successful in 9s
Check code formatting / Check-Python-Flake8 (push) Successful in 9s
Check code formatting / Check-Bash-Shellcheck (push) Successful in 4s
Run unit tests on host / Run-Unit-Tests (push) Successful in 8s
The python and C modules that are supposed to be built into the firmware
image (i.e. those that are in manifest.py or in USER_C_MODULES) have
been moved to the software/modules directory.
The software/src directory should now only contain python scripts and
other files that should be installed to the Picos flash filesystem. The
idea is that these should be those scripts that implement the
application behaviour, as these are the ones that a user who does not
want to build the whole firmware themself wants to modify.
2025-04-01 22:05:30 +02:00
8a8cb85c39
ci: Add firmware with filesystem image to artifacts
2025-04-01 22:05:30 +02:00
e2895589f1
schematic: Update to KiCad 9 and some minor fixes
...
Build RPi Pico firmware image / Build-Firmware (push) Successful in 3m0s
Check code formatting / Check-C-Format (push) Successful in 6s
Check code formatting / Check-Python-Flake8 (push) Successful in 8s
Check code formatting / Check-Bash-Shellcheck (push) Successful in 4s
Run unit tests on host / Run-Unit-Tests (push) Successful in 7s
- Add gain setting resistor for I2S Amp
- Add three pushbuttons
2025-04-01 21:21:48 +02:00
de5f0a3ad0
Add test rig
Build RPi Pico firmware image / Build-Firmware (push) Successful in 3m3s
Check code formatting / Check-C-Format (push) Successful in 8s
Check code formatting / Check-Python-Flake8 (push) Successful in 9s
Check code formatting / Check-Bash-Shellcheck (push) Successful in 4s
Run unit tests on host / Run-Unit-Tests (push) Successful in 6s
2025-04-01 21:14:39 +02:00
b818ed933d
Merge pull request 'nfc-module' ( #10 ) from nfc-module into main
...
Check code formatting / Check-C-Format (push) Successful in 6s
Check code formatting / Check-Python-Flake8 (push) Successful in 9s
Check code formatting / Check-Bash-Shellcheck (push) Successful in 4s
Run unit tests on host / Run-Unit-Tests (push) Successful in 7s
Build RPi Pico firmware image / Build-Firmware (push) Successful in 2m58s
Reviewed-on: #10
Reviewed-by: Matthias Blankertz <matthias@blankertz.org >
2025-03-25 21:21:27 +00:00
ee43ad816a
Providing public interface, fixed formatting.
Build RPi Pico firmware image / Build-Firmware (push) Successful in 3m0s
Check code formatting / Check-C-Format (push) Successful in 7s
Check code formatting / Check-Python-Flake8 (push) Successful in 9s
Check code formatting / Check-Bash-Shellcheck (push) Successful in 4s
Run unit tests on host / Run-Unit-Tests (push) Successful in 7s
2025-03-25 22:16:38 +01:00
a2a9c82471
Nfc module now depends on initialized MFRC522, fixed incorrect return type hint.
Build RPi Pico firmware image / Build-Firmware (push) Successful in 3m0s
Check code formatting / Check-C-Format (push) Successful in 6s
Check code formatting / Check-Python-Flake8 (push) Failing after 8s
Check code formatting / Check-Bash-Shellcheck (push) Successful in 4s
Run unit tests on host / Run-Unit-Tests (push) Successful in 7s
2025-03-25 22:05:14 +01:00
976bc4053c
Made nfc.py executable, increased tocard_retries to 20 due to increased CPU frequency.
Build RPi Pico firmware image / Build-Firmware (push) Successful in 2m57s
Check code formatting / Check-C-Format (push) Successful in 6s
Check code formatting / Check-Python-Flake8 (push) Failing after 8s
Check code formatting / Check-Bash-Shellcheck (push) Successful in 5s
Run unit tests on host / Run-Unit-Tests (push) Successful in 7s
2025-03-25 20:37:58 +01:00
5cda9891f5
Added docstrings and license information.
...
Moved main.py contents to documentation as a simple example.
2025-03-25 20:37:58 +01:00
ba4c5175eb
WIP: First working example for an async background task
2025-03-25 20:37:53 +01:00
dfd48a0314
Fix crash when starting audiocore from REPL
Check code formatting / Check-C-Format (push) Successful in 7s
Check code formatting / Check-Python-Flake8 (push) Successful in 9s
Check code formatting / Check-Bash-Shellcheck (push) Successful in 4s
Run unit tests on host / Run-Unit-Tests (push) Successful in 7s
Build RPi Pico firmware image / Build-Firmware (push) Successful in 3m0s
2025-03-23 19:12:51 +01:00
72d5d97d46
Merge pull request 'audiocore-mp3-decoder' ( #12 ) from audiocore-mp3-decoder into main
...
Build RPi Pico firmware image / Build-Firmware (push) Successful in 2m55s
Check code formatting / Check-C-Format (push) Successful in 6s
Check code formatting / Check-Python-Flake8 (push) Successful in 9s
Check code formatting / Check-Bash-Shellcheck (push) Successful in 4s
Run unit tests on host / Run-Unit-Tests (push) Successful in 7s
Reviewed-on: #12
Reviewed-by: Stefan Kratochwil <kratochwil-la@gmx.de >
2025-03-22 10:19:11 +00:00
1385eee85c
audiocore: Make it more obvious what __sev does
Build RPi Pico firmware image / Build-Firmware (push) Successful in 2m55s
Check code formatting / Check-C-Format (push) Successful in 7s
Check code formatting / Check-Python-Flake8 (push) Successful in 9s
Check code formatting / Check-Bash-Shellcheck (push) Successful in 5s
Run unit tests on host / Run-Unit-Tests (push) Successful in 8s
2025-03-22 10:54:23 +01:00
444b7c4d9f
audiocore: Use constant for MP3 frame size
2025-03-22 10:54:23 +01:00
389fed4d3b
MP3Player module to manage mp3 playing
2025-03-22 10:53:27 +01:00
931571bd0a
audiocore: Add async support
...
Rename the exising audiocore C module to _audiocore and create a new
Micropython wrapper module audiocore. This makes it easier to implement
async methods.
Add interrupt support to _audiocore that notifies core0 whenever data
has been consumed from the MP3 bitstream buffer.
Use this interrupt and an asyncio.ThreadSafeFlag to implement
audiocore.async_put which will play back the provided buffer, allowing
other async tasks to run while waiting for space in the bitstream
buffer.
2025-03-22 10:53:27 +01:00
cc2bf8a84b
audiocore: Integrate mp3 decoder
2025-03-22 10:53:27 +01:00
ff1ddfb639
Add helix_mp3 fixed-point MP3 decoder library
2025-03-17 21:13:34 +01:00
24d9261b40
Merge pull request 'micropython: Update to 1.24.1, with cherrypicked patches for pico-sdk 2.1.1' ( #11 ) from micropython-1.24.1-pico-2.1.1 into main
...
Build RPi Pico firmware image / Build-Firmware (push) Successful in 2m55s
Check code formatting / Check-C-Format (push) Successful in 7s
Check code formatting / Check-Python-Flake8 (push) Successful in 9s
Check code formatting / Check-Bash-Shellcheck (push) Successful in 4s
Run unit tests on host / Run-Unit-Tests (push) Successful in 8s
Reviewed-on: #11
Reviewed-by: Stefan Kratochwil <kratochwil-la@gmx.de >
2025-03-17 20:07:33 +00:00
9c898853f8
ci: Add firmware build step
...
Build RPi Pico firmware image / Build-Firmware (push) Successful in 2m57s
Check code formatting / Check-C-Format (push) Successful in 6s
Check code formatting / Check-Python-Flake8 (push) Successful in 8s
Check code formatting / Check-Bash-Shellcheck (push) Successful in 4s
Run unit tests on host / Run-Unit-Tests (push) Successful in 7s
Try to build the actual firmware image in CI
2025-03-10 20:17:27 +01:00
c698dad6da
micropython: Update to 1.24.1, with cherrypicked patches for pico-sdk 2.1.1
2025-03-10 20:17:25 +01:00
e07e42b9dc
Merge pull request 'rp2-sd-driver' ( #9 ) from rp2-sd-driver into main
...
Check code formatting / Check-C-Format (push) Successful in 6s
Check code formatting / Check-Python-Flake8 (push) Successful in 8s
Check code formatting / Check-Bash-Shellcheck (push) Successful in 4s
Run unit tests on host / Run-Unit-Tests (push) Successful in 7s
Reviewed-on: #9
Reviewed-by: Stefan Kratochwil <kratochwil-la@gmx.de >
2025-03-10 19:16:27 +00:00
98ecca0d09
rp2_sd: Cleanup and fixes
...
Check code formatting / Check-C-Format (push) Successful in 6s
Check code formatting / Check-Python-Flake8 (push) Successful in 8s
Check code formatting / Check-Bash-Shellcheck (push) Successful in 4s
Run unit tests on host / Run-Unit-Tests (push) Successful in 8s
- Use SD_SECTOR_SIZE define instead of magic number 512
- Replace uint8_t buf[1] with plain uint8_t
- Check sd_spi_read_dma precondition that sd_dma_context state has to be
DMA_IDLE explicitly and return false instead of relying on assert
- sd_spi_dma_isr is time critical
2025-03-10 20:15:05 +01:00
f7d44516df
test.py: Update to use rp2_sd module
...
Signed-off-by: Matthias Blankertz <matthias@blankertz.org >
2025-03-10 20:15:05 +01:00
460a67cf9f
Add rp2 PIO and DMA fast SD card driver
...
The builtin micropython SD card driver using the default micropython SPI
implementation suffered from very low read speeds. Add an optimized SD
card driver using rp2 PIO and DMA. Currently read only, write support to
be added later.
Signed-off-by: Matthias Blankertz <matthias@blankertz.org >
2025-03-10 20:15:05 +01:00
48c5caa078
Merge pull request 'microdot-integration' ( #8 ) from microdot-integration into main
...
Check code formatting / Check-C-Format (push) Successful in 7s
Check code formatting / Check-Python-Flake8 (push) Successful in 9s
Check code formatting / Check-Bash-Shellcheck (push) Successful in 4s
Run unit tests on host / Run-Unit-Tests (push) Successful in 7s
Reviewed-on: #8
Reviewed-by: Matthias Blankertz <matthias@blankertz.org >
2025-02-11 18:22:17 +00:00
b57283a04f
microdot: First working example. We observe wifi instabilities/detectability issues.
Check code formatting / Check-C-Format (push) Successful in 7s
Check code formatting / Check-Python-Flake8 (push) Successful in 8s
Check code formatting / Check-Bash-Shellcheck (push) Successful in 4s
Run unit tests on host / Run-Unit-Tests (push) Successful in 7s
2025-01-28 21:44:40 +01:00
b5124b9b1c
wifi: announce ssid, set ip. SSID visibilty varies between adapters.
2025-01-28 21:30:00 +01:00
fbea092a95
Added microdot submodule.
2025-01-28 21:23:48 +01:00
73d107f927
Merge pull request 'micropython-mfrc522' ( #4 ) from micropython-mfrc522 into main
...
Check code formatting / Check-C-Format (push) Successful in 6s
Check code formatting / Check-Python-Flake8 (push) Successful in 9s
Check code formatting / Check-Bash-Shellcheck (push) Successful in 5s
Run unit tests on host / Run-Unit-Tests (push) Successful in 8s
Reviewed-on: #4
Reviewed-by: Matthias Blankertz <matthias@blankertz.org >
2025-01-28 18:33:05 +00:00
f213a51e36
Documented maximum observed delay for future reference.
Check code formatting / Check-C-Format (push) Successful in 6s
Check code formatting / Check-Python-Flake8 (push) Successful in 8s
Check code formatting / Check-Bash-Shellcheck (push) Successful in 4s
Run unit tests on host / Run-Unit-Tests (push) Successful in 7s
2025-01-28 19:25:57 +01:00
836f9ec42b
Using relative paths for submodules.
2025-01-28 19:25:57 +01:00
e79d3886ed
Usable mfrc522 code.
...
Not as async as possible, and definately needs a future revisit. But
works for now, with acceptable delays, if the newly introduced
tocard_retries parameter of class MFRC522 is used and set to a
reasonable low value.
2025-01-28 19:25:57 +01:00
1caa3f54a5
Being more pythonesk.
2025-01-28 19:25:57 +01:00
f00b2b1ab1
Made mfrc522.py part of our micropython environment.
2025-01-28 19:25:57 +01:00
3deba7d604
Fixes for flake8.
2025-01-28 19:25:57 +01:00
7188722cc8
Made tag uid retrieval awaitable.
2025-01-28 19:25:57 +01:00
553bbe95b2
Fixed uid output. Also fixed line endings (sorry).
2025-01-28 19:25:57 +01:00
62b93de024
We are not interested in the card's content.
2025-01-28 19:25:57 +01:00
4e7968fc0c
Added deployment script and example main.py.
2025-01-28 19:25:57 +01:00
df33e072c3
Added micropython library for the mfrc522 card reader.
2025-01-28 19:25:57 +01:00
16a3fdb8d0
Merge pull request 'Check all shell scripts in our repo.' ( #7 ) from runner_shellcheck into main
...
Check code formatting / Check-C-Format (push) Successful in 32m14s
Check code formatting / Check-Python-Flake8 (push) Successful in 10s
Check code formatting / Check-Bash-Shellcheck (push) Successful in 5s
Run unit tests on host / Run-Unit-Tests (push) Successful in 26s
Reviewed-on: #7
Reviewed-by: Matthias Blankertz <matthias@blankertz.org >
2025-01-14 20:12:03 +01:00
1981cac7de
Check all shell scripts in our repo.
2025-01-14 20:11:53 +01:00
527df80623
Merge pull request 'Flashing via picotool is the new default.' ( #6 ) from flash_with_picotool into main
...
Reviewed-on: #6
Reviewed-by: Matthias Blankertz <matthias@blankertz.org >
2025-01-14 20:11:39 +01:00
8b9d6ce9fc
Check for required commands, cleanup, added help.
Check code formatting / Check-C-Format (push) Successful in 7s
Check code formatting / Check-Python-Flake8 (push) Successful in 8s
Run unit tests on host / Run-Unit-Tests (push) Successful in 8s
2024-12-10 21:27:56 +01:00