-
Notifications
You must be signed in to change notification settings - Fork 18
Sensor blocks
Sensor blocks are blocks designed to work with sensors. Before using a sensor block you must create the sensor first. Once the sensor are created a set of blocks appears in the toolbox to work with certain sensor features:
-
The reading of a magnitude measured by a sensor is performed by a Reporter block. This block reports the value of a certain magnitude measured by the sensor, and in the sensor documentation is noted as "Read () from sensor".
A shape example of a "Read () from sensor" block:
-
Execute a script when a magnitude measured by a sensor changes. This is done by an Event block, and in the sensor documentation this block is noted as "When () changes from sensor".
A shape example of a "When () changes from sensor" block:
-
Some sensors can be configured. For example, you can configure the resistance values used by the voltage divider of a LDR sensor. The configuration values are set by blocks noted as "Set () with value () for sensor" in the documentation.
A shape example of a "Set () with value () for sensor" block:
Category | Sensor |
---|---|
Air Quality | SDS011 |
Distance |
2Y0A21 PING))) 28015 ultrasonic sensor US015 ultrasonic sensor |
Geographic position | GPS |
Humidity |
BME280 DHT11 DHT22 DHT23 |
Illuminance |
BH1620FVC BH1721FVC LDR |
Magnetic field | AH49E |
Potentiometers | Linear potentiometer |
Presence | AM412 |
Pressure | BME280 |
Rotation | Relative rotary encoder |
Switches |
4x4 key matrix 2 POSITION TOGGLE SWITCH 3 POSITION TOGGLE SWITCH ANALOG JOYSTICK HALL EFECT PUSH SWITCH TILT SWITCH |
Temperature |
BDE0600G BME280 DHT11 DHT22 DHT23 DS1820 10K THERMISTOR TMP36 |
UV |
GUVA-S12SD ML8511 |