Show Posts
Pages: 1 ... 12 13 [14] 15 16
196  Forum 2005-2010 (read only) / Exhibition / Re: firefly night light on: November 06, 2009, 11:12:08 pm
I don't mind at all.  I don't consider this thread hijacked.  If there are other thoughts about how to make it more realistic or interesting in some way, I welcome the input.  What you're suggesting, however, is a little beyond me at this time.  I'm interested in seeing how your variation comes out, though.  Please keep me posted.
197  Forum 2005-2010 (read only) / Exhibition / Re: firefly night light on: November 06, 2009, 09:22:09 pm
There is a call to randomly choose which LED to light.  There is also a call to randomly choose how long to wait between blinks (from 1/2 second to 4 seconds).  Another call chooses how long the blink will last--this is the blink value.  It will wait for a few milliseconds between incrementing the time "i".

You can play around with any of these values to get the affect you want.  If you don't want a fade to black between the two values, you can change the blink delay value to 0.  They would immediately light one after another.  Does this answer your question?
198  Forum 2005-2010 (read only) / Exhibition / Re: firefly night light on: June 16, 2009, 06:08:37 am
I was just brain storming and thought of a way to use all of the outputs on my Arduino for fire flies.  I could use one PWM output to control the fade rate of the LED.  All other outputs would be tied to transistors and LEDs.  I would wire them as common Anode so that I could light any one of 19 fire flies, instead of only 6.  Basically, I'd be multiplexing the outputs.
199  Forum 2005-2010 (read only) / Exhibition / Re: firefly night light on: June 16, 2009, 06:01:26 am
I haven't decided exactly what the end result should look like.  The bugs in a jar is good, and I've seen some video of it.  I had also thought of getting a small sheet of wood or something and then putting the LEDs through holes in that.  I'll post some more pictures and/or video when I've figured it out.
200  Forum 2005-2010 (read only) / Exhibition / Re: firefly night light on: June 15, 2009, 09:50:11 pm
Here's the video.  Please give me your comments.

[media]http://www.youtube.com/watch?v=NIoIsmw5_gc[/media]
201  Forum 2005-2010 (read only) / Exhibition / firefly night light on: June 15, 2009, 07:13:01 am
I've written a program to "look" like fireflies blinking in my kid's room.  It's a pretty simple program and I had a little help, but it works pretty well.  I thought I'd share with anyone who enjoys seeing them in the summer.  They started coming out about a week ago in central Indiana.  have fun.
I used the PWM outputs and a cosine function to vary the duty cycle for a smooth increase and decrease in brightness.

Code:
/*This sketch is intended to approximate the blinking of fireflies.  It varies the delay between
blinks and varies the total blink time.  I've used the random() function to vary which PWM  output
is chosen for the next blink.
Hope you get some enjoyment out of it.  I created it as a fun night light for my kids.
Chad Richardson -- Chad@ChadsCustomWood.net
*/


int value;
int pwmPin = 11;                    // light connected to digital pin 11-- I just chose an initial value
//int ledpin2 = 9;
long time=0;
int period = 500;
int i = 0;
long blink_delay = 1000;            // these must be declared as long due to the random() operation
long blink = 3;
long random_led = 55;
const byte pwmPins [] = {3, 5, 6, 9, 10, 11};

void setup()
{                                    //nothing to setup
}

void loop()
{
  choose_firefly();
  fade();

  blink_delay = random(500, 4001);
  delay(blink_delay);  
  blink = random(2, 5);  
  
}
void fade()
{
  for(i=0; i<255;)
  {
    time = i;
    value = abs(-127+127*cos(4*PI/period*i));            //the -127 value shifts the cosine curve negative with a zero initial value; abs shifts everything positive
    analogWrite(pwmPin, value);           // sets the value (range from 0 to 255)
    delay(blink);
    i++;
  }
}

void choose_firefly()
  {
    pwmPin = pwmPins [random (0, 6)];  
  }
202  Forum 2005-2010 (read only) / Exhibition / Re: Analog keyboard-7buttons for only an analog input on: February 10, 2010, 12:33:08 pm
I toyed with the idea of doing this.  I even went so far as to work up an Excel spreadsheet to calculate values and voltages so you could choose what size resistors you wanted.  It's still a manual process, but you can see the expected voltages when you push a certain button.  I was trying to maintain a fairly equal separation in voltage between each of them.  If you'd like the spreadsheet, PM me and I'll e-mail it to you.
203  Forum 2005-2010 (read only) / Exhibition / Re: Wi controlled Lego gun turret on: January 23, 2010, 03:32:06 pm
That's a cool project.  Are you controlling with the accelerometer?  Are you able to use the stick, if you preferred?  I've been thinking about maybe building a jog control for my cnc using a nunchuck.
204  Forum 2005-2010 (read only) / Exhibition / Re: My homebrew LCD shield on: April 12, 2009, 07:50:08 pm
Thanks, it's been extremely helpful for my project.  My brother is an amateur photographer and wants to take high-speed photos of water droplet splatters, etc.  The plan, which is about half-way there in software, is to manually set a delay time, arm the trigger, trigger the micro, count down for the user-specified time, and shoot the photo.  These darned things are $1,000+ USD.  We plan to share when it's finished.
205  Forum 2005-2010 (read only) / Exhibition / Re: My homebrew LCD shield on: April 11, 2009, 07:54:18 pm
Sorry, I've been gone for a few days.

I only bent the pins 8-13.  If you were to only install the analog pins and digital pins 0-7, they all line up fine with each other (0.1" spacing).  Pins 8-13 are the ones that are offset by an odd amount.
206  Forum 2005-2010 (read only) / Exhibition / Re: My homebrew LCD shield on: April 07, 2009, 06:17:27 am
Thanks for the link.  That is a pretty decent board and the price is pretty good too.  That's very much like what I've been thinking about.
207  Forum 2005-2010 (read only) / Exhibition / Re: My homebrew LCD shield on: April 06, 2009, 07:10:57 pm
The board I used has standard spaced holes, so I bent the pins on one set so that they would line up.  I don't have pictures of that.  It would be nice if there were some circuit boards that were drilled for arduino so anyone could build a prototype thing-a-ma-jig like this on their own.
208  Forum 2005-2010 (read only) / Exhibition / My homebrew LCD shield on: April 06, 2009, 06:21:22 pm
I have posted a few pictures of my homebrew LCD shield.  It isn't as pretty as I would like, but it is pretty good for a first try.  The LCD has male pin headers on it that plug in to the board.  I can install a new on easily if, for some reason, I should kill this one.

I connected a couple of female inline headers to allow access to the digital pins that are not being used by the LCD.  A future version might have a full row of inputs, rather than just the remaining ones.

There are 6 buttons.  One is a reset button while the other 5 are used with the analog inputs.  I turn on the internal pull-ups in the Arduino when I use the buttons, which are connected to ground.  When I'm not using the buttons, I still have access to the power and analog input pins via a female inline header.  As long as you don't press a button, you don't interfere with the inputs while you're in analog input mode.

This should provide a nice platform for working with inputs while employing a human readable interface at the same time.

Check out my picures:

http://www.flickr.com/photos/flyboy19/sets/72157616348500003/
209  Forum 2005-2010 (read only) / Frequently-Asked Questions / Re: How to calibrate a thermistor? on: January 28, 2010, 08:00:08 am
Why not use 2 thermistors.  One would be of known type and characteristics.  The other would be the thermistor under test.  You could have a couple of baths set up in styrofoam cups.  Put each pair of thermistors in the cup, let them stabilize and then take measurements.  I'd think that after 3 or 4 different temperature readings, you should have a reasonable idea of what the curve should look like.  The wider the gap from least to greatest, the better, of course.  Mainly, I'm thinking that you could compare the unknown thermistor to different thermistor charts to determine which one you have.  I know this isn't the automated test you would like to have, but at least you would have something to run with.

If you were to plot several thermistor curves in a spreadsheet and then plot the points you measure from your unknown thermistor, you could do a visual curve fit and a little SWAG to determine the thermistor.
210  Forum 2005-2010 (read only) / Bar Sport / Re: Duemilanove made in China on: January 17, 2011, 07:52:55 pm
When someone doesn't even have the decency to rename their product after ripping it off of an open source design, they probably aren't worthy of your money and business.  There are all sorts of clones out there with their own name.  I have respect for those guys, but personally, I really like the guys with the original idea.  I reward them with my business, no matter how small I may be.  Chinese Arduino...NO, I wouldn't buy anything from them.
Pages: 1 ... 12 13 [14] 15 16