Hello !
I am new on this forum. (but I already read some very interesting exchanges here)
My current project is to follow the curse of the sun during the day. For that I use an arduino Uno with a RTC (DS3231 or DS3232).
For the RTC I use the Library DS3232RTC-master of Jack Christensen.
My problem is that I cannot manage to register and read data using the RAM of the RTC module. :
static float Latitude, Longitude ; // (example of data Latitude=45.128 ; Longitude = -1.007 )
In the main loop :
I want either read variables through USB (no problem for that )
:
if (carlu1=='w') {
Serial.print(F(" Entrez Latitude,Longitude : "));
Attente6 :
if (Serial.available()<=0) goto Attente6; // attente données
delay (10);
Latitude = Serial.parseFloat();
delay (10);
Longitude = Serial.parseFloat();
delay (10);
then record the data in the RAM of RTC by using the following command
:
writeRTC(byte addr, byte *values, byte nBytes)
writeRTC(1, byte *values, 4)
either read in the RAM of RTC by using the following command
:
readRTC(byte addr, byte *values, byte nBytes)
I don’t manage to fill the 2nd parameter and I didn’t find any example of the use of these 2 commands on the net.
Someone can give an advice or propose an example ?
Thanks in advance for your help !