Initial setup for the Handcrank Boost Converter
This commit is contained in:
commit
06ecbf4137
6 changed files with 154 additions and 0 deletions
41
src/main.c
Normal file
41
src/main.c
Normal file
|
|
@ -0,0 +1,41 @@
|
|||
#include "hardware/gpio.h"
|
||||
//#include <stdio.h>
|
||||
#include <pico/stdlib.h>
|
||||
|
||||
#define LED1_PIN 13
|
||||
#define LED2_PIN 14
|
||||
#define LED3_PIN 15
|
||||
|
||||
int main()
|
||||
{
|
||||
//stdio_init_all();
|
||||
//printf("Hello, world!\n");
|
||||
|
||||
gpio_init(LED1_PIN);
|
||||
gpio_init(LED2_PIN);
|
||||
gpio_init(LED3_PIN);
|
||||
|
||||
gpio_set_dir(LED1_PIN, true);
|
||||
gpio_set_dir(LED2_PIN, true);
|
||||
gpio_set_dir(LED3_PIN, true);
|
||||
|
||||
gpio_put(LED1_PIN, true);
|
||||
gpio_put(LED2_PIN, true);
|
||||
gpio_put(LED3_PIN, true);
|
||||
|
||||
sleep_ms(3000);
|
||||
|
||||
while (true) {
|
||||
gpio_put(LED1_PIN, true);
|
||||
gpio_put(LED2_PIN, false);
|
||||
gpio_put(LED3_PIN, false);
|
||||
sleep_ms(500);
|
||||
gpio_put(LED1_PIN, false);
|
||||
gpio_put(LED2_PIN, true);
|
||||
sleep_ms(500);
|
||||
gpio_put(LED2_PIN, false);
|
||||
gpio_put(LED3_PIN, true);
|
||||
sleep_ms(500);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue