Created
March 15, 2019 09:27
-
-
Save timlambrecht/26a976797aa0049b1add0cde87dc55d2 to your computer and use it in GitHub Desktop.
Code for one sensor
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include "MeOrion.h" | |
MeUltrasonicSensor SensorM(PORT_7); /* Ultrasonic module can ONLY be connected to port 3, 4, 6, 7, 8 of base shield. */ | |
void setup() | |
{ | |
Serial.begin(9600); | |
} | |
void loop() | |
{ | |
Serial.print("SensorM : "); | |
Serial.print(SensorM.distanceCm() ); | |
Serial.println(" cm"); | |
delay(100); /* the minimal measure interval is 100 milliseconds */ | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment