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

Micropython Webserver: Serve large textfiles without memory allocation failure

My project includes a webserver using an ESP32 and micropython v1.12 Background: I want to create config page which allows me to enter WiFi credentials for connection my ESP to my home network. I’m doing this running a webserver running on my ESP32…
agentsmith
  • 1,226
  • 1
  • 14
  • 27
2
votes
1 answer

Circuit Python MQTT Exception Block

I'm using the Adafruit Circuit Python MQTT library and am trying to catch the errors being generated. while True: try: # Poll the message queue mqtt_client.loop() except (ValueError, RuntimeError, MMQTTException) as e: …
Jason Small
  • 1,064
  • 1
  • 13
  • 29
2
votes
1 answer

How to do a get request in Micropython on ESP32?

I'm trying to do a simple get request with Micropython on an ESP32. Unfortunately I keep getting OSError: -202. That's what I have so far: wlan.py import network wlan = network.WLAN(network.STA_IF) # create station interface wlan.active(True) …
BetaRide
  • 16,207
  • 29
  • 99
  • 177
2
votes
1 answer

MicroPython: OSError: [Errno 19] ENODEV

I tried to connect my ESP32 to a sensor GY91(MPU9250 +BMP280). I'm using this library: https://github.com/tuupola/micropython-mpu9250 I used the example code: import utime from machine import I2C, Pin from mpu9250 import MPU9250 i2c =…
Adri
  • 33
  • 1
  • 3
2
votes
2 answers

Is there a Zfill type function in micro python. Zfill in micro python

I am trying to put a python script on a pyboard that’s running micro python. Is there a python equivalent of .zfill In MicroPython?
2
votes
1 answer

Micropython and Bluetooth on ESP32

I know the support for bluetooth is still under development but it seems to cover everything I need at this point so I decided to give it a try. I just want to simulate reading from a source of data (a EKG machine) so I came up with this code: from…
fditz
  • 871
  • 9
  • 28
2
votes
2 answers

how to send image to an API in micropython language

I am trying to send image through API in Micropython. still no solution how to do it. please help import urequests import json URL = 'https://example.com/test' datas = json.dumps({"auth_key": "43435", "mac": "abcd", "name": "washid"}) filep =…
2
votes
1 answer

Does RDFlib available for micropython?

If RDFlib is not available for Micropython, is there any other library available for Micropython to work with RDF?
Madhubhani
  • 25
  • 4
2
votes
1 answer

BLE Clarifying the Read and Indicate Operations

I'm writing code for Pycom's Lopy4 board and have created a BLE service for environmental sensing which currently has one characteristic, temperature. I'm taking the temperature as a float and attempting to update the characteristic value every two…
2
votes
0 answers

Is there a simple way to transfer image from openMV to PC?

I am working on the flir lapton3.5 with openMV. With the help of openMV, it's easy for me to get the thermal image from filr lapton3.5, don't have to concern about the complicated spi/iic agreement. Well, I want to show the real-time thermal image…
xiaofei lu
  • 21
  • 1
2
votes
1 answer

Building micropython in stm32 port in windows

I am currently trying to build a MicroPython application on Windows 10 using the Atollic TrueSTUDIO IDE for a NUCLEO-H743ZI development board. I get the following error. c:/program files (x86)/gnu tools arm embedded/9…
2
votes
0 answers

How do get the cookies from the response in Micropython using urequests?

I use urequests to access a couchdb database from an esp8266 micro-controller. I need to authenticate the session, and get a cookie back, that I can use in subsequent requests to the database. It will also be used for longpolling the database for…
TuinBoy
  • 185
  • 1
  • 9
2
votes
0 answers

Are there pure python versions of bulitins

I know this is a very edge case and probably has no reason to exist,but are there pure python versions of builtins? Specifically sys, I know its written in C for performance,but on my platform(a casio Prizm CG-FX 50 calculator) the standard library…
2
votes
2 answers

The most efficient way to store a very large 2D array in Python/MicroPython

I have a project in an embedded system (NodeMCU running MicroPython), where I need to store a very large array of variables, which have values of either 0 or 1. I need to be able to read/write them individually or via loops in a convenient way. For…
2
votes
0 answers

Can't seem to get uasyncio working in a micropython script for a PyBoard

I am designing a new time/score keeper for an air hockey table using a PyBoard as a base. My plan is to use a TM1627 (4x7seg) for time display, rotary encoder w/ button to set the time, IR and a couple 7segs for scoring, IR reflector sensors for…
Matt
  • 175
  • 5