• Skip to main content
  • Skip to primary sidebar

RNTLab.com

The Ultimate Shortcut to Learn Electronics and Programming with Open Source Hardware and Software

  • Courses
  • Forum
    • Forum
    • Ask Question
  • Shop
  • Account
  • Blog
  • Login

esp32 remote clock?

Q&A Forum › Category: ESP32 › esp32 remote clock?
0 Vote Up Vote Down
Jack Douglas asked 3 years ago

Hi
I want to deploy a remote solar-powered weather station as per Project 4 without LoRa.  I want instead to save the sensor data to an SD Card file with a timestamp.  However, there isn’t internet and I need a way to date/time stamp the data when it is awake.  What are my options?

Question Tags: clock, ESP32, remote, Weather Station
6 Answers
0 Vote Up Vote Down
Sara Santos Staff answered 3 years ago

Hi.
You can use an RTC module with a coin cell to keep track of time.
We have a tutorial for Arduino. I guess it should be similar for the ESP32:

Guide for Real Time Clock (RTC) Module with Arduino (DS1307 and DS3231)


This tutorial was written a long time ago, so it’s not much complete.
I hope this helps.
Regards,
Sara

0 Vote Up Vote Down
Jack Douglas answered 3 years ago

Thanks.  I connected an RTC and will see how it goes.

0 Vote Up Vote Down
Jack Douglas answered 3 years ago

Hi Sara   In this tutorial, the code uses byte pointer variables which are converted to decimals in a print statement.  I would like to save the values to string and save to a txt file, which I will open and send via MQTT.  Can you describe how to convert the byte pointer variables to characters?
Many thanks,  Jack

0 Vote Up Vote Down
Sara Santos Staff answered 3 years ago

Hi.
I think you can use something like this:

String yearString = String((char *) year);

I didn’t test it.
Regards,
Sara

0 Vote Up Vote Down
Jack Douglas answered 3 years ago

This worked fine.  Big thank you!

I need to work on my cpp.

0 Vote Up Vote Down
Sara Santos Staff answered 3 years ago

Great!
I’ll mark this issue as resolved. If you need further help, you just need to open a new question in our forum.
Regards,
Sara

Primary Sidebar

Login to Ask or Answer Questions

This Forum is private and it’s only available for members enrolled in our Courses.

Login »

Latest Course Updates

  • [New Edition] Build ESP32-CAM Projects eBook – 2nd Edition April 16, 2025
  • [eBook Updated] Learn ESP32 with Arduino IDE eBook – Version 3.2 April 16, 2025

You must be logged in to view this content.

Contact Support - Refunds - Privacy - Terms - MakerAdvisor.com - Member Login

Copyright © 2013-2025 · RandomNerdTutorials.com · All Rights Reserved

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.