Programming, Serial and Virtual Prototyping - PowerPoint PPT Presentation

About This Presentation
Title:

Programming, Serial and Virtual Prototyping

Description:

Programming, Serial and Virtual Prototyping * Code if ( You like semicolons ) { Stay here for intro to Arduino code } else { Join the MODKit group for GUI code ... – PowerPoint PPT presentation

Number of Views:88
Avg rating:3.0/5.0
Slides: 17
Provided by: BoeAn
Category:

less

Transcript and Presenter's Notes

Title: Programming, Serial and Virtual Prototyping


1
Programming, Serial and Virtual Prototyping
2
Code
  • if ( You like semicolons )
  • Stay here for intro to Arduino code
  • else
  • Join the MODKit group for GUI code

3
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

4
Serial in Setup
5
Serial Monitor
6
Serial Communication
7
Serial Activity with Circuit 7
  • Communication
  • Troubleshooting circuits
  • Debugging Code

8
Serial CommunicationSerial Setup
  • void setup ( )
  • Serial.begin ( 9600 )
  • In this case the number 9600 is the baudrate at
    which the computer and Arduino communicate

9
Serial CommunicationSending a Message
  • void loop ( )
  • Serial.print ( Constructivism )
  • Serial.println ( Mechatronics )

10
Serial CommunicationSerial Debugging
  • void loop ( )
  • int xVar 10
  • Serial.print ( Variable xVar is )
  • Serial.println ( xVar )

11
Serial CommunicationSerial Troubleshooting
  • void loop ( )
  • Serial.print ( Digital pin 9 reads )
  • Serial.println ( digitalRead ( 9 ) )

12
Serial CommunicationCircuit 7 code
  • void loop ( )
  • buttonState digitalRead(inputPin)
  • if (buttonState HIGH)
  • digitalWrite (ledPin, LOW)
  • else
  • digitalWrite(ledPin, HIGH)
  • Serial.print (button state is )
  • Serial.println ( buttonState )

13
Fritzing
  • Now that you feel comfortable putting together
    circuits with your breadboard lets talk about
    how to go from the breadboard to a PCB

14
Free Time
  • The rest of the class is dedicated to free
    pursuit
  • Do whatever you like and an instructor will help
    you with any questions or problems you may have,
    this includes questions about personal projects
    using Arduino
  • Thank you for attending our Intro to Arduino
    class
  • Please fill out a class feedback form before you
    leave

15
Questions?
16
www.sparkfun.com 6175 Longbow Drive, Suite
200 Boulder, Colorado 80301
Write a Comment
User Comments (0)
About PowerShow.com