int led1=6;
int led2=2;
int led3=4;
int led4=3;
int sensor4=9;
int sensor5=10;
void setup() {
pinMode(led1, OUTPUT);
pinMode(led2, OUTPUT);
pinMode(sensor4, INPUT);
pinMode(sensor5, INPUT);
analogRead(sensor4);
analogRead(sensor5);
}
// the set of code above writes for pin6 and pin2; reads for pin9 and pin10.
void loop()
if (sensor4>=4);
{
digitalWrite(led1, HIGH);
digitalWrite(led2, LOW);
}
If you google , there are explanations of all instructions and the syntax required*
There are also examples in the IDE that will help you with general coding .
I’d recommend Simon Monks “ Getting started book” too.
This makes it much easier for us to read.
It also is very helpful for finding problems with curly brackets. Hint, several replies have pointed out that you are missing curly brackets for your loop.