Skip to content

Week of Data

You'll log one sensor every minute for seven days with real timestamps, survive a power cut without losing the record, and graph what your home is up to.

About

Reading a sensor once is a demo; reading it every minute for a week is data. Temperature, humidity, light, soil moisture or a door switch all work, so pick one, log it with a real clock, and look at the graph. You'll find a pattern you didn't expect, like the fridge cycling, the sun hitting the window, or the heater kicking on at 5 a.m. The skill here is keeping the record honest: timestamps that survive a reset, a file that doesn't corrupt when the power goes, and a calibration you can defend. Something will break around day three, and the logger has to come back from it on its own.

At a glance

Per requirement
35 XP
Completion bonus
300 XP
Requirements
6
Takes
Two weeks
Skill level
Beginner (done it a few times)
Cost
Inexpensive (under $20)
Supplies
You need some
Where
At home
Other people
On your own
Locked for now
Earn two more Uncommon badges in Microcontrollers & Robotics to open this one. Log in to see how far along you are.

Requirements

  1. 1
    Wire a digital sensor to an Arduino or ESP board and read it in the serial monitor. Use a DHT22 or BME280 for temperature and humidity, a photoresistor for light, or a capacitive soil probe for a plant, and each is under ten dollars. Take a screenshot of live readings scrolling in the serial monitor. Photo
  2. 2
    Calibrate against something you trust. Put the sensor next to a thermometer, or in a known condition like an ice bath for a temperature probe, and note the offset. Take a photo of the two readings side by side. Photo
  3. 3
    Give it a real clock and write one timestamped line per minute. millis() starts from zero on every reset, so it can't date a log. Use a DS3231 module (about two dollars, and it keeps time on a coin cell) or NTP on an ESP board. Write CSV: a date and time, then the reading, one line per minute, to an SD card (a module is about two dollars) or a free dashboard like ThingSpeak. Take a screenshot of the first few lines with timestamps that match a clock in the room. Photo
  4. 4
    Pull the power for a minute on day three and show the log picking up with the right time. The file has to open cleanly afterward, which means closing or flushing it after every write rather than once an hour, and the first line after the gap has to carry the real time rather than starting again from zero. Take a screenshot of the lines either side of the gap. Photo
  5. 5
    Keep it running for seven days straight. Something else will go wrong in a week: a sensor glitch, a card filling up, the Wi-Fi dropping, someone unplugging it to charge a phone. Say what it was and how the logger coped, or how you fixed it. Take a screenshot of the log file or the dashboard showing the full week. Photo
  6. 6
    Graph the week and mark three events you can explain. Any spreadsheet will do. Label the spikes and dips with what caused them, like the oven, the open window or the cold night. Post the graph with your three annotations on it. Photo