From ArduinoInfo
Jump to: navigation, search

Terry King: Beginning outlines and information for/about SHED Magazine NZ


  1. LEVELS of INFORMATION: Could different Reader information be located in different available online locations?? More detailed information including Arduino Sketches (code) that might not fit elsewhere. What might go where?
    1. Print Issue(s)
    2. Online Digital Issue(s)
    3. SHED Website
    4. Arduino-Info WIKI
  2. How might "aside details" be handled?? This would be more detailed optional information that a reader might initially bypass but return to or read at once if interested in the details.
    1. Printed "Sidebar" or Box
    2. Footnote
    3. EndNotes (Possibly in more detail in Online edition?)
    4. Other online resource
  3. Approximately how many print pages would be "good" per article? Is this related to the amount of Graphical content?
  4. Might we arrange 2 or more "Testers" who would walk through an article (probably/possibly including the physical Arduino actions) before final article goes to bed? (Terry's Engineer Son and decidedly Non-Engineer wife might volunteer).. Others? Jude?
  5. What is the sensitivity/approach to the issue of "Mains Connected Devices"? Obviously quite a few Sheddies do this. Is there a policy? Disclaimer?
  6. How should the "Starter Set" be handled relative to the Article(s)


  • Bring the "New Tools" of Arduino Microcomputers and Electronics to the SHED audience
  • Engage both "Never Before - Electronics" readers and "More experienced" readers with a body of Information and How-To that leads quickly to hands-on learning and "I can do that" experience.
  • Leverage and fit into the Kiwi Ingenuity culture of lateral thinking and problem solving.
  • Lead into and showcase non-trivial Shed-related projects that advance the level of usefulness and capability of Sheddie-originated solutions and inventions.

Possible Statement: "These articles will not give you every recipe or all the answers, but they will give you the tools you can use to bend Arduino and Electronics into the shape that you need to build your own projects."

" We will get to as much detail as you want, but we will 'take it as we need it' ".


NOTE: This is only an Outline!

What can you do with Arduino? [Graphic here?]

  • OUTPUTS: You control things in the real world like lights, motors, beepers, heaters, etc.
  • INPUTS: You monitor sensors that tell you about light, temperature, button presses and many more.
  • SKETCHES: You write statements (code) that make decisions about what Outputs to change, based on Inputs, and sometimes Time.

Getting Started:

  • How-To download and install the free open-source Arduino software
  • How-To connect an Arduino and check that it is recognized properly
  • How-To load your first Arduino Sketch [Graphic of menus]
  • A Blinkin' LED: just a place to start

Breadboard- Connecting your own wires and devices:

What's Happening?

You are turning a Digital Output ON and OFF. What it is connected to and what it Does is up to you.

  • Connect a Buzzer and control it
  • Connect a Relay Board. It has an LED inside it that turns the Relay on and off, so it's much like your first LED connection.
  • Change the timing of the Relay turning on and off.
  • Add a connection and add software commands to your Sketch to control a second relay on the relay board.
  • Connect something to the Relay Contacts and control THAT.

NOTE: This brings up the "Mains Connected Device" issue. An easy example here would be to control a desk lamp, or an outlet. Perhaps we could 'require' that readers only connect via a "Ground Fault Interrupter" {? NZ Terminology?} so that any human contact with a 'live' wire will cause a shutdown. Alternative: control a 12 volt lamp or device if reader has some source of battery power?

Next - Digital Inputs:

The true power of Arduino is its ability to monitor the real world through Sensors [concept]. Sensors may be as simple as a push-button switch or as complex as an Inertial Navigation system with electronic Gyroscopes and Accelerometers. Let's start with the switch.
  • Install a push-button switch on the Breadboard
  • Connect the switch and a Pull-down Resistor [Concept] to Arduino.
  • Learn the Software Statements for Digital Inputsand make your switch control some Output Devices:
    • LED
    • Buzzer
    • Relay
  • Replace the push-button switch with a Light Sensor and see how changing light can control things.



PINS... BITS... ONES and ZEROS... HIGH and LOW...</span>

... YOU NEED TO KNOW!!</span>

We have been throwing a lot of terms around, and it's time to get them straight:

A Significant rewrite of this:

NOTE: Need to assess where to stop with this first article. MAYBE here, or maybe after talking about the ANALOG world:

Analog Inputs:

OK, those Digital Inputs and Outputs are only (High-One-ON or Low-Zero-OFF). But many of the interesting things are not like that. They can have a Range of Values, like Temperature for example. Time to figure them out.

  • Connect a Potentiometer from +5V High Rail to 0V Low Rail, with it's center connection to A0.
  • [Graphic] potentiometer can sweep across the range from 0V to 5V.
  • Add software statements to sense the potentiometer Analog Input, and display them on your main computer.
  • Turn the potentiometer across it's range and see the changing values that are received. The range of values is 0 to 1023 [concept].
  • Replace the potentiometer with the light sensor and a pulldown resistor. Cover the light sensor with you hand and see the different Analog values that are received. Perhaps tape the sensor on a window that is dark at night and watch the values change as night falls. Decide what value you would want to use to turn the lights on.

Analog Outputs:

So far we have only been able to turn things ON or OFF with Digital Outputs. What if we want to make an LED dimmer or brighter, or control the speed of a motor? We need Analog Outputs.

  • Connect your LED like you did way back at the beginning. Run the Good Old Blink Program.
  • The LED is ON for 1 second (1000ms) and OFF for 1 second. Change it to 100ms for both ON and OFF. It's only on 1/2 the time.. why doesn't it look dimmer??
  • Change the delay values to 50, then,20, then 10, then 5. At what speed does the LED seem to be on steady with no flickering?? [Persistence of Vision]..
  • Remove the delay statements and use analogWrite [details] to control the brightness of the LED. Try ON only 10% of the time. Can you still see it? 1%?
  • Use the fade example from the Arduino software Examples folder.
  • [Now?? Later: use the RGB tri-color LED to make many changing colors]

Digital Signals:

There is one more very important kind of Input and Output that Arduino can do. This is to communicate with more complex devices by sending and receiving Digital Signals. This can be relatively simple, like the Temperature sensor we will connect in a minute, or quite complex, like running an Ethernet interface that puts your Arduino on the Web as a server of information. Complex functions like that can take many hundreds of lines of 'code' to write.


Fortunately, you don't have to write your own complex code to use many interesting devices, because other people have already figured it out and are sharing it with you by putting it in an Arduino Library. We will install the library to talk to the DS18B20 Temperature Sensor [?that's in your starter kit], and make it work.
  • Find the "library" folder in your Arduino software install
  • Download and "UnZip" the DS18B20 library. It will create a folder with several things inside it.
  • Copy that folder inside your library folder
  • Download or cut-and-paste the Temperature Test Program
  • [Rewrite of:]
  • [outline of the communications to the low-cost temperature sensor]

Conclusion and further resources:

  • Review of the concepts and terminology: pointer to Glassary
  • [Possible 'culminating project example??]
  • Short outline of following article(s)
  • Pointers to additional online resources
  • Request for feedback