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
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))), )
def paper_text(text, x, y): print("drawing text: " + text) particle("function", "call", particle_id, "text", "|".join( (text, str(x), str(y))))
def paper_fontsize(s): print("changing font") particle("function", "call", particle_id, "fontsize", str(s))
def paper_image(bitmap, x, y): print("drawing image: " + bitmap) particle("function", "call", particle_id, "img", "|".join( (bitmap, str(x), str(y))))
def paper_cmd(cmd): print("running " + cmd) particle("function", "call", particle_id, cmd)