This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <Sparki.h> | |
#define LEFT 1 | |
#define RIGHT 0 | |
class CleaningRobot{ | |
int pingThresh; | |
int lineThresh; | |
byte turnDir; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <Sparki.h> | |
class Patterns{ | |
public: | |
Patterns(){ | |
} | |
void turnSignal(){ | |
int colors[3][3] = {RGB_RED, RGB_BLUE, RGB_GREEN}; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// /------^-----\ | |
// | | | |
// | 69 70 71 | | |
// | 68 64 67 | | |
// | 7 21 9 | | |
// | 22 25 13 | | |
// | 12 24 94 | | |
// | 8 28 90 | | |
// | 66 82 74 | | |
// \____________/ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <Sparki.h> | |
class Patterns{ | |
public: | |
Patterns(){ | |
} | |
void turnSignal(){ | |
int colors[3][3] = {RGB_RED, RGB_BLUE, RGB_GREEN}; | |
sparki.beep(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <Sparki.h> | |
void setup(){ | |
} | |
void loop(){ | |
Serial.print("Distance = "); | |
Serial.print(sparki.ping()); | |
Serial.println(" cm"); | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <Sparki.h> | |
void setup(){ | |
Serial1.begin(9600); | |
} | |
void loop(){ | |
Serial1.print("Distance = "); | |
Serial1.print(sparki.ping()); | |
Serial1.println(" cm"); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#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()); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#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(){ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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(){ | |