Skip to content

Instantly share code, notes, and snippets.

@kekyo
Created October 12, 2018 14:59
Show Gist options
  • Save kekyo/dad60b0cd5a5e5ca6a5d70c7d84ad70c to your computer and use it in GitHub Desktop.
Save kekyo/dad60b0cd5a5e5ca6a5d70c7d84ad70c to your computer and use it in GitHub Desktop.
BrainPad demonstration at MADOBEN YOKKAICHI 2018
using GHIElectronics.TinyCLR.BrainPad;
using System;
using System.Collections;
using System.Text;
using System.Threading;
namespace TinyCLRApplication1
{
class Program
{
static void Main()
{
var display = new Display();
var lightSensor = new LightSensor();
var wait = new Wait();
while (true)
{
var light = lightSensor.ReadLightLevel();
var text = string.Format("Light Level: {0}", light);
display.Clear();
display.DrawSmallText(20, 0, text);
display.RefreshScreen();
wait.Seconds(0.1);
}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment