RTClib | A fork of Jeelab 's fantastic RTC Arduino library | Video Utils library
kandi X-RAY | RTClib Summary
kandi X-RAY | RTClib Summary
This is a fork of JeeLab's fantastic real time clock library for Arduino.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of RTClib
RTClib Key Features
RTClib Examples and Code Snippets
Community Discussions
Trending Discussions on RTClib
QUESTION
I'm trying to read multiple sensors and saving all that data in one, singular, *.txt file. This is needed to enable it to analize and easily fill a database. But here is the catch, not all the sensors give int values, and as I learned the hard way, "String" gives to much unpredictable errors.
I want to read:
- Temperature
- Humidity
- Light intensity
- Sound
all saved as int
I also want to save
- 2 Accelero values (x,yand z values) as Float;
- a piece of text, just to log a status or debug as a String.
I tried to fill them into array but I'm overlooking something. Can someone please point me in the correct direction to make it work, that would help me alot!
For your interest, it should become a datalogger for a trailer for horses. So I get feedback about forces while driving and also the climate of the trailer and trigger camera and sound to monitor the animals (will be next step to livestream it and make it a IOT-system).
The code:
...ANSWER
Answered 2021-Feb-23 at 00:05Define a structure for the statistics you are trying to capture:
QUESTION
I'm making a project that requires an lcd, and the project was working fine on my breadboard for testing. I moved it to my final product, but now my lcd stops displaying text after a few minutes, or when the potetiometer value is too low. One thing that really gets my attention is that if the potentiometer is fully high, the lcd doesn't clear by itself. When I lower it, it happens again. I have a refresh rate in this project as well for about every 250 milliseconds. Here is the code for my project along with it's schematic.
code -
...ANSWER
Answered 2021-Feb-05 at 05:50Turns out I had a cheap potentiometer. I replaced it and it works good as new.
QUESTION
I've been working on collecting flow rates using the Arduino interrupt and I want to time stamp the data using a real time clock.
I have both sketches working individually using the Arduino examples but when I combine them it only writes to the serial port once and I am not sure why.
Once I have the pulse count will save to a SD card for data manipulation.
...ANSWER
Answered 2020-Dec-18 at 20:04noInterrupts()
stops all interrupts, not just the one you set up. Any Arduino library code that uses interrupts in the background could stop working. You should enable and disable only the interrupt you set up yourself.
Try replacing interrupts();
with attachInterrupt(digitalPinToInterrupt(Pulses), CountPulses, FALLING);
and replacing noInterrupts();
with detachInterrupt(digitalPinToInterrupt(Pulses));
You can then also remove the attachInterrupt()
from setup()
.
QUESTION
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:19Your line of code:
QUESTION
This is my very first code in arduino. Im trying to build a simple watering automation for my garden. The code contain 3 main functions which is:
- To topup fertilizer tank with water.
- To add fertilizer into the water tank while water being topup with assumption fertilizer will be mix during this process.
- To automated watering process through the day.
For the 1st and 3rd function, Im already got it done (theoretically + small scale system) i think. haha!
Now, for the fertilizer function number 2 (fertilizer_PUMP()), im using 2 peristaltic pump to add AB fertilizer solutions into the tank. Im trying to get the pump to run for the x amount of time but the the function only run once, after that the loop need to reset if both float switch become dry and wait for the bottom switch wet again. Could anyone please help and guide me which part im missing? Im open for any suggestion to improved my code too.. Thank you.
UPDATE:
Im so sorry for the confusing. Actually for this function, below are my requirements.
- If top float dry and bottom float wet > turn on both peristaltic pump for 10s(or more will change later) and stop.
- Then, if top float dry and bottom float dry > reset.
- Wait for next top float dry and bottom float wet.
Im really sorry again for the confusing. Kinda messed up with the logic previously.
...ANSWER
Answered 2020-Apr-07 at 19:07Define your currentTime and fertilizer_pumpON as global
QUESTION
I have an embedded board which sends information from IMU sensors along with a timestamp received from a RTC Module.
The Timestamps are obtained from Adafruit's RTClib
The code has a function called unixtime()
which provides me timestamps as follows:
ANSWER
Answered 2018-Sep-20 at 17:21I am using the DS3231 RTC module which provides a precision of seconds. [1].
According to documentation for InfluxDB's HTTP Write Syntax [2]:
All timestamps are assumed to be Unix nanoseconds unless otherwise specified
Since Information provided by the RTC is hardware specific, I assume the precision cannot be changed. (doubtful)
SolutionI used the precision
parameter in the HTTP write syntax in my Arduino Sketch as follows:
QUESTION
I have an Arduino on an Adafruit feather mo. I am attempting to store data on an adalogger. The idea is simple. I have a potentiometer and I wish to write data from that potentiometer to an SD card. I can create, open, and close a CSV file, but I cannot write data from the potentiometer to the CSV file on the SD card.
Very rarely, I can get data from the sensor to write into the CSV file. However, I am not convinced this is a hardware issue, because I can see all the data in COM using Serial.println()
just like I want from the potentiometer. It just won't write to the SD card. Can someone point out what I could be going wrong?
This code works:
...ANSWER
Answered 2017-Mar-30 at 02:03Try changing the code so that the open call only happens when the WriteEnable flag changes from false to true. Do the opposite for the close call.
To more directly match the Arduino Reference move the close call to be just after the write.
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install RTClib
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page