11 December 2019

Damian the Dreamkeeper

For my final project, I invited a little monster named Damian into existence. He wants to hear your dreams, and in exchange he'll share someone else's dream with you! The dreams he shares are randomized from those he's heard, and so there's a possibility someone else will hear your dream later. Share whatever dreams you want, even if they're a little weird - Damian's a monster so he's seen some... stuff. No judgement! Maybe you'll hear a dream from someone else that inspires you or at least helps you feel a little less alone.


As always,
CapriciousClockwinder2345620 + Toupe4
(no ledge)

PS I'd be delighted to know if you've found meaning in our names, and if you have any answers.

10 December 2019

Robo Arm Game

For my final project, I wanted to make a unique dungeon crawler like game that was played by two people on an LED matrix attached to a robotic arm.

Unfortunately that all didn't work out, but the result is a playable match the sequence game you can play with a friend and keep track of high scores. This isn't the end of Dungeon Arm Game quite yet! I will be working on a new version shortly that will be closer to my initial plans for this game.

I go over my reasons for making this game in the video and enjoy a clip of Cam and Lea playing it.

https://youtu.be/5cFgCl2A6fs

If you can't watch the video yet it will take a while to upload. I decided to make a 4K 60FPS video for this for some reason.

Maze Cube

For my final project I decided to create a maze cube to merge technology with mind puzzles and create an object that people can interact with while exercising their brains. The cube is made out of a 3D printed box, 5 RGB LED Flexible Neopixel Matrix, an Arduino Nano Every, a GY-521 with MPU6050 sensor module, and 3 C Alkaline batteries. Once the cube is turned on, the maze lights up and the user travels through it by moving the box in the direction they wish to go.

I have designed this cube to allow for future additions. I would like to expand the maze to be randomly generated each time the cube is turned on. Additionally, I included a button to provide the selection of different levels, adapting the game to the user’s skills and abilities so that everybody can play.


09 December 2019

Seasons of the Year


For this project, I used one PN 532 NFC to read all of the 19 RFIDs that are attached to either a character or an object. I also used the Adafruit Music shield, two speakers, one ELEGOO UNO, and on/off power switch. Glowforge lazier cutter was used to cut all the characters, objects, instruction board and top board.
 

Final Project: Enchanted Harp of the Fae

REQUIREMENTS:
  • Project must be interactive.
  • Project must use an microprocessor running code written by you.
  • Project must include a soldered circuit board or shield.  You may use header pins and other connectors (JST, headphone jacks, barrel jacks, etc) to preserve your components.  You cannot use a breadboard in your final project (though you can of course use it during the design process).
  • Project must be housed in an enclosure of some kind.  The electronics should not be exposed (unless that is a meaningful part of your design, discuss with professor).  The enclosure, or parts of it, may be 3D printed, but does not have to be.
  • Your project may use other shields and sensors that we have not covered in this course, but use your judgment.  The professor may not be able to assist you with things he has never used before.
  • Your project may communicate back to a computer running other software, but doesn't have to.
MATERIALS USED:
  • 1x 5v Power Source 
  • 1x Auxilary Cord
  • 1x Arduino UNO
  • 1x Adafruit WAV Trigger
  • 1x RGB LED
  • 2x metal keyrings
  • 2x latch buttons
  • 4x custom switches
  • 1x custom built wooden enclosure
  • 1x Incarcerated Fairy
  • A lot of aluminum wire
  • A lot of insulated wires
  • A lot of hot glue
  • A lot of soldering material
  • And a lot more...!





The Enchanted Harp of the Fae
(+2 charisma when in inventory)


I was debating cropping this, but if anything
I'm proud of the abducted cactus my friend painted for me


For my final project, I decided to dive in and dedicate all my energy to creating an interactive, audio-based prop. The result is as seen above: a wooden conglomeration of metal, electricity, blood, sweat, and tears that can be played by just about anyone.  

The project itself includes an Adafruit Wav Trigger, an Arduino UNO, an RGB LED, 4 custom switches, two buttons, a ton of wires, and an accelerometer to expand functionality of the Arduino. There's also a lot of fire and brimstone soldering inside with two key rings acting as power/ground hubs. At the moment, there are four modes:
  • Default: Plays short bursts of music
  • Looped: Plays track, and then loops it
  • Effects: Plays short sound effects
  • Experimental: Plays random tracks*
 * Random as in chosen by the fairy in the harp, of course
It's worth noting that while the experimental branch-- activated by pressing two latch mode buttons-- currently plays random tracks on the wav trigger, future plans would involve programming a better system that allows for active song creation via a music making program.


  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
