diff --git a/4_Bit_Binary_Counter SKELETON.c b/4_Bit_Binary_Counter SKELETON.c new file mode 100644 index 0000000000000000000000000000000000000000..8931a839f51f39c2c3ecacdeaa025ccf741a03ba --- /dev/null +++ b/4_Bit_Binary_Counter SKELETON.c @@ -0,0 +1,35 @@ +#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 + + + + + } +} diff --git a/LED_Animation SKELETON.c b/LED_Animation SKELETON.c new file mode 100644 index 0000000000000000000000000000000000000000..2e88d09b67a0e20b5c5829e1678920146b003d00 --- /dev/null +++ b/LED_Animation SKELETON.c @@ -0,0 +1,25 @@ +#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