Skip to main content

ToF sensor unit

ToF (Time of Flight) Ranging Unit resolves distance between the emit point and the reach point of a subject. Measure absolute distances up to 2 m (about 6.5 feet).

ToF sensorHAT versionWatch the video here
img.pngimg_1.png• Port: A
• Connection: 4-pin Grove cable

Sensor Configuration

{
{
"m5devices": [
{
"uid": "M5",
"sensors": [
{
"id": "tof",
"type": "tof",
"events": {
"isFar": {
"event": "far"
},
"isNear": {
"event": "near"
},
"isFrontOf": {
"event": "front-of"
}
},
"settings": {
"log": false,
"ranges": {
"isFar": {
"max": 2000,
"min": 810
},
"isNear": {
"max": 800,
"min": 400
},
"isFrontOf": {
"max": 390,
"min": 0
}
},
"highSpeed": false,
"longRange": true
}
}
]
}
]
}

Simple usage in content

In this tutorial We will use M5 stack fire as device and a ToF as sensor.

  • This Unit uses the A port in M5 stack fire so you have to attach the sensor with a Grove Cable into your device. Then connect your sensor into the screen where you wish to use it.

  • In Wallboard Sensor Designer, you have to make the sensor configuration.

  • When you open it you have to login into your editor account you use then make a fast connection to your sensor.

  • If you are connected, you have to choose port A, then ToF.

img_2.png
  • Enable the events you wish to use in your content, then send it to the screen you chosed in the Content editor you use.
    img_13.png

If you wish to see or customize your sensor config

  • Open the Content editor where you sent the configuration, and focus to the screen you selected.
  • Right click on the screen: Device Properties >> Set >> Set sensor configuration

How to make your content?

img_3.png• You will need 3 different pages.
  • Then add sensor events: Content >> Edit sensor events >> Add new
img_4.png
  • Then save it and try it.