Update chap 8

This commit is contained in:
Kevin Thomas
2025-09-19 17:52:20 -07:00
parent ae4261cd36
commit 9bf6113b1c

View File

@@ -1,11 +1,23 @@
#include <stdio.h>
#include "pico/stdlib.h"
#define LED_PIN 25
int main(void) {
uint8_t age;
stdio_init_all();
while (true)
gpio_init(LED_PIN);
gpio_set_dir(LED_PIN, GPIO_OUT);
while (true) {
printf("age: %d\r\n", age);
gpio_put(LED_PIN, 1);
sleep_ms(500);
gpio_put(LED_PIN, 0);
sleep_ms(500);
}
}