Skip to content

Commit 3568baf

Browse files
author
Adafruit Adabot
committed
Merge branch 'm4eyes_arcadify' of github.com:ladyada/Adafruit_Learning_System_Guides into m4eyes_arcadify
2 parents 78cee83 + 87015a9 commit 3568baf

2 files changed

Lines changed: 9 additions & 12 deletions

File tree

M4_Eyes/M4_Eyes.ino

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -137,12 +137,12 @@ void setup() {
137137
if (!arcada.arcadaBegin()) {
138138
while (1);
139139
}
140+
arcada.displayBegin();
140141
// MUST set up flash filesystem before Serial.begin() or seesaw.begin()
141-
arcada.filesysBeginMSD();
142-
143-
// if(i == 1) fatal("Flash init fail", 100);
144-
//else if(i == 2) fatal("No filesys", 500);
145-
142+
if (!arcada.filesysBeginMSD()) {
143+
arcada.setBacklight(255);
144+
arcada.haltBox("No filesystem found, please load CircuitPython on in order to create one!");
145+
}
146146

147147
Serial.begin(115200);
148148
while(!Serial) delay(10);
@@ -259,13 +259,15 @@ void setup() {
259259
// of the nose booper when doing this...it self-calibrates on startup.
260260
char *filename = "config.eye";
261261
#if NUM_EYES > 1 // Only available on MONSTER M4SK
262+
/* MEMEFIX
262263
if(!(priorButtonState & 0b001000000000)) {
263264
filename = "config1.eye";
264265
} else if(!(priorButtonState & 0b010000000000)) {
265266
filename = "config2.eye";
266267
} else if(!(priorButtonState & 0b100000000000)) {
267268
filename = "config3.eye";
268269
}
270+
*/
269271
#endif
270272
loadConfig(filename);
271273

@@ -909,9 +911,9 @@ void loop() {
909911
uint32_t newlyPressed = ~(buttonState | changedState); // Bits SET if newly pressed
910912
if( newlyPressed & 0b001000000000) { // Seesaw pin 9 (inner)
911913
currentPitch *= 1.05;
912-
} else if(newlyPressed & 0b010000000000) { // Seesaw pin 10 (middle)
914+
} else if(newlyPressed & ARCADA_BUTTONMASK_A) { // Seesaw pin 10 (middle)
913915
currentPitch = defaultPitch;
914-
} else if(newlyPressed & 0b100000000000) { // Seesaw pin 11 (outer)
916+
} else if(newlyPressed & ARCADA_BUTTONMASK_DOWN) { // Seesaw pin 11 (outer)
915917
currentPitch *= 0.95;
916918
}
917919
if(newlyPressed) {

M4_Eyes/globals.h

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,5 @@
11
//34567890123456789012345678901234567890123456789012345678901234567890123456
22

3-
#include <Adafruit_GFX.h> // Core graphics for Adafruit displays
4-
#include <Adafruit_ST7789.h> // TFT-specific display library
5-
#include <Adafruit_ZeroDMA.h> // SAMD-specific DMA library
6-
#include <Adafruit_ImageReader.h> // ImageReturnCode type
73
#include "Adafruit_Arcada.h"
84
#include "DMAbuddy.h" // DMA-bug-workaround class
95

@@ -24,7 +20,6 @@
2420
// Light sensor is not active by default. Use "lightSensor : 102" in config
2521
#else
2622
#define NUM_EYES 1
27-
#define BACKLIGHT_PIN 47
2823
#endif
2924

3025
// GLOBAL VARIABLES --------------------------------------------------------

0 commit comments

Comments
 (0)