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.

About

MicroPython is a lean and fast implementation of the Python 3 programming language that is optimised to run on a microcontroller. It was originally created by the Australian programmer and physicist Damien George and first appeared in May of 2014.

The MicroPython board is a small electronic circuit board that runs MicroPython on the bare metal, and gives you a low-level Python operating system that can be used to control all kinds of electronic projects.

MicroPython was successfully funded via a Kickstarter campaign. The software is available to the public under the MIT open source license.

Books

Sites

Damien George's KickStarter project to develop a API to use with ESP8266 WiFi chip, optimised and well supported. ESP8266 is one of the best boards to use with MicroPython.

Example projects

1031 questions
-1
votes
1 answer

Unstable Micropython on ESP8266

I take my first steps in Micropythone on ESP8266. I uploaded the latest version 1.13 and when I try to run wifi in AP mode - strange things happen. Once every few wifi runs will work, but most often there is no response (I can't see wifi network…
-1
votes
1 answer

OSError: 118 with esp32

I am currently working on a code in micropython using the esp32, and getting an error messeage that says "OSError:118". if anyone is familiar with the problem I,d be happy to get help. I'm using pycharm and the socket library. im creating a very…
-1
votes
2 answers

Pygame on to ESP8266

Is it possible to load external python libraries onto a microprocessor and get it to work with micropython? How would I approach this problem? I have an esp8266, and am worried that it does not have enough flash space for the large library, but I…
-1
votes
2 answers

Is there a radio function for microbit micropython?

I can't figure out what it is. from microbit import* # what is the words that trigger it?
-1
votes
1 answer

PID temperature control , Python - eliminating noise values, STM32

I am reading NTC thermistor values via ADC with 12bit resolution. 10 samples are read within span of 100 m/s at ambient (no heating or cooling) looks like this ADC(PA0)= 1 -> 3919 ADC(PA0)= 2 -> 3934 ADC(PA0)= 3 -> 3932 ADC(PA0)= 4 -> 3922 ADC(PA0)=…
TonyP
  • 5,655
  • 13
  • 60
  • 94
-1
votes
1 answer

How to import Motor on Micropython into a DFRobot Quad Motor Shield

I am attempting to import two motors onto my pyboard in micropython that are connected to my DFRobot DC Quad Motor Shield. Example code from them is written in Arduino and I cannot translate. Attached is my previous code that did not work and the…
-1
votes
1 answer

microPython attributeError in __init__

EDIT: Thanks to the age old tradition of unplugging and plugging everything back in I got it to work; I reflashed the WiPy module and reinstalled the Pymakr plugin. I am currently in the process of writing a PID-controller for micropython (we have…
-1
votes
2 answers

c only first 8 bytes passed to function

I am working on a C module in micropython... if I pass a byte array to a function, only the first 8 bytes make it (according to sizeof). I have to also send in the length, then copy it to access everything in a function. static void…
IAmCoder
  • 3,179
  • 2
  • 27
  • 49
-1
votes
2 answers

Counting a character a number of times

What I want to do is a break on the program once a character has appeared a number of times in a string in Python. This is the output I…
-1
votes
3 answers

Mount NodeMCU with Micropython filesystem?

I've recently bought a NodeMCU board and flashed Micropython in it. I've read about the boot.py and main.py scripts, but I can't understand how to access them. I have succesfully connected to the Python REPL with the screen command and everything…
magicleon94
  • 4,887
  • 2
  • 24
  • 53
-1
votes
2 answers

Distance of connected wlan device

how to get the distance of the WLAN device connected to wi-fi of my node esp8266 device using micropython in the node esp8266?
Jagdish Chauhan
  • 129
  • 1
  • 10
-2
votes
0 answers

How to solve Mixed Integer Linear Programming Problem using MicroPython

I'm trying to solve a MILP problem using MicroPython but I'm not sure, if man can solve this in MicroPython . Can I have an example (code) of how to solve a simple MILP problem please ? Thank you in advance I dont have any Idee
-2
votes
0 answers

Data transfer between Lego Mindstorms and Raspberry Pi

It was possible to establish a Bluetooth connection between Lego and Raspberry using a network connection. Used these actions https://github.com/ev3dev/ev3dev/issues/1280#issuecomment-1186266809 Previously, I could exchange data via the Bluetooth…
-2
votes
0 answers

"C" and "circuit-python" convert seconds, to hours minutes seconds day month year. for rp2040 mcu on WOKWI don't know neonics

I don't know enough C and circuit-python mnemonics to convert seconds to 28 year epoch, for rp2040 mcu scripts on WOKWI. This first code block is my micropython attempt. I don't know how to declare a 64 bit number and the variable containing the…
-2
votes
1 answer

raspberry pi pico (micropython) throws ImportError

if i run this code in VsCode with python it works just fine but if i run it with MicroPython i get the error ImportError: no module named 'cv2' #from machine import ADC,PWM,Pin import cv2 import mediapipe as mp LandMarks =…
VLAD 05
  • 5
  • 2
1 2 3
68
69