aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/jingle_bells/jingle_bells.pde4
-rw-r--r--src/virtual_sqrl/virtual_sqrl.pde10
2 files changed, 12 insertions, 2 deletions
diff --git a/src/jingle_bells/jingle_bells.pde b/src/jingle_bells/jingle_bells.pde
index d4d49bf..c54bba8 100644
--- a/src/jingle_bells/jingle_bells.pde
+++ b/src/jingle_bells/jingle_bells.pde
@@ -4,7 +4,7 @@
*/
#define LEDPIN 13
-#define OUTPIN 9
+#define OUTPIN 5
#define FREQ_A3 220.00
#define FREQ_AS3 233.08
@@ -113,6 +113,8 @@ void PlayMusicString(char* music, int outputPin){
void setup() {
+ TCCR1B = TCCR1B & 0b11111000 | 0x01;
+ analogWrite(9,12);
}
void loop() {
//Jingle Bells translated from sheet music at
diff --git a/src/virtual_sqrl/virtual_sqrl.pde b/src/virtual_sqrl/virtual_sqrl.pde
index c7b7e47..62e7efa 100644
--- a/src/virtual_sqrl/virtual_sqrl.pde
+++ b/src/virtual_sqrl/virtual_sqrl.pde
@@ -35,7 +35,7 @@ void setup() {
// Sets a starting volume
analogWrite(volumePin,defaultVolume);
- MsTimer2::set(10, handleLogic); // 10ms period
+ MsTimer2::set(1000, handleLogic); // 10ms period
MsTimer2::start();
// interrupt 1 = pin 3
@@ -84,6 +84,14 @@ void handleLogic() {
logicLock = 0;
}
+void chooseSpeaker() {
+ if(random(5) == 1) {
+ activeSpeaker = speakerTwoPin;
+ } else {
+ activeSpeaker = speakerOnePin;
+ }
+}
+
void motionOn() {
analogWrite(volumePin, 0);
if(TSL>200) {