Austin Schuh | 0a96ea3 | 2022-01-01 22:29:30 -0800 | [diff] [blame] | 1 | /** |
| 2 | * Copyright (c) 2020 Raspberry Pi (Trading) Ltd. |
| 3 | * |
| 4 | * SPDX-License-Identifier: BSD-3-Clause |
| 5 | */ |
| 6 | |
| 7 | #include "pico/stdlib.h" |
| 8 | |
| 9 | int main() { |
| 10 | #ifndef PICO_DEFAULT_LED_PIN |
| 11 | #warning blink example requires a board with a regular LED |
| 12 | #else |
Philipp Schrader | 790cb54 | 2023-07-05 21:06:52 -0700 | [diff] [blame^] | 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 | } |
Austin Schuh | 0a96ea3 | 2022-01-01 22:29:30 -0800 | [diff] [blame] | 22 | #endif |
| 23 | } |