protected static void StartNeoPixel()
        {
            strip = new NeoPixelStrip(150, "neopixelstrip01");

            CreateCyclesCollection();

            neoPixelThread = new Thread(StartNeoPixelThread);
            neoPixelThread.Priority = ThreadPriority.Lowest;
            neoPixelThread.Start();
        }
예제 #2
0
        public static void Main()
        {
            strip = new NeoPixelStrip(50, "LaughOMeter");
            analogPin = new AnalogInput(Cpu.AnalogChannel.ANALOG_3);

            while (true)
            {
                try
                {
                    Debug.Print(analogPin.Read().ToString());
                    strip.SetLevel(((ushort)(analogPin.Read() * 100 / maxVal)), palette);
                }
                catch { }
                Thread.Sleep(500);
            }
        }