ds3231 | arduino library for DS3231 RTC

 by   rodan C++ Version: Current License: No License

kandi X-RAY | ds3231 Summary

kandi X-RAY | ds3231 Summary

ds3231 is a C++ library typically used in Internet of Things (IoT), Arduino applications. ds3231 has no bugs, it has no vulnerabilities and it has low support. You can download it from GitHub.

DS3231 library for the Arduino.
Support
    Quality
      Security
        License
          Reuse

            kandi-support Support

              ds3231 has a low active ecosystem.
              It has 118 star(s) with 72 fork(s). There are 21 watchers for this library.
              OutlinedDot
              It had no major release in the last 6 months.
              There are 0 open issues and 6 have been closed. On average issues are closed in 0 days. There are 1 open pull requests and 0 closed requests.
              It has a neutral sentiment in the developer community.
              The latest version of ds3231 is current.

            kandi-Quality Quality

              ds3231 has no bugs reported.

            kandi-Security Security

              ds3231 has no vulnerabilities reported, and its dependent libraries have no vulnerabilities reported.

            kandi-License License

              ds3231 does not have a standard license declared.
              Check the repository for any license declaration and review the terms closely.
              OutlinedDot
              Without a license, all rights are reserved, and you cannot use the library in your applications.

            kandi-Reuse Reuse

              ds3231 releases are not available. You will need to build from source code and install.

            Top functions reviewed by kandi - BETA

            kandi's functional review helps you automatically verify the functionalities of the libraries and avoid rework.
            Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of ds3231
            Get all kandi verified functions for this library.

            ds3231 Key Features

            No Key Features are available at this moment for ds3231.

            ds3231 Examples and Code Snippets

            No Code Snippets are available at this moment for ds3231.

            Community Discussions

            QUESTION

            How do I manually install a library in Thonny
            Asked 2021-May-03 at 15:18

            I want to install this library using Thonny https://github.com/adafruit/Adafruit-uRTC to use a DS3231 with my Raspberry Pi Pico. I cannot install it via the built-in package manager feature for two reasons. The version on PyPi is out of date and apparently buggy, I want to use the latest version. Even if I wanted to use the version on PyPi micropip fails to install it with an opaque and unhelpful error message "micropip returned with error code 1".

            I have the source files, they have no dependencies, how can i just install them manually?

            ...

            ANSWER

            Answered 2021-May-03 at 15:18

            The library you are trying to install is deprecated. Maybe you want a more specific driver like this one. You can just upload it to your board like any other .py file.

            Generally to install libraries manually you enter the REPL and type.

            Source https://stackoverflow.com/questions/67368303

            QUESTION

            Tinkerboard with RTC board does not update the system time
            Asked 2021-Mar-20 at 14:03

            I'm working on a ASUS TinkerBoard, OS Linaro 9.5 - Kernel 4.4.132

            I added a little RTC board based on DS3231 chip.
            The system creates the device /dev/rtc1 added to /dev/rtc0 and /dev/rtc (link to /dev/rtc0).
            I'm able to talk with the RTC chip via i2cdetect and hwclock commands but I have a strange behavior.

            This is my tests - of course I'm disconnected from the network to avoid the ntp sync:

            WITHOUT RTC: at every power up the board/OS resets the date and time from Nov 03 2016 00:00

            WITH RTC:

            • synced the date/time by Internet connection
            • forced the RTC value set by hwclock -f /dev/rtc1 --systohc
            • checked the value by 'hwclock -f /dev/rtc1 --get'
            • disconnected from the network and powered down the board - let's say at 18:00
            • powered up the board at 18:15
            • when the desktop is ready I see the system time is set to 18:00 (?)
            • if I read the RTC by hwclock -f /dev/rtc1 --get and I have 18:15
            • the data is correctly set to today (!)

            It seems the system date is restored, the system time is freezed at the power down time, the RTC time is correct but it is not restored to the system time.

            Any idea?

            ...

            ANSWER

            Answered 2021-Mar-20 at 14:03

            You say that /dev/rtc is a link to /dev/rtc0, this means that your kernel is configured with CONFIG_RTC_HCTOSYS_DEVICE set to rtc0. You can either set it to rtc1 or update your device tree aliases so that the DS3231 becomes rtc0.

            The other solution would be to stop relying on the kernel hctosys and use hwclock -f /dev/rtc1 --hctosys in a startup script.

            Source https://stackoverflow.com/questions/66713365

            QUESTION

            Bluetooth module not loaded sometimes on reboot in Raspbian Buster, Raspberry Pi 4
            Asked 2021-Feb-03 at 09:02

            I have written a bluez application on Raspbian Buster, Raspberry Pi 4. In some reboots, the bluetooth module and service are not loaded.

            On checking the bluetooth.service with command: $ sudo systemctl status bluetooth.service, I see, Condition check resulted in Bluetooth service being skipped.

            I checked $ lsmod and $ dmesg logs for both issue and non-issue conditions.

            The difference I find in the lsmod is shown below:

            The difference I find in the dmesg log is shown below:

            The left side is the issue case and the right side is non issue case.

            How can I fix the issue so that the bluetooth works consistently? I am using Raspbian Lite OS 2020-02-14.

            Update 1 [03 Feb 2021]: I checked the journalctl log for the issue case and found this:

            ...

            ANSWER

            Answered 2021-Feb-03 at 09:02

            My orientation sensor was interfaced to UART2 of Raspberry Pi 4. On getting suggestion from @svin83 , I disabled UART2. After that I rebooted the Pi 4 10 times and the bluetooth worked correctly all the times.

            I moved the sensor to I2C-3 bus in Raspberry Pi 4.

            As per the documentation, UART Configuration, the UART2 should not have interfered with bluetooth functionality, but it turns out it does.

            Source https://stackoverflow.com/questions/66021697

            QUESTION

            Adafruit RTClib TimeSpan calculation fails on ESP32
            Asked 2020-Dec-06 at 05:19

            I'm currently trying to measure remaining time until a given timestamp using Adafruit's RTClib library. My RTC module is a DS3231. here is my TimeSpan object in code:

            ...

            ANSWER

            Answered 2020-Dec-06 at 05:19

            QUESTION

            How to stop a PIR sensor from sending high output when there's no motion
            Asked 2020-Jul-31 at 08:22

            My intention is a program a system that turns on at a certain time and also turns off at a particular time. But the problem I'm facing is that each time it gets to the scheduled time to turn on the sensor starts sensing motion even when there's no motion for a few seconds after that it goes back to normal. Normal in the sense that it stops sensing motion when there's no motion. I ran a basic motion dection code using PIR sensor and led just to check if the sensor is working properly, it worked out fine so I don't really know why I'm still getting that error. Please how can I eliminate this error cus I have very little knowledge on how to program an Arduino.

            ...

            ANSWER

            Answered 2020-Jul-31 at 08:22

            A PIR sensor like the HC-SR501 will not immediately switch back to "low". It will switch to "high" once motion is detected and sustain the output for around 10 seconds.

            In my applications I usually use multiple sensors, for example a PIR motion sensor combined with a camera. Once the PIR triggers, the application will start checking for motion inside the camera picture.

            Source https://stackoverflow.com/questions/63188092

            QUESTION

            How to resolve the issue of repeatedly sending text message in an intruder alarm
            Asked 2020-Jul-28 at 06:35

            This code is meant to be useful for detecting an intruder at a particular time interval, then it turns on 2 led's and a buzzer and then send a text message to the pre-programmed number. But the challenge I'm facing is that when the system comes on the pir sensor keeps sending a logic 1 and that in turn makes the gsm module to keep sending text message even when no intruder is in range also immediately the scheduled time elapses the sensor then again sends a logic 1 before finally going off. Secondly the text message I receive shows Content not support. Please I'm really in need of help I'm confused and I don't know what to do anymore.

            ...

            ANSWER

            Answered 2020-Jul-28 at 06:35

            Try to get 1 variable to be for help. I'll name it help just to show. This will make so the text msg will be sent only first time after change of state from low to high.

            Source https://stackoverflow.com/questions/63122800

            QUESTION

            'While' condition is not satisfied
            Asked 2020-Jun-24 at 09:02

            i am having a bit of trouble understanding why the "while" loop in my code doesn't stop when the condition is met.

            ...

            ANSWER

            Answered 2020-Jun-24 at 09:02

            It is evident from your code that, you are using an 'OR' between these conditions as in (x or y). So the loop will continue its execution until both of these conditions equate to a false value.

            ex : Consider the following while loop

            Source https://stackoverflow.com/questions/62549536

            QUESTION

            SQW signal on DS3231 RTC module is stuck at 1Hz (need 1024Hz)
            Asked 2020-Apr-30 at 16:25

            I want to use a DS3231 RTC (ZS-042) to make precise time measurements on my arduino uno. I need to measure milliseconds, to the regular time functions of the various RTC libs are not enought.

            After googling & asking aroung I found that I need to use the SQW output of the DS3231 and attach it to an interrupt or timer. When using the appropriate rate, I would be able to perform time measurements.

            So I tried wiring the SQW to pin 5 on my arduino uno (which is the T1 input), and configure T1 to use an external source. I used some RTC lib to enable the SQW output and set it to 1024hz. Then I attached the ISR for counting ticks and overflows.

            All this seems to basically work, however the SQW signal seems to be stuck at 1hz, no matter what I do.

            Here is my code:

            ...

            ANSWER

            Answered 2019-Apr-03 at 10:54

            If your module has DS3231M chip then according to datasheed this modification can only generate 1Hz signal on INT/SQW pin (3) and 32768Hz on 32kHz pin(1). I have several DS3231M's and checked it.

            If your module has DS3231SN chip: I had a similar issue recently. Got 10 pcs of DS3231SN from ali. Soldered one IC to my board and discovered this problem. Luckily I had ZIF SO16 to DIP adapter and built a test-board, connected it to oscilloscope and tested all of them. Only 4 pcs of 10 was able to generate different signals (1024Hz, 4096Hz etc.) on SQW pin according to datashet. Also they generated stable 32768 Hz signal on 32KHz pin (pin 1).

            Other 6(also marked as DS3231SN) gave only 1 Hz signal on SQW pin, all of them produced signal on 32 kHz pin (one IC generated about 35 kHz), one IC generated floating frequency signal on SQW pin (around 1500 Hz and it cant be changed). I think it's low quality fake IC's.

            Source https://stackoverflow.com/questions/54502375

            QUESTION

            Raspberry Pi 3 v1.2 with RTC synch problems
            Asked 2019-Dec-01 at 06:48

            I am trying to synch the hour between localtime and RTC. I have DS3231 RTC, i followed a guide to install and configure the OS to use it, RTC is working, but the time without internet is 2 hours backwards. My timezone is GMT+2 and its set correctly in /etc/localtime. When NTP is working everything is looking fine. Output of timedatectl:

            ...

            ANSWER

            Answered 2019-Dec-01 at 06:48

            welcome to stackoverflow!

            To set your OS timezone in the system configuration you have to define it with timedatectl. For example for Bulgaria you have to enter

            Source https://stackoverflow.com/questions/58955142

            QUESTION

            PCM5122 DAC with Android Things
            Asked 2018-May-11 at 20:43

            I have a Raspberry Pi 3B and Suptronics X920 Expansion Board which uses PCM5122 DAC. So I'm having trouble playing sounds through that board.

            The config file is default except for the display configuration part:

            ...

            ANSWER

            Answered 2018-Jan-31 at 17:07

            It looks like you might be using some of the code for the Google Assistant sample, and you are correct to assume that TYPE_BUS is what you need to enable the audio routes to use the I2S bus instead of the built-in audio jack.

            However, that is likely not the whole story. The DAC likely requires additional configuration commands and/or external triggers. Looking at a similar HAT with the same DAC, for example, there is an I2C bus connection as well for DAC setup commands. Our Assistant sample uses the VoiceHAT driver to accomplish the additional triggering required by the DAC on that peripheral.

            In Raspbian, the driver you enable via dtoverlay likely takes care of both pieces. Here, your code will need to manage the setup bits manually. Look at how the VoiceHAT driver is used in the Assistant sample as an example of this.

            Also, make sure you are not enabling any of the I2S pins as either GPIO or PWM, as this will disable the audio route per the documentation.

            Side Note: Android Things does not support making kernel changes via config.txt, so adding drivers there is expected not to have any effect.

            Source https://stackoverflow.com/questions/48541166

            Community Discussions, Code Snippets contain sources that include Stack Exchange Network

            Vulnerabilities

            No vulnerabilities reported

            Install ds3231

            You can download it from GitHub.

            Support

            For any new features, suggestions and bugs create an issue on GitHub. If you have any questions check and ask questions on community page Stack Overflow .
            Find more information at:

            Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items

            Find more libraries
            CLONE
          • HTTPS

            https://github.com/rodan/ds3231.git

          • CLI

            gh repo clone rodan/ds3231

          • sshUrl

            git@github.com:rodan/ds3231.git

          • Stay Updated

            Subscribe to our newsletter for trending solutions and developer bootcamps

            Agree to Sign up and Terms & Conditions

            Share this Page

            share link