blob: f34552bb58c8e48d2e642bb1f6c9c73f53c8669d [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
Philipp Schrader790cb542023-07-05 21:06:52 -070013 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 }
Austin Schuh0a96ea32022-01-01 22:29:30 -080022#endif
23}