This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//Kregg's light sensor failure example | |
//https://gist.github.com/khanning/19753c1a0f978117b992c60668d09d1c | |
// build as main.cpp in microbit-samples | |
#include "MicroBit.h" | |
MicroBit uBit; | |
uint8_t lightLevel; | |
void lightLevelReady(MicroBitEvent) { | |
lightLevel = uBit.display.readLightLevel(); |