canon_ble #82

Merged
mattmcw merged 149 commits from canon_ble into main 2023-08-01 03:38:52 +00:00
2 changed files with 7 additions and 7 deletions
Showing only changes of commit 231c354cb1 - Show all commits

View File

@ -7,7 +7,7 @@
SoftwareSerial pixieSerial(-1, PIXIEPIN);
Adafruit_Pixie light = Adafruit_Pixie(NUMPIXELS, &pixieSerial);
McopySerial mc(McopySerial::LIGHT_IDENTIFIER);
McopySerial mc;
String color = "000,000,000";
@ -28,7 +28,7 @@ volatile char cmd = 'z';
void setup () {
mc.begin();
mc.begin(mc.LIGHT_IDENTIFIER);
pixieSerial.begin(115200); // Pixie REQUIRES this baud rate
light.setPixelColor(0, 0, 0, 0);
light.show();
@ -41,10 +41,10 @@ void loop () {
now = millis();
cmd = mc.loop();
if (cmd == McopySerial::LIGHT) {
if (cmd == mc.LIGHT) {
color = mc.getString();
parseColorString();
mc.confirm(McopySerial::LIGHT);
mc.confirm(mc.LIGHT);
}
//send light signal to pixie every second

View File

@ -33,7 +33,7 @@ volatile bool ledState;
const String name_remote = "mcopy";
CanonBLERemote canon_ble(name_remote);
TickTwo blinker(blink, 500);
McopySerial mc(McopySerial::CAMERA_IDENTIFIER);
McopySerial mc;
volatile boolean connected = false;
@ -83,7 +83,7 @@ void loop()
now = millis();
cmd = mc.loop();
if (cmd == McopySerial::CAMERA && last + 1000 < now) {
if (cmd == mc.CAMERA && last + 1000 < now) {
shutter();
}
@ -114,5 +114,5 @@ void shutter () {
blinker.pause();
digitalWrite(LED, HIGH);
last = millis();
mc.confirm(McopySerial::CAMERA);
mc.confirm(mc.CAMERA);
}