As there seems to be no writes to the sensor via myserial
, then it would seem that reading from it is enough.
That code is a bit weird (the 4 reads in the for() followed by one in the read()).
Anyhow, looking at the specs, it seems you should be fine just reading four bytes at a time, verify that the first one is 255, then consider the next two ones and ignore the fourth (checksum, or use it to validate the others)
I think you should be able to:
- update your board to the
dev
branch (updating to the experimental release at the bottom here).
- connect your device's GND to Bela Mini's GND and the device's UART Tx pin to BelaMini's P2.05
- run this in the terminal at the bottom of the IDE:
config-pin P2.05 uart
- create and run the following patch: