7

What are the actual values for HIGH, LOW, INPUT, and OUTPUT? These are used in functions like pinMode() and digitalWrite().

Thanks

1 Answers1

4

These might be of use to you:

https://www.arduino.cc/en/Reference/Constants

Arduino HIGH LOW

#define HIGH 0x1
#define LOW  0x0

#define INPUT 0x0
#define OUTPUT 0x1

#define true 0x1
#define false 0x0

So basically they are booleans since C/C++ represents true as 0x1 and false as 0x0

Brethlosze
  • 1,533
  • 1
  • 22
  • 41
Matt
  • 83
  • 1
  • 8
  • Thanks, that helps a lot! –  Jun 29 '15 at 20:09
  • i am trying to port the sample blink program to AVR-C in atmel studio. Do you have any idea how to still use the arduino functions while writing the program? –  Jun 29 '15 at 20:10
  • I haven't messed around with amt. studio, but I'm sure someone else has implemented blink in AVR-C so the answers are out there. – Matt Jun 29 '15 at 20:15