コード例 #1
0
 private static void Blink(int pin, int delay)
 {
     MCU.DigitalWrite(MCU.High, pin);
     Delay(delay);
     MCU.DigitalWrite(MCU.Low, pin);
     Delay(delay);
 }
コード例 #2
0
 public Servo(IMicrocontroller mcu, int pin, int minMilliseconds, int maxMilliseconds)
 {
     this.mcu             = mcu;
     this.pin             = pin;
     this.minMilliseconds = minMilliseconds;
     this.maxMilliseconds = maxMilliseconds;
     MCU.Initialize(mcu);
 }
コード例 #3
0
 public async Task InitAsync()
 {
     MCU.Initialize(mcu);
     await mcu.ExecuteAction(Init, pin);
 }
コード例 #4
0
 private static void Init(int pin)
 {
     MCU.PinMode(MCU.Output, pin);
 }