O'Reilly logo

Getting Started with the Internet of Things by Cuno Pfister

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Drivers for Sensors and Actuators

Class DigitalSensor

An instance of class DigitalSensor provides access to a pin that can be configured as a digital input:

public class DigitalSensor
{
    public Cpu.Pin InputPin { get; set; }

    public void Open();
    public object HandleGet();
}
  • Cpu.Pin InputPin

    Mandatory property that indicates which pin should be configured as a digital input.

  • void Open()

    Method that reserves the input pin, which must have been specified during initialization of the sensor object. It can be called explicitly, or automatically when HandleGet is executed for the first time.

  • object HandleGet()

    Method that returns the current state of the digital input pin as a Boolean object.

Class DigitalActuator

An instance of class DigitalActuator provides access ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required