DigitalWrite in Teensy microcontroller?

  • Thread starter Thread starter angelspikes
  • Start date Start date
  • Tags Tags
    Microcontroller
Join the discussion
Registration is free. Ask a follow-up in this thread, or start your own.
1 reply · 4K views
angelspikes
Messages
10
Reaction score
0
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
 
Engineering news on Phys.org
Have you tried reading the documentation for the functions and constants? That should tell you which header file(s) you need to include.