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

ESP8266 Micropython Twilio API

Has anyone had success using Twilio with Micropython on an 8266? I've tested the below in pyton3 and can get it to successfully send a text message. However, when I port it over to micropython (below), the message fails. I went back to the urequests…
fuzzyaces
  • 1
  • 4
0
votes
0 answers

pca9685 and node mcu using micropython

I have a Lolin MCU like this Lolin v3 I have a PCA9685 board like this cheap controller And Im coding in microPython in the nodeMCU device. I managed to attach one of those small 9g servos to the nodeMCU board and controll it. No problem. I want to…
javirs
  • 1,049
  • 26
  • 52
0
votes
1 answer

HCSR04 sensor continually producing time out error. Want loop to run with no timeout

I have a code currently running on a pyboard and is being used with a motor shield adafruit Motorshield v2.3. I know most ultrasonic sensors timeout after not detecting a surrounding for a long time. I want my code to continually search for a…
0
votes
1 answer

Micropython Raw Socket on MAC Layer

How exactly would one go about creating a raw socket on the MAC layer in Micropython? The UNIX equivalent is: eth_p_all=3 netif='wlan0' s=socket.socket(socket.AF_PACKET,socket.SOCK_RAW,socket.htons(eth_p_all)) s.bind((netif,0)) For one, it is not…
user8079
  • 23
  • 4
0
votes
1 answer

Open Raw Socket Micropython For 802.11 Packets

I am working with an ESP8266 (NodeMCU) with MicroPython and want to be able to do packet injection or send raw packets / freedom packets. I cannot find anyway to open a raw socket (usocket/socket module) or do this via the 'network' module. Is there…
meep
  • 334
  • 3
  • 10
0
votes
0 answers

ESP32: Odd behavior with urequests - object with buffer protocol required

I am trying to wear out a battery to see how long it powers my ESP32. To do this, I wrote a simple program that writes "Still alive" to a website once a minute. However, the program crashes every time it has written the string successfully to the…
0
votes
0 answers

micro python rounding

I can't get the hang of rounding in micropython a=round(86.86, 1) print (a) 86.90001 surely there must be a way to limit to one dp & get it to round up?
Kris Mclean
  • 21
  • 2
  • 7
0
votes
1 answer

Type Error Microbit Rock Paper Sciccors Project

I have a type error but can't seem to fix it. from microbit import * import random import radio radio.on() randomnummer = 0 while True: if accelerometer.current_gesture("shake"): #geschud (feelsgoodman) randomnummer =…
0
votes
1 answer

Android Things Custom Hardware

I'm interested is it possible to install and use Android Things(former Brillo) on custom produced hardware? I can see from the official documentation there is preselected and certified SoMs listed, but I'm interested in using my own hardware. Is…
hris.to
  • 6,235
  • 3
  • 46
  • 55
0
votes
1 answer

Micropython webserver stops working when add code to read data from dht11

I've downloaded webserver code from https://docs.micropython.org/en/v1.8/esp8266/esp8266/tutorial/network_tcp.html, it worked well. But after adding code reading dht11 values, webserver stops responding. What's wrong with my code? import…
A. Makarevich
  • 365
  • 1
  • 3
  • 18
0
votes
0 answers

how to get a list of built-in modules programatically

I would like to get a list of the built-in a(and frozen) modules using micropython, running on the board (ESP32) itself. help('modules') will give you a list of all modules, but this is only send to the terminal. I have not been able to capture it…
Jos Verlinde
  • 1,468
  • 12
  • 25
0
votes
1 answer

Python traceback: File "". What does it mean?

Ok, obviously I am new at this. I got this Python traceback: Traceback (most recent call last): File "", line 1, in File "", line 30 SyntaxError: invalid syntax What does File "" stand for? My code contains an…
Bigman74066
  • 408
  • 4
  • 12
0
votes
1 answer

Micro:Bit Button Press Delay

I am trying to make a simple game similar to snake (however the player does not get longer over time). The game is almost complete, however I have encountered a problem where the button presses that would normally change the direction that you are…
0
votes
1 answer

Burn MaixPy on Sipeed M1W

I am using Sipeed M1W and its LCD display white screen after I burned the demo. Then I built and compiled MaixPy and burned micropython.bin to the board but it's still white and display following message on the terminal. Official…
Chris Wong
  • 143
  • 1
  • 1
  • 6
0
votes
1 answer

Communicate between two python scripts on two systems over wifi

I am running a python code on a wipy board (micropython environment) and a python code on an embedded linux system. The wipy board is connected to the linux system with wifi. I was wondering how to create bi-directional communication for passing…
Kunal Shah
  • 610
  • 6
  • 17