Digital Read/Write

  • pinMode
    • takes the pin to be determined
    • takes the mode -> in or out
    • MUST do this for most pins. Forgetting this will get you in trouble
  • digitalWrite
    • takes pin and sets it HIGH or LOW
    • that is, gives that pin 0 or 5V
  • digitalRead
    • takes pin and returns HIGH or LOW

Copyright Mike Edwards 2006-2009. All content available under the Creative Commons Attribution ShareAlike license, unless otherwise noted.