input_rot_only.py 文件源码

python
阅读 23 收藏 0 点赞 0 评论 0

项目:orangepi-radio 作者: thk4711 项目源码 文件源码
def init():
    print(lirc_device)
    wiringpi.wiringPiSetup()
    wiringpi.pinMode(A_1_PIN,INPUT)
    wiringpi.pullUpDnControl(A_1_PIN,PUD_UP)
    wiringpi.pinMode(B_1_PIN,INPUT)
    wiringpi.pullUpDnControl(B_1_PIN,PUD_UP)
    wiringpi.pinMode(BTN_1_PIN,INPUT)
    wiringpi.pullUpDnControl(BTN_1_PIN,PUD_UP)

    wiringpi.pinMode(A_2_PIN,INPUT)
    wiringpi.pullUpDnControl(A_2_PIN,PUD_UP)
    wiringpi.pinMode(B_2_PIN,INPUT)
    wiringpi.pullUpDnControl(B_2_PIN,PUD_UP)
    wiringpi.pinMode(BTN_2_PIN,INPUT)
    wiringpi.pullUpDnControl(BTN_2_PIN,PUD_UP)

    wiringpi.pinMode(POWER_PIN,INPUT)
    wiringpi.pullUpDnControl(POWER_PIN,PUD_UP)

    thread.start_new_thread(encoder_loop, ())
    thread.start_new_thread(keypressd, (lirc_device, ))
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号