Simple java driver for the SCD30 CO2 (temparature and humidity) sensor. The SCD30 is tested on RaspberryPi 3B+ and uses the I2C BUS.
More at https://zzerog.github.io/jSCD30/.
- Code completion
- Add logging fasade (as SLF4J)
- Maven page (mvn page)
- Unit testing
- Create examples
//init with I2C_BUS. RPi3 B+ => BUS_1;
SCD30 scd30 = new SCD30(new I2CMode(I2CBus.BUS_1));
scd30.setEventListener(event -> {
switch (event.getType()) {
case CO2:
System.out.println("CO2: " + event.getValue() + " ppm");
break;
case TEMP:
System.out.println("Temperature: " + event.getValue() + " °C");
break;
case HUMID:
System.out.println("Humidity: " + event.getValue() + " %");
break;
}
});
System.out.println("SCD30 firmware version: "+scd30.getFirmwareVersion());
scd30.start();
more at example package
- More about sensor: https://cz.mouser.com/new/sensirion/sensirion-scd30/
This project is licensed under the GNU General Public License v3.0 - see the LICENSE.md file for details