© The Author(s), under exclusive license to APress Media, LLC, part of Springer Nature 2021
G. FlurryJava on the Raspberry Pihttps://doi.org/10.1007/978-1-4842-7264-0_11

11. An Environmental Sensor

Greg Flurry1  
(1)
Austin, TX, USA
 

In this chapter, we’ll produce a device library for a commonly used IoT device – an environmental sensor. For this book, I chose the Bosch BME280, which measures humidity, pressure, and temperature. The BME280 is a hugely popular sensor, and you can find many breakout boards built with the sensor that make it very easy to include in your project.

In this chapter, I’ll discuss
  • The joy of finding that diozero supports your device!

  • Some of the differences between reading from and writing to a device with I2C and SPI

  • The benefits ...

Get Java on the Raspberry Pi: Develop Java Programs to Control Devices for Robotics, IoT, and Beyond now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.