Lylly Hoang
Created January 28, 2020

Beep-Boop UFO

Crank the dial up and purple lights flash! Various beeps sound! To turn off the UFO, simply crank it all the way down!

20
Beep-Boop UFO

Custom parts and enclosures

Video Demo

Schematics

Stage of Development

Stage of Development

Stage of Development

Stage of Development

Final Product

Code

Untitled file

Arduino
This is the "Beep-Beep UFO". It's a make-shift, alien, unidentified flying object that has the ability to light up and make various sounds (beeps) when it's on. The user turns the dial (potentiometer) at the very top of the UFO to turn it on/off. The sounds are meant to mimic what a tractor beam might sound like during some sort of alien abduction. Any object can be placed inside the beam, in this case, I chose a duck.
This code triggers the 10 neopixel LED lights on the playground circuit board express. A potentiometer is connected to the circuit board and when the analog read serial is under 10, no sound plays and no lights are on. When the dial is above 10, sounds play and purple lights flash. Depending on how much the dial is cranked, different frequencies play and more lights flicker. The higher the reading, the higher the frequency and amount of lights (and vise versa).
#include <Adafruit_CircuitPlayground.h>
uint16_t value;
uint8_t pixels;
uint16_t freq;

void setup() {
  Serial.begin(9600);
  CircuitPlayground.begin();
}
void loop() {
  value = analogRead(3);
  pixels = map(value, 0, 1023, 0, 10);
  freq = map(value, 0, 1023, 100, 10000);

   CircuitPlayground.playTone(freq, 50, false);

  CircuitPlayground.clearPixels();
  for (int p=0; p<pixels; p++) {
    CircuitPlayground.setPixelColor(p, 0xFF00FF);
  }
  delay(50);
}

Credits

Lylly Hoang
4 projects • 0 followers

Comments