#include #include #define inputPin 40 // input pin -> PIR Sensor int main(){ int PIR=0; // init shunya interfaces library shunyaInterfacesSetup(); // set Given GPIO Pin to INPUT mode pinMode(inputPin, INPUT); while(1){ printf("%d\n",digitalRead(inputPin)); if(digitalRead(inputPin)){ printf("Obstacle detected!!\n"); delay(100); } else { printf("\n"); delay(100); } delay(100); } return 0; }