Get data from ultrasonic sensor hc-sr04 on Raspberry Pi

Hello, i intend to visualize realtime sensor data from an ultrasonic sensor (hc-sr04) on an Raspberry Pi with p5.js. How can i read in the data?

Thanks!

Have you tried checking previous forum posts about using ultrasonic sensors?

https://discourse.processing.org/search?q=ultrasonic

https://discourse.processing.org/search?q=hc-sr04