daily pastebin goal
25%
SHARE
TWEET

Untitled

a guest Oct 19th, 2018 75 Never
Upgrade to PRO!
ENDING IN00days00hours00mins00secs
  1. import time
  2. import os
  3. import sys
  4.  
  5. flag =0
  6.  
  7. while(1):
  8.     sstr = str(flag)
  9.     os.system("fswebcam image["+ sstr+"].jpg" )
  10.     flag=flag+1
  11.     time.sleep(5)
  12.  
  13.  
  14.  
  15.  
  16.  
  17.  
  18.  
  19.  
  20.  
  21.  
  22.  
  23. import time
  24. from sense_hat import SenseHat
  25.  
  26. sense = SenseHat()
  27. #sensors
  28. sense.set_imu_config(True,  True, True)
  29.  
  30. def LED():
  31.     sense.show_message("HELLO")
  32.  
  33. def HUMIDITY():
  34.     humidity = sense.get_humidity()
  35.     print("humidity = %s %%rh" % humidity)
  36.  
  37. def temp():
  38.     temp = sense.get_temperature()
  39.     print("Temperature: %s C" % temp)
  40.  
  41. def pressure():
  42.     pressure = sense.get_pressure()
  43.     print("Pressure: %s Millibars" % pressure)
  44.  
  45. def gyro():
  46.     orientation = sense.get_orientation_degrees()
  47.     print("p: {pitch}, r: {roll}, y: {yaw}".format(**orientation))
  48.  
  49. def accel():
  50.     raw = sense.get_accelerometer_raw()
  51.     print("x: {x}, y: {y}, z: {z}".format(**raw))
  52.  
  53. def compass():
  54.     raw =  sense.get_compass_raw()
  55.     print(sense.compass_raw)
  56.  
  57. while(1):
  58.     gyro()
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top