This repository describes the sensor LV MAXSONAR EZ as a modular VIAM sensor component to be used in order to aquire distance readings from the repsective ultrasonic sensor.
sudo apt update && sudo apt upgrade -y
sudo apt-get install python3
sudo apt install python3-pip
sudo apt-get install python3-venv
The lv-maxsonar-ez
resource fulfills the Viam sensor interface.
The get_readings()
method takes no arguments and returns the detected distance
in centimeters (with the key 'distance').
This component should be configured as type sensor, model emery:sensor:lv-maxsonar-ez
.
The following attributes may be configured as lv-maxsonar-ez
component config
attributes.
Example:
{
"pw_pin": 36,
"rx_pin": 37
}
This pin outputs a pulse width (PW) representation of range.
This pin commands a range reading (RX) of the sensor.
{ "trigger_pin": "37", "echo_interrupt_pin": "36", "board": "raspberry-pi-3" }