Error
  • JHTMLicon not supported. File not found.
  • JHTMLicon not supported. File not found.
  • JHTMLicon not supported. File not found.

puts

is it possible that this could be converted into float other than 1.0, 2.0, 3.0?
Saturday, 20 February 2010 06:38
// This code i got here from this site...(thanks to jrobertson)is it possible to convert this to float or doubled than 1.0, 2.0, 3.0, etc?


deviceid = '00:12:D1:E6:57:BE'
range = ''
count = 0
while count < 1
# assuming the bt device is already connected get the signal strength value.
range = `hcitool rssi #{deviceid}`.chomp
if range.length > 0
puts range[/\w+$/]
else
puts 'connecting to the bluetooth device ...'
Thread.new{`rfcomm connect 0 #{deviceid}`}
end

sleep 7
end

Read more: http://feeds.dzone.com/~r/dzone/snippets/~3/VOMwY5tKuQg/10213

 
2
Next
End


Page 2 of 2
Taxonomy by Zaragoza Online