DigitalWrite in Teensy microcontroller?

  • Thread starter Thread starter angelspikes
  • Start date Start date
  • Tags Tags
    Microcontroller
Join the discussion
Ask a follow-up here, or get your own question answered by working scientists, mathematicians and engineers — people, not an autocomplete.
Real named experts · corrections over time · the nuance an AI answer skips
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