1. Limited time only! Sign up for a free 30min personal tutor trial with Chegg Tutors
    Dismiss Notice
Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

DigitalWrite in Teensy microcontroller?

  1. May 17, 2014 #1
    I'm trying to use the function pinMode so that I can use an analog pin as a digital output pin.
    But when I debug the source file, it states that OUTPUT and PIN_AO is undeclared, and that pinMode and digitalWrite are implicit declarations. I assume I'm missing a library which i should include? What should I do to correct these problems?

    pinMode(PIN_A0, OUTPUT);
    digitalWrite(PIN_AO, HIGH);

    // This was written in main
     
  2. jcsd
  3. May 17, 2014 #2

    AlephZero

    User Avatar
    Science Advisor
    Homework Helper

    Have you tried reading the documentation for the functions and constants? That should tell you which header file(s) you need to include.
     
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook




Similar Discussions: DigitalWrite in Teensy microcontroller?
Loading...