board/stm32f401rc-rs485: Add support to ultrasonic sensor HC-SR04

Signed-off-by: Rodrigo Sim rcsim10@gmail.com
This commit is contained in:
Rodrigo Sim
2024-05-18 12:20:46 -03:00
committed by Alan Carvalho de Assis
parent e6ed8c6782
commit 8fb458b7fe
4 changed files with 109 additions and 0 deletions
@@ -539,3 +539,19 @@ NSH commands::
mcsonn_main: Connected
nsh> msdis
hcs04
-----
Configures the NuttShell (nsh) over USB Serial (check usbserial configuration) and enables ultrasonic sensor HC-SR04::
nsh> cat /dev/dist0
6241 --> value
6227
6241
6255
You can convert the value using following::
Convert to cm: value/58
Converto to inches: value/148