Skip to content

ZZerog/jSCD30

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

22 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

jSCD30

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/.

TODO LIST

  • Code completion
  • Add logging fasade (as SLF4J)
  • Maven page (mvn page)
  • Unit testing
  • Create examples

Usage

        //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

Dependencies

Resources

License

This project is licensed under the GNU General Public License v3.0 - see the LICENSE.md file for details

About

Simple java driver for the SCD30 CO2 sensor

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages