Top Banner
http://robotsclub.wordpress.com Arduino Programming 101 Lesson 1: An Introduction to Programming
9

Arduino Programming 101 - WordPress.com · An Arduino Board (Arduino UNO) Solid Copper Wires (for connecting sensors to Arduino) A USB connector to upload program to Arduino **The

Nov 15, 2019

Download

Documents

dariahiddleston
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Arduino Programming 101 - WordPress.com · An Arduino Board (Arduino UNO) Solid Copper Wires (for connecting sensors to Arduino) A USB connector to upload program to Arduino **The

http://robotsclub.wordpress.com

Arduino Programming 101Lesson 1: An Introduction to Programming

Page 2: Arduino Programming 101 - WordPress.com · An Arduino Board (Arduino UNO) Solid Copper Wires (for connecting sensors to Arduino) A USB connector to upload program to Arduino **The

http://robotsclub.wordpress.com

Topics to be Covered

What is “Arduino”?

Set Up a Development Environment

Helpful Resources

Image Courtesy of openclipart.org

Page 3: Arduino Programming 101 - WordPress.com · An Arduino Board (Arduino UNO) Solid Copper Wires (for connecting sensors to Arduino) A USB connector to upload program to Arduino **The

http://robotsclub.wordpress.com

What is Arduino?The Arduino is a small circuit board with an on-board processor chip and storage to hold and run programs

There are a number of inputs and outputs that allow the Arduino to be programmed to send and receive electrical signals

The programs are written in the Arduino Programming Language, which is very similar to C/C++

We will be using the Arduino much like the Mindstorms NXT to read input from ultrasonic and light sensors and send commands to motors on the robot

Arduino Open-Source Community Logo from arduino.cc

Page 4: Arduino Programming 101 - WordPress.com · An Arduino Board (Arduino UNO) Solid Copper Wires (for connecting sensors to Arduino) A USB connector to upload program to Arduino **The

http://robotsclub.wordpress.com

Required MaterialsAn Arduino Board (Arduino UNO)

Solid Copper Wires (for connecting sensors to Arduino)

A USB connector to upload program to Arduino

**The Mindstorms NXT cables work for Arduino**

Various Sensors (Ultrasonic, Photoresistor, Motor Controller, etc)

Battery Power Source (Will be custom-made in a later lesson)

A computer for programming

Page 5: Arduino Programming 101 - WordPress.com · An Arduino Board (Arduino UNO) Solid Copper Wires (for connecting sensors to Arduino) A USB connector to upload program to Arduino **The

http://robotsclub.wordpress.com

First StepsBefore we begin working with the Arduino boards, we need to set up a development environment

Navigate to http://arduino.cc/en/Main/Software and under the Arduino IDE heading, find the latest version (1.0.5 at time of writing) and download the version for your operating system

Open the downloaded file and follow any on-screen instructions to install the software

Page 6: Arduino Programming 101 - WordPress.com · An Arduino Board (Arduino UNO) Solid Copper Wires (for connecting sensors to Arduino) A USB connector to upload program to Arduino **The

http://robotsclub.wordpress.com

Basics of Arduino SoftwareAn Arduino program is referred to as a Sketch

The program has a built-in compiler that will verify your code before you can upload it to the Arduino

Under the File menu, there’s an Examples list with tons of pre-written programs for the Arduino to use as starting points

In our next lesson, we will be using these examples to write some basic Arduino code

Page 7: Arduino Programming 101 - WordPress.com · An Arduino Board (Arduino UNO) Solid Copper Wires (for connecting sensors to Arduino) A USB connector to upload program to Arduino **The

http://robotsclub.wordpress.com

Helpful ResourcesArduino Examples: http://arduino.cc/en/Tutorial/HomePage(Each Example from the menu explained online)

Arduino Reference: http://arduino.cc/en/Reference/HomePage

Arduino Forums: http://forum.arduino.cc (Huge group of people with tons of experience and knowledge - search for questions - odds are someone else had the same problem and already found a solution)

Page 8: Arduino Programming 101 - WordPress.com · An Arduino Board (Arduino UNO) Solid Copper Wires (for connecting sensors to Arduino) A USB connector to upload program to Arduino **The

http://robotsclub.wordpress.com

My Webpage

http://robotsclub.wordpress.com

I will post these presentations, tons of helpful websites, images of wiring diagrams, quick tips for programming, and anything else I think you might find useful when creating your Mini-SUMO bot

Check the site regularly for new material!

Page 9: Arduino Programming 101 - WordPress.com · An Arduino Board (Arduino UNO) Solid Copper Wires (for connecting sensors to Arduino) A USB connector to upload program to Arduino **The

http://robotsclub.wordpress.com

The EndQuestions? Comments? Concerns? Suggestions? Please let me know!