canano-Canano Raspberry Pi插件板的Python库-Tj Bruno Installation Usage Contributing

canano-Canano Raspberry Pi插件板的Python库-Tj Bruno

发布:2020-12-23 10:42:57.470013

做者:Tj Bruno

### 做者邮箱:Tbruno25@gmail.com

### 首页:https://github.com/Tbruno25/canano

### 文档:None

### 下载连接 

# canano

Python library for Canano Raspberry Pi add-on board. python

Installation

Use pip to install package on Raspberry Pigit

pip install canano

Copy /scripts using svn or by cloning the repogithub

sudo svn checkout https://github.com/Tbruno25/canano/trunk/scripts

Run rpi_setup.py to modify /boot/config and /etc/network/interfaces for use with the canano boardapache

sudo python3 scripts/rpi_setup.py
sudo reboot

Usage

The api currently gives you control over the components on the boardapi

from canano import red_led, green_led, relay, button

red_led.on() # activate
green_led.off() # deactivate
button.state # returns state

canano controls the socketcan interface allowing you to easily adjust on the flysocket

from canano import canano
canano.baud = 250000 # sets bus baudrate to 250k
canano.reset() # clears buffer 
canano.bus # python-can bus object 
canano.bus.recv() # returns next message

Play around with it to find interesting use cases! svn

Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.spa

Copy from pypi.org

查询时间:8.373ms
渲染时间:8.477ms

本文同步分享在 博客“zhenruyan”(other)。
若有侵权,请联系 support@oschina.cn 删除。
本文参与“OSC源创计划”,欢迎正在阅读的你也加入,一块儿分享。.net

相关文章
相关标签/搜索