Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- from picamera import PiCamera
- import time
- import random
- name = "ISS (ZARYA)"
- line1 = "1 25544U 98067A 19352.98291280 -.00000451 00000-0 16927-6 0 9991"
- line2 = "2 25544 51.6430 165.1707 0007614 51.0107 86.0364 15.50119867203926"
- #update line1 and line2 before sending this to the ISS
- iss = ephem.readtle(name, line1, line2)
- measure = 0
- photo_counter = 0
- #non modificare le variabili
- def get_latlon(time = None):
- if(time is None):
- iss.compute()
- else:
- iss.compute(time)
- def FileNameWithDate():
- return time.strftime("/home/pi/image_%y-%m-%d_%H-%M-%S",time.localtime())
- timer=10800
- while timer>0:
- cam = PiCamera()
- ora=time.clock
- cam.resulution = (1296,972)
- cam.start_preview()
- time.sleep(10)
- cam.capture(FileNameWithDate())
- cam.stop_preview()
- timer -= 10
- #main program to capture images
- from random import randint
- s = SenseHat()
- s.low_light = True
- s.clear()
- import math
- yellow = (255, 255, 0)
- green = (0, 255, 0)
- blue = (0, 0, 255)
- fucsia = (255, 0, 255)
- cyan = (0, 255, 255)
- red = (255, 0, 0)
- orange = (255, 160, 0)
- colors=[yellow,green,blue,fucsia,cyan,red,orange]
- sensehat = SenseHat()
- sensehat.low_light = True
- class Spinner():
- def __init__(self,sensehat):
- self.s=sensehat
- self.points=[]
- self.points=[(3,0),(4,0),(5,0),(6,1),(7,2),(7,3),(7,4),(7,5),(6,6),(5,7),(4,7),(3,7),(2,7),(1,6),(0,5),(0,4),(0,3),(0,2),(1,1),(2,0)]
- self.curpos=0
- self.s.clear()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement