Introduction to the Arduino by Clive G4NAQ

Following a talk at the club and some interest from members this page shows details of the talk on Friday 18th Nov 2016 along with code (sketches) relating to the four demonstrations. The presentation slides cover the following topics: -

  • What is a microcontroller?
  • What is an Arduino?
  • Current Models of Arduino
  • Sensors / Shields
  • Kits
  • Arduino Development Environment
  • Programming the Arduino
  • Compiling Sketches
  • Demonstration Projects
  • A Club Project
  • Amateur Radio and the Arduino
  • Useful Books & Links

The slides from the talk can be downloaded here: -  Introduction to the Arduino Microcontroller

The demonstration projects were written to highlight how you work with simple code to make useful projects either radio related or for in the home.  Project code has been made available as PDF file and as an INO file if you want to use it with the Arduino IDE or other editor.  No guarantees are provided with this code and feel free to modify it or advise me of coding issues!

Project 1 - Temperature & Humidity Sensor

Temperature & Humidity sensor

This is the basis of what could be used as a weather station but just using 1 dual function sensor. To complete this project you would need to add additional sensors which typically are all part of the kits available today and add a display to make it self contained.

The demonstration showed this working with an Arduino Nano which is one of the smaller boards but still has sufficient capacity to support this type of project.

Project Demo 1 PDF format  Project Demo 1 INO format     

Project 2 - House Alarm PIR Sensor

PIR and Ultrasonic sensors
This project demonstrates the 3 components typically found in a house alarm movement sensor and uses a PIR to detect the presence of an object, an LED to show the detection has taken place and also ultrasonic sensors which measures the proximity. This was the first Arduino I purchased and it never had the useful header pins which can be seen on the newer models so an I/O shield is connected to provide the connections.
This demonstration was built around an Arduino UNO R3 but again would function on a Nano or other models.

 Project Demo 2 PDF format Project Demo 2 INO format

Project 3 - Morse Code Tutor

Morse Tutor
The project was built to mimic the original Morse tutor developed by Datong around 20 years ago. The four position switch enables the choice of the alphabet, numbers, mixed alphabet and numbers or punctuation characters to be sent. A small interface board consisting of header pins and 10k resistors is required between the I/O pins and the switch to "pull down" the pins down otherwise they will generate random results (see  The sketch is configured to generate 5 character groups of Morse and the audio output frequency to the speaker has been preset. Both of these can easily be changed and it would only take a few lines of code to connect a further 10k pot to control the audio frequency. The code has been developed as a series of functions which makes it easier to maintain and to understand. The characters are written out to the serial interface along with a message when a change is made to the Morse option (switch). This project was the most time consuming as I head to teach myself C at the same time and can probably be optimised further so later versions of the code will be updated to the website in due course. The next change being to convert the huge section of code used to send the characters into an array.
Project 4 - Morse Code Decoder 
Morse Decoder
This project was written to prove the previous project actually works in that it decodes the morse being generated. It will flash the LED to show the characters being decoded as well as writing the characters out to the terminal interface in the form of "." and "-" to show the characters. The microphone can be placed next to the receiver speaker for basic testing and improved by using a small interface to enable direction to a receiver.  The majority of the code was found on another website and modified to show how an LCD display module can be integrated.
If you find there are any problems or have suggestions for the code I have released please drop me an email -  Have fun experimenting with the Arduino, SARC hopes to create some further projects in relation to radio in the near future.