Hi. I want to communicate with an SPI sensor (BME280). However, I could not find the SPI interface in the /dev directory. So, first of all, how can I enable the SPI interface?
Secondly, I’ve seen here that SPI access from user-space is provided through the spidev and that the SPI interface can be accessed only via an application written in C/C++. Is it possible to access the SPI from an application written in a different language, e.g. Python?
Hi @CristianM
Thanks for writing to the Toradex Community!
However, I could not find the SPI interface in the /dev directory. So, first of all, how can I enable the SPI interface?
You would need to enable the spidev device as explained here.
Is it possible to access the SPI from an application written in a different language, e.g. Python?
For Python, you can use this python package.
Further there is also a driver (bosch,bme280) in the Linux kernel for the given sensor. Please check this Documentation Documentation/devicetree/bindings/iio/pressure/bmp085.yaml
Best regards,
Jaski