1 / 13

Introduction to Arduino Programming: Master the Basics with Practical Examples

Learn the fundamentals of Arduino programming with practical examples and code explanations. Explore code structure, digital I/O functions, and running code standalone or tethered. Dive into the Arduino IDE and gain hands-on experience in creating and executing programs for Arduino projects.

swilma
Download Presentation

Introduction to Arduino Programming: Master the Basics with Practical Examples

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. living with the lab Gerald RecktenwaldPortland State Universitygerry@me.pdx.edu Introduction to Arduino Programming arduino.cc

  2. living with the lab references these notes borrow from . . . • Arduino web site • http://arduino.cc/en/Guide/Environment • http://arduino.cc/en/Tutorial/HomePage • Adafruit tutorial #1 and 2 • http://www.ladyada.net/learn/arduino/lesson2.html • Leah Buechley’s Introduction to Arduino • http://web.media.mit.edu/~leah/LilyPad/03_arduino_intro.html

  3. living with the lab writing and downloading code

  4. living with the lab running Code while tethered

  5. living with the lab running code stand-alone

  6. living with the lab Arduino IDE IDE = Integrated Development Environment http://www.arduino.cc/en/Guide/Environment

  7. living with the lab code structure: header header provides information and can also contain code

  8. living with the lab code structure: setup function setup function is executed only once at the start

  9. living with the lab code structure: loop function loop function is repeated indefinitely

  10. living with the lab code pinMode(13, Output) prepares pin 13 for outputs of voltage • digital I/O functions: • pinMode • digitalWrite • digitalRead

  11. living with the lab code digitalWrite(13, HIGH) sets pin 13 to a voltage that means “on” (five volts in this case) • digital I/O functions: • pinMode • digitalWrite • digitalRead

  12. living with the lab code delay(1000); tells microcontroller to do nothing for 1000 ms = 1 s • digital I/O functions: • pinMode • digitalWrite • digitalRead

  13. living with the lab code digitalWrite(13, LOW) sets pin 13 to voltage that means “off” or zero volts • digital I/O functions: • pinMode • digitalWrite • digitalRead

More Related