SetValue() 공개 메소드

public SetValue ( int channels, byte level ) : void
channels int
level byte
리턴 void
예제 #1
0
        private static void RecordHit(LightBoard lights, string id)
        {
            PlayAudio(@"..\..\..\NerfTargets\content\sounds\hit.wav");

            var channels = GetChannelsForTarget(id);

            for (int i = 0; i < 3; ++i)
            {
                lights.SetValue(channels, 0x00);
                Thread.Sleep(100);
                lights.SetValue(channels, 0xFF);
                Thread.Sleep(100);
            }
            lights.SetValue(channels, 0x00);
        }
예제 #2
0
 private static void ShowTarget(LightBoard lights, string id)
 {
     Console.WriteLine("Showing target " + id);
     lights.SetValue(GetChannelsForTarget(id), 0xFF);
 }
예제 #3
0
 private static void HideTarget(LightBoard lights, string id)
 {
     Console.WriteLine("Hiding target " + id);
     lights.SetValue(GetChannelsForTarget(id), 0x00);
 }