Function to test the SDK

This commit is contained in:
Marius Drechsler 2025-03-04 16:39:49 +01:00
parent 3b32a4c37b
commit 61d4458f23
Signed by: marius
GPG key ID: 56D4131BA3104777
3 changed files with 157 additions and 0 deletions

23
test/test.c Normal file
View file

@ -0,0 +1,23 @@
#include <stdio.h>
#include "pico/stdlib.h"
#include "hardware/gpio.h"
#include "pico/binary_info.h"
const uint LED_PIN = 0;
int main () {
bi_decl(bi_program_description("Blink"));
bi_decl(bi_1pin_with_name(LED_PIN, "Onboard LED"));
stdio_init_all();
gpio_init(LED_PIN);
gpio_set_dir(LED_PIN, GPIO_OUT);
while (1) {
gpio_put(LED_PIN, 1);
sleep_ms(1000);
gpio_put(LED_PIN, 0);
sleep_ms(1000);
}
return 0;
}