added autobar file
This commit is contained in:
parent
7cc2346923
commit
43576de627
21
autobar.c
Normal file
21
autobar.c
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
// AutoBar
|
||||||
|
// Automatic bartender running on the Raspberry Pi Pico/W
|
||||||
|
//
|
||||||
|
// Copyright 2022 Wyatt Miller, Avery Miller
|
||||||
|
// Licensed by the Mozilla Public License v2
|
||||||
|
|
||||||
|
#include "pico/stdlib.h"
|
||||||
|
|
||||||
|
void set_and_sleep(int pin, bool state, int sleep_duration);
|
||||||
|
|
||||||
|
int main() {
|
||||||
|
const uint LED_PIN = PICO_DEFAULT_LED_PIN;
|
||||||
|
gpio_init(LED_PIN);
|
||||||
|
gpio_set_dir(LED_PIN, GPIO_OUT);
|
||||||
|
while (true) {
|
||||||
|
gpio_put(LED_PIN, 1);
|
||||||
|
sleep_ms(250);
|
||||||
|
gpio_put(LED_PIN, 0);
|
||||||
|
sleep_ms(250);
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user