Questions tagged [micropython]
MicroPython is a Python interpreter (with partial native code compilation feature). It provides a subset of Python 3.5 features, implemented for embedded processors and constrained systems.
micropython
1,120
questions
0
votes
1
answer
30
views
ESP8266 is stuck in an infinite socket.accept() loop, i guess?
Ive been working with my ESP8266 and have encountered an issue that seems to be coming from nowhere and being unsolvanle. At least - to me.
Basically I went on with this tutorial on building a simple ...
-1
votes
0
answers
23
views
Socket connection fails(ESP8266) [closed]
I'm connected to ESP-WROOM device from a PC on Windows 11. I'm trying to connect a socket in MicroPython to a server on my LAN.
I simplified my code to the following to show the error I keep getting.
...
3
votes
2
answers
35
views
ImportError: can't import name perf_counter. What may be the reason?
I`ve been working on my code for Micropython-flashed ESP8266, and well... this error occured:
from time import perf_counter
ImportError: can't import name perf_counter
I believe that the whole code ...
0
votes
0
answers
22
views
Reading encoder output in MicroPython (Pi Pico) doesn't seem to work properly, any suggestions?
I've put together a pi pico, motor driver board, and a motor with 2 integrated hall effect encoders. The latter is from adafruit and the example code is written for Arduino. I've attempted to adapt ...
1
vote
1
answer
45
views
Why do I get a "Invalid grant_type" error when I want to refresh the access token? - Netatmo API
I want to refresh the access token for the Netatmo API. I tried different things but I get every time the same error. I use MicroPython and the urequests lib for the requests.
The error is:
Status ...
0
votes
0
answers
22
views
MicroPython typical sleep times in while loops for ESP32-S3
Another question from my side. This time it is a little more hardware related. I asked myself why the sleep times within while loops in many examples are set to 0.1s. For this is quite a long time. ...
0
votes
1
answer
28
views
Why does Raspberry Pi Pico W make AP with default configuration?
import socket
import network
ssid = 'PICOlo amore'
password = '12345678'
led = Pin(15, Pin.OUT)
ap = network.WLAN(network.AP_IF)
ap.active(False)
ap.active(True)
ap.config(essid=ssid, password=...
0
votes
0
answers
26
views
Problems wit running CAN in Micropython on a pyboard 1,1
Pyboard, micropython, CAN hardware
I have a pyboard v1.1 with micropython running and I want to use CAN to communicate between modules at 250K and 500K.
I am using CAN 1(Y3 = RX = B8, Y4 = TX) = B9). ...
0
votes
0
answers
15
views
Im doing project esp32 using micropython haivng problem with my turbidity sensor
from machine import Pin, ADC
import time
# Inisialisasi pin ADC (misalnya, GPIO 34)
adc_pin = ADC(Pin(34))
adc_pin.atten(ADC.ATTN_11DB) # Set attenuation untuk rentang tegangan yang lebih besar (0-3....
0
votes
0
answers
41
views
graphic LCD display interfacing WDG0151-TMI-v-Winstar
So I try to interface with a graphical LCD display, but the thing that I tried is not really working. I have to mention that I never interfaced any LCD display. I attached some photos and the ...
0
votes
0
answers
33
views
Error when importing RPi.GPIO - Micropython - Raspberry pi pico
I'm trying to import RPI.GPio into the program below and I encounter the following error, on the first line: MPY: soft reboot
Traceback (most recent call last):
File "<stdin>", line ...
0
votes
0
answers
53
views
Break the loop if stdin has value
I can not stop the loop if there is not a gap in data send via UART.
If there is gap in data it listens to the command but does not read the UART data anymore.
I would like to
I read data on UART and ...
1
vote
1
answer
65
views
Bluetooth BLE implementation between Swift app and Rasberry Pi Pico W
I have an IOS app using CoreBluetooth to connect to a Rasberry Pi Pico W.
I am trying to send data to the board, but the data is not received, despite the connection is established properly.
The same ...
0
votes
0
answers
20
views
I have a simple web server on an ESP8266. At first, it runs fine, but after a while with no requests it goes down. Pinging the IP address times out
I am a beginner, but I coded a simple web server on an ESP8266.
Part of my code follows:
# Accept an incoming connection request
print("\nWaiting for a request\n")
conn, addr = s....
0
votes
0
answers
34
views
I can't get the program to see my override buttons
I want to be able to press the buttons on the web app to change the lights, but I also want to be able to override the web app with physical buttons to change the LEDs like the web app can. This is a ...