Source code for examples.tasks.blink

"""
A very simple task: Blink an LED

Written by @mikewehr in the ``mike`` branch: https://github.com/wehr-lab/autopilot/blob/mike/autopilot/tasks/blink.py

Demonstrates the basic structure of a task with one stage,
described in the comments throughout the task.

See the main tutorial for more detail: https://docs.auto-pi-lot.com/en/latest/guide.task.html#

This page is rendered in the docs here in order to provide links to the mentioned objects/classes/etc., but
this example was intended to be read as source code, as some comments will only be visible there.

.. note::
    Currently, after completion, the task needs to be explicitly imported and added to :data:`.tasks.TASK_LIST` ,
    this will be remedied shortly (see the ``registries`` branch).
"""
import itertools
import tables
import time
from datetime import datetime

from autopilot.hardware import gpio
from autopilot.tasks import Task
from collections import OrderedDict as odict