LESSON 3 (CODING)
I would like to appeal to kids (as well as adults) and jumping right into programming C++ is very scary. There are a number of programs like Scratch and Blockly that introduce programming in a child friendly way. However, I would like to jump right into the deep end – if you want to learn to drive, get behind the wheel of a real car. All you need to do is focus on the elements we will use for each specific project.
Why Coding?
Remember how we said the Arduino Nano only understands ON and OFF
those tiny switches we called binary (1s and 0s)?
It is like if your robot friend only knew two words: ‘yes’ and ‘no’. It would be really hard to tell it anything complicated like ‘move your leg forward and then turn the light on’, using only yes and no! So we invented programming languages — they’re like special English that humans use to talk to computers. We write normal looking sentences with words and numbers, and a program called a compiler translates everything we wrote into the 1s and 0s the Arduino actually understands.The language the Arduino Nano uses is called C++.
Where do we write our Code?
An IDE is short for Integrated Development Environment — it’s basically a “control room” or “workshop” where you write, test, and send programs to your Arduino (or any computer/robot).
Imagine you want to build a robot that can blink lights, move its legs, or play music when something gets close.
You need to write instructions (the code) for the robot to follow. But writing code is like giving directions to a friend who only speaks a very strict language (C++ for Arduino). It would be hard if you had to use lots of different tools: one for writing, one for checking mistakes, one for sending it to the robot, one for seeing what the robot says back…An IDE is like having all those tools in one single room — a magic workbench that does everything together:
A place to write your instructions (code).
A helper that checks for mistakes.
A button that sends your instructions to the Arduino (like pressing “Upload”).
A window that shows what the Arduino is saying back to you (like a chat box).
To program our projects you will need to download the Arduino IDE onto your computer at home. Follow the instructions below to do so. If you struggle ask someone for help (You could email me).
NOTE:
To make our kits more affordable we use cheaper Chinese clones of the original Arduino board. They have a different USB chip (it handles the data from your computer to the CPU on the Arduino), that the IDE may not be able to read.
- Download the file below to your desktop.
- Right Click on the file (on your desktop).
- Click “Run as Administrator”.
- Click Install
- When complete, reboot your computer.
You now have the correct driver.
If you have Mac or difficulties, see below for the manufacturers website.