I'm trying to have my pi read an ultrasonic sensor (Maxbotix HRLV-EZ4) using the serial interface, but I can't seem to get it to work. Here's the wiring diagram:
Note: Pin 10 is the RXD pin.
Here is the module and the script that utilizes the module I'm using. Disclaimer: I did not write either of these. The only thing I have done with it is test out different inputs for the (portName) input, as I was (and am) not sure what to put there. Consider it unedited in any way.
https://www.maxbotix.com/wp-content/upl ... raspPi.txt
The error is keep getting, 'Expected serial data not received', is defined at the end of the first script. The sensor uses a TTL protocol, or an optional RS232 protocol (but I'll have to break out the solder). 8-bit, 9600 baud. I have already activated the ttyAMA0 and ttyS0 UARTS by altering the /boot/config.txt file: enabling the UART, and disabling bluetooth to be able to use ttyAMA0.
If anyone can help walk me through this, it would be greatly appreciated. If I have left out any critical information, please let me know.