Professional Documents
Culture Documents
Practical:13
Aim: Design a small application based on IOT using Arduino or Rasberry pi.
● Program:
int LED = 13;
intobstaclePin = 8;
inthasObstacle = HIGH;
void setup()
{
pinMode(LED, OUTPUT);
pinMode(obstaclePin, INPUT);
}
void loop()
{
hasObstacle = digitalRead(obstaclePin);
if (hasObstacle == LOW)
{
digitalWrite(LED, HIGH);
}
else
{
digitalWrite(LED, LOW);
}
delay(200);
}
En.no:2007042 Cloud Technologies(IT5102)
● Output:
When Obtacle is detected by IR Transmitter
Conclusion: Hence, in this way, I have successfully completed the practical based on,
Design a small application based on IOT using Arduino or Rasberry pi.
K S P A T