Giter VIP home page Giter VIP logo

ds18b20-science-fair's Introduction

ds18b20-science-fair

My kid is doing a science fair project and wants to log temperature changes in their experiment. We got some inexpensive DS18B20 sensors online and hooked them up to a raspberry pi. Most examples online do some string manipulation to extract the temperature from a single sensor. I wanted to extract data from multiple sensors and export it to CSV or JSON so it could be graphed out later.

This is a very basic executable that gets the data from all attached sensors and appends it to a file. We call the executable via cron as needed. Worked great.

We used https://github.com/yryz/ds18b20 to access the sensors and temperatures. Thank you for the excellent library!

To use this project:

  • clone the repo.
  • run go build getTemps.go to build the executable file (go run getTemps.go works for testing/manual use)
  • run crontab -e to configure a cronjob to run the executable
    • e.g. to capture data every 5 minutes, add */5* ** * cd /path/to/ds18b20-science-fair/ && ./getTemps
  • when the job is triggered, a new timestamped CSV file should appear in the ./data directory
  • if desired, the files can be concatenated together for additional processing: cat *.csv > combined_output.csv

ds18b20-science-fair's People

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.