Questions tagged [adafruit-circuitpython]

Use of the CircuitPython language and libraries on supported hardware, not just Adafruit boards and devices.

CircuitPython is derived from MicroPython through the support of Adafruit to simplify the low-level access to many standalone microcontrollers by programming in Python directly on the device, without the need for an IDE. Extensive libraries allow for the easy use of add-on devices from several manufacturers.

For great community support also checkout Adafruit's Discord Server or Forums

156 questions
1
vote
2 answers

Python script module not found on rerun of script

I am running a python script on RaspberryPi 4, and today when I ran the script again, it showed me the error ModuleNotFoundError: No module named 'adafruit_ssd1306' although I ran this same script yesterday about 10 times, it ran perfectly without…
1
vote
1 answer

How do you use a variable for pin number on an ADS1115 or other chips in python

I'm trying to understand how I can use a variable for specifying the pin number on an ADS1115. Generally one would read from the analog input by specifying something like this import board import busio import adafruit_ads1x15.ads1115 as ADS from…
1
vote
1 answer

Why can't i move my mouse and press a button at the same time in circuitpython on a tiny 2040 (runs on rp2040 just like raspberry pi pico)

i am writing something which should let me use a joystick as a Spacemouse that i want to use in fusion 360, im doing this by making the mouse move and pressing the middle mouse button and shift, and releasing it when the joystick stops moving, but…
1
vote
0 answers

Clearing NeoPixel LEDs after running animate()?

I'm trying to run an animation for a period of time, then clear the LEDs and go back to setting the colors manually with Neopixel.pixels.fill(). Only, after I run animation.animate(), I lose the ability to use pixels.fill() I tried using the…
1
vote
0 answers

Using adafruit_debouncer on a keyboard matrix

I am implementing a key matrix in Circuitpython on a Raspberry Pi Pico. I have gotten to the point where I can scan and read fine. Now I need to add debouncing. I would like to use adafruit_debouncer for that. First I fell for the mistake of simply…
Marian Aldenhövel
  • 677
  • 1
  • 6
  • 24
1
vote
0 answers

ADAFFRUIT_PCA9865 library issue for windows 10

I have a rasparm robot by adeept it has a power electronics unit provided by the company and it is connected to raspberry pi3b+. adeept has online tutorial to run the robots and already written python files which we need to run in raspberry pi in…
1
vote
0 answers

How to Install non-Adafruit libraries on a circuitpython board?

Total Newbie here! At first: I made a python script for a simple PID controller with a SPI sensor board and I2C Display. It runs on a Raspberry Pi and controls a small furnace. Since the raspberry (in my case) is pretty prone to freeze or do…
jwagn
  • 11
  • 1
1
vote
1 answer

CircuitPython Class expects wrong datatype for args on __init__

Repost with minimal reproducible error: I'm building a basic daylight alarm clock out of a rp2040, RTC, and NeoPixel strip. I'm building the Class for Alarm (inherits from Clock, inherits from NeoPixel) objects that contain: Time to trigger(hour,…
1
vote
1 answer

How to register to be notify of changes in a BLE peripheral?

I have a BLE peripheral device (Arduino nano) with a single service and a single characteristic. The characteristic holds an 8-bit uint which is set to 1 when the switch is on, 0 when the switch is off. The characteristic supports READ and…
1
vote
1 answer

Converting Dijkstra's Algorithm from Python3 to CircuitPython (TI-Python)

I'm writing Python code on one of the new TI-84 Python edition calculators. These use a version of CircuitPython with limited support for some quite basic features. This includes missing dictionary methods such as items() and values(). My original…
Robin Andrews
  • 3,514
  • 11
  • 43
  • 111
1
vote
4 answers

SparkFun RP2040 and MicroPython

I am a software engineer working on a microcontroller system for a side project. The microcontroller I am using is the SparkFun ProMicro (based on the RP2040 board). I am trying to flash the board so that I can write data to the onboard flash…
1
vote
0 answers

How we can acces the hardware registers in python

I am trying to access the hardware registers in python. I found out many built in libraries like circuit python, pymodbus etc but they read/write the data on buses.Instead I read the mmap library but this library takes file instead of the addresses.…
1
vote
1 answer

Circuitpython "interactive" option

I'm trying to debug a circuitpython program (that's running on a microcontroller) and I would like to know if there's a simple way to get the program to drop into the REPL upon a crash/termination while preserving the variables and functions defined…
jadsq
  • 3,033
  • 3
  • 20
  • 32
1
vote
1 answer

Bluetooth advertising and scan

Hello I'm hoping someone can help me with Bluetooth advertising & scanning. This is for a school stem project. I'm working with a circuit playground Bluefruit development board and using circuit python. Trying to implement a social distancing badge…
1
vote
2 answers

How to do non blocking usb serial input in circuit python?

I am trying to interface a micropython board with python on my computer using serial read and write, however I can't find a way to read usb serial data in micropython that is non-blocking. Basicly I want to call the input function without requiring…
Evan Almloff
  • 83
  • 1
  • 6
1 2
3
10 11