コード例 #1
0
ファイル: Hex.py プロジェクト: KEClaytor/HexPi
def main():
    # Initalize Pi GPIO
    out.initialize()

    # Create a new twitter interface
    thandler = twitterclock.tclock()
    # Fake twitter for testing
    #thandler = twitterclock.fakeclock()

    while 1:
        #if monitor.tweet_changed():
        parse_command(thandler)

        # Twitter api rate limit is 100 / hr
        sleep(30)

    return
コード例 #2
0
ファイル: letters.py プロジェクト: KEClaytor/HexPi
_qmark =  [1,1,1,1,0,0,0,1,0,0,0,0,0,1,1,0,1,1,0,0,0]
_exclm =  [1,1,1,1,0,0,0,1,0,0,0,0,0,0,0,1,1,1,0,0,0]
_lt =     [0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,0,0,0,0,0,0]
_gt =     [0,1,1,1,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0]
_qt =     [0,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]
_dqt =    [0,1,1,1,0,0,0,0,0,0,0,0,0,1,1,0,0,0,0,0,1]
_bslash = [0,0,0,0,0,0,0,1,1,0,0,0,0,1,0,0,0,0,1,1,1]
_slash =  [0,0,1,1,0,0,0,0,1,0,0,0,0,0,0,0,1,1,1,0,0]
_tilde =  [0,0,0,0,0,0,0,0,0,0,0,1,1,1,0,0,1,1,1,1,1]
_carrot = [1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,0,0,0,1]
_lparen = [1,0,0,0,0,0,0,0,1,1,1,1,1,1,1,0,0,0,0,0,0]
_rparen = [1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0]
_star =   [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,1,0,1,0] 
_space =  [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]



all_letters = [_a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n,
        _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0, _1, _2,
        _3, _4, _5, _6, _7, _8, _9,\
        _dash, _equals, _colon, _scolon, _comma, _period, \
        _qmark, _exclm, _lt, _gt, _qt, _dqt, _bslash, _slash, \
        _tilde, _carrot, _lparen, _rparen, _star, _space]


letter_dict = dict(zip(lowercase+digits+"-=:;,.?!<>'\"\/~^()* ", all_letters))

if __name__ == "__main__":
    out.initialize()
    debug.debug_echo()