LED Cloud

The led cloud is a some cotton that is shaped to look like a cloud. Within the cotton is a a 48 wires shaped to look kinda like a tree. On the end of each branch of the tree, there is an LED, this is what makes the cloud light up.

Engineer

Miko

Area of Interest

School

Berkeley Carroll

Grade

Incoming Freshman

First Milestone

Here is the code

// NeoPixel Ring simple sketch (c) 2013 Shae Erisson
// released under the GPLv3 license to match the rest of the AdaFruit NeoPixel library

#include <Adafruit_NeoPixel.h>
#ifdef __AVR__
#include <avr/power.h>
#endif

// Which pin on the Arduino is connected to the NeoPixels?
// On a Trinket or Gemma we suggest changing this to 1
#define PIN 6

// How many NeoPixels are attached to the Arduino?
#define NUMPIXELS 3

// When we setup the NeoPixel library, we tell it how many pixels, and which pin to use to send signals.
// Note that for older NeoPixel strips you might need to change the third parameter–see the strandtest
// example for more information on possible values.
Adafruit_NeoPixel pixels = Adafruit_NeoPixel(NUMPIXELS, PIN, NEO_GRB + NEO_KHZ800);

int delayval = 500; // delay for half a second
const int sampleWindow = 50; // Sample window width in mS (50 mS = 20Hz)
unsigned int sample;

void setup()
{
#if defined (__AVR_ATtiny85__)
if (F_CPU == 16000000) clock_prescale_set(clock_div_1);
#endif
// End of trinket special code

pixels.begin();
pixels.show(); // Initialize all pixels to ‘off’

Serial.begin(9600);

}

void loop()
{
unsigned long startMillis = millis(); // Start of sample window
unsigned int peakToPeak = 0; // peak-to-peak level

unsigned int signalMax = 0;
unsigned int signalMin = 1024;

// collect data for 50 mS
while (millis() – startMillis < sampleWindow)
{
sample = analogRead(0);

delay(4);
if (sample < 600)
{
pixels.setPixelColor(0,pixels.Color(0,0,0));
pixels.setPixelColor(1,pixels.Color(0,0,0));
pixels.setPixelColor(2,pixels.Color(0,0,0));
pixels.show();

}

if (sample > 600)
{
pixels.setPixelColor(0,pixels.Color(0,255,0));
pixels.setPixelColor(1,pixels.Color(0,255,0));
pixels.setPixelColor(2,pixels.Color(0,255,0));
pixels.show();
Serial.println(sample);
delay (100);

}
if (sample < 1024) // toss out spurious readings
{
if (sample > signalMax)
{
signalMax = sample; // save just the max levels
}
else if (sample < signalMin)
{
signalMin = sample; // save just the min levels
}
}
}
peakToPeak = signalMax – signalMin; // max – min = peak-peak amplitude
double volts = (peakToPeak * 5.0) / 1024; // convert to volts

Serial.println(volts);
}

Starter Project

Hi I’m Miko, I’m a up coming freshman at bc. The starter project that i chose to make is the miniPOV 4. I chose this because is a really cool “toy” and while making it I learned how to solder and the basics of of putting together a small kit. So what it does is it creates a light painting in the air by using the persistence of vision effect. You do this by waving it around in the air in a dark room. The minipov 4 Runs on 3 AAA batteries, which is 4.5 volts.   2 capacitors filters out low frequency noise and stabilized input and output voltage Ceramic capacitor filters out high frequency noise and stabilizes the output voltage   This Blue knob – Potentiometer its a variable resistor which controls the input into the microcontroller, and the microcontroller controls the speed at which the LED’s blink. It also has 2.2k ohm resistors, which limit the current so that the miniPOV doesn’t short circuit. since, the microcontroller is too weak to power the LED’s on its own, it has three transistors to amplify the current, and each transistor is for a certain color, red, green, or blue.   One challenge I faced while constructing this was making sure each piece has its own bit of solder, and making sure not to bridge any solder.

Leave a Comment

Start typing and press Enter to search