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 count button clicks after 5 presses

I'm trying to count button click but only after 5 clicks and after the fifth click it will print the clicks BUT starting at 1. Example: Press button = 1 click Press button = 2 click Press button = 3 click Press button = 4 click Press button =…
SoggyCashew
  • 69
  • 1
  • 4
  • 15
-2
votes
1 answer

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 values that are int's. My code is as…
Ephreal
  • 1,835
  • 2
  • 18
  • 35
-2
votes
1 answer

Is it possible to create a fuzzy controller with micropython?

I need to create a fuzzy controller with skfuzzy. Is it possible to use skfuzzy to develop a fuzzy controller with Micropython? https://github.com/scikit-fuzzy/scikit-fuzzy
Miltex
  • 302
  • 1
  • 13
-2
votes
1 answer

How to convert the adc output of the capacitive soil humidity sensor v1.2 to actual humidity percentages in python(micropython)?

Below is an example of a basic test code, from which you can read out the analog values of the sensor. However, higher values are where the driest places are. Strictly water approaches value of 0. This is contrary to my basic knowledge of how…
-2
votes
1 answer

tips of easy to start tutorials/guides

I want to try out Micrpopython (as a beginner) and I want some tips for some easy tutorials to get started. What I have in mind of something fun, to begin with, would be a temperature sensor that activates a LED light when a certain temperature is…
-2
votes
1 answer

how find a word in txt file

i'm use micropython and i want to find essid and password in my txt file and change my wifi config. and my setting.text "\n -----------Time----------- \n t=(2019,5,23,4,40,00,4,143) \n -----------Wifi----------- \n w_e=any-wifi-name \n…
-2
votes
1 answer

Access Multiple Sensors Value using Micropython in NodeMCU?

I am trying to gather inputs from five sensors and simply print the same but the return values always seem to return 1 or 0 regardless to change in the inputs to the sensors. The code used by me is as follows from machine import pin p0 =…
OshoParth
  • 1,492
  • 2
  • 20
  • 44
-3
votes
1 answer

text files are empty after I run my script

TL;DR When I run my program it deletes all my txt file data, I do not understand why. I'm making a waypoint editor/saver for my robot arm, and this program is meant to allow me to choose from a 'set' which is just a txt file, and then change or set…
-3
votes
2 answers

string to array list, is it possible?

I'm doing a project for myself which involves raspberry pico and an oled display. I'm using micropython but I think this is more like a generic python question. I need to populate the screen with images, the fastest way to do it is to ask the pico…
taccola
  • 3
  • 1
-3
votes
1 answer

Buzzer is not working with my MicroPython code

I'm working on a buzzer that has to make a simple sound. But I can't figure out about how to make this buzzer work in MicroPython. I've already tried the following code but it is not doing much. I'm a little bit stuck at this. import pycom import…
Zino
  • 1
  • 4
1 2 3
68
69