Skip to content

Commit eda4c12

Browse files
committed
Added BAT LOW display for any voltage below 3.7V. Send inital program change if enter is held during startup.
1 parent c70b8d3 commit eda4c12

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

NuEVI.ino

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -598,6 +598,11 @@ void setup() {
598598

599599
state = DISPLAYOFF_IDL;
600600
mainState = NOTE_OFF; // initialize main state machine
601+
602+
if (!digitalRead(ePin)) {
603+
activePatch=0;
604+
doPatchUpdate=1;
605+
}
601606

602607
Serial3.begin(31250); // start serial with midi baudrate 31250
603608
Serial3.flush();
@@ -3260,7 +3265,7 @@ void drawMenuScreen(){
32603265
display.print("MENU ");
32613266
int vMeterReading = analogRead(vMeterPin);
32623267
if (vMeterReading > 3000) display.print("USB "); else display.print("BAT ");
3263-
if (vMeterReading < 2294) display.print("LOW"); else display.print(map(vMeterReading,0,3100,0,50)*0.1,1);
3268+
if (vMeterReading < 2294) display.print("LOW"); else display.print(map(vMeterReading,0,3030,0,50)*0.1,1);
32643269
display.print("V");
32653270
display.drawLine(0,9,127,9,WHITE);
32663271
display.setCursor(0,12);

0 commit comments

Comments
 (0)