Search found 4 matches

by Xarbenence
Fri Jul 22, 2022 11:05 pm
Forum: micro:bit boards
Topic: ISR code example gives an error on microbit
Replies: 9
Views: 32808

Re: ISR code example gives an error on microbit

The micro:bit uses a different version of MicroPython -- based on v1.9.2 https://github.com/bbcmicrobit/micropython Because it's such a small microcontroller and because it's targeted at education, a lot of features are not available, including interrupts. Depending on how adventurous you're feelin...
by Xarbenence
Tue Jul 12, 2022 5:03 am
Forum: General Discussion and Questions
Topic: From hex string to bits
Replies: 10
Views: 7451

Re: From hex string to bits

@jimmo, I actually only need binascii.unhexlify. def unhexlify(s): return bytes(int(s[i:i+2], 16) for i in range(0, len(s), 2)) Wow. Thank you. If you don't mind, could I ask you a follow up question? The binascii documentation says that unhexlify takes hexadecimal data and converts it to binary re...
by Xarbenence
Tue Jul 12, 2022 12:17 am
Forum: General Discussion and Questions
Topic: From hex string to bits
Replies: 10
Views: 7451

Re: From hex string to bits

@jimmo, I actually only need binascii.unhexlify.
by Xarbenence
Mon Jul 11, 2022 7:07 pm
Forum: General Discussion and Questions
Topic: From hex string to bits
Replies: 10
Views: 7451

Re: From hex string to bits

Hello, I am currently using micropython to program a micro:bit. When I attempt to use binascii.unhexlify, I get an error saying that there is no module named binascii (or ubinascii, I have tried to import both). Do you know why this might be? I know that only a few micropython modules are imported t...