5)...". ">



Arduino Programming Notebook

Winking two LEDs:

A first exercise. This is, of course, the “Hello World” of micro controller programming. Your Arduino probably came programmed to wink one LED, just as a quick “Is it working?” test. The material in this tutorial is not rocket science, but please read through it anyway. It covers some important foundation material. Click Here


A better program to wink two LEDs! What is a “good” program? Click Here


A few general points. In this short tutorial I mention a few “gotchas”. Click Here


Simple Counting on LEDs Click Here


Using the built in analog to digital converter with, as always, general points illustrated along the way. Click Here


Two little discourses:

Syntax is everything. Becoming a good programmer. Click here


A BIG tutorial:

This tutorial is big… sorry. It’s just that one thing kept leading on to another. In it you can learn…

  • what the “serial monitor” is. (You might as well know… you already have it!)
  • how to use the serial monitor. Try it; you’ll like it
  • one way to connect an LCD alphanumeric display
  • what the Arduino’s “map” function does…
  • and sundry incidental things crop up, too, for instance recommendations about pin usage!

Sorry the tutorial is so big, but it covers important ground. Along the way, we will make a pretty little LED flasher. The rate the lights flash is changed by turning a potentiometer. (“Volume control”, variable resistor.) Click here


If you only want a quick “How To” about connecting an LCD panel, there is a page for you about just that. Click Here


Using switches to send input to the Arduino:

At last! This tutorial opens the door to all sorts of things. It is the first of two about reading switches. It discusses the electronics in addition to the usual help with the programming issues. Click Here


A second tutorial about sending input to the Arduino using switches:

This tutorial extends the previous one. It also introduces the Boolean data type, Boolean variables, and Boolean operators. Click Here


Functions that return values:

We’ve met functions, but not functions that send a value back to where the function was called. Functions which return values are incredibly useful. This tutorial also discusses aspects of Arduino arithmetic, including the modulo function. Click Here


Using what we’ve done:

There’s not a lot of new “words” in this… but in it we put to use some of the things learned in earlier tutorials. We create a device to count two different events. “Switch bounce” gets further consideration, too. (Car overtaking counter example.) Click Here


FROM serial monitor TO Arduino:

Earlier we saw how messages could be passed from the Arduino to the IDE’s serial monitor. This tutorial shows you how to send things the other direction. Click Here


A flashing LED toy:

You can skip this one without missing the introduction of new concepts. However it is short, and yields a little “toy” which I hope is fun. It flashes its LEDs at a variable rate, which is altered by changing the setting on a potentiometer. The tutorial also tries to explain bottom up development. Click Here


Up/ Down counter. Switch bounce. Binary numbers:

You are finally getting rewards for your earlier work. This tutorial won’t be very taxing, it draws on things you know. It looks again at “switch bounce” (and does a better job than the first review of that topic!) And discusses things many students find puzzling about showing numbers in binary. Click Here


Compound Operators:

A brief discussion of an optional shorthand you may find useful. You may want to use it yourself, and you may need to be able to read it to understand what other people’s programs are doing. Click Here


Comparison Operators:

The various tests available to Arduino programmers when asking if something is true or false, e.g. “if (bTmp>5)…”. Click Here


No Comment

Post A Comment

error: Context Menu disabled!