All Questions
24 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
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 ...
-2
votes
1
answer
211
views
Making a sub class of 'int' but still return 'int' in type
I am trying to add some functionality to the 'int' class in python. And I would like to be able to take type() or isinstance() of this subclass and still return it as an int so I can compare with ...
5
votes
1
answer
33k
views
ModuleNotFoundError: No module named 'machine'
when I try to control my esp32 microcontorller with micropython I get the following error:
File "c:/Users/supre/Documents/Python Programme/micropython/blinktest.py", line 1, in <module&...
1
vote
3
answers
720
views
Implement a function that turns floats into fractions from scratch without external modules
I was given a task to find a way to make a function to turn floats into fractions as accurate as possible,
and by sheer brute forcing, i created a function like this
def isclose(a, b, tolerance):
...
0
votes
0
answers
222
views
Python interactive menu in terminal/putty etc
I was wondering if there's a way to create an interactive menu (table in this case) within the terminal window?
A crude example would be something similar to this:
+++++1000+++2000+++3000+++4000++
...
1
vote
2
answers
2k
views
How to interrupt a function while running in Python
I am programming a couple of LEDs to make a clone of Philips Hue or LIFX for personal needs as a beginner project. My goal is to learn more about hardware and software. I've written some code that ...