Hardware Reference
In-Depth Information
end_time = datetime.datetime.strptime(a_when.end_
time.split(".")[0], "%Y-%m-%dT%H:%M:%S")
except ValueError:
print(ValueError)
continue
current_time = datetime.datetime.now()
if end_time > current_time: #Has the event ended?
print '\t%s. %s' % (i, an_event.title.text,)
print '\t\tStart time: %s' % (a_when.start_time,)
print '\t\tEnd time: %s' % (a_when.end_time,)
We will filter out all upcoming events and list them with details. We will
check whether we have set an alert for the event. If indeed there was an
alert, we will blink an LED until the event has ended:
for reminder in a_when.reminder:
if reminder.method == "alert" \
and start_time - datetime.timedelta(0,60*int(reminder.
minutes))<current_time:
print '\t%s. %s' % (i, an_event.title.text,)
print '\t\tStart time: %s' % (a_when.start_time,)
print '\t\tEnd time: %s' % (a_when.end_time,)
count = 0
gpio.output(24,gpio.HIGH)
time.sleep(1)
gpio.output(24,gpio.LOW)
time.sleep(1)
Designing an enclosure design for
the personal assistant
In this task, we will look into the enclosure design for the project. In order to make things
simple, we will use a design that is open source. The enclosure is one that can be assembled
in few simple steps. This enclosure was designed by Michael Milazzo ( http://makezine.
com/2013/01/18/laser-cutting-a-glueless-acrylic-project-box/ ) .
Prepare for lift off
This enclosure can be fabricated in few simple steps using a laser cuter. The design available
along with this project in the PDF format can be modified using a design tool such as
Inkscape or Adobe Illustrator.
 
Search WWH ::




Custom Search