adafruit-circuitpython

Toggling a value during a loop without time.sleep()

Toggling a value during a loop without time.sleep() Question: I’m trying to make a toggleable value in my program, during a loop. I can’t use time.sleep() in the program, as I can’t have the program stopping completely (so that you can’t press buttons during this time). I could just do this: while True: if button.is_pressed(): …

Total answers: 2

bit manipulation in CircuitPython

bit manipulation in CircuitPython Question: 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 CircuitPython? Thanks. Asked By: mik3.rizzo || Source Answers: Even with regular Python it’s typical to use the bitwise & and …

Total answers: 1

Circuitpython can't find port Seeed XIAO nRF52840 Sense

Circuitpython can't find port Seeed XIAO nRF52840 Sense Question: I have a Seeed XIAO nRF52840 Sense and it had been working fine with circuit python, but one time when I turned it on, circuit python gave this error message: Couldn’t find the device automatically. Check the connection (making sure the device is not in bootloader …

Total answers: 2

Python put requests on a CIRCUITPY

Python put requests on a CIRCUITPY Question: I have a CIRCUITPY macro board (keybow 2040) that I want to make automatically download a file, but I don’t have enough storage space on the board to put all the required libraries for the python requests module. The board’s available storage space is 866 KB, which is …

Total answers: 1

Raspberry Pi Pico ImportError: no module named 'machine'

Raspberry Pi Pico ImportError: no module named 'machine' Question: I am running the following blink program on my raspberry pi pico. I am using circuit python. from machine import Pin import time led = Pin(13, Pin.OUT) while True: led(1) time.sleep(1) led(0) time.sleep(1) When I run it though it gives this error: Traceback (most recent call …

Total answers: 3