energietransitie / needforheat-generic-firmware

Common source code (library) for NeedForHeat measurement devices
https://www.energietransitiewindesheim.nl/needforheat-generic-firmware/
Apache License 2.0
4 stars 1 forks source link

Add software support for the buzzer in M5CoreINK #50

Closed n-vr closed 2 years ago

n-vr commented 2 years ago

What does this change

This PR adds support for the buzzer on the M5Stack Core INK.

:warning: This code is already used by the co2 monitor firmware repository on the use-generic-library branch. That branch will currently only compile when the change in the testing section below is made.

Testing

These changes can be tested by using the co2 monitor firmware repository on the use-generic-library branch.

  1. Make the following change to the platformio.ini file.
    - https://github.com/energietransitie/twomes-generic-esp-firmware
    + https://github.com/energietransitie/twomes-generic-esp-firmware#buzzer
  2. Compile the firmware and flash it onto a device.
  3. When you hold 'up' on the multi-functional button for 10 seconds, you will hear a beep when recalibration starts. You will hear 2 beeps when calibration finishes successfully and 3 if it fails. Recalibration can take between 3 and 4 minutes. See chapter 3.7.1 in the SCD41 datasheet to read why.