]> git.scottworley.com Git - tattlekey/blame - client/tattlekey.c
client: Start with the 'blink' example
[tattlekey] / client / tattlekey.c
CommitLineData
5ec2b60a
SW
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
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}