コード例 #1
0
 /// <summary>
 /// Read from GPIO pin on a Rasperry Pi
 /// Will throw an exception if the program is not running on a Pi
 /// or an invalid pin number is used.
 /// </summary>
 /// <param name="pinNumber">number of the pin to read</param>
 /// <returns>true if the pin is high and false if it is low</returns>
 public static bool ReadFromPin(int pinNumber)
 {
     return(manager.ReadFromPin(pinNumber));
 }