Skip to content

Instantly share code, notes, and snippets.

@mithi
Created Jun 26, 2015
Embed
What would you like to do?
testing infrared reflectance sensors and the ultrasonic rangefinder sensor in arbotics sparki
#include <Sparki.h>
void infraredReflectanceSensorsTest(){
sparki.clearLCD();
sparki.print("Edge Left: ");
sparki.println(sparki.edgeLeft());
sparki.print("Line Left: ");
sparki.println(sparki.lineLeft());
sparki.print("Line Center: ");
sparki.println(sparki.lineCenter());
sparki.print("Line Right: ");
sparki.println(sparki.lineRight());
sparki.print("Edge Right: ");
sparki.println(sparki.edgeRight());
sparki.updateLCD();
delay(200);
}
void rangeFinderTest(){
sparki.beep();
sparki.clearLCD();
sparki.print(sparki.ping());
sparki.updateLCD();
delay(3000);
}
void setup(){
}
void loop(){
//rangeFinderTest();
infraredReflectanceSensorsTest();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment