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
2
votes
1 answer

How to configure VSCode so IntelliSense works for MicroPython system libraries?

My specific question is related to MicroPython development on Pycom's GPY with Pytrack expansion board. I also have Pycom's Pymakr extension for VSCode installed as well. But I feel the question can be asked and answered more generally and I'll try…
Patrick
  • 2,044
  • 1
  • 25
  • 44
2
votes
1 answer

Micropython Esp8266 Sympy

Can I use Sympy library in esp8266 micropython? I tried to install it using ampy, but it returns an error I want to solve linear equations: For example: from sympy import symbols, Eq, solve y = symbols('x') eq1 = Eq(x*2 -5x + 6) sol =…
Sahak Sahakyan
  • 101
  • 1
  • 9
2
votes
1 answer

Is it possible to attach a micro: bit board to a rock, and make it count numbers of times it has been thrown up into the air?

See the headline I can easily get gestures to work. But what if I were to attach the board on a rock, and make it register how many times the rock has been thrown up into the air - and caught again? I am wondering if it is possible to utilize the…
Mikkel
  • 33
  • 2
2
votes
0 answers

Micropython error : OSError: [Errno 19] ENODEV

I am trying to use pressure sensors and a LOLIN D32 pro microcontroller to measure water level. The two pressure sensors are MS5803 and BME280 below is my code ''' import machine from machine import Pin, I2C import bme280, ms5803 …
bam2619
  • 21
  • 2
2
votes
2 answers

umqtt.robust on Wemos

I am trying to install micropython-umqtt.robust on my Wemos D1 mini. The way i tried this is as follow. I use the Thonny editor I have connected the wemos to the internet. in wrepl type: import upip upip.install('micropython-umqtt.simple') I get…
Tracy
  • 43
  • 5
2
votes
2 answers

Converting Python Time to MicroPython PyBoard

I have a Python script controlling a Fibonacci clock that works great on the Raspberry Pi 4B, however, when I transfer the code to a PyBoard using MicroPython (which I'm completely new to) it doesn't work. Below is the part I believe to be the…
Random Boo
  • 19
  • 1
2
votes
0 answers

How to use queues with micropython and ev3dev

I am in need to use some sort of thread-safe queue in micropython running on an ev3dev device. I am trying by using the uasyncio module but although it seems to be recognizing the library correctly when I try to use the Queue I get strange behavior.…
2
votes
0 answers

How to control a Sphero Original, e.g. using Micropython?

I recently got a used Sphero robot (as far as I can tell a "Sphero Original" since it doesn't have any other version information), and intended to experiment with it with my children. Unfortunately, as far as I could find out, all the official…
Christoph
  • 5,480
  • 6
  • 36
  • 61
2
votes
1 answer

Rshell on windows freezes randomly while sending files to ESP32 running micropython via rsync or cp

I'm having trouble copying files to ESP32 device running micropython via rshell (remote micropython shell). The problem seems to occur randomly. Sometimes I manage to successfuly send all files (like 20 of them) with rsync and sometimes I cannot…
2
votes
1 answer

ESP32 : Error when activating Wi-Fi interface

I recently purchased an ESP-32 that I use with MicroPython for a web server via Wi-Fi. Everything works very well and I decided to buy 4 more. But on none of the 4 works when I enable the Wi-Fi interface. I get this error everytime : >>> import…
Axok
  • 25
  • 4
2
votes
1 answer

Xbee Micropython EEXIST error when call file open() function

I'm using Xbee3 and I want to append data to file. I try this script for test but I received EEXIST error if TEST.txt file exists. If this file doesn't exist the file is created for the first run but I get same error when I run this script again. f…
Buğra Tufan
  • 33
  • 1
  • 6
2
votes
1 answer

Problems trying to build custom micropython firmware for STM32

I am trying to build custom Micropython firmware with ethernet support for STM32F407VE. I've forked working board without ethernet support and trying to modify it with ethernet support. Things I have done: defined MICROPY_HW_ETH_* variables in…
untitled
  • 1,037
  • 2
  • 12
  • 27
2
votes
2 answers

How to fix "IndexError: list index out of range" in micropython socket.getaddrinfo() method?

I am using micropython on my esp32. I want to send data from esp32 to AWS IoT MQTT Broker Endpoint. But in micropython socket module, getaddrinfo(hostname, port) method return empty list every time. How can I solve it? It is working when I use IP…
MSI Shafik
  • 139
  • 6
2
votes
0 answers

utime module missing from micropython on calculator

I'm trying to create a delay inbetween prints on micropython, but no modules work. I've tried another suggestion involving import machine and of course import utime both return the error: ImportError: no module named '[name of the…
doliphin
  • 752
  • 6
  • 22
2
votes
3 answers

Other ways of creating a delay other than time.sleep() in python

I am doing a bit of python on my casio calculator and i have run into a little problem, the version of python that my calculator uses is microPython 1.9.4. I am not able to use import time as the time module isn't in this version. Any help would be…
user12034971