aboutsummaryrefslogtreecommitdiff
path: root/puzzle/dummy/main.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'puzzle/dummy/main.cpp')
-rw-r--r--puzzle/dummy/main.cpp23
1 files changed, 23 insertions, 0 deletions
diff --git a/puzzle/dummy/main.cpp b/puzzle/dummy/main.cpp
new file mode 100644
index 0000000..4374066
--- /dev/null
+++ b/puzzle/dummy/main.cpp
@@ -0,0 +1,23 @@
+#include <Arduino.h>
+#include <Wire.h>
+
+void receiveEvent(int howMany){
+ while (Wire.available()){
+ char c = Wire.read();
+ Serial.print(c, HEX);
+ }
+ Serial.println();
+}
+
+void setup() {
+ Wire.begin(0x00);
+ Wire.onReceive(receiveEvent);
+}
+
+void loop() {
+ const uint8_t data[] = {0xff, 0x00, 0xde, 0xad, 0xbe, 0xef};
+ Wire.beginTransmission(0x69);
+ Wire.write(data, sizeof(data));
+ Wire.endTransmission();
+}
+