aboutsummaryrefslogtreecommitdiff
path: root/Mussel/examples/command
diff options
context:
space:
mode:
authorJonas Smedegaard <dr@jones.dk>2025-03-11 12:02:07 +0100
committerJonas Smedegaard <dr@jones.dk>2025-03-11 16:48:06 +0100
commit02876f961fc8b68f2cb43a23a1d98d89fce11858 (patch)
treed12658d92f62c4fd957fb68e683d75b8f378428f /Mussel/examples/command
parent8d0212da635222b404113ad0ff5d469adf00ab6f (diff)
add library Mussel
Diffstat (limited to 'Mussel/examples/command')
-rw-r--r--Mussel/examples/command/command.ino19
1 files changed, 19 insertions, 0 deletions
diff --git a/Mussel/examples/command/command.ino b/Mussel/examples/command/command.ino
new file mode 100644
index 0000000..f359e00
--- /dev/null
+++ b/Mussel/examples/command/command.ino
@@ -0,0 +1,19 @@
+#include <Mussel.h>
+
+// instantiate with attitude #6
+Mussel mussel(6);
+
+void setup() {
+ Serial.begin(115200);
+ mussel.begin();
+
+ Serial.printf("\n\nDevice ready: %s\n",
+ mussel.desc().c_str());
+}
+
+void loop() {
+ Serial.printf("gap:%d\n",
+ mussel.read());
+
+ delay(1000);
+}