Skip to content
Snippets Groups Projects
Commit e5cfee6a authored by dk8g20's avatar dk8g20
Browse files

added skeleton code

parent 62ad4ce0
Branches main
No related tags found
No related merge requests found
#include "pico/stdlib.h"
const uint decrementButton = 21;
const uint incrementButton = 22;
const uint resetButton = 20;
const uint bitLedOne= 5;
const uint bitLedTwo = 4;
const uint bitLedThree = 3;
const uint bitLedFour = 2;
int main() {
//Initialise your IO
int counter = 0;
while (true) {
if((counter % 2) > 0) {gpio_put(bitLedOne,1);} else {gpio_put(bitLedOne,0);}
//Add for the other LED's
if(gpio_get(incrementButton) == 0){}
//Make the buttons do something
}
}
#include "pico/stdlib.h"
//Function definition
void animation(int length);
int main() {
//Define how fast you want your animation to play in MS
const int animationStep = 50;
//Initialise all LEDS - Use a for loop
//Loop animation
while (true) {
animation1(animationStep);
}
}
void animation1(int length) {
//Add your custom animation
}
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment