Instructions
IDUINO for maker’s life
www.openplatform.cc 21
}
********Code End********
3.3 Example 3
In this example we try to combine digital pin and analog pin together to control two LED
lights, connection and code as below.
Code for example 3
********Code begin********
int Led=13;
int ledPin=12;
int buttonpin=7;
int sensorPin = A0;
int sensorValue = 0;
int val;
void setup()
{
Serial.begin(9600);
pinMode(Led,OUTPUT);
pinMode(ledPin, OUTPUT);
pinMode(buttonpin,INPUT);
}
void loop()