/*************************************************
 * Pin / Library Setup
 *************************************************/

#include <SoftwareSerial.h>
#include "Adafruit_Soundboard.h"
#include<Wire.h>


// Accelerometer / Gyro

const int MPU_addr=0x68;
int16_t AcX,AcY,AcZ,Tmp,GyX,GyY,GyZ;

// WAV TRIGGER

#define SFX_TX 11
#define SFX_RX 12
#define SFX_RST 10

SoftwareSerial ss = SoftwareSerial(SFX_TX, SFX_RX);
Adafruit_Soundboard sfx = Adafruit_Soundboard(&ss, NULL, SFX_RST);

// RGB LED

const int blueLED = 6;
const int greenLED = 5;
const int redLED = 3;

// MODE BUTTONS

const int bgModeButton = 8;
const int fxModeButton = 9;

// BUTTONS

const int b1 = A0;
const int b2 = A1;
const int b3 = A2;
const int b4 = A3;

// LOGIC VARIABLES

int stateOfBoard = 0;
int loopingTrack = 0;
int fairySongs[] = {6,4,2,9,3};
boolean fairyIsAwake = false;
boolean isLooping = false;
char oldMembraneKey;

/*************************************************
 * Initial Startup
 *************************************************/

void setup() {
  
  // COMMUNICATION
  // Serial, sfx, and accelerometer, respectively
  
  Serial.begin(9600);
  
  ss.begin(9600);
  
  Wire.begin();
  Wire.beginTransmission(MPU_addr);
  Wire.write(0x6B);
  Wire.write(0);
  Wire.endTransmission(true);
  
  // SET PIN MODES
  
  // leds
  pinMode(redLED, OUTPUT);
  pinMode(blueLED, OUTPUT);
  pinMode(greenLED, OUTPUT);
  
  // buttons
  pinMode(bgModeButton, INPUT);
  pinMode(fxModeButton, INPUT);
  pinMode(b1, INPUT);
  pinMode(b2, INPUT);
  pinMode(b3, INPUT);
  pinMode(b4, INPUT);
}

/*************************************************
 * Loop
 *************************************************/

void loop() {

  // Checks if harp is picked up
  moveThatFey();
  
  // Control Mode & Settings
  setMode();

  // Change LEDs and Sounds based on setMode() feedback
  modeHandling();
  ledHandling();

  // If in loop mode, enable looping
  loopThatBg();
  
  delay(5);
}

/*************************************************
 * My Functions
 *************************************************

+++ TABLE OF CONTENTS +++

1.0 // State Logic
2.0 // LEDs
3.0 // Looping
4.0 // Other

*/

// 1.0 STATE LOGIC

// change board mode or "state"
// Uses larger buttons located near base
void setMode() {
  int bgModeState = digitalRead(bgModeButton);
  int fxModeState = digitalRead(fxModeButton);
  
  // mode selection
  // EXPERIMENTAL MODE
  if (fxModeState == HIGH && bgModeState == HIGH) {
    stateOfBoard = 3;
    isLooping = false;
  // FX MODE
  } else if (fxModeState == HIGH) {
    stateOfBoard = 2;
    isLooping = false;
  // LOOP MODE
  } else if (bgModeState == HIGH) {
    stateOfBoard = 1;
    isLooping = true;
  // DEFAULT, NON LOOP MUSIC
  } else {
    stateOfBoard = 0;
    isLooping = false;
  }
}

// depending on mode, play certain sound list
// case 3 is special, activates looping
void modeHandling() {
 int b1State = digitalRead(b1);
 int b2State = digitalRead(b2);
 int b3State = digitalRead(b3);
 int b4State = digitalRead(b4);
 
 switch (stateOfBoard) {
  // NON LOOP: WHITE
  case 0:
    if (b1State == HIGH) {
      sfx.playTrack(4); // project k ish
    } else if (b2State == HIGH) {
      sfx.playTrack(2); // medieval entry
    } else if (b3State == HIGH) {
      sfx.playTrack(6); // happy tune
    } else if (b4State == HIGH) {
      sfx.playTrack(3); // march
    }
    break;
  // LOOP MODE: BLUE
  case 1:
    if (b1State == HIGH) {
      sfx.playTrack(4); // project k ish
      loopingTrack = 4;
    } else if (b2State == HIGH) {
      sfx.playTrack(2); // medieval entry
      loopingTrack = 2;
    } else if (b3State == HIGH) {
      sfx.playTrack(6); // happy tune
      loopingTrack = 6;
    } else if (b4State == HIGH) {
      sfx.playTrack(9); // medieval entry
      loopingTrack = 9;
    }
    break;
  // FX MODE: RED
  case 2:
    if (b1State == HIGH) {
      sfx.playTrack(1); // magic fx
    } else if (b2State == HIGH) {
      sfx.playTrack(9); // harpsichord
    } else if (b3State == HIGH) {
      sfx.playTrack(5); // monster
    } else if (b4State == HIGH) {
      sfx.playTrack(3); // march
    }
    break;
  // EXPERIMENTAL MODE, PURPLE (RANDOM)
  case 3:
    int fairyChoice = random(0,4);
    sfx.playTrack(fairySongs[fairyChoice]);
    break;
  default:
    break;
 }
}

