Skip to content

Commit

Permalink
small fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
CDFER committed Jun 7, 2023
1 parent a1879ce commit d4682da
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 4 deletions.
1 change: 1 addition & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
"datasheet",
"EEPROM",
"LOGI",
"selftest",
"Sensirion"
]
}
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ vTaskDelay(4750 / portTICK_PERIOD_MS); //new data available after approx 5 secon
| `setCalibrationMode()` | Sets the calibration mode and stores it in the EEPROM of the SCD4x. The automatic self-calibration algorithm assumes that the sensor is exposed to the atmospheric CO2 concentration of 400 ppm at least once per week. Use this function sparingly to avoid unnecessary wear of the EEPROM. |
| `getCalibrationMode()` | Gets the calibration mode. Returns `true` if auto calibration is enabled, `false` otherwise. |
| `saveSettings()` | Stores settings in the EEPROM of the SCD4x. Wait at least 800ms before sending further commands. EEPROM is guaranteed to endure at least 2000 write cycles before failure. |
| `getErrorText()` | Converts an error code into descriptive text. Returns a pointer to a constant character array containing the descriptive text of the error. If the error code is not recognized, "Unknown error" is returned. |
| `getErrorText()` | Converts an error code into descriptive text. Returns a pointer to a constant character array containing the descriptive text of the error. If the error code is not recognized, "Unknown error" is returned. |
## Credits
Based on the work of Raphael Nestler and everyone at Sensirion AG.
Expand Down
2 changes: 1 addition & 1 deletion examples/async_scd4x_measurement.ino
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
Instructions:
- Install the SCD4X library in your Arduino IDE or add it to platformio.ini
- Connect the SCD4X CO2 sensor to the following pins on your Arduino board:
- Connect the SCD4X CO2 sensor to the ESP32:
- SDA: GPIO 21
- SCL: GPIO 22
- VCC: 3V3 (3.3V)
Expand Down
4 changes: 2 additions & 2 deletions scd4x.h
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
#include <Arduino.h>
#include <Wire.h>

#define SCD4X_I2C_ADDRESS 0x62 // 7-bit I2C Address
#define SCD4X_I2C_ADDRESS 0x62 // I2C Address

class SCD4X {
public:
Expand All @@ -54,7 +54,7 @@ class SCD4X {
uint8_t begin(TwoWire& port = Wire, uint8_t addr = SCD4X_I2C_ADDRESS);

/**
* Checks for correct response, manufacturer ID, and part ID.
* Checks for correct response, manufacturer ID, part ID, and does a quick selftest.
*
* @param port Wire instance (e.g., Wire or Wire1)
* @param stream Debug output pointer (e.g., &Serial)
Expand Down

0 comments on commit d4682da

Please sign in to comment.