Instructions

IDUINO for maker’s life
16 www.openplatform.cc
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()
{
sensorValue = analogRead(sensorPin);
digitalWrite(ledPin, HIGH);
delay(sensorValue);
digitalWrite(ledPin, LOW);