Skip to content

Instantly share code, notes, and snippets.

Avatar

Mithi Sevilla mithi

View GitHub Profile
@mithi
mithi / mearm.ino
Last active Aug 28, 2015
test mearm
View mearm.ino
#include <Servo.h>
class Sweeper {
Servo servo;
int pos;
int inc;
int interval;
unsigned long lastUpdate;
int maximum;
int minimum;
@mithi
mithi / session1.ino
Created Jun 25, 2015
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)
View session1.ino
#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 / writeM.ino
Last active Aug 29, 2015
writeM wheelTest for arcbotics Sparki
View writeM.ino
#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 / gripperTest.ino
Created Jun 26, 2015
gripper test for arcbotics sparki.
View gripperTest.ino
#include <Sparki.h>
void beepx(int x, int d){
for (int i = 0; i < x; i++){
delay(d);
sparki.beep();
}
}
void gripperTestA(){
@mithi
mithi / LightSense.ino
Last active Aug 29, 2015
Code for Arcbotics Sparki Light Sensor
View LightSense.ino
#include <Sparki.h>
class LightSense{
int lightLeft;
int lightCenter;
int lightRight;
int del;
public:
@mithi
mithi / servoTest.ino
Last active Aug 29, 2015
Sparki Neck Servo Test
View servoTest.ino
#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 / session2.ino
Created Jun 26, 2015
testing infrared reflectance sensors and the ultrasonic rangefinder sensor in arbotics sparki
View session2.ino
#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 Aug 29, 2015
wall avoidance program for Arcbotics Sparki.
View wallAvoidance.ino
#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 Aug 29, 2015
Edge Avoidance program for arcbotics sparki.
View edgeAvoidance.ino
#include <Sparki.h>
class EdgeAvoidance{
int threshold;
int angle;
int distBack;
int leftEdge;
int rightEdge;
int wait;
@mithi
mithi / linesense.ino
Last active Aug 29, 2015
line following program for arcbotics sparki
View linesense.ino
#include <Sparki.h>
class LineSense{
int threshold;
public:
LineSense(int thresh){
threshold = thresh;
}