All Questions
Tagged with micropython python-3.x
45 questions
0
votes
1
answer
44
views
micropython stm32F722ze, ValueError: Pin(PC13) doesn't exist
I am using stm32f722ze and trying to write a program to control led using push button but it always says value error. With the help of user manual figure out the Arduino mapping for PC0 but cannot ...
0
votes
0
answers
55
views
Main function for uasyncio micropython software IoT
I am building a backend IoT app in micropython on an ESP32, using python 3.9.12 and uasyncio V3.
i want auto_pump() to work in backgoung from when i start the device and the server to wait for client ...
0
votes
0
answers
570
views
Raspberry Pi Pico W getting stuck in socket.accept call
I am using Pico W as web server to control relays to switch on and off switches. I am able to connect pico w to wifi router. Web server works fine. After some idle time like 2-3 hrs, Pico stops ...
0
votes
1
answer
1k
views
'mpremote' is not recognized as an internal or external command
I installed python and mpr by using it as well. But now after installing mpr pip install --user mpr and using mpr command I got following error in windows.
c:\>mpr version
'mpremote' is not ...
1
vote
1
answer
4k
views
match case in micropython - SyntaxError: invalid syntax [duplicate]
I am using python 3.10.5 on my raspberry pi pico and I am trying to use match & case instead of if statements When I try to run the program it returns an error:
Traceback (most recent call last):
...
-1
votes
2
answers
2k
views
how to use and debug micropython-aioble library for esp32?
I am using micropython for esp32 to make BLE app using aioble library.i am using as per sample code + add from library but i am facing this problem and don't understand why. Is it because the library ...
0
votes
0
answers
2k
views
How to add Python Libraries/Modules to Casio CG50 Calculator
Got a Casio CG50 calculators and there are some useful programs that I have on my laptop written in Python that won't work on the calculator due to it running Micropython by default and the lack of ...
0
votes
1
answer
289
views
MicroPython on Casio fx-CG50 returns "BuzzFizz" on FizzBuzz(15)
I ran a fizzbuzz program I wrote on Python 3.10 on Windows 10 (64-bit) which gave the output
1
2
Fizz
4
Buzz
(...)
14
FizzBuzz
Whereas running it on MicroPython 1.9.4 on a Casio PRIZM fx-CG50 (...
0
votes
2
answers
343
views
Python hex conversions on function return
I have a board that returns a byte type with the value in it: b'\x0126.381\x00\x00\x00'
When I have this returned in a function it automatically formats the return as a float:
def read(address, ...
2
votes
0
answers
900
views
MicroPython: Scheduling
I am very inexperienced with Python so bear with me. I am trying to set a schedule in a RaspiPico to turn a RaspPi 3B+ on at given times. The RaspPi 3B+ turns itself off at the 57th minute of every ...
2
votes
0
answers
576
views
While True and sleep in Uasyncio in micropython
I'm writing a surveillance camera app with ESP32-cam and MicroPython.
tl;dr at the end
I'm using the Threaded code below:
import camera
import machine
from config import app_config
from webserver ...
0
votes
0
answers
834
views
ESP32 Socket client not connecting to python server
Hey!
Am a developer trying to establish a socket connection between my pc and an esp32 connected on the same network.
Code
On esp32(micropython)
import usocket
import network
def do_connect():
...
0
votes
1
answer
210
views
Difference between asyncio stream and synchronous stream for json output to a client
response = {
'error': 'invalid request',
'status': 'retry'
}
synchronous side:
conn.send('HTTP/1.1 200 OK\n')
conn.send('Content-Type: application/json\n')
conn.send('Connection: close\n\n')
conn....
-3
votes
2
answers
171
views
string to array list, is it possible?
I'm doing a project for myself which involves raspberry pico and an oled display.
I'm using micropython but I think this is more like a generic python question.
I need to populate the screen with ...
-1
votes
1
answer
207
views
Not usual bytes to string decoding. How to?
I'm working with some interesting devices and some of them uses micropython and on this part have problem with encodings.
I need to make two devices communicating by UART-protocol.
First device (may ...