Programming electronics with Arduino

From Dallas Makerspace
Jump to: navigation, search

Arduino For The Absolute Beginner

Visit Hackerspace Tech to get enrolled in the class.

These lessons “Walk the Dog” through each line of code in a program. We focus on teaching the fundamental aspects of coding. Each lesson builds on previous examples, leaving you confident to take on the next challenge. The focus of our core curriculum is on learning the Arduino programming language – which is often the most substantial barrier to mastering Arduino.

Introduction and Familiarization

Get to know the Arduino Board itself and get very comfortable working in the Arduino Integrated Development Environment.

  • Course Introduction
  • Hardware Overview
  • Download and Install the Arduino IDE
  • Arduino IDE and Sketch Overview
  • Understanding Arduino Syntax

Basics

  • Understanding and Using Variables
  • Blink an LED
  • Challenge Discussion
  • digitalRead() and Serial Port Communication
  • Challenge Discussion
  • analogRead() and Serial Port Communications
  • Challenge Discussion
  • Reading Analog Pins and Converting the Input to a Voltage
  • Challenge Discussion
  • Fade an LED with Pulse Width Modulation using analogWrite()
  • Challenge Discussion

Control

Once you have the fundamentals down, start to create logical programs that respond to inputs and create outputs.

  • If-Else Statement, Comparison Operators and Conditions
  • Challenge Discussion
  • For Loop Iteration
  • Challenge Discussion
  • How to Use Arrays
  • Challenge Discussion
  • Switch Case Statement and Using a Keyboard for Data Collection
  • Challenge Discussion
  • While Statement
  • Challenge Discussion

Digital

  • Blink an LED Without using the delay() Function
  • Challenge Discussion
  • Using Buttons
  • Challenge Discussion
  • State Change Detection and the Modulo Operator
  • Challenge Discussion
  • Debouncing a Button
  • Challenge Discussion

Analog

  • Analog I/O and Serial Communications
  • Challenge Discussion
  • Analog Input
  • Challenge Discussion
  • Calibration
  • Challenge Discussion
  • Smoothing Data
  • Challenge Discussion

Intermediate Skills

Using Matrices

  • Multi-Dimensional Arrays AKA Matrix
  • Challenge Discussion

Using Liquid Crystal Displays

  • Introduction to Liquid Crystal Displays
  • Setting Up an LCD Display
  • LiquidCrystal Library Functions Tour Part 1
  • LiquidCrystal Library Functions Tour Part 2
  • Graphical User Interface using Buttons
  • Fast Track: Graphical User Interface using Buttons
  • Graphical User Interface using a Potentiometer
  • Fast Track: Graphical User Interface using a Potentiometer

Using Servos with Arduino

  • Introduction to Servos
  • Powering a Servo
  • Servos the Hard Way: Part One
  • Servos the Hard Way: Part Two
  • Servos the Hard Way: Part Three
  • Servo Library: Part 1
  • Servo Library: Part 2

User Defined Functions

  • Creating a User Defined Function
  • Passing Multiple Arguments
  • Functions that Return Values
  • Why Make Functions?

Libraries

  • Downloading and Setting up Libraries
  • Library Syntax
  • Library from Scratch
  • Sketch to Functions
  • Creating a Header File
  • Creating a source file
  • Wrapping up the Library
  • Creating a Keywords File

Connecting to the Internet with Serial Communication and Processing

  • Introduction to the Concept
  • Installing Processing
  • Simple Communication
  • Intro to the Process
  • Installing the Twitter4j Library
  • Setting up Twitter Accounts
  • Arduino Side
  • Processing Side and Tweet

Frequently Asked Questions

So all I have to do is watch videos and I will learn to code and understand electronics?

If it were only that easy. Learning to code and understand electronics is an undertaking, and will require discipline on your part. Our curriculum is designed to get you into the trenches of programming the sketches – we want you to understand it thoroughly! Most of the time you spend in the course will be working through the challenges presented in nearly every lesson. The more energy you put into the course, the more results you will get out the other end.

How long will it take me to get through the material?

The online academy is a self-paced course. The more time you can spend on the lessons and working on the challenges, the sooner you will be done. The curriculum represents more than a college semesters worth of material, so 16 weeks is the minimum recommended time span to complete the course. This estimate is based on spending an hour a day with the material, if you only work on the material when you attend weekly meetups it could take a year.

Will I need to spend a fortune in components and software to complete the course?

No. The electronic components needed complete the core curriculum can be purchased for less than $60 US. Hardware components for the intermediate curriculum like liquid crystal displays and servos will add around $20-30 depending on the quantity and type you decide to buy. The popular electronics distributor Jameco created a kit specifically for the Programming Electronics Academy that includes all the components required for the core curriculum. The software used in the course is the Arduino Integrated Development Environment, which is free and open source. A complete list of the required equipment, electronic components and software can be downloaded here.

I hate quizzes, does your course have quizzes?

No. Our teaching philosophy does not embrace testing by rigid right or wrong answers. We challenge our students every lesson with questions that require changing code or circuits. We find this process of discovery more effective than rote memorization. It is worth noting that our basic electronics modules do have worksheets which generally help students memorize key formulas by repetitious application.

Will I get a certificate after completing the course?

Yes. If you complete every module in the curriculum and provide code/pictures/video of three crucible projects, you will be mailed a signed certificate of completion.

How much of the course is about hardware, and how much about software?

The focus of our core curriculum is on learning the Arduino programming language – which is often the most substantial barrier to mastering Arduino. That being said, we have modules on basic electronics theory and circuit analysis which introduce the application of Ohm’s law, series and parallel circuit design and understanding electrical schematics. Throughout the curriculum we teach topics related to digital electronics such as pin states, pulse width modulation, analog to digital conversion, floating pins and more. With microcontrollers like the Arduino uses, it is nearly impossible to teach the software without the hardware – which is why we love this stuff!

Is learning to program the Arduino a Fad, will it waste my time?

The Arduino programming language is based on the C++, which is a derivative of C. C++ is one of the most popular programming languages in the world today. All of the fundamental concepts of programming including for loops, if statements, data structures (i.e. arrays) and classes are used in C++. Additionally, the final code that ends up inside commercial products using microcontrollers (this code is sometimes referred to as firmware) is often written first in C, giving it wings outside of virtual walls. The short answer is that C++ is here to stay for a long time and the Arduino (and it’s derivatives) is only growing more popular as the development board of choice.

What if I am older, can I still learn this stuff?

Many of our students are experienced at life and enjoy learning new skills, or refreshing old skills. Our most senior student is in his late seventies. We have found that age has very little to do with how people fare at mastering the material. Drive, attitude, and discipline are usually better predictors of success.