Arduino Crash Course

for Coder Dojo Mentors

by Chris Quartier

What is Arduino?

  • a simple microcontroller board
  • a cross-platform development environment 
  • all open source (hardware and software)

Getting Started

  • Download and Install Arduino IDE (arduino.cc/en/Main/Software)
  • Run Arduino IDE and under Tools Menu:
    • If using LittleBits:
      • Select Board: Arduino Leonardo
    • If using Digital Sandbox:
      • Select Board: Arduino Pro or Pro Mini
      • Select Processor: ATMega328 3.3v 8MHz
  • Plug the board in and select correct port under Tools>Port

Setup

Loop

void Setup () {

  // code that is run once
  // at the very beginning
  // useful for setting pin modes

  pinMode(1, INPUT);
  pinMode(2, OUTPUT);

}
void Loop () {

  // code that is run continually
  // runs as fast as it can
  // usually the meat of program

  pin1State = digitalRead(1);
  digitalWrite(2, HIGH);

}

Necessary Code

Stuff We'll Attempt to Cover

  • Types and Constants
  • Inputs and Outputs
  • Analog vs Digital
  • Time Functions
  • Serial Communications
  • Interrupts?

On Your Own:

CoderDojoCR Arduino Crash Course

By cquartier

CoderDojoCR Arduino Crash Course

If you're looking at these slides on your own, the last slide is probably the most helpful.

  • 481