Sha256: 3a376d2ea68024c0a342f797e0cc4f97ea5a173e87221c244d64b128cc336a49

Contents?: true

Size: 360 Bytes

Versions: 1

Compression:

Stored size: 360 Bytes

Contents

# -*- coding: utf-8 -*-
#usr/bin/env ruby
require 'rubygems'
$:.unshift File.expand_path '../lib', File.dirname(__FILE__)
require 'arduino_firmata'
require 'tw'

arduino = ArduinoFirmata::Arduino.new
sleep 3

##  LM35DZ -> Analog 0 PIN
puts temp = arduino.analog_read(0)*100*5/1024
client = Tw::Client.new
client.auth
client.tweet "現在の温度 #{temp}度"

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
arduino_firmata-0.0.1 samples/tweet_temperature.rb