Cours:PiPico : Différence entre versions
| Ligne 9 : | Ligne 9 : | ||
https://raspberrypi.github.io/pico-sdk-doxygen/group__hardware__gpio.html | https://raspberrypi.github.io/pico-sdk-doxygen/group__hardware__gpio.html | ||
| − | + | {| class="wikitable" | |
| + | |- | ||
| + | ! Syntaxe | ||
| + | ||void gpio_init(uint gpio) | ||
| + | |- | ||
| + | ! Paramètres | ||
| + | || | ||
| + | {| class="wikitable" | ||
| + | |- | ||
| + | | gpio || numéro de gpio | ||
| + | |} | ||
| + | |} | ||
*gpio_put(LED_PIN, 1); | *gpio_put(LED_PIN, 1); | ||
*gpio_set_dir(LED_PIN, GPIO_OUT); | *gpio_set_dir(LED_PIN, GPIO_OUT); | ||
Version du 21 novembre 2022 à 22:36
Créer/configurer un projet vscode
- pico_project.py
- git clone https://github.com/raspberrypi/pico-project-generator.git
- ./pico_project.py --gui
- ne pas cocher "create VSCode project"
GPIO
https://raspberrypi.github.io/pico-sdk-doxygen/group__hardware__gpio.html
| Syntaxe | void gpio_init(uint gpio) | ||
|---|---|---|---|
| Paramètres |
|
- gpio_put(LED_PIN, 1);
- gpio_set_dir(LED_PIN, GPIO_OUT);
- gpio_set_pulls (uint gpio, bool up, bool down)