Skip to content

Instantly share code, notes, and snippets.

View mithi's full-sized avatar

Mithi Sevilla mithi

View GitHub Profile
@mithi
mithi / marioMelody.ino
Last active August 29, 2015 14:23
mario melody with sparki of arcbotics
#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 July 3, 2015 08:32
Arcbotic's Sparki pushes obstacles out of a given perimeter.
#include <Sparki.h>
#define LEFT 1
#define RIGHT 0
class CleaningRobot{
int pingThresh;
int lineThresh;
byte turnDir;
@mithi
mithi / patterns.ino
Last active August 29, 2015 14:24
drawing crazy patterns with arcbotics sparki
#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 August 29, 2015 14:24
code used to test the remote of sparki
// /------^-----\
// | |
// | 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 September 13, 2015 12:46
merging crazy patterns with IR
#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 July 9, 2015 10:02
serial test with Sparki by arcbotics
#include <Sparki.h>
void setup(){
}
void loop(){
Serial.print("Distance = ");
Serial.print(sparki.ping());
Serial.println(" cm");
@mithi
mithi / bluetoothSerialTest.ino
Last active August 29, 2015 14:24
testing bluetooth with sparki
#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 August 29, 2015 14:24
testing the bluetooth module with sparki
#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 August 29, 2015 14:24
serial command test with arcbotics sparki
#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 July 11, 2015 05:38
accelerometer display with processing and sparki by arcbotics
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(){