micropython-Chinese-Community / mpy-lib

HTS221, LPS22, LIS2DW12, LIS2MDL, LSM6DSO, STTS751, si7051, bme280, bmp280, APDS9930, TM1650, TM1637, LCD1602, GNSS, all kinds of micropython drives, examples, libs
MIT License
170 stars 73 forks source link

Problem with the alarm #9

Closed GeralDennis closed 2 years ago

GeralDennis commented 2 years ago

Hi I' ve had some problems with the following lines of code: ds.ALARM(12, 20, 10, ds.PER_DISABLE) ds.ALARM(12, 20, 10, ds.PER_DAY) When I run the programan, the shell show me the following: -----AttributeError: 'DS3231' object has no attribute 'PER_DISABLE'--- I am using an ESP32 dev module Could you help me fix it? Thank you very much in advance.

shaoziyang commented 2 years ago

Sorry, this is an error in the demo program. Please use the following usage:

ds.ALARM(12, 20, 10, DS3231.PER_DISABLE)
ds.ALARM(12, 20, 10, DS3231.PER_DAY)
GeralDennis commented 2 years ago

Thanks for your help ¡¡¡¡¡¡¡