Atal Tinkering Labs ATL
There are few functions so useful that you find them everywhere. The ‘for loop’ is an example of this type. A For Loop repeats an action for a specified number of iterations, reducing the lines of code that need to be written thus making the programmers life easier. In this example we are setting out to make a row of LEDs light up somewhat similar to Kit in Knight Rider.
In the last lesson we learned about the “If statement”. The “If statement” was the perfect choice for setting up instructions to run only when certain conditions are met. “If 30 seconds has passed – stop the heating element” or “If the sensor perceives a wall – turn 180 Degrees”. This lesson will expand on this amazingly useful function and show you how to stack different conditions to meet the flexibility you will want in your designs.
Lets expand the repertoire of output that we can use by looking at the function analogWrite(). I experienced much confusion with analogWrite(), because I suspected that it had to do with the analog pins on the Arduino. The function, however, has nothing to do with the analog pins. There are 5 pins on most Arduino boards marked with an ‘~’ next to the pin number – these pins can be invoked to rapidly change the power being applied at the pin – this is a technique called pulse width modulation (PWM).
In the last lesson you learned about using the analogRead() function to collect data from a sensor connected to one of the Arduino’ analog pins. The range of data we received from the analogRead() function, was mapped from 0 to 1023. What if we wanted to know the actual voltage being applied at the pin?
Knowing if something is on or off can be extremely useful, but often you will want to know more. How bright is the light? How fast is the satellite moving? These types of answers are often analog – they cover a large range of values, not just on or off. The Arduino handles analogs inputs with 6 dedicated pins, labeled A0 through A5. These pins have access to an analog-to-digital converter, which takes the range of input values and creates a digital version by cutting up the range into tiny pieces. All this is handled behind the scenes –…
As simple as it may seem, knowing when something is either on or off can be a great tool to designing something useful. Answers to the following questions are what this lesson plans to tackle: Is a button being pressed? Has a switch been turned on? What is my on/off sensor status? When you can answer questions like these, you can implement actions based on the current status – if the button is pressed do this – otherwise, do that. If the sensor is HIGH take this action, otherwise do nothing. You get the gist. But before we can…
The first program you usually write when learning a new programming language is called “Hello World”. The program outputs those words as its only function. When learning to program microcontrollers such as the Arduino, the equivalent of “Hello World” is a program that blinks an LED. Guess what it is called – Blink.
A variable is like a bucket. You choose what types of stuff you want in the bucket and can change the contents as often as you like. When you declare a variable, you are telling the program two things, firstly – what types of things you plan to put in the bucket, and secondly, what the name of the bucket is so you can refer to it later. If you tell the program you will be putting fluids in the bucket, than you can go all day filling it with beer, water, and iced tea – but the second…
The coding language that Arduino uses is very much like C++ (“see plus plus”), which is a rather common language in the world of computing. As I have alluded to in previous lessons, the code you learn to write for your Arduino will be very similar to code you write in any other computer language – all the basic concepts remain the same – it’s just a matter of learning a new dialect should you pursue other ventures. The code you will be writing is called “human readable”, that is, it will make sense to you (sometimes) and will…
IDE stands for Integrated Development Environment. Pretty fancy sounding, and should make you feel smart anytime you use it. The IDE is a text editor like program that allows you to write computer code for your Arduino board. When you open up the Arduino program, you are opening the IDE. It is intentionally stream lined to keep things as simple and straightforward as possible. When you save a file in Arduino, the file is called a sketch – a sketch is where you save all the computer code that you have written. Lets take a look at some…
One of the absolute best things about the Arduino platform is how easy it is to get started. The software that installs on your computer is completely free and designed specifically for ease of use. The program is called an Integrated Development Environment, or IDE. The fancy name might intimidate you but it runs just like a text editing program. As with any software install, you may have some peculiar things working on your computer that could hinder a smooth install. I have loaded the Arduino several times on different operating systems and have not had too many troubles….
What are all the components on that aesthetically pleasing blue Arduino circuit board? What does GND stand for, and what is with the “~” mark next to those plastic lifted holes mean? This tutorial covers the hardware on the Arduino board that you will likely use as you work on projects. It is by no means a comprehensive study of the physical layout, but enough to make you familiar with the parts you will be using.
This video shows a step-by-step tutorial on showing data from your GPS on Google Earth. The project uses the Adafruit Ultimate GPS board and an Arduino Microcontroller. The lesson shows how to properly configure GPS coordinates from NMEA sentences into a KML file that Google Earth can display. For more info, see Arduino LESSON 25 at www.toptechboy.com, where we have the code and supporting material.
This tutorial presents step-by-step instructions on using the Adafruit Ultimate GPS unit and the Virtuabotix SD card reader and an Arduino to create a data logging GPS. This builds on the work presented in LESSON 22, so go back and review that one first.
This tutorial has step-by-step instructions on creating a GPs tracker based on the Arduino and Adafruit Ultimate GPS breakout board. This lesson will get the circuit connected, and the module streaming and reading good NMEA sentences. In lesson 23 we will parse the data and save to an SD card.
This video shows step-by-step instructions on logging sensor data from an Arduino to an SD card. This facilitates easy importing into Excel and easy charting, graphing and data analysis. We use the BMP180 pressure sensor and a standard SD card reader.