From 69356a5b0464bc79d671628e4790113c6da2e623 Mon Sep 17 00:00:00 2001
From: DenysVolo <denysvoloshchuk2002@gmail.com>
Date: Fri, 13 May 2022 12:43:05 +0100
Subject: [PATCH] Added skeleton code

---
 BinaryAdder - Skeleton.c    | 28 ++++++++++++++++++++++++++++
 VariableBuzzer - Skeleton.c | 20 ++++++++++++++++++++
 2 files changed, 48 insertions(+)
 create mode 100644 BinaryAdder - Skeleton.c
 create mode 100644 VariableBuzzer - Skeleton.c

diff --git a/BinaryAdder - Skeleton.c b/BinaryAdder - Skeleton.c
new file mode 100644
index 0000000..c18ce6a
--- /dev/null
+++ b/BinaryAdder - Skeleton.c	
@@ -0,0 +1,28 @@
+#include "pico/stdlib.h"
+
+int main() {
+
+    //Initialise the inputs and outputs you would need
+
+    int currentOut = 2;
+    int firstInt = 0;
+    int secondInt = 0;
+
+    while (currentOut < 6) {
+        //Caputre and display the first 4-bit variable
+    }
+
+    while (currentOut < 10) {
+        //Caputre and display the second 4-bit variable
+    }
+
+    int finalInt = firstInt + secondInt;
+    currentOut = 1;
+
+    while (finalInt != 0) {
+        //Display the result of the calculation
+    }
+    while(currentOut < 10) {
+        //Make sure all the other ouputs are zeroed
+    }
+}
diff --git a/VariableBuzzer - Skeleton.c b/VariableBuzzer - Skeleton.c
new file mode 100644
index 0000000..c76c448
--- /dev/null
+++ b/VariableBuzzer - Skeleton.c	
@@ -0,0 +1,20 @@
+#include "pico/stdlib.h"
+
+int main() {
+    uint buzzer = 18;
+    gpio_init(buzzer);
+    gpio_set_dir(buzzer, GPIO_OUT);
+
+    uint buzzerSlower = 20;
+    gpio_init(buzzerSlower);
+    gpio_set_dir(buzzerSlower, GPIO_IN);
+
+    uint buzzerFaster = 21;
+    gpio_init(buzzerFaster);
+    gpio_set_dir(buzzerFaster, GPIO_IN);
+
+    int delay = 100;
+    while (true) {
+        //Capture your inputs to change the value of delay, which will change the frequency of the buzzer
+    }
+}
\ No newline at end of file
-- 
GitLab