1 / 38

Intro to Arduino with LilyPad

Make a MakerSpace, Artisan ’ s Asylum Linz Craig, Chris Taylor, Mike Hord & Joel Bartlett. Intro to Arduino with LilyPad. Overview of Class. Getting Started: Installation and Applications Electrical: Components, Input and Output, Analog and Digital Trouble Shooting:

leala
Download Presentation

Intro to Arduino with LilyPad

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. Make a MakerSpace, Artisan’s Asylum Linz Craig, Chris Taylor, Mike Hord & Joel Bartlett Intro to Arduino with LilyPad

  2. Overview of Class Getting Started: Installation and Applications Electrical: Components, Input and Output, Analog and Digital Trouble Shooting: Serial Communication Additional Teaching Tools: Giant Components and Breadboard, Free Teaching Materials

  3. Arduino Board “Strong Friend” Created in Ivrea, Italy in 2005 by Massimo Banzi & David Cuartielles Open Source Hardware Atmel Processor Coding is accessible (C++, Processing, ModKit and MiniBloq)

  4. The LilyPadDev Board

  5. Flip the Board Over Do you see the wires that are running to the sensors, LEDs, and buttons? The microcontroller can already talk to the inputs and outputs!

  6. Board Type

  7. Other Board Type

  8. Serial Port / COM Port

  9. Analog and Digital All Arduino signals are either Analog or Digital All computers including Arduino, only understand Digital It is important to understand the difference between Analog and Digital signals since Analog signals require an Analog to Digital conversion

  10. Output Output is always Digital To Output a Digital signal (On or Off) use this code: digitalWrite( pinNumber , value ); Where value is HIGH or LOW To output a signal that pretends to be Analog use this code: analogWrite( pinNumber, value ); Where value is a number 0 - 255

  11. Output Output is always Digital Using a Digital signal that pretends to be an Analog signal is called Pulse Width Modulation Use Pulse Width Modulation, or P.W.M., for anything that requires a signal between HIGH and LOW P.W.M. is available on Arduino pins # 3, 5, 6, 9, 10, and 11

  12. Output Output is always Digital, even when it’s P.W.M. For P.W.M. the Arduino pin turns on then off very fast P.W.M. Signal @ 25% P.W.M. Signal @ 75% P.W.M. Signal rising

  13. Input Input is any signal entering an electrical system Both digital and analog sensors are forms of input Input can also take many other forms: Keyboards, a mouse, infared sensors, biometric sensors, or just plain voltage from a circuit

  14. Analog Input To connect an analog Input to your Arduino use Analog Pins # 0 - 5 To get an analog reading: analogRead ( pinNumber ); Analog Input varies from 0 to 1023 on an Arduino

  15. Digital Input To connect digital input to your Arduino use Digital Pins # 0 – 13 (Although pins # 0 & 1 are also used for serial) Digital Input needs a pinMode command: pinMode ( pinNumber, INPUT ); Make sure to use caps for INPUT To get a digital reading: digitalRead ( pinNumber ); Digital Input values are only HIGH (On) or LOW (Off)

  16. Digital Sensors No matter what the sensor there are only two settings: On and Off Signal is always either HIGH (On) or LOW (Off) Voltage signal for HIGH will be a little less than 5V on your Uno Voltage signal for LOW will be 0V on most systems

  17. Setup, Internal Pullup Resistorsvoid setup ( ){ digitalWrite (12, HIGH); } You will need to create internal pullup resistors in setup, to do so digitalWritethe pin HIGH

  18. Serial Communication Serial Communication is the transferring and receiving of information between two machines, the Arduino dedicates pin # 0 to receiving information and pin 1 to transferring information

  19. Serial in Setup

  20. Serial Monitor

  21. Serial Communication:Serial Setup void setup ( ) { Serial.begin ( 9600 ) ; } In this case the number 9600 is the baud rate at which the computer and Arduino communicate

  22. Serial Communication:Sending a Message void loop ( ) { Serial.print ( “Constructivism & “ ) ; Serial.println ( “Mechatronics” ) ; }

  23. Serial Communication

  24. Serial Communication:Serial Debugging void loop ( ) { int xVar = 10 ; Serial.print ( “Variable xVar is “ ) ; Serial.println ( xVar ) ; }

  25. Serial Communication:Serial Troubleshooting void loop ( ) { Serial.print ( “Digital pin 9 reads “ ) ; Serial.println ( digitalRead ( 9 ) ) ; }

  26. Making the World’s Worst Musical Instrument Now for some really crappy dubstep…. If we have time. Because, really, who has time for crappy dubstep?

  27. MODKit: WWW.modk.it Graphical User Interface for intuitive coding of Arduino Developed by Ed Baafi and Collin Reisdorf

  28. Fritzing Virtual Electrical Prototyping Project started in 2007 by the Interaction Design Lab at the University of Applied Science Potsdam, Germany Open Source Prototypes: Document, Share, Teach, Manufacture

  29. Murphy’s Law If it can go wrong, it will… eventually. Be ready to improvise.

  30. Developing Instructors They will surprise you. Being open will lead you to some interesting places. Have some student leaders. Get some laughs to make people comfortable.

  31. Other Teaching Tools Sewing: http://www.sparkfun.com/tutorials/category/16 Processing: http://processing.org/ Ohm’s Law Board: http://learn.sparkfun.com/curriculum/26 Giant Breadboard and Components: http://learn.sparkfun.com/curriculum/22, http://learn.sparkfun.com/curriculum/23 Additional Resources: http://learn.sparkfun.com/curriculum http://www.arduino.cc/

  32. Questions?

  33. www.sparkfun.com 6175 Longbow Drive, Suite 200 Boulder, Colorado 80301

More Related