Introduction to the Coding Series
Simple I/O that is usually taken for granted on PCs, like reading key presses, outputting to a display, and sounding an alarm, often get in the way of the focus of the main task when developing for microcontrollers. It is for this reason we have developed a library, for the multi-function shield we have chosen, that simplifies basic I/O operations. We also provide a set of real world applications that make use of this library, so those new to coding on the Arduino can experiment with and enhance them.
Some familiarity with the Arduino platform is assumed, as is the installation of the Arduino development environment. We got our shield from Hobby Components, but there are a number of other suppliers too.
Installing the multi-function shield library
If you haven’t already done so, you will need to first install the TimerOne and Software I2C libraries using instructions for installing Arduino libraries. You can download the multi-function shield library from the link below and install using the instructions from the link above:
- Multi-function shield library (download older version 1.1 or version 1.0 if necessary)
- All source code used in series
If for any reason you haven’t been successful installing any of the libraries, then download this library bundle instead, unzip and copy to your Documents\Arduino\libraries folder (if using Windows) or OS equivalent. Although we do everything to ensure our downloads are free from viruses and malware, please check that your virus and malware scanning software is up to date before hand.
We must point out that by following the Hackatronics series, you agree to do so at your own risk, and agree to take full responsibility for any loss or damages you may incur upon yourself or others. If you’re a kid starting out, be sure to have supervision of a responsible adult.
More about this series
This series is divided in to three main parts (and is also available as an eBook with extra information):
Part 1 demonstrates the ease with which the multi-function shield buttons, beeper and display can utilized by using the shield library, thereby making it easier to concentrate on the logic of the application. Part 2 demonstrates how the shield library can be used to read values from external sensors, such as temperature, sonar and motion sensors, and how to process electronic pulses from an external source. Part 3 explores working applications using the library and the multi-function shield:
- 24 hour alarm clock
- Heart monitor – (requires heart pulse sensor)
- Count down timer
- Surface incline level indicator– (requires MPU6050 motion sensor)
- Sonar ranger – (requires HC SR04 sonar module)
- Speedometer – (requires magnet and reed switch)
Each of these has scope to be built upon and expanded, but we leave that to you. Get coding and have fun!
New! Want to control your Arduino with an internet browser? Check out our new Arduino Web Server