DigitalWrite in Teensy microcontroller?

1 reply · 4K views · last reply
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
 
Have you tried reading the documentation for the functions and constants? That should tell you which header file(s) you need to include.