Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[DO NOT MERGE] Sim changes for forthcoming beta MicroPython release #113

Draft
wants to merge 36 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
36 commits
Select commit Hold shift + click to select a range
699a2d7
Work towards building on the audio-recording branch
microbit-matt-hillsdon Mar 20, 2024
202c7fd
The simulator compiles (with my local mpy change)
microbit-matt-hillsdon Mar 21, 2024
41ff6b0
Add pin touches sample
microbit-grace Mar 21, 2024
292addc
Update pin_touches sample to include logo
microbit-grace Mar 21, 2024
b73637d
WIP record audio
microbit-grace Mar 22, 2024
1b9465a
Initial steps towards microphone HAL
microbit-matt-hillsdon Mar 22, 2024
9cc4b2b
Microphone: get as far as reading samples
microbit-matt-hillsdon Mar 22, 2024
c971228
WIP convertToUnit8Array
microbit-grace Mar 25, 2024
3c4a79c
Update to latest from audio-recording branch
microbit-matt-hillsdon Mar 27, 2024
7aaa800
Remove unused HAL method
microbit-matt-hillsdon Mar 27, 2024
c562955
Reinstate clear on display for non-HAL use (reset)
microbit-matt-hillsdon Mar 27, 2024
88e2baf
Safari 13 compatible speech option
microbit-matt-hillsdon Mar 27, 2024
41e7ce3
Merge branch 'beta-updates' of https://github.com/microbit-foundation…
microbit-grace Mar 27, 2024
2916e18
WIP
microbit-matt-hillsdon Mar 27, 2024
62a338e
WIP playing recorded audio
microbit-matt-hillsdon Mar 27, 2024
8eb6fa7
Update
microbit-matt-hillsdon Apr 2, 2024
26a4ee4
Roughly works
microbit-matt-hillsdon Apr 2, 2024
2cda4d2
Sample program
microbit-matt-hillsdon Apr 2, 2024
d232569
Fix set rate in record.py
microbit-grace Apr 2, 2024
19b095b
Remove debug
microbit-matt-hillsdon Apr 2, 2024
90292b6
Merge branch 'beta-updates' of https://github.com/microbit-foundation…
microbit-grace Apr 3, 2024
3c30c59
Give older Safari a chance
microbit-matt-hillsdon Apr 3, 2024
4f1baa3
Tweak Safari workaround
microbit-matt-hillsdon Apr 3, 2024
ef44717
Fix PR feedback
microbit-matt-hillsdon Apr 3, 2024
5907c05
Tweak sample to allow on-the-fly rate change
microbit-matt-hillsdon Apr 3, 2024
4ed8c93
Remove browser tab mic indicator
microbit-grace Apr 11, 2024
aea7937
Activate sim mic light when recording
microbit-grace Apr 11, 2024
8798367
Update simulator micropython lib
microbit-grace May 3, 2024
4da3f33
Add microphone.set_sensitivity example and js hal
microbit-grace May 3, 2024
6042086
Update to latest
microbit-matt-hillsdon May 23, 2024
06b4549
Tweak AUDIO_OUTPUT_BUFFER_SIZE and document
microbit-matt-hillsdon May 23, 2024
b887f22
Audio fixes
microbit-matt-hillsdon May 24, 2024
34e45b3
Update MicroPython to fix silent frames issue
microbit-matt-hillsdon May 28, 2024
7d84c58
Update MicroPython
microbit-matt-hillsdon Aug 19, 2024
677585f
Update MicroPython
microbit-matt-hillsdon Aug 21, 2024
ab07528
Resample via a libsamplerate (#117)
microbit-matt-hillsdon Aug 28, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 21 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -318,7 +318,7 @@ Tagged releases with a `v` prefix are deployed to https://python-simulator.userm

1. Update the lib/micropython-microbit-v2 to the relevant hash. Make sure that its lib/micropython submodule is updated (see checkout instructions above).
2. Review the full diff for micropython-microbit-v2. In particular, note changes to:
1. main.c, src/Makefile and mpconfigport.h all which have simulator versions that may need updates
1. main.c, src/Makefile and mpconfigport.h, microbitfs.c, drv_radio.c all which have simulator versions that may need updates
2. the HAL, which may require implementing in the simulator
3. the filesystem, which has a JavaScript implementation.

Expand All @@ -331,6 +331,26 @@ Steps for WASM debugging in Chrome:
- Enable "WebAssembly Debugging: Enable DWARF support" in DevTools Experiments
- DEBUG=1 make

## License

This software is under the MIT open source license.

[SPDX-License-Identifier: MIT](LICENSE)

MicroPython for micro:bit is included in the build process via a submodule.

We use dependencies via the NPM registry as specified by the package.json file under common Open Source licenses.

Full details of each package can be found by running `license-checker`:

```bash
$ npx license-checker --direct --summary --production
```

Omit the flags as desired to obtain more detail.

A fork of libsamplerate_js to reduce bundle size is [hosted on GitHub](https://github.com/microbit-foundation/libsamplerate-js).

## Code of Conduct

Trust, partnership, simplicity and passion are our core values we live and
Expand Down
2 changes: 1 addition & 1 deletion lib/micropython-microbit-v2
Submodule micropython-microbit-v2 updated 58 files
+19 −16 .github/workflows/build.yml
+0 −1 .gitignore
+1 −1 lib/codal
+1 −1 lib/micropython
+6 −6 src/addlayouttable.py
+1 −1 src/codal.patch
+2 −1 src/codal_app/codal.json
+3 −0 src/codal_app/main.cpp
+43 −17 src/codal_app/microbithal.cpp
+12 −7 src/codal_app/microbithal.h
+22 −17 src/codal_app/microbithal_audio.cpp
+94 −0 src/codal_app/microbithal_microphone.cpp
+15 −8 src/codal_port/Makefile
+6 −2 src/codal_port/drv_display.c
+2 −2 src/codal_port/drv_image.c
+2 −0 src/codal_port/drv_radio.c
+3 −1 src/codal_port/drv_softtimer.c
+6 −6 src/codal_port/iters.c
+7 −7 src/codal_port/main.c
+120 −0 src/codal_port/make_microbit_version_hdr.py
+35 −34 src/codal_port/microbit_accelerometer.c
+128 −0 src/codal_port/microbit_audiorecording.c
+199 −0 src/codal_port/microbit_audiotrack.c
+8 −7 src/codal_port/microbit_button.c
+24 −23 src/codal_port/microbit_compass.c
+12 −12 src/codal_port/microbit_display.c
+23 −14 src/codal_port/microbit_i2c.c
+50 −48 src/codal_port/microbit_image.c
+150 −21 src/codal_port/microbit_microphone.c
+57 −31 src/codal_port/microbit_pin.c
+1 −1 src/codal_port/microbit_pinaudio.c
+8 −0 src/codal_port/microbit_pinmode.c
+11 −10 src/codal_port/microbit_sound.c
+50 −24 src/codal_port/microbit_soundeffect.c
+16 −9 src/codal_port/microbit_soundevent.c
+12 −11 src/codal_port/microbit_speaker.c
+31 −22 src/codal_port/microbit_spi.c
+16 −15 src/codal_port/microbit_uart.c
+83 −87 src/codal_port/microbitfs.c
+9 −7 src/codal_port/modantigravity.c
+271 −115 src/codal_port/modaudio.c
+26 −5 src/codal_port/modaudio.h
+14 −12 src/codal_port/modlog.c
+8 −6 src/codal_port/modlove.c
+18 −17 src/codal_port/modmachine.c
+30 −26 src/codal_port/modmicrobit.c
+6 −2 src/codal_port/modmicrobit.h
+20 −15 src/codal_port/modmusic.c
+21 −19 src/codal_port/modos.c
+9 −7 src/codal_port/modpower.c
+19 −17 src/codal_port/modradio.c
+30 −14 src/codal_port/modspeech.c
+8 −6 src/codal_port/modthis.c
+8 −66 src/codal_port/mpconfigport.h
+25 −2 src/codal_port/mphalport.h
+35 −0 src/codal_port/utils.c
+6 −19 src/codal_port/utils.h
+53 −0 src/test_record.py
Loading
Loading