160 questions
0
votes
0
answers
73
views
CircuitPython make Android believe its connected to the internet
I am using Raspberry Pi Pico W in an AP mode and need to allow users to go to 192.168.4.1 to see a website on which they can communicate with the Raspberry.
On an iPhone everything works just fine, ...
-1
votes
2
answers
63
views
laser turns on without input
i have a setup with a microcontroller where pushing a button i attached with gpio pins turns on a laser pointer using gpio pins. this is part of a larger project including speakers and other leds and ...
0
votes
1
answer
78
views
CircuitPython - Input pins dont work when not executing from Thonny
I am building a thermostat and have designed a board layout which I am intent on ordering but I want to make sure everything works before I order. After getting everything wired up on a breadboard for ...
0
votes
0
answers
54
views
How to use CircuitPython to play music through the Type-C interface of my ESP32-S2?
I have an ESP32-S2, and I want to connect my Type-C headphones to it via the Type-C interface and play music.
My Type-C headphones are different from headphones with a 3.5-millimeter jack. Type-C ...
0
votes
1
answer
176
views
How to disable USB HID once done, using adafruit_hid.keyboard & circuitpython
My computer won't boot due to a failed fan speed check in the Bios. My wireless keyboard won't mount in time, and if I don't hit "escape" to skip the test everything hangs.
I decided to try ...
-1
votes
1
answer
69
views
TypeError: unsupported types for __gt__: 'int', 'NoneType' - Circuit Python [duplicate]
I took an Adafruit code example ([Rotary encoder][1]) for a rotary encoder and changed it in a way that I can control the volume of my PC with a Raspberry Pi Pico as HID.
#
# SPDX-License-Identifier: ...
1
vote
3
answers
126
views
How to do something like if "this" for 3 seconds, then "that"
I'm using CircuitPython and I'd like to turn on and LED when the light sensor is covered for 3 seconds and up, but I couldn't figure it out.
Is it done with the time.sleep command ?
My current code:
...
0
votes
0
answers
23
views
How to get meta data from a webradio stream in CircuitPython?
I have the following working code to stream audio from a webradio station:
(Raspberry Pi Pico on a Pimoroni Pico Demo Base. CircuitPython 9.2.1)
import time, os
import adafruit_connection_manager
...
0
votes
0
answers
90
views
Error importing neopixel library onto QT PY esp32-s2: seesaw neopixel being imported from unexpected location - is seesaw neopixel use intended?
I'm new to programming using circuitpython and can't figure out the cause of this error when attempting to run a simple blinking LED program on my QT PY esp32-s2.
Full error is below:
Traceback (most ...
0
votes
0
answers
75
views
Extending CircuitPython (Simple Example) how to complete
I was building Circuitpython from the github repro from adafruit.
This was working for a raspi pico well. I could compile and dounload the firmware.uf2 -> Thonny everthing look OK.
Next I wanted to ...
1
vote
0
answers
140
views
BrokenPipeError when fetching from API for Matrix Portal M4
I'm working on a project using an ESP32 with CircuitPython, specifically the Adafruit Matrix Portal M4. I'm trying to fetch data from the an API (https://api.wheresthefuckingtrain.com/by-id/A31), but ...
0
votes
1
answer
44
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....
0
votes
1
answer
166
views
Raspberry pi pico circuit python specific folder show on file explorer
When I connect raspberry pi pico to the computer all files are shown, but i want to show only specific folders and files within. And I want to use circuit python and show only the sd card folder.
I ...
0
votes
0
answers
121
views
Pico W Ducky - UK Keyboard Layout converting Backslash ( \ ) to Hash ( # )
I have setup a Pico Ducky using Pico W. I have been able to get some test scripts to work. I am working on a simple use case where a text file is saved to a location on the target machine. I am using ...
1
vote
0
answers
388
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 ...
0
votes
0
answers
420
views
Asyncio on CircuitPython doesn't runs two functions concurrently
I am actually on a project that needs concurentials functions... but I don't really know (and understand) a lot about it.
My program must run on a Raspberry pi pico with Circuitpython. I did some ...
2
votes
1
answer
210
views
Raspberry Pi Zero 2 W automatically disconnects after editing and saving new code in the `code.py` file
I have a question for you. Has anyone encountered an issue related to crashing and automatic disconnection of Raspberry Pi Zero 2 W when attempting to edit and save new code in the code.py file? I'm ...
0
votes
1
answer
611
views
Running circuit python on one esp32 core and C++ on the other
Is it possible to lock one esp32 core to running circuit python and the other running C++. I want to run realtime code (with interrupts) in C++ and the main program in circuit python.
I have ...
2
votes
2
answers
432
views
Circuitpython servo not rotating full 180 degrees with Raspberry Pi Pico
I am writing a circuit python code to rotate a servo 180 degrees
import time
import board
import busio
from adafruit_servokit import ServoKit
kit = ServoKit(channels=16, i2c=(busio.I2C(board.GP1, ...
0
votes
0
answers
566
views
simple Server using socketpool on a pico w with Circuitpython
this is my code:
import wifi
import socketpool
wifi.radio.connect("ssid", "password")
print("connected")
pool = socketpool.SocketPool(wifi.radio)
# Create a simple HTTP ...
0
votes
1
answer
190
views
The issue about sending the second calling using `Adafruit_requests`
Hi everyone!
Introduction
I'm currently working on a project where I'm creating an independent controller to manage Spotify player using their API. The controller is intended to expose localhost for ...
-1
votes
1
answer
203
views
ImportError: No module named setuptools on Raspbian OS
I tried to install the Adafruit Python DTH on my Raspberry Pi Zero 2 W (Raspbian64 OS) according to this tutorial - see section PROGRAMMING THE DHT11 WITH PYTHON
For the last step sudo python setup.py ...
0
votes
0
answers
76
views
Getting abnormally high negative temperature even though rtd is at room temperature using adafruit_max31865
I am trying to log temperature using MAX31865 module and Raspberry Pi.
I have written following python code:
import board
import busio
from digitalio import DigitalInOut, Direction
import ...
2
votes
1
answer
347
views
Changing advertisement ID in adafruit_ble for Circuit Playground Bluefruit
Not sure how esoteric this question is, but I'm trying to do some basic Bluetooth communications from an Adafruit Circuit Playground Bluefruit using Circuit Python.
The basic use case is to use UART ...
0
votes
1
answer
816
views
Importing Neopixel
I am working on a project that requires adafruit circuitpython neopixel. So I ran
pip3 install neopixel
It said I need to create a virtual environment so I did and ran the command in it and it said ...
2
votes
0
answers
280
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
75
views
Is there a dstandard GP I/O port to control the onbord LED on Raspberry Pi RP2040-Zero? What port is it?
Tried without success to control the LED via board.led and board.led0 in CircuitPython.
Aso tried board.GP0 through board.GP29.
GP25 is in use and can't be programmed.
0
votes
0
answers
196
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 ...
0
votes
1
answer
85
views
Where can I find the adafruit_irremote GenericTransmit Address for Samsung?
# SPDX-FileCopyrightText: 2021 ladyada for Adafruit Industries
# SPDX-License-Identifier: MIT
"""IR transmit example for Samsung TV using Circuit Playground Express"""
# ...
0
votes
1
answer
85
views
Footpedal with pi pico and circut python
Im building my own footpedal for my pc and got it working more or less. I can send the he code so it acts as a keyboard but I want it to display as a FOOTPEDAL1 .. 2 .. 3 .. 4. I downloaded this code ...
1
vote
0
answers
77
views
Porting bit operations from Python to C#
I am working on a C# port of the Adafruit_CircuitPython_RFM69 Python library which is an SPI radio module library that I'm using with a Raspberry Pi.
I have most of the python properties ported over ...
3
votes
0
answers
382
views
How can you use a Python library with CircuitPython?
I recently got started using CircuitPython on microcontrollers (specifially the Raspberry Pi Pico W and Zero W [I know, technically it's a single-board computer]). There are some Python packages that ...
-2
votes
1
answer
206
views
Keyboard layout pico
I am working on a project to make a badusb out of an raspberry pi pico but i have some problems, when the payload executes,it opens my file explorer and i want it to be a HID device so how do i do ...
-1
votes
2
answers
415
views
Adafruit QT PY ESP32-S2 stuck in CircuitPython mode
I have an adafruit qt py esp32-s2 that i accidently put in ciruitpython mode which means that i cant upload any arduino code to it. Idk why this happends all i know is that i need to be able to upload ...
0
votes
0
answers
281
views
adafruit_requests Error: x509-crt-bundle:Failed to verify certificate
I'm trying to get data from a weather API on a Raspberry Pi Pico running CircuitPython. It works on this API. Code:
pool = socketpool.SocketPool(wifi.radio)
requests = adafruit_requests.Session(pool, ...
0
votes
1
answer
1k
views
How to create a webserver with soft access point in CircuitPython?
I want to serve a basic index.html file using a Raspberry Pi Pico W. I am able to in MicroPython but need to use CircuitPython for this project. I found code to create a soft access point but wasn't ...
1
vote
0
answers
1k
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 ...
-1
votes
1
answer
336
views
Can't flash circuitpython program to rpi pico using ampy
I was trying to figure out how to make code persist on the pico and stumbled upon ampy. When trying to flash my pico, I was met with an error (exact output below). I'm guessing it might be something ...
0
votes
1
answer
844
views
Whys there no module named numbers in my circuitpython raspberry pi pico?
So i was testing my TFT but when i uploaded the code
import board
import displayio
import terminalio
from adafruit_ili9341 import ILI9341
# Initialize ILI9341 display
spi = board.SPI()
tft_cs = board....
1
vote
0
answers
235
views
ValueError: invalid syntax for integer with base 10 while using adafruit_requests in Circuit Python
I am trying to build a simple notification application to detect when my letter box is opened and send a notification via pushbullet using Raspberry Pico W.
This is the application:
import os
import ...
3
votes
1
answer
394
views
CircuitPython library usb_midi not found
I am making a project with midi. I have installed circuit python using the following article https://gallaugher.com/makersnack-installing-circuitpython-on-a-raspberry-pi/
When I try to import usb_midi ...
0
votes
1
answer
982
views
Adafruit LoRa RFM96W payload limit is 252 bytes but I want to send 512 bytes of data
So basically I have a numpy array, its shape is (8,64) after array.tobytes() and len(array) is 512. And
the send() function in the adafruit_rfm9x library has a payload limit of 252 bytes. Is there any ...
1
vote
0
answers
244
views
How to transfer images between two Raspberry Pi Pico over SPI?
I'm doing a hobby project and I have a task to make an exchange of information between two Raspberry Pi Pico. I want to take an image from the memory of Pi Pico #1 and send it using SPI to the memory ...
1
vote
2
answers
72
views
Toggling a value during a loop without time.sleep()
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 ...
0
votes
1
answer
186
views
Implementing DST and time zones with python
def grabtime(dst):
global sec
global minute
global hour
global day
global month
global year
gps.update()
sec = gps.timestamp_utc.tm_sec
minute = gps.timestamp_utc....
1
vote
0
answers
564
views
Adafruit Library Import Error in Thonny despite being added
I am currently working on a project where I need to convert a analog signal to a digital one therefore I am using an ADS1115 ADC Converter. This converter is connected to my Raspberry Pi Pico on a ...
0
votes
1
answer
297
views
ValueError: object not in sequence
I'm using CircuitPython to draw text and shapes on an LCD, which works. I detect interaction (a rotary encoder) and want to change a shape's colour, when I detect a certain state. This also works but ...
0
votes
1
answer
2k
views
Adafruit neopixel library not loading correctly onto raspberry pi pico
I've been trying to use the adafruit neopixel library to... well... use neopixels. However, I've been having some problems. I am using a pi pico, thonny as my IDE, and Ubuntu as my OS.
I started off ...
0
votes
2
answers
442
views
How can I randomize a list of integers 1 to X in CircuitPython without duplicates?
I am creating a circuit python project and the code compiles fine but it isn't working the way I intend. This loop that I have is supposed to generate a non repeating list of integers 1 to X in a ...
0
votes
0
answers
208
views
Problem with the serial connection between Processing and CircuitPython on an Adafruit Grand Central M4 Metro
Serial Connection Problem between Processing and CircuitPython Code on a Adafruit Grand Central M4 Metro.
I have a Adafruit Grand Central M4 Metro Micro-Computer with 3 Motors connected to it. On the ...