Пример #1
0
def paper_deepsleep(seconds):
    print("deep sleep {}".format(seconds))
    try:
        # this is guaranteed to fail
        particle("function", "call", particle_id, "deepsleep",
                 str(seconds_between_updates))
    except:
        pass
Пример #2
0
def paper_rect(x0, y0, x1, y1):
    print("drawing rectangle")
    particle(
        "function",
        "call",
        particle_id,
        "rect",
        "|".join((str(x0), str(y0), str(x1), str(y1))),
    )
Пример #3
0
def paper_text(text, x, y):
    print("drawing text: " + text)
    particle("function", "call", particle_id, "text", "|".join(
        (text, str(x), str(y))))
Пример #4
0
def paper_fontsize(s):
    print("changing font")
    particle("function", "call", particle_id, "fontsize", str(s))
Пример #5
0
def paper_image(bitmap, x, y):
    print("drawing image: " + bitmap)
    particle("function", "call", particle_id, "img", "|".join(
        (bitmap, str(x), str(y))))
Пример #6
0
def paper_cmd(cmd):
    print("running " + cmd)
    particle("function", "call", particle_id, cmd)