Professional Documents
Culture Documents
LAB 9
Handling Arduino
Objectives
•Introduction to Arduino
•Introduction to basic architecture of Arduino
•Learning the use of Arduino IDE.
Tools Used
•Arduino IDE
BSCS 4-A Burhan Ahmed Satti 01-134172-065
void setup() {
// start serial communication
Serial.begin(9600);
}
void loop() {
// read the value from the sensor:
sensorValue = analogRead(sensorPin);
Serial.println(sensorValue);
analogWrite(13, sensorValue);
delay(sensorValue);
}
Result
Conclusion
Task is done.
void setup() {
// start serial communication
Serial.begin(9600);
pinMode(LED_BUILTIN, OUTPUT);
}
void loop() {
// read the value from the sensor:
sensorValue = analogRead(sensorPin);
VoltageValue = (sensorValue/1023)*5;
Serial.println(VoltageValue);
delay(1000);
}
Result
Conclusion
Task is done.