CMiYC Labs, Inc.

Projects and Ideas by J. Lewis

Entries for the ‘Tutorials’ Category

Arduino Exercise: Pull-Ups

When hooking up switches or buttons to an Arduino I/O pin, sometimes the results might appear completely random. Sometimes it will appear as though there is a delay from when the button is pressed until the state of the pin actually changes. Other times the pin’s value will seem to randomly fluctuate from HIGH to LOW. Even more maddening might be as your finger gets closer to the switch, the pin’s state changes!

The fix to these problems is simple: use pull-up resistors. Here’s how they can fix this problem and how you can use them with an Arduino board.

Detailed explanation…
(Read the rest of this entry…)

millis() Tutorial: Arduino Multitasking


Shortly after learning how to flash one LED, most new Arduino users move on to flashing two or more LEDs.

The millis() function is one of the most powerful functions of the Arduino platform. This function returns the number of milliseconds the current sketch has been running since the last reset. This may not seem to be highly useful until you consider it as a replacement for the delay() function. Now millis() itself cannot cause a delay, but you can use it create a virtual delay.
(Read the rest of this entry…)

LED Basics

Note… this page has moved to:  http://www.cmiyc.com/tutorials/led-basics/

Nearly ever consumer device makes use of the Light Emitting Diode (LED). This highly versitle device offers an easy way to add an indicator to any project, while drawing a relatively small amount of current. Once their operation is understood, adding them to any project is a simple task. This is an simplified explanation of how a LED works and how to select a current limiting resistor. The information here is enough to use LEDs in a project, but is not intended to be a through explanation.

(Read the rest of this entry…)