There are currently 0 users and 2 guests online.
C++ Library for $50 robot Version 2
Submitted by Webbot on January 1, 2009 - 10:40pm.
Common functions for all I/O pins.
Pins are normally created via IN or OUT so that their initial state is known. See IN.hpp and OUT.hpp
uint8_t GetBit(); // Get the bit mask for this Pin
bool IsValid(); // was this defined as a valid pin
// The following are only needed by devices which use the same I/O pin to change between in and out - eg some sonar devices
void SetInput(); // Change this into an input pin
void SetOutput(); // Change this into an output pin