Vickash Codes

Temperature Logging with Dino and TempoDB


Dino is a Ruby gem that lets you control a connected Arduino with Ruby. It’s very general purpose and already supports lots of hardware that you’d normally connect to an Arudino, including analog sensors, like the TMP36 temperature sensor :

TMP36 Analog Temperature Sensor

This script will read the value of the sensor connected to pin A0 of an attached Arduino and print the raw 10-bit reading from the ADC:

Note: Some of these features are only available in the latest 0.12.0 branch of the dino gem.

require 'dino'
board =
tmp36 = 'A0', board: board) do |reading|
  puts reading

Wouldn’t it be better to get the actual temperature though?

Read More »

Previous Posts