NOT FINISHED YET!!! My first try to get a self built fully working Quadrocopter based on an mbed, a self built frame and some other more or less cheap parts.
Diff: LED/LED.cpp
- Revision:
- 12:67a06c9b69d5
- Parent:
- 8:d25ecdcdbeb5
--- a/LED/LED.cpp Thu Oct 18 20:04:16 2012 +0000 +++ b/LED/LED.cpp Sat Oct 20 17:28:28 2012 +0000 @@ -40,7 +40,19 @@ } void LED::tilt(int index) { - Led = Led^(1 << (index-1)); + Led = Led ^ (1 << (index-1)); //XOR +} + +void LED::set(int index) { + Led = Led | (1 << (index-1)); //OR +} + +void LED::reset(int index) { + Led = Led & ~(1 << (index-1)); //OR +} + +int LED::check(int index) { + return Led & (1 << (index-1)); } void LED::operator=(int value) {