Questions tagged [raspberry-pi-pico]

For questions relating to the Raspberry Pi Pico microcontroller.

The Raspberry Pi Pico is a microcontroller designed by the Raspberry Pi Foundation. It supports MicroPython, CircuitPython, and C.

The first Pico version was released in 2021.

512 questions
0
votes
1 answer

MicroPython application throws AttributeError for very basic use of re.split without a duplicate "re.py" file present

I don't seem to understand why my rather generic use of the split function from the re library is failing: from machine import Pin, SPI, UART from array import array import sys, re, time, math,…
0
votes
1 answer

RS485 Board starts losing numerous packets Raspberry Pico

I've built a data logger with a Raspberry Pico that sniffs data from an RS485 and saved them into an SD Card (see image). Everything works correctly with the only issue that over time the Raspberry seems to read incorrect data more and more…
NicoCaldo
  • 1,171
  • 13
  • 25
0
votes
1 answer

Micropython GPIO control function in background

How can I write code to allow function run in background in exactly that time that I need? When I run this func in cycle it's executing after others. import time from machine import Pin a_1 = Pin(21, Pin.OUT) a_2 = Pin(20, Pin.OUT) def…
0livaw
  • 1
0
votes
2 answers

ADS1115 and raspberry pi pico

is there any way to use the ADS1115 with a raspberry pi pico?, I'm in the middle of a project where I need 4 analog inputs but the pico only has 3, I'm using circuit python btw... any help is appreciated
0
votes
1 answer

GDB loading a different file when debuggin raspberry pi PICO?

I'm trying to debug a Raspberry Pi Pico project using openOCD + Picoprobe. I go through the steps that appear to be correct to do all this from my Linux PC (the Get started with Pico and C++ guide is for the Raspberry Pi, but there are tutorials…
0
votes
2 answers

trying to concat two pointer char but one of them is changing

I am using Raspberry Pi pico with C. I am trying to take 2 different decimal value to char then concat them. I am taking those decimal values from rfid. The values ​​coming from rfid are not decimal at first, I convert these values ​​to decimal by…
0
votes
1 answer

How to use user input in pi Pico Device mini controller

I have tried to get user input in pico thonny but i can't get user input from machine import Pin a = input() print(a)
Wasi Chandio
  • 1
  • 1
  • 3
0
votes
0 answers

Can't set my tiny2040 pimoroni to print hello world

I have flashed the latest micropython into my rp2040, can access it, but when I try the simplest code possible exactly like this: print("hello world") it returns a bunch of gibberish and syntax error and so on. wth is going on, help please! I need…
0
votes
0 answers

Create GATT Server with Micropython on Raspberry Pi Pico

I want to create a simple GATT Server on my Raspberry Pi Pico. The goal is to create a service that sends a simple set of data to the client. Im using the latest version of MicroPython. My Problem is, that I cant seem to figure out how I can use the…
0
votes
1 answer

Trying to make a Raspberry Pi Pico project that blinks a light in morse code. How would I get the separate character from the "word" variable?

from machine import Pin from time import sleep led = Pin(0, Pin.OUT) def dot(): led.value(1) sleep(0.5) led.value(0) sleep(2) def dash(): led.value(1) sleep(1) led.value(0) sleep(2) # 0.5 Seconds = Dot # 1…
Kiri.
  • 41
  • 4
0
votes
1 answer

How do I install usocket to my Raspberry Pi Pico modules

Good Morning/Afternoon/Evening I am trying to connect my Raspberry Pi Pico to a Realtime Database on Firebase. I'm using a Wave Pico-ESP8266 module to connect to wifi and micropython. I also have the ufirebase.py module that uses the usocket module,…
0
votes
1 answer

Traceback (most recent call last): File "", line 12 IndentationError: unindent doesn't match any outer indent level

from machine import Pin, PWM from time import sleep pwm = PWM(Pin(15)) pwm.freq(1000) while True: for duty in range(65025): pwm.duty_u16(duty) sleep(0.0001) for duty in range(65025, 0, -1): pwm.duty_u16(duty) …
0
votes
1 answer

How to use water flow sensor(Yf-s201) on Raspberry Pi Pico?

#!/usr/bin/python import RPi.GPIO as GPIO import time, sys #import paho.mqtt.publish as publish FLOW_SENSOR_GPIO = 13 #MQTT_SERVER = "192.168.1.220" GPIO.setmode(GPIO.BCM) GPIO.setup(FLOW_SENSOR_GPIO, GPIO.IN, pull_up_down = GPIO.PUD_UP) …
0
votes
1 answer

Raspiberry Pi RP2040 LCD clock signals

I'm using Micro python to try and generate an RGB signal for a TFT screen such as the: Screen The timings i need the follow are: CLKIN: 3.33Mhz Horizontal is 800 clock cycles up and 1 clock cycle down Vertical is 480 Horizontal Clock cycles up…
0
votes
0 answers

My motor will not run with bluetooth on pico

I'm doing a project and I am using an HC-06, raspberry PICO, 28BYJ-48 Motor, and a ULN2003 Motor Driver. I coded the motor to turn and everything, and it all works perfectly. I debugged, and the Micropython interpreter shows no errors. I am using an…
Elmntz
  • 1