mechatronics/docs/thonny.md

52 lines
578 B
Markdown

# 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(<segundos>)
utime.sleep_ms(<milisegundos>)
utime.sleep_us(<microsegundos>)