I am making an electronic Latin dictionary and I keep coming up with this message when I verify the code.
here is the (partial) code:
// Using Morse code (for lack of more I/O) and nine LEDs to make the translating of Latin easier
const int LED_1 = 1; //LED 1 is connected to pin 1
const int LED_2 = 2; //LED 2 is connected to pin 2
const int LED_3 = 3; //LED 3 is connected to pin 3
const int LED_4 = 4; //LED 4 is connected to pin 4
const int LED_5 = 5; //LED 5 is connected to pin 5
const int LED_6 = 6; //LED 6 is connected to pin 6
const int LED_7 = 7; //LED 7 is connected to pin 7
const int LED_8 = 8; //LED 8 is connected to pin 8
const int LED_9 = 9; //LED 9 is connected to pin 9
const int buttonDash = 11; //The morse code dash button is connected to pin 11
const int buttonDot = 12; // the morse code dot button is connected to pin 12
void setup () {
pinMode(LED_1, OUTPUT); // OUTPUT means a write and INPUT means a read
pinMode(LED_2, OUTPUT);
pinMode(LED_3, OUTPUT);
pinMode(LED_4, OUTPUT);
pinMode(LED_5, OUTPUT);
pinMode(LED_6, OUTPUT);
pinMode(LED_7, OUTPUT);
pinMode(LED_8, OUTPUT);
pinMode(LED_9, OUTPUT);
pinMode(buttonDash, INPUT);
pinMode(buttonDot, INPUT);
String string1 = ((digitalRead(buttonDot), digitalRead(buttonDash), digitalRead(buttonDash), digitalRead(buttonDash), digitalRead(buttonDash), digitalRead(buttonDash), digitalRead(buttonDash))); //Amo: to love
String string2 = ((digitalRead(buttonDot), digitalRead(buttonDash), digitalRead(buttonDot), digitalRead(buttonDot), digitalRead(buttonDot), digitalRead(buttonDash), digitalRead(buttonDash), digitalRead(buttonDot), digitalRead(buttonDot), digitalRead(buttonDot), digitalRead(buttonDash), digitalRead(buttonDash), digitalRead(buttonDash), digitalRead(buttonDot), digitalRead(buttonDash), digitalRead(buttonDot), digitalRead(buttonDash), digitalRead(buttonDash), digitalRead(buttonDash));//Laboro: to Work
}
void loop () {
if(string1 == HIGH) {
digitalWrite((LED_2 = HIGH) && (LED_4 = HIGH) && (LED_5 = HIGH) && (LED_6 = HIGH) && (LED_7 = HIGH) && (LED_9 = HIGH));
delay(500);
digitalWrite((LED_2 = LOW) && (LED_4 = LOW) && (LED_5 = LOW) && LED_6 = LOW) && (LED_7 = LOW) && (LED_9 = LOW));
delay(500);
digitalWrite((LED_1 = HIGH) && (LED_3 = HIGH) && (LED_4 = LOW) && (LED_5 = HIGH) && (LED_6 = HIGH) && (LED_7 = 8) && (LED_8 = HIGH) && (LED_9 = HIGH)
Moderator edit: partial quote changed to code tags