Need a unique gift idea?
A Pastebin account makes a great Christmas gift
SHARE
TWEET

Untitled

a guest Jul 22nd, 2018 61 Never
Upgrade to PRO!
ENDING IN00days00hours00mins00secs
 
  1. using System;
  2. using System.Threading;
  3.  
  4. using Microsoft.SPOT;
  5. using Microsoft.SPOT.Hardware;
  6.  
  7. using GHIElectronics.NETMF.FEZ;
  8. using GHIElectronics.NETMF.Hardware;
  9.  
  10. namespace FEZ_Panda_II_Application1 {
  11.    
  12.     public class Program {
  13.  
  14.         public static void Main() {
  15.  
  16.             PWM MyFader = new PWM((PWM.Pin)FEZ_Pin.PWM.Di5);
  17.             AnalogIn POTknob = new AnalogIn((AnalogIn.Pin)FEZ_Pin.AnalogIn.An3);
  18.             POTknob.SetLinearScale(0, 100);
  19.             int POTknobReadout = 0;
  20.  
  21.             while (true)
  22.             {
  23.                 POTknobReadout = POTknob.Read();
  24.                 Debug.Print(POTknobReadout.ToString());
  25.                 MyFader.Set(10000, (byte)POTknobReadout);
  26.                 Thread.Sleep(10);
  27.             }
  28.         }
  29.     }
  30. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top