Boot & wiring
Power the rails and bring up Wi-Fi.
| 3V3 | Power + | Rail + |
| GND | Ground | Rail − |
| D23 | I²S data (SD) | INMP441 mic |
| D19 | I²S word select (WS) | INMP441 mic |
| D18 | I²S clock (SCK) | INMP441 mic |
| D22 | I²C clock (SCL) | SSD1306 OLED |
| D21 | I²C data (SDA) | SSD1306 OLED |
| D15 | Beep | Buzzer |
| D4 | IR illuminator | 850 nm IR LED |
Left header
ENVPVND34D35D32D33D25D26D27D14D12D13GNDVIN
Right header
D23D22TX0RX0D21D19D18D5TX2RX2D4D2D15GND3V3
1// Odyssey capture node: reference firmware sketch
2#include <WiFi.h>
3#include <HTTPClient.h>
4#include <driver/i2s.h>
5#include <Adafruit_SSD1306.h>
6#include <mbedtls/sha256.h>
7
8const int I2S_SCK = 18, I2S_WS = 19, I2S_SD = 23; // mic
9const int OLED_SDA = 21, OLED_SCL = 22; // REC indicator
10const int IR_LED = 4, BUZZER = 15;
11const char* GATEWAY = "https://gateway.odyssey.xyz";
12Adafruit_SSD1306 hud(128, 64, &Wire, -1);
13
14void setup() {
15 Serial.begin(115200);
16 pinMode(IR_LED, OUTPUT);
17 pinMode(BUZZER, OUTPUT);
18 Wire.begin(OLED_SDA, OLED_SCL);
19 hud.begin(SSD1306_SWITCHCAPVCC, 0x3C);
20 WiFi.begin(SSID, PASS);
21}
22
23void loop() {
24 if (!captureRequested()) return; // double-tap
25 Clip clip = recordClip(10); // audio + frames + IMU
26 hud.print("REC"); // visible to bystanders
27 beep(1);
28 digitalWrite(IR_LED, HIGH); // gaze frames
29 clip.gaze = trackGaze();
30 digitalWrite(IR_LED, LOW);
31 uint8_t h[32]; sha256(clip, h);
32 Sig s = secureElementSign(h, now()); // key never leaves the chip
33 post(GATEWAY "/samples", clip, s);
34 beep(2);
35}