Search found 10 matches
- Sat May 28, 2022 5:16 pm
- Forum: micro:bit boards
- Topic: Accessing the row pins for LED display
- Replies: 3
- Views: 22161
Re: Accessing the row pins for LED display
On a V1 micro:bit I had some success with this for driving directly one physical row (2nd one from top). MicroPython v1.9.2-34-gd64154c73 on 2017-09-01; micro:bit v1.0.1 with nRF51822 Type "help()" for more information. >>> >>> import machine >>> import microbit >>> display.off() >>> OUTSET = 0x5000...
- Sat Oct 23, 2021 2:37 pm
- Forum: micro:bit boards
- Topic: File system greater than 30k for V2?
- Replies: 2
- Views: 28628
Re: File system greater than 30k for V2?
It would also be useful to be able to change the playback rate. I ended up duplicating the samples to play a file at half speed for Halloween laughing skeleton using Cytron EDU:BIT and BBC micro:bit (YouTube). For anyone interested, more detail on that in Instructables: Halloween Spooky Ghost With B...
- Wed Oct 13, 2021 10:21 pm
- Forum: micro:bit boards
- Topic: File system greater than 30k for V2?
- Replies: 2
- Views: 28628
Re: File system greater than 30k for V2?
I squashed as much as I could into the 30k: Instructables: PIR Movement Alarm With BBC Micro:bit and External Speaker - YouTube video in step 5 with the sample playback. Would be nice to see this raised and perhaps with a marker/warning showing when you go above 30k for projects developed on the V2 ...
- Fri Aug 06, 2021 11:21 pm
- Forum: micro:bit boards
- Topic: File system greater than 30k for V2?
- Replies: 2
- Views: 28628
File system greater than 30k for V2?
The micro:bit V2 has 512kB flash (double that of the V1) but it appears to still have the same ~30kB reserved for files? I wanted to do a bit of audio sample playback and I can't fit it all into 30k. Is there an easy way to change/extend this?
- Fri Aug 06, 2021 11:14 pm
- Forum: micro:bit boards
- Topic: Playing audio files on the micro:bit
- Replies: 8
- Views: 47061
Re: Playing audio files on the micro:bit
I have some audio playing (unsigned 8bit raw files) on a V2 as I type this. from microbit import * import audio import math def frames_from_file(sfile, frame): # 32 is length of AudioFrame while(sfile.readinto(frame, 32) > 0): yield frame def play_file(filename): frame = audio.AudioFrame() with open...
- Wed Oct 28, 2020 3:42 pm
- Forum: Development of MicroPython
- Topic: More detail for MemoryError exceptions
- Replies: 0
- Views: 2323
More detail for MemoryError exceptions
I've had a few troublesome MemoryError exceptions in CircuitPython recently and from what I've seen on MicroPython on micro:bit the issue is the same. The tricky ones for me fall into four categories: feels like there's enough memory around but still fails, sometimes explicity gc.mem_free() "profili...
- Sat Aug 22, 2020 4:32 pm
- Forum: General Discussion and Questions
- Topic: get_mode for micro:bit pins with analog read and write
- Replies: 1
- Views: 1333
get_mode for micro:bit pins with analog read and write
I can't find the documentation for the BBC micro:bit MicroPython's get_mode() method on the pins. It appears to be set all the time to a useful value apart from for read_analog() where it returns unused for some reason? MicroPython v1.9.2-34-gd64154c73 on 2017-09-01; micro:bit v1.0.1 with nRF51822 T...
- Thu Aug 06, 2020 7:16 pm
- Forum: Development of MicroPython
- Topic: bytes() makes a new copy of a bytes variable
- Replies: 2
- Views: 2367
bytes() makes a new copy of a bytes variable
I noticed this in CircuitPython but just tested a micro:bit and it does the same thing. bytes() makes a new copy of an object even if it's bytes() already. MicroPython v1.9.2-34-gd64154c73 on 2017-09-01; micro:bit v1.0.1 with nRF51822 Type "help()" for more information. >>> >>> a = b"Original" >>> b...
- Thu Aug 06, 2020 7:10 pm
- Forum: micro:bit boards
- Topic: Accessing the row pins for LED display
- Replies: 3
- Views: 22161
Re: Accessing the row pins for LED display
Thanks for the info. It reminds me of the days of peek and poke!
- Wed Jun 17, 2020 11:40 am
- Forum: micro:bit boards
- Topic: Accessing the row pins for LED display
- Replies: 3
- Views: 22161
Accessing the row pins for LED display
Is it possible to access the pins for the rows of the LED display to allow direct, low-level control of the LED screen after a display_off(), of course? The columns appear to be available as microbit.pinX but I've not worked out how to access the rows.