Skip to content

Instantly share code, notes, and snippets.

View mithi's full-sized avatar

Mithi Sevilla mithi

View GitHub Profile
@mithi
mithi / session1.ino
Created June 25, 2015 19:41
A program that tests the gripper, servo and wheels of Arcbotic's Sparki robot. For the wheels, the Robot will write the letter M and you can specify its proportions (1, 2, 3, 4, 5)
#include <Sparki.h>
void beepx(int x, int d){
for (int i = 0; i < x; i++){
delay(d);
sparki.beep();
}
}
void writeM(int s){
@mithi
mithi / servoTest.ino
Last active August 29, 2015 14:23
Sparki Neck Servo Test
#include <Sparki.h>
void beepx(int x, int d){
for (int i = 0; i < x; i++){
delay(d);
sparki.beep();
}
}
void servoLeftToRight(int degree, int d){
@mithi
mithi / gripperTest.ino
Created June 26, 2015 12:49
gripper test for arcbotics sparki.
#include <Sparki.h>
void beepx(int x, int d){
for (int i = 0; i < x; i++){
delay(d);
sparki.beep();
}
}
void gripperTestA(){
@mithi
mithi / writeM.ino
Last active August 29, 2015 14:23
writeM wheelTest for arcbotics Sparki
#include <Sparki.h>
void beepx(int x, int d){
for (int i = 0; i < x; i++){
delay(d);
sparki.beep();
}
}
void writeM(int s){
@mithi
mithi / LightSense.ino
Last active August 29, 2015 14:23
Code for Arcbotics Sparki Light Sensor
#include <Sparki.h>
class LightSense{
int lightLeft;
int lightCenter;
int lightRight;
int del;
public:
@mithi
mithi / session2.ino
Created June 26, 2015 19:30
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: ");
@mithi
mithi / wallAvoidance.ino
Last active August 29, 2015 14:23
wall avoidance program for Arcbotics Sparki.
#include <Sparki.h>
const byte LEFT = 0;
const byte RIGHT = 1;
class WallAvoidance{
int distError;
int distTooClose;
int distBack;
@mithi
mithi / edgeAvoidance.ino
Last active August 29, 2015 14:23
Edge Avoidance program for arcbotics sparki.
#include <Sparki.h>
class EdgeAvoidance{
int threshold;
int angle;
int distBack;
int leftEdge;
int rightEdge;
int wait;
@mithi
mithi / edgeAvoidance.ino
Last active August 29, 2015 14:23
edge avoidance improved version for sparki. improved version.
#include <Sparki.h>
class EdgeAvoidance{
int threshold;
int angle;
int distBack;
int leftEdge;
int rightEdge;
int wait;
@mithi
mithi / linesense.ino
Last active August 29, 2015 14:23
line following program for arcbotics sparki
#include <Sparki.h>
class LineSense{
int threshold;
public:
LineSense(int thresh){
threshold = thresh;
}