mechatronics/docs/thonny.md

578 B

Thonny

MicroPython

Install

Linux

wget https://github.com/thonny/thonny/releases/download/v4.1.7/thonny-4.1.7-x86_64.tar.gz
tar -xvzf thonny-4.1.7.bundled.tar.gz
cd thonny-4.1.7
./install

/home/[user]/apps/thonny/bin/thonny

Windows

Code

(HIGH) status

led.value(1) led.on()

(LOW) status

led.value(0) led.off()

Pin

led_placa = Pin(2, Pin.OUT, value=1)

Button

boton_up = Pin(4, Pin.IN, Pin.PULL_DOWN)

Mod

Time

import utime

utime.sleep()

utime.sleep_ms()

utime.sleep_us()