This repository has been archived on 2025-01-25. You can view files and clone it, but cannot push or open issues or pull requests.
Ha Thach 1be0e7fc28
change blink to use PICO_DEFAULT_LED_PIN to support other boards (#57)
* change blink to use PICO_DEFAULT_LED_PIN to support other boards

* also update pio/pwm and picoboard/blinky system/hello_double_tap
2021-02-22 15:08:12 +00:00

20 lines
383 B
C

/**
* Copyright (c) 2020 Raspberry Pi (Trading) Ltd.
*
* SPDX-License-Identifier: BSD-3-Clause
*/
#include "pico/stdlib.h"
int main() {
const uint LED_PIN = PICO_DEFAULT_LED_PIN;
gpio_init(LED_PIN);
gpio_set_dir(LED_PIN, GPIO_OUT);
while (true) {
gpio_put(LED_PIN, 1);
sleep_ms(250);
gpio_put(LED_PIN, 0);
sleep_ms(250);
}
}