// 2.0 LEDS

// depending on state of board, change LED
// Fade in over short time
void ledHandling() {
  turnOffLEDs();
  switch (stateOfBoard) {
  case 0:
    digitalWrite(greenLED, HIGH);
    digitalWrite(redLED, HIGH);
    digitalWrite(blueLED, HIGH);
    break;
  case 1:
    digitalWrite(blueLED, HIGH);
    break;
  case 2:
    digitalWrite(redLED, HIGH);
    break;
  case 3:
    digitalWrite(redLED, HIGH);
    digitalWrite(blueLED, HIGH);
    break;
  default:
    break;
  }
}

// turn off LEDs on state change
void turnOffLEDs() {
  digitalWrite(redLED, LOW);
  digitalWrite(greenLED, LOW);
  digitalWrite(blueLED, LOW);
}

// 3.0 LOOPING

// stop loop if mode is changed
// disables loop for 1st and 3rd mode
void pauseAndStopLoop() {
  isLooping = false;
  loopingTrack = 0;
  sfx.stop();
}

// loop sound if mode 2
void loopThatBg() {
  if (isLooping == true && loopingTrack != 0) {
    sfx.playTrack(loopingTrack);
  }
}

// 4.0 OTHER

void moveThatFey() {
  // Get Data from Accelerometer
  Wire.beginTransmission(MPU_addr);
  Wire.write(0x3B);  
  Wire.endTransmission(false);
  Wire.requestFrom(MPU_addr,14,true);  
  AcX=Wire.read()<<8|Wire.read();      
  AcY=Wire.read()<<8|Wire.read();  
  AcZ=Wire.read()<<8|Wire.read();  
  Tmp=Wire.read()<<8|Wire.read();  
  GyX=Wire.read()<<8|Wire.read();  
  GyY=Wire.read()<<8|Wire.read();  
  GyZ=Wire.read()<<8|Wire.read();  
  int mapMovement = (map(AcZ, -10000, 10000, 0, 100));
  mapMovement = -mapMovement;
  Serial.println(mapMovement);
  
  if (-1 * mapMovement > 20) {
    if (fairyIsAwake == false) {
      fairyIsAwake = true;
      sfx.playTrack(1);
    }
  }
}

/* For testing only
void variableTest() {
  Serial.println("state of board is:"+stateOfBoard);
  Serial.println("fx button is:"+fxModeState);
  Serial.println("bg button is:"+bgModeState);
  Serial.println("b1 is:"+b1State);
  Serial.println("b2 is:"+b2State);
  Serial.println("b3 is:"+b3State);
  Serial.println("b4 is:"+b4State);
  Serial.println("b5 is:"+b5State);
}

And with that, I go to sleep, like many of my fallen finals comrades before me.

Final Project: SafePhone


There are, on average, more distracted driving accidents that occur that lead to death in the United States than any other type of accident occurrences. According to the Federal Communications Commission (FCC), nine people are killed and 1,000 are injured in distracted driving related accidents every day in the United States.

For my final project, I made a game that will encourage drivers to leave their phones in the cell phone holder while they drive. (Note: My original idea included an LCD Display but while working with it, it decided to stop working.)

 If the driver stays at least 21 cm away from the device, they will receive 1 point every 10 seconds but if they get within 19 cm of the phone, the program will deduct 10 points from their total point value.

The hall effect sensor detects if there is a magnet present and the Sharp IR sensor detects if the driver gets close to the cell phone.
The idea is for the driver to be able to claim social media credit with their friends and help them become aware of their role in safe driving.

Materials:                                                                                           Programs:
Car Phone Holder                                                                               Tinkercad
Arduino Mega 2560                                                                            Arduino
Arduino Mega 2560 Case                                                                   Ultimaker Cura 4.4
3-D Printed Cable Box
3-D Printed Hall Effect Sensor Box
Apple Barrel Black Paint
Hot Glue
Jumper Wires
Hall Effect Sensor
Sharp IR Sensor