Skip to content

Instantly share code, notes, and snippets.

@FaisalFehad
Created August 16, 2017 16:42
Show Gist options
  • Save FaisalFehad/d9b3483d9aae144671c5a453305c17fd to your computer and use it in GitHub Desktop.
Save FaisalFehad/d9b3483d9aae144671c5a453305c17fd to your computer and use it in GitHub Desktop.
RPi temp test
# set timer to start
timer = 60
start_time = Time.now
stop_time = start_time + timer
holder = 0
def temp
system('/opt/vc/bin/vcgencmd measure_temp')
end
while Time.now <= stop_time
holder += 1 # stress task
temp
puts holder
system('clear')
end
# set timer to start
timer = 60
start_time = Time.now
stop_time = start_time + timer
holder = 0
def temp
system('/opt/vc/bin/vcgencmd measure_temp')
end
while Time.now <= stop_time
holder += 1 # stress task
temp
puts holder
# set timer to start
timer = 60
start_time = Time.now
stop_time = start_time + timer
holder = 0
def temp
system('/opt/vc/bin/vcgencmd measure_temp')
end
while Time.now <= stop_time
holder += 1 # stress task
temp
puts holder
system('clear')
end
puts "The last temp was: "
temp
puts "Holder: #{holder}"
system('clear')
end
puts "The last temp was: "
temp
puts "Holder: #{holder}"
puts "The last temp was: "
temp
puts "Holder: #{holder}"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment