Template Software STM32F429 Discovery Kit with SCD41 CO2 Sensor

Dependencies:   LCD_DISCO_F429ZI TS_DISCO_F429ZI BSP_DISCO_F429ZI

Revision:
13:aff8e9f42652
Parent:
12:98dd45560c50
--- a/scd30.h	Thu Mar 17 09:38:06 2022 +0000
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,80 +0,0 @@
-#ifndef SCD30_H
-#define SCD30_H
-
-#include "mbed.h"
-// i2c sensor address
-#define SCD30_ADR  0x61
-// sensor automatically starts measurement. RDY pin signals measurement ready.
-#define COMMAND_CONTINUOUS_MEASUREMENT {0x00, 0x10, 0x00, 0x00, 0x00}
-#define COMMAND_CONTINUOUS_MEASUREMENT_LEN 5
-// 2s measurement Interval
-#define COMMAND_SET_MEASUREMENT_INTERVAL {0x46, 0x00, 0x00, 0x02, 0x00}
-#define COMMAND_SET_MEASUREMENT_INTERVAL_LEN 5
-// automatic self calibration on
-#define COMMAND_AUTOMATIC_SELF_CALIBRATION {0x53, 0x06, 0x00, 0x01, 0x00}
-#define COMMAND_AUTOMATIC_SELF_CALIBRATION_LEN 5
-// command that needs to be sent before reading out the measurement result
-#define COMMAND_READ_MEASUREMENT {0x03, 0x00}
-#define COMMAND_READ_MEASUREMENT_LEN 2
-
-    /** Create SCD30 controller class
-     *
-     * @param Scd30 class
-     *
-     */
-class Scd30 {
- 
-public:
-     enum ScdError {
-         SCD_ERROR_NO_ERROR,
-         SCD_ERROR_COM_ERROR
-     };
-
-    /** Create a SCD30 object using the specified I2C object
-     * @param sda - mbed I2C interface pin
-     * @param scl - mbed I2C interface pin
-     * @param I2C Frequency (in Hz)
-     *
-     * @return none
-     */
-     Scd30(PinName sda, PinName scl, int i2cFrequency, PinName rdy);
-    
-    /** Initialize settings and start Auto-Measurement 
-     *
-     * @param --none--
-     *
-     * @return enum ScdError
-     */
-    uint8_t init();
-    
-    /** Check if measurement is ready
-     *
-     * @param --none--
-     *
-     * @return bool true=ready
-     */
-    bool isMeasurementReady();
-    
-    /** Read all environmental parameters (CO2, Temp and Hum) from sensor
-     *
-     * @param --none-
-     *
-     * @return enum ScdError
-     */
-    uint8_t readMeasurement();
-    
-    /** Get current CO2 value
-     *
-     * @param --none--
-     *
-     * @return enum SCDerror
-     */
-    float getCo2(){ return _co2;};
- 
-private:
-    I2C           _i2c;
-    DigitalIn     _rdy;
-    float         _co2;
- 
-};    
-#endif
\ No newline at end of file