Posts

Showing posts from January, 2009

Dark sensor

Image
This is really a test of a light sensor, or Light Dependent Resistor (LDR). I got one of these with my prototyping kit from Adafruit and figured I should learn how to use it. There is actually a much more useful article on  Libelium that shows how to hook it up more clearly and even gives schematics.  The 5v is dropped a bit with a 1k resistor. The LDR is dropped into ground with the other end sitting between the dropped 5v and one of the analog ports. As voltage varies through the LDR the analog port sees the difference and reports it.  In my code whatever is found on the LDR/analog port (0-1023) is translated into a number of LEDs to light. The lower the value - or less resistance to ground - presented by the LDR shows up as a lower value on the analog port. This means less LEDs lit. The higher the values and the more LEDs are lit.  I built several versions of this setup, but the one pictured is the last version. It uses 9 LEDs I took from a Christmas light string I got from Gerten&

Triple Axis Accelerometer

Image
Another post-holidays item I ordered from SparkFun was a triple-axis accelerometer (MMA7260Q). This was probably the most expensive item in my order and the one I was the most twitchy about working with. If I wrecked it - soldered it wrong or fed it too much voltage - well, that was $20 gone.  What I got was fairly easy to work with, though. SparkFun pre-mounts the chip onto a breakout board for convenience. From there all I had to do was solder on some headers so I could slot it into a bread-board. SparkFun frequently provides a link to the datasheet PDF, which helps with some of the basics of what each given item's specs, limitations are - what it can do. They also provided another helpful link to Tom Igoe's site to a page describing the MMA7260Q. The data sheet was helpful, but Tom Igoe's description was more so. This description didn't discuss using it with the Arduino specifically, but I could infer enough to get things going. Once I had the break-out soldered, I

Seven segment LED

Image
Over the holidays when gift giving was over and I could spend money again (don't ask), I made an order to both Adafruit and Sparkfun. From the latter I ordered a number of things (in later blogs) including 4 seven-segment LEDs. I mean, c'mon - they were only 95 cents.  Using my Arduino Duemilanova and protoyping kit I got one of these things working. I could display 0-9 and then turn off at the touch of a button. In the interest of sharing, here are my notes. The image shows the finished product. A prototyping shield on top of my Duemilanova. On that is one of my single 7 segment LED (SparkFun COM-08546). The unit has 10 pins coming out of the back of it - 5 on top, and five on bottom. They fit nicely into a breadboard.  Eight of the pins are used to control the segments - one of those being the decimal dot to the right of the number. There is a dot to the left of it, but it doesn't do anything. One of the pins - dead center at the top - accepts voltage. According to the sp

Introduction

Image
I've never had a blog before, and for that matter, never had a reason. Now I do, or at least now I want to get some things down before I forget. If any of this winds up being useful to other people, great. If not, well, I've got notes out in the cloud I can get back to from anywhere. It has come to my attention that computers are better at remembering things than my own brain - more on that later... For a while I've had a number of ideas regarding various gadgets I wanted to build. Most of these gadgets are of an electronic nature. I am a Software Engineer by trade. While I've got 15+ years of experience programming in various languages, I've got little or no experience with electronics. This has, until recently, stopped me from acting on any of these ideas. With software you can debug and you can try again with little or not consequences. With electronics sometimes if you make a mistake you can fry a component - and you're out real money. I hadn't gotten in