Content Tagged With "logging"

Raspberry pi Temperature Monitor
no code, yet

I wanted to build a wireless arduino temperature logger. Well, I did. Except it was a rasberry pi and it logged to google drive. it was awesome. BUT! i lost the code. No worries, though. Here are my notes. I will clean this up soon...

I bought a raspberry pi and a DHT11 temperature/humidity sensor. Hooked it up and ran it. I used software/instructions from:

The sensor is accurate to 2 degrees C. It takes 2 seconds to get a reading and it isn’t as accurate as the DHT22. But, it was what was in stock at gateway so I used it and am logging data to a google spreadsheet via this code:

import sys

import gspread

import Adafruit_DHT

import time

import datetime

gc = gspread.login('', ‘password’)

sh = gc.open_by_url('')

worksheet = sh.get_worksheet(0)

sensor = Adafruit_DHT.DHT11

pin = 4

for x in range(2,2000):

humidity, temperature = Adafruit_DHT.read_retry(sensor, pin)

if humidity is not None and temperature is not None:

    print 'Temp={0:0.1f}*C  Humidity={1:0.1f}%'.format(temperature, humidity)

    worksheet.update_cell(x, 1,"%Y-%m-%d"))

    worksheet.update_cell(x, 2,

    worksheet.update_cell(x, 3, temperature)

    worksheet.update_cell(x, 4, humidity)


    print 'Failed to get reading. Try again!'


LOL, i need to get code formatting figured out on this site..

Here is the ardunio library and example code:

BUT, probably want to do what this guy is doing:

In fact, that’s the direction I want to go in. He does use the same temp sensor, which is guess is fine. But, he uses nrf24L01+ and an arduino so that’s the next step I suppose.

This is good, he uses protobufs:

As for WIRED communication between an arduino and raspberry,

thank you for playing.