Esempio n. 1
0
 /// <summary>
 /// This sets the pull-up or pull-down resistor mode on the given pin, which should be set as an input. 
 /// Unlike the Arduino, the BCM2835 has both pull-up an down internal resistors. 
 /// The parameter pud should be; PUD_OFF, (no pull up/down), PUD_DOWN (pull to ground) or PUD_UP (pull to 3.3v) 
 /// The internal pull up/down resistors have a value of approximately 50KΩ on the Raspberry Pi.
 /// </summary>
 public static void SetPinResistorMode(int pin, Constants.InternalResistor mode)
 {
     SetPinResistorMode(pin, (int)mode);
 }
Esempio n. 2
0
 /// <summary>
 /// The PWM generator can run in 2 modes – “balanced” and “mark:space”. The mark:space mode is traditional, however the default mode in the Pi is “balanced”. 
 /// You can switch modes by supplying the parameter: PWM_MODE_BAL or PWM_MODE_MS.
 /// </summary>
 public static void SetPwmMode(Constants.PwmMode mode)
 {
     SetPwmMode((int)mode);
 }
Esempio n. 3
0
 /// <summary>
 /// This sets the mode of a pin to either INPUT, OUTPUT, PWM_OUTPUT or GPIO_CLOCK. Note that only wiringPi pin 1 (BCM_GPIO 18) supports PWM output and only wiringPi pin 7 (BCM_GPIO 4) supports CLOCK output modes.
 /// This function has no effect when in Sys mode. If you need to change the pin mode, then you can do it with the gpio program in a script before you start your program.
 /// </summary>
 public static void SetPinMode(int pin, Constants.PinMode mode)
 {
     SetPinMode(pin, (int)mode);
 }