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

相關文章
相關標籤/搜索