/********************************************** e-Gizmo PBot Uno Controller - PBotDistanceSensor.ino A new features included on baord the PBot Uno. Now it can measure the distance in centimeter unit, Upload this code to see the output, attached the sensor. Codes by e-Gizmo Mechatronix Central http://www.e-gizmo.net March 17,2020 ************************************************/ #include "eGizmo_PBot_Uno.h" #include eGizmo_PBot_Uno PBot; void setup() { PBot.BEGIN(); } void loop() { PBot.DISTANCE(); // Reading the distance sensor Serial.print("Measure in cm = "); Serial.println(PBot.RANGE); // Printing the distance value in cm in the Serial Monitor delay(10); }