Skip to content

Instantly share code, notes, and snippets.

Avatar

Mithi Sevilla mithi

View GitHub Profile
@mithi
mithi / marioMelody.ino
Last active Aug 29, 2015
mario melody with sparki of arcbotics
View marioMelody.ino
#define NOTE_B0 31
#define NOTE_C1 33
#define NOTE_CS1 35
#define NOTE_D1 37
#define NOTE_DS1 39
#define NOTE_E1 41
#define NOTE_F1 44
#define NOTE_FS1 46
#define NOTE_G1 49
#define NOTE_GS1 52
@mithi
mithi / cleaningRobot.ino
Created Jul 3, 2015
Arcbotic's Sparki pushes obstacles out of a given perimeter.
View cleaningRobot.ino
#include <Sparki.h>
#define LEFT 1
#define RIGHT 0
class CleaningRobot{
int pingThresh;
int lineThresh;
byte turnDir;
@mithi
mithi / patterns.ino
Last active Aug 29, 2015
drawing crazy patterns with arcbotics sparki
View patterns.ino
#include <Sparki.h>
class Patterns{
public:
Patterns(){
}
void turnSignal(){
int colors[3][3] = {RGB_RED, RGB_BLUE, RGB_GREEN};
@mithi
mithi / remoteTest.ino
Last active Aug 29, 2015
code used to test the remote of sparki
View remoteTest.ino
// /------^-----\
// | |
// | 69 70 71 |
// | 68 64 67 |
// | 7 21 9 |
// | 22 25 13 |
// | 12 24 94 |
// | 8 28 90 |
// | 66 82 74 |
// \____________/
@mithi
mithi / patternsWithRemote.ino
Last active Sep 13, 2015
merging crazy patterns with IR
View patternsWithRemote.ino
#include <Sparki.h>
class Patterns{
public:
Patterns(){
}
void turnSignal(){
int colors[3][3] = {RGB_RED, RGB_BLUE, RGB_GREEN};
sparki.beep();
@mithi
mithi / serialTest.ino
Created Jul 9, 2015
serial test with Sparki by arcbotics
View serialTest.ino
#include <Sparki.h>
void setup(){
}
void loop(){
Serial.print("Distance = ");
Serial.print(sparki.ping());
Serial.println(" cm");
@mithi
mithi / bluetoothSerialTest.ino
Last active Aug 29, 2015
testing bluetooth with sparki
View bluetoothSerialTest.ino
#include <Sparki.h>
void setup(){
Serial1.begin(9600);
}
void loop(){
Serial1.print("Distance = ");
Serial1.print(sparki.ping());
Serial1.println(" cm");
@mithi
mithi / bluetoothCommTest.ino
Last active Aug 29, 2015
testing the bluetooth module with sparki
View bluetoothCommTest.ino
#include <Sparki.h>
void showServoCommands(){
Serial1.println("...");
Serial1.println("ready to receive orders!");
Serial1.println("enter 1, 2, or 3 to face left, front, or right.");
}
int userServoCommand(){
while (!Serial1.available());
@mithi
mithi / serialCommandTest.ino
Last active Aug 29, 2015
serial command test with arcbotics sparki
View serialCommandTest.ino
#include <Sparki.h>
void showServoCommands(){
Serial.println("enter [1] to face left.");
Serial.println("enter [2] to face front.");
Serial.println("enter [3] to face right.");
Serial.println("waiting for your command!");
}
int userServoCommand(){
@mithi
mithi / accelerometerdisplay.pde
Created Jul 11, 2015
accelerometer display with processing and sparki by arcbotics
View accelerometerdisplay.pde
import processing.serial.*;
Serial port;
String[] values = {"","",""};
PFont font;
//Serial.list()[7] is /dev/tty.usbmodem1421
//Serial.list()[4] is /dev/tty.ArcBotics-DevB
void setup(){