ok,
what with parenting and COVID and the inevitable electronics letting off the wrong kind of smoke, its taken me over a week to get back to this.
i also have no idea about what I’m really doing, and I don’t actually know where to put this code. I tried puttinig it here:
void loop()
{
RecordButtonState = digitalRead(BigButton);
DeleteButtonState = digitalRead(ButtonDelete);
ClearButtonState = digitalRead(ButtonClear);
ResetButtonState = digitalRead(ResetButton);
FillButtonState = digitalRead(FillButton);
ButtonBankSelectState[BankArrayNumber] = digitalRead(ButtonBankSelect);//These setup the states of the buttons
unsigned long trigTimer = 0;
if ((trigTimer > 0) && (millis() - trigTimer > 20))
{
digitalWrite(TRIG, LOW); // Set trigger low after 20 msec
trigTimer = 0;
}
{if(buttonState == HIGH) {
looper = (looper+1);
BankPush1 = (BankPush1+1);
BankPush2 = (BankPush2+1);
BankPush3 = (BankPush3+1);
BankPush4 = (BankPush4+1);
BankPush5 = (BankPush5+1);
BankPush6 = (BankPush6+1);
ClockKeep = (ClockKeep+1);
digitalWrite(TRIG, HIGH);
trigTimer = millis();
digitalWrite(OUT1,Sequence [1+BankArrayShift1][BankPush1 + NewKnobValue1] || (Fill1));
digitalWrite(OUT2,Sequence [2+BankArrayShift2][BankPush2 + NewKnobValue2] || (Fill2));
digitalWrite(OUT3,Sequence [3+BankArrayShift3][BankPush3 + NewKnobValue3] || (Fill3));
digitalWrite(OUT4,Sequence [7+BankArrayShift4][BankPush4 + NewKnobValue4] || (Fill4));
digitalWrite(OUT5,Sequence [8+BankArrayShift5][BankPush5 + NewKnobValue5] || (Fill5));
digitalWrite(OUT6,Sequence [9+BankArrayShift6][BankPush6 + NewKnobValue6] || (Fill6));
delay(10); // 10 ?
digitalWrite(OUT1,LOW);
digitalWrite(OUT2,LOW);
digitalWrite(OUT3,LOW);
digitalWrite(OUT4,LOW);
digitalWrite(OUT5,LOW);
digitalWrite(OUT6,LOW);
buttonState = LOW;
}
else
{
looper = looper;
ClockKeep = ClockKeep;
}
}
but it dont liek that at all…:
/home/lance/Documents/synth/BB/code_b_b/code_b_b.ino: In function ‘void loop()’:
code_b_b:198:20: error: ‘TRIG’ was not declared in this scope
digitalWrite(TRIG, LOW); // Set trigger low after 20 msec
^~~~
/home/lance/Documents/synth/BB/code_b_b/code_b_b.ino:198:20: note: suggested alternative: ‘TWIE’
digitalWrite(TRIG, LOW); // Set trigger low after 20 msec
^~~~
TWIE
code_b_b:213:18: error: ‘TRIG’ was not declared in this scope
digitalWrite(TRIG, HIGH);
^~~~
/home/lance/Documents/synth/BB/code_b_b/code_b_b.ino:213:18: note: suggested alternative: ‘TWIE’
digitalWrite(TRIG, HIGH);
^~~~
TWIE
exit status 1
‘TRIG’ was not declared in this scope
can you possibly be a little bit more precise as to where i stick it?