Alright, so this code is for a game that is a power source connected to 6 buttons at ports 1, 2, 9, 11, 12, and 13. These are consequently supposed to light up 6 LEDs, each connected to 1. If you press the buttons in the right order, all the LEDs blink at once. Does it work?
int ledPin1 = 1;
int ledPin2 = 2;
int ledPin3 = 9;
int ledPin4 = 11;
int ledPin5 = 12;
int ledPin6 = 13;
void setup() {
//put your setup code here, to run once:
}
void loop() {
//put your main code here, to run repeatedly:
int QuestionNumberArray[] = {1, 2, 9, 11, 12, 13};//the array itself
const size_t n = sizeof(questionNumberArray) //the array used
sizeof(questionNumberArray[0]);//the base of the array
for (size_t i = 0; i < n - 1; i++) //the loop itself
{
size_t j = random(1, n-i);
int t = questionNumberArray[i]; //integer output for increase
questionNumberArray[i] = questionNumberArray[j];//the value definition
questionNumberArray[j] = t;
pinMode(questionNumberArray, INPUT);
if(digitalRead(questionNumberArray) == HIGH) {
then(digitalRead(1, 2, 9, 11, 12, 13) == HIGH)
break;
}
}
Also, how do I make it so that people have infinite times to try