Initial commit

This commit is contained in:
Dennis Schoepf 2020-09-17 11:34:41 +02:00
commit 2cb72a73e8
8 changed files with 143 additions and 0 deletions

View file

@ -0,0 +1,17 @@
#include <Arduino.h>
#include <SharpIR.h>
SharpIR sensor(SharpIR::GP2Y0A02YK0F, A0);
void setup()
{
Serial.begin(9600);
pinMode(A0, INPUT);
// put your setup code here, to run once:
}
void loop()
{
int distance = sensor.getDistance();
Serial.println(distance);
}