Closed mohdrais closed 2 months ago
I'll try to define it as constant and try to be able to define it before the include. But last time I tried it didn't work (it was like 2+ years ago)
I've seen it's already done for Attiny. You can test it definining URTCLIB_WIRE before including the library:
#define URTCLIB_WIRE Wire1
#include "uRTCLib.h"
Sorry, it does not work for Pico W. Thank you
On Tue, Aug 6, 2024 at 1:49 PM Naguissa @.***> wrote:
I've seen it's already done for Attiny. You can test it definining URTCLIB_WIRE before including the library:
define URTCLIB_WIRE Wire1
include "uRTCLib.h"
— Reply to this email directly, view it on GitHub https://github.com/Naguissa/uRTCLib/issues/43#issuecomment-2270436136, or unsubscribe https://github.com/notifications/unsubscribe-auth/APBMQ26B675KGWS2OBXM67DZQBPW7AVCNFSM6AAAAABL7LO7FGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDENZQGQZTMMJTGY . You are receiving this because you authored the thread.Message ID: @.***>
Then the quick way is to copy library on Sketch's folder (under libraries folder) and change definition line:
https://github.com/Naguissa/uRTCLib/blob/master/src/uRTCLib.h#L48
Change it from Wire to Wire1
So, this way folders will be like:
[...]/Arduino/YourSketch/libraries/uRTCLib
[...]/Arduino/YourSketch/libraries/uRTCLib/src
[...]/Arduino/YourSketch/libraries/uRTCLib/src/uRTCLib.h ==> This is the modified file
[...]/Arduino/YourSketch/libraries/uRTCLib/src/uRTCLib.cpp
Thank you
On Wed, Aug 7, 2024 at 1:18 PM Naguissa @.***> wrote:
Then the quick way is to copy library on Sketch's folder (under libraries folder) and change definition line:
https://github.com/Naguissa/uRTCLib/blob/master/src/uRTCLib.h#L48
Change it from Wire to Wire1
So, this way folders will be like:
[...]/Arduino/YourSketch/libraries/uRTCLib [...]/Arduino/YourSketch/libraries/uRTCLib/src [...]/Arduino/YourSketch/libraries/uRTCLib/src/uRTCLib.h ==> This is the modified file [...]/Arduino/YourSketch/libraries/uRTCLib/src/uRTCLib.cpp
— Reply to this email directly, view it on GitHub https://github.com/Naguissa/uRTCLib/issues/43#issuecomment-2272636732, or unsubscribe https://github.com/notifications/unsubscribe-auth/APBMQ22KTOKFRCW2WIINGOLZQGU2LAVCNFSM6AAAAABL7LO7FGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDENZSGYZTMNZTGI . You are receiving this because you authored the thread.Message ID: @.***>
Hello, I am using Pico W and I want to run DS3231 by using I2C1 (Wire1). How to do that? (It works when using I2C0 (Wire).