This file contains 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 <RGBLED.h> | |
RGBLED myled = RGBLED(9,10,11); | |
int s0=3,s1=4,s2=5,s3=6; | |
int out=2; | |
byte flag=0; | |
byte counter=0; | |
int countR=0,countG=0,countB=0; | |
void setup() |
This file contains 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.*; | |
int yspacing = 16; // How far apart should each horizontal location be spaced | |
int h; // Width of entire wave | |
Serial myPort; | |
float theta = 0.0; // Start angle at 0 | |
float amplitude = 0; // Height of wave | |
float period = 500.0; // How many pixels before the wave repeats | |
float dy; // Value for incrementing X, a function of period and xspacing | |
float[] xvalues; // Using an array to store height values for the wave |
This file contains 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.*; | |
import ddf.minim.*; | |
Serial myPort; | |
char val; | |
int appear; | |
PImage spaceship; | |
PImage alien; | |
float centerX; | |
float centerY; |
This file contains 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
const int pingPin = 7; | |
long duration; | |
long cm; | |
char trigger; | |
void setup() { | |
Serial.begin(9600); | |
trigger = '2'; | |
} |