Having fun with code, using Arduino in a middle school CS classroom

Slides:



Advertisements
Similar presentations
Lab7: Introduction to Arduino
Advertisements

Mini-SumoBot Construction and Programming
Embedded Sumo 1T4 – 1T5 UTRA.
Re-programming the Simon Says with Arduino Linz Craig, Brian Huang.
Jeff Branson Education Outreach Coordinator Derek Runberg Curriculum Curator
1 Arduino Board: Arduino UNO Arduino Programing Environment: Arduino 0022
Introduction.
Khaled A. Al-Utaibi  What is Arduino?  Arduino Boards  Arduino Shields  Arduino Uno Hardware.
Introduction to Arduino Prepared by R. Lamond.  “Arduino is an open-source electronics prototyping platform based on flexible, easy- to-use hardware.
Basic Circuits – Lab 2 Arduino and Sensors Xmedia Spring 2011.
Embedded Programming and Robotics
Working with Arduino: Lesson #1: Getting Acquainted with the Kit EGN1007.
Colorado Space Grant Consortium Gateway To Space ASEN 1400 / ASTR 2500 Class #12 Gateway To Space ASEN 1400 / ASTR 2500 Class #12 T-58.
Ballooning Bundle. What is a Microcontroller? Small computer with a processor core, memory and programmable input/output Continuously repeats software.
Microprocessors Tutorial 1: Arduino Basics
Arduino. What is it? A open-source software suite and single-board microcontroller. Allows easy and affordable prototyping of microcontroller applications.
Tweaking Your Simon Adding a photoresistor and changing code Instruction by Pete Lewis and Linz Craig.
Microprocessors Tutorial 1: Arduino Basics
1 - Remove LED from 13 and GND - Bring out your breadboard from HW#4 Arduino Overview:
INTERNET OF EVERYTHING SDU 2016 Week 4. Simple Digital and Analog Inputs  The Arduino’s ability to sense digital and analog inputs allows it to respond.
Arduino “Getting Started” Instructor : Dr Matthew Miss Khin Yi Kyaw
1 Microcontrollers. 2 Programmers work in the virtual world Machinery works in the physical world Microcontrollers connect the virtual and physical world.
CSE 341 Project : Ultrasonic Radar PRESENTED BY: NAME : AKIFA TASNEEM ID : SECTION: 02 1.
Prototyping with Microcontrollers and Sensors. Overview Objective Background Information Problem Statement Materials Procedure Assignment Closing.
Arduino - Introduction
Arduino.
Getting Started: Building & Programming
Application of Programming: Scratch & Arduino
By Rick Darby Sponsors: Geekspace Gwinnett The WorkSpot
Assist. Prof. Rassim Suliyev - SDU 2017
Prototyping with Microcontrollers and Sensors
Microcontroller basics
Microcontroller basics
Microprocessors Tutorial 1: Arduino Basics
UTA010 : Engineering Design – II
An Arduino Workshop A Microcontroller.
Welcome to Arduino A Microcontroller.
Get Your Project Started with Arduino
Arduino Development for Beginners
UCD ElecSoc Robotics Club 2017/2018
Arduino Part 1 Topics: Microcontrollers Programming Basics
Arduino.
Arduino - Introduction
Arduino Basics Connect Arduino to USB port
Introduction to Arduino Microcontrollers
Introduction to Arduino Microcontrollers
Arduino and Grove LET’S START.
Roller Coaster Design Project
Roller Coaster Design Project
ARDUINO     What is an Arduino? Features 14 Digital I/O pins 6 Analogue inputs 6 PWM pins USB serial 16MHz Clock speed 32KB Flash memory 2KB SRAM.
Instructor Resources.
What is Arduino? By James Tedder.
FeMaidens Programming
Arduino 101 Credit(s):
Working with Arduino: Lesson #1: Getting Acquainted with the Kit
Welcome to Digital Electronics using the Arduino Board
Banyule Coding Club: Learn Arduino Richard Counsel Malcolm Macleod Watsonia Library - June 2018 Reference materials here ->
CTY SAR FCPS Shawn Lupoli, Elliot Tan
Having fun with Arduino
Aeroponic Engineering and Vertical Farming
Introduction to Arduino
Lab #1: Getting Started.
Arduino Uno circuit basics
Introduction to Arduino
Arduino Board.
Arduino म्हणजे काय?.
Arduino and Grove LET’S START.
Introduction to Arduinos
Introduction to Arduino IDE and Software
Instructor Resources.
Presentation transcript:

Having fun with code, using Arduino in a middle school CS classroom Michael Cappiello Cappiellom@gmail.com @MSTRCAP Hhselectronics.tumblr.com

What is an Arduino? Arduino is an open-source electronics platform based on easy-to-use hardware and software.  Arduino boards are able to read inputs - light on a sensor, a finger on a button, or a Twitter message - and turn it into an output - activating a motor, turning on an LED, publishing something online. You can tell your board what to do by sending a set of instructions to the microcontroller on the board. To do so you use the Arduino programming language (based on Wiring), and the Arduino Software (IDE), based on Processing. (n.d.). Retrieved April 24, 2017, from https://www.arduino.cc/en/guide/introduction

Parts of the Arduino UNO R3

Models and Applications All models have: Digital & Analog I/O pins. Regulated 3.3V and/or 5V. Solid state memory Onboard power LED. Can be programmed using Arduino IDE software. Arduino Model Comparisons

Shields Vs. Breakouts Breakout boards usually have a smaller form factor. Shields stack right on top of the Arduino using the existing form factor. Breakouts save space, but require a breadboard or additional wiring. Breakouts can be reused with other microcontrollers. Shields use the same voltages and I/O pins as the Arduino model they are designed to fit.

What will I need and Where Do I order it from? Arduino Uno R3 (or compatible model) USB Cable Jumper wires Solderless Breadboard 6V-18V Battery Pack Various Electrical components (resistors, LED’s, etc.) Adafruit Sparkfun Electronic Express Amazon

Getting started Download and install Arduino IDE: https://www.arduino.cc/download_handler.php Go to File>Examples>Basic>Blink Select the appropriate COM port by going to Tools>Port>COM# Arduino/Genuino Uno. Run the code by clicking on the upload icon. If the onboard LED begins to blink, you have successfully programmed your Arduino.

Wiring up An LED for “blink” Code

“BLINK” Code Structure // the setup function runs once when you press reset or power the board void setup() { // initialize digital pin LED_BUILTIN as an output. pinMode(LED_BUILTIN, OUTPUT); } // the loop function runs over and over again forever void loop() { digitalWrite(LED_BUILTIN, HIGH); // turn the LED on (HIGH is the voltage level) delay(1000); // wait for a second digitalWrite(LED_BUILTIN, LOW); // turn the LED off by making the voltage LOW Void Setup Void Loop

Wiring up a Switch to Arduino

Practice Program #2 (digital inputs) File>Examples>Digital>DigitalInputPullup Wire up an LED between Pin #13 and GND Wire up your limit switch between Pin #2 and GND Upload and Run Task: Modify this code to control two LED’s with one button, one light should be on when the switch is pressed and vice versa when not pressed.

Wiring up an analog input to Arduino

Practice Program #5 (Analog inputs) File>Examples>Control>IfStatementConditional Wire up an LED between Pin #13 and GND Wire a 10K Resistor and an LDR (Light Dependent Resistor) between 5V and GND. Connect a wire between these two components and connect to A0 pin. Upload the code and test by covering the LDR with your hand, the LED should turn on/off as the resistance changes. You can see this value expressed as an Analog # by opening up the serial monitor. Task: Modify this code to express the analog value of light using six LED’s (as the resistance increases, the LED’s should light up)

Speaker wiring for Arduino

Practice Program #3 (Tone and frequency) Files>Examples>Digital>ToneMultiple Connect a speaker between Pin #6 and GND Upload and run the program. Task: Create a little song using a variety of frequencies and tone durations.

Servo wiring for ARDUINO

Practice Program #4 (servo motors) Files>Examples>Servo>Sweep Connect the servo motor to the following pins: Red to 5V Black to GND White to Pin #9 Upload and run. Task: Create a program that toggles two LED’s and moves the servo motor between 45 and 135 degrees when a switch is pressed.

Teacher resources/Classroom activities Circuit on TinkerCAD Arduino-Playground Arduino-Education Five Day Arduino Lesson Plan for LED and Servo Control

Research backing Arduino as a viable tool to teach CS Using Arduino to Enhance Computer Programming Courses Teaching Introductory Programming Concepts: A Comparison of Scratch and Arduino

Wrap up Where do I go from here? Where can I find help? How do I get copies of the resources from this workshop? Questions, comments & concerns.