#include <Arduino.h>
#define PIN_SEQUENCE 14
#define PIN_CAM 15
#define PIN_INPUT A0
int tps = 0;
int tooth;
int sequence[48] = {0, 1, 1, 1, 1, 1, 0, 1, 1, 1, 0, 0, 1, 1, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 1, 1, 1, 0, 0, 1, 1, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0};
int cam[48] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1};
void setup() {
Serial.begin(115200);
while (!Serial);
Serial.println("Hello from the Pico!");
pinMode(PIN_INPUT, INPUT);
pinMode(PIN_SEQUENCE, OUTPUT);
pinMode(PIN_CAM, OUTPUT);
}
void loop() {
for (tooth=0; tooth<48; tooth++) {
digitalWrite(PIN_SEQUENCE, sequence[tooth]);
digitalWrite(PIN_CAM, cam[tooth]);
tps = analogRead(A0); // 0-1023
delay(tps);
}
}sequence
cam