I connected an HC-SR04 ultrasonic sensor to a RPi Zero 2 W and created the following VIAM configuration:
{
"components": [
{
"name": "rpi",
"namespace": "rdk",
"type": "board",
"model": "pi",
"attributes": {
"digital_interrupts": [
{
"name": "int_echo_us1",
"pin": "38"
}
]
}
},
{
"name": "ultrasonic_1",
"namespace": "rdk",
"type": "sensor",
"model": "ultrasonic",
"attributes": {
"board": "rpi",
"echo_interrupt_pin": "int_echo_us1",
"trigger_pin": "40",
"timeout_ms": 1000
},
"depends_on": [
"rpi"
]
}
]
}
Unfortunately the logs show the same error message over and over again:
rdk.resource_manager.rdk:component:sensor/ultrasonic_1 resource/graph_node.go:277 resource build error: unknown resource type: API "rdk:component:sensor" with model "rdk:builtin:ultrasonic" not registered resource rdk:component:sensor/ultrasonic_1 model rdk:builtin:ultrasonic
I have tried many ways to configure it, but end up with the same situation every time. Does anyone have any idea how to proceed?