blob: d478d7843f021d16682de839c7b506969bf69094 [file] [log] [blame]
Austin Schuh0a96ea32022-01-01 22:29:30 -08001/**
2 * Copyright (c) 2020 Raspberry Pi (Trading) Ltd.
3 *
4 * SPDX-License-Identifier: BSD-3-Clause
5 */
6
7#include "pico/stdlib.h"
8
9int main() {
10#ifndef PICO_DEFAULT_LED_PIN
11#warning blink example requires a board with a regular LED
12#else
13 const uint LED_PIN = PICO_DEFAULT_LED_PIN;
14 gpio_init(LED_PIN);
15 gpio_set_dir(LED_PIN, GPIO_OUT);
16 while (true) {
17 gpio_put(LED_PIN, 1);
18 sleep_ms(250);
19 gpio_put(LED_PIN, 0);
20 sleep_ms(250);
21 }
22#endif
23}