m5stack / M5Unit-RTC

MIT License
2 stars 1 forks source link

Compile error with M5Stack Capsule RTC with BM8563 #3

Closed Dirk611 closed 3 months ago

Dirk611 commented 4 months ago

Greetings! I am attempting to compile a program with the RTC; I've been able to compile examples with the internal SD card and IMU, but not the example for the RTC, gives the following error:

C:\Users\dirk6\AppData\Local\Temp.arduinoIDE-unsaved2024413-17884-3ssctb.stzp9\Unit_RTC_M5Core2\Unit_RTC_M5Core2.ino:17:10: fatal error: M5_BM8563.h: No such file or directory

include "M5_BM8563.h"

      ^~~~~~~~~~~~~

compilation terminated. exit status 1

Compilation error: M5_BM8563.h: No such file or directory

I did install the only library I could find named M5Unit-RTC, but that didn't help....

I tried using the line from other examples:

include "Unit_RTC.h"

but got the following compilation error: exit status 1

Compilation error: 'BM8563' does not name a type; did you mean 'BIT53'?

Sorry I'm a new guy; can anyone advise me as to what I should do? Thank you

pandiannano commented 3 months ago

Sorry for the inconvenience, please change this code from:

include "M5Core2.h"

include "M5_BM8563.h"

BM8563 RTC;

to:

include "M5Core2.h"

include "Unit_RTC.h"

Unit_RTC RTC;

Dirk611 commented 3 months ago

Thank you for your kind reply, Pandian! I did get it working! (o: so all is good!

but if you are interested, below I posted what I had to do (several things) to get it working;

Yes, I did have the M5Stack Capsule board selected.....

[image: image.png]

However, I was not able to locate BM8563 RTC examples that are specific to the M5 Capsule.......There is a group of examples labelled "Examples for M5 Capsule" (please see screen cap below) but I was unable to find any RTC examples there.....

[image: image.png]

In attempting to use your recommendation, I was unable to find the exact location of examples for M5Capsule (that is, I don't see a specific category for the M5Capsule)...... [image: image.png]

I noticed the Board Manager I have installed is version 2.1.1, so I installed 2.0.7 (as you recommend), hoping examples I need are included..... In the Examples I2C_BM8563_RTC section I found an RTC example called BM8563_Set But it appears 2.0.7 doesn't appear to have the M5Capsule board profile, because I get the following compilation error:

Invalid FQBN: board m5stack:esp32:m5stack_capsule not found Compilation error: Invalid FQBN: board m5stack:esp32:m5stack_capsule not found

So I reloaded Board Manager 2.1.1 and that fixed that problem.

I also discovered a generic I2C_BM8563_RTC example folder. I loaded those SET (time) and GET (time). Those examples were for other boards but worked after setting the correct SDA and SCL I/O for the M5 Capsule... all good!

Thank you! Dirk

On Thu, May 23, 2024 at 7:28 PM Pandian Nano @.***> wrote:

Are you using rtc in the m5 capsule examples? If correct? You follow this

image.png (view on web) https://github.com/m5stack/M5Unit-RTC/assets/6286904/1957e01b-a7e4-4603-96ff-9bb1f0602ef5

— Reply to this email directly, view it on GitHub https://github.com/m5stack/M5Unit-RTC/issues/3#issuecomment-2128382106, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACW7MHER4EV4WFQLOVCCISLZD2QVJAVCNFSM6AAAAABHW63ZMCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCMRYGM4DEMJQGY . You are receiving this because you authored the thread.Message ID: @.***>

Dirk611 commented 3 months ago

Oh! didn't see your latest comment till now..... It also works with

include "I2C_BM8563.h"

Thx! (o: