Saturday, May 4, 2013

More Parts Arrive...

Next, the connector wires and the breadboard arrived. The connector wires are cool. Each wire rather than being solid wire or dipped in solder, are attached to a pin connector, plus all 40 wires are molded together like a ribbon cable, yet easily pulled apart.

But the breadboard...
Oops! when the description said "mini," it wasn't kidding. Note to self, "measure first, then order." There is no possible way to do anything with the diode matrix.

In the meantime, some basics for the kids. We talked about current and how if flows from one end of the power source, in this case a battery, through the circuit and back to the battery. We talked about diodes, since this is the first thing we would be utilizing. We especially talked about the fact that they will only allow the current to pass through in one direction.
To drive the point home we did a little experimenting with the Snap Circuits kit that my son got for Christmas. This includes some basic parts like a motor, 3 ICs, an LED, speaker, 2 types of switches, etc. We assembled a basic circuit that had a push-button to turn on the LED. Next, we replaced the LED with a light bulb. To make a point we turned the light bulb around and it still lit when we pushed the button. Then we put the LED back correctly, proved that it worked, then turned it around too. No light emitted when the button was pushed.

The Snap Circuit parts are really clever. First, they do have a genuine snap, like a winter coat would use, on the connection points of each part. Second, they have the schematic representation of the part on it. Now that they saw this, we could talk, at length, about the, much more complex, schematic for the LED array.

But, we still really wanted to get building something, anything, using the Arduino board. I found some LED replacement bulbs that belonged to set of Christmas lights that we had bought. 3 white LEDs, that's it. I took one of the LEDs out of it's plastic housing and placed the long wire (anode or positive) in pin 13 and the other wire (cathode or negative) went into GND (ground) right next to it. We powered up the board and the new LED blinked in time with the on-board LED since our sketch from last time was still on there. Next, I thought we could move the LED to another pin, and modify the sketch to alternately blink the on-board LED then the one that we just moved to pin 10. Just as a quick test, I changed the sketch to just blink pin 10 instead of 13, by changing the led variable to 10. Now, for the record, the anode is in 10 and the cathode is in 9. Compiled, downloaded, nothing. No lights blinked anywhere.

Times up, I have to figure out what to do about the ground. Yeah, I can move the LED to my teeny, tiny, breadboard and have the anode go to pin 10 and the cathode go to ground and all would be right with the world and the sketch. But, there is something that I'm missing...

No comments:

Post a Comment