All Questions
Tagged with micropython adafruit-circuitpython
23 questions
0
votes
1
answer
43
views
Is micropython compatible with Ply?
I would like to use the ply parser on micropython.
Running lex.py in micropython gives me a syntax error. Line 341.
def get_caller_module_dict(levels):
f = sys._getframe(levels)
return { **f....
1
vote
0
answers
284
views
Printing an exception that works on Micropython/CircuitPython AND desktop python
I am writing a library that is supposed to work on Micropython/CircuitPython as well as on "normal" Python (i.e, like a Raspberry Pi). I have not been able to find a way to format or print ...
2
votes
0
answers
250
views
missing data when recording audio on raspberry pi pico
i wanted to record audio using max9814 and raspberry pi pico with micropython/circuitpython but when i recorded the data, some parts of it lose because it's trying to read the data and write the data ...
0
votes
0
answers
185
views
Creating a Virtual USB Device with a Pico - Need Guidance
I am currently working on a project where I need to create a virtual USB device on a host device using a Pico microcontroller. However, I am facing difficulties in understanding the process and I ...
1
vote
0
answers
941
views
how do i get usb_hid on micropython
So there is a module named usb_hid on CircuitPython but its not on MicroPython. Is there a way to get usb_hid on MicroPython?
It isnt in the lib folder of CircuitPython. I even tried displaying all ...
2
votes
1
answer
770
views
Streaming mp3 audio from a URL in circuitPython
I want to stream mp3 audio from a URL using the Raspberry Pi Pico W. This is my code:
import adafruit_requests
import wifi
import socketpool
import ssl
import board
import audiomp3
import audiobusio
...
0
votes
1
answer
3k
views
Can't set up soft access point in CircuitPython
I want to set up a soft access point (a hotspot without an internet connection) on my Raspberry Pi Pico W with a webserver, the reason it needs to also be a soft access point is because I want to take ...
2
votes
0
answers
53
views
Subclassing weird behavior in CircuitPython
Some background:
In MicroPython there is a class called Pin which controls I/O pins. In CircuitPython a similar class is called DigitalInOut. So for compatibility I wrote this simple class. ...
0
votes
2
answers
210
views
base64 library for circuitpython on SEEED Xiao ESP32-C3
I'm trying to import base64 on the SEEED Xiao ESP32-C3 which is running circuitpython version 8 beta 6. However, when I use import base64 or import ubase64 I see the error ImportError: no module named ...
0
votes
1
answer
902
views
Is there a way to move a mouse to exact coordinates using CircuitPython?
I am using a Raspberry Pi Pico to move my mouse to an absolute position on a button press. However, I have noticed mouse.move moves your current mouse position by x and y units, but I want to change ...
1
vote
1
answer
691
views
bit manipulation in CircuitPython
I've to perform bit-level operations using CircuitPython, like extracting and manipulating 3 bits from a bytes() object.
In normal Python I use the Bitarray library.
Is there an equivalent for ...
2
votes
1
answer
1k
views
Is it possible to create a delay of less than 0.001 seconds using circuitpython?
hardware: raspberry pi pico
language: adafruit-circuitpython
TL;DR: 0.001 sec is the maximum precision that time.sleep() can perform.
how can we get over it, using circuitpython?
The 'utime' library ...
0
votes
0
answers
2k
views
Write output of CircuitPython program to file
Similarly to how CircuitPython automatically writes the output of boot.py to boot_out.txt, how can I get the output of code.py (including error messages) to go into something like code_out.txt?
(CDC ...
0
votes
0
answers
88
views
In circuitpython and micropython is it advisable to import dependencies on the fly?
Would it be okay to display a loading screen before importing large dependencies or do imports get processed in some way before any code is run?
1
vote
1
answer
836
views
Detecting modifier keys pressed on host computer from circuitpython
I have a Raspberry Pi Pico running CircuitPython. Is it possible for the python code on this board to detect if a modifier key is pressed on the host computer's keyboard when the board is connected to ...