RPi GPIO mock framework.
- Source:
- See:
Methods
(inner) addDS18B20(id, sensor)
Adds a new simulated DS18B20 digital thermometer.
Parameters:
Name | Type | Description | |||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
id |
string | The id of the thermometer, must be unique |
|||||||||
sensor |
object | Thermometer description Properties
|
(inner) start(mockLocation, callback)
Initializes the framework. Calling this function will override any call to fs where the path starts with either /sys/class/gpio or /sys/bus/w1/devices. By default the overrides are ./sys/class/gpio and ./sys/bus/w1/devices.
Parameters:
Name | Type | Description |
---|---|---|
mockLocation |
string | If a value is passed, this is prepended to the real path to form the new mock path |
callback |
function | Called when start is finished |
(inner) stop()
Stops the framework. Calling this function will reset fs to default.