autobar/autobar.c

26 lines
586 B
C
Raw Normal View History

2022-07-15 13:30:55 -05:00
// AutoBar
// Automatic bartender running on the Raspberry Pi Pico/W
//
// Copyright 2022 Wyatt Miller, Avery Miller
// Licensed by the Mozilla Public License v2
2022-07-16 18:05:25 -05:00
// wyatt is gay
2022-07-15 13:30:55 -05:00
#include "pico/stdlib.h"
void gpio_put_explict(int pin, bool status) {
gpio_put(pin, status);
return;
}
2022-07-15 13:30:55 -05:00
void set_and_sleep(int pin, bool state, int sleep_duration);
int main() {
2022-07-16 18:05:25 -05:00
const uint LED_PIN = PICO_DEFAULT_LED_PIN;
2022-07-15 13:30:55 -05:00
gpio_init(LED_PIN);
gpio_set_dir(LED_PIN, GPIO_OUT);
while (true) {
set_and_sleep(LED_PIN, 1, 1000);
set_and_sleep(LED_PIN, 0, 1000);
2022-07-15 13:30:55 -05:00
}
}