Skip to content

Commit

Permalink
Merge branch 'master' of github.com:schoolpost/BlueMagic32
Browse files Browse the repository at this point in the history
  • Loading branch information
schoolpost committed Jul 7, 2020
2 parents d263d18 + 43b9ede commit b16211c
Showing 1 changed file with 37 additions and 0 deletions.
37 changes: 37 additions & 0 deletions examples/M5_ATOM_Remote_Trigger/M5_ATOM_Remote_Trigger.ino
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
#include "M5Atom.h"
#include <BlueMagic32.h>

void setup()
{

M5.begin(true, false, true);
Serial.begin(115200);

M5.dis.drawpix(0, 0xffffff);

BMDConnection.begin("BlueMagic32");
BMDControl = BMDConnection.connect();
}

void loop()
{
M5.update();

if (BMDConnection.available())
{

if (M5.Btn.wasPressed())
{
BMDControl->toggleRecording();
}

if (BMDControl->isRecording())
{
M5.dis.drawpix(0, 0x00ff00);
}
else
{
M5.dis.drawpix(0, 0xffffff);
}
}
}

0 comments on commit b16211c

Please sign in to comment.