int redLed = 2;
int greenLed = 3;
int blueLed = 4;
int pushButton1 = 6;
int pushButton2 = 5;
int counter = 0;
void setup() {
pinMode(redLed, OUTPUT);
pinMode(greenLed, OUTPUT);
pinMode(blueLed, OUTPUT);
pinMode(pushButton1, INPUT_PULLUP);
pinMode(pushButton2, INPUT_PULLUP);
Serial.begin(9600);
}
void loop() {
if(digitalWrite(pushButton1)<=LOW)
{
counter--
}
if(digitalWrite(pushButton2)>=LOW)
{
counter++
}
}
Arduino: 1.6.7 (Windows 7), Board: "Arduino/Genuino Uno"
C:\Users\comp\Desktop\ArduinoSketches\rgbLed\sketch_mar19a\sketch_mar19a.ino: In function 'void loop()':
sketch_mar19a:17: error: too few arguments to function 'void digitalWrite(uint8_t, uint8_t)'
if(digitalWrite(tipkalo1)=<LOW)
^
In file included from sketch\sketch_mar19a.ino.cpp:1:0:
C:\Users\comp\Desktop\Arduino\hardware\arduino\avr\cores\arduino/Arduino.h:126:6: note: declared here
void digitalWrite(uint8_t, uint8_t);
^
sketch_mar19a:17: error: expected primary-expression before '<' token
if(digitalWrite(tipkalo1)=<LOW)
^
sketch_mar19a:20: error: expected ';' before '}' token
}
^
sketch_mar19a:21: error: too few arguments to function 'void digitalWrite(uint8_t, uint8_t)'
if(digitalWrite(tipkalo2)=>LOW)
^
In file included from sketch\sketch_mar19a.ino.cpp:1:0:
C:\Users\comp\Desktop\Arduino\hardware\arduino\avr\cores\arduino/Arduino.h:126:6: note: declared here
void digitalWrite(uint8_t, uint8_t);
^
sketch_mar19a:21: error: expected primary-expression before '>' token
if(digitalWrite(tipkalo2)=>LOW)
^
sketch_mar19a:24: error: expected ';' before '}' token
}
^
exit status 1
too few arguments to function 'void digitalWrite(uint8_t, uint8_t)'
This report would have more information with
"Show verbose output during compilation"
enabled in File > Preferences.