![SK Pang Electronics RSP-PICANGPS Скачать руководство пользователя страница 10](http://html1.mh-extra.com/html/sk-pang-electronics/rsp-picangps/rsp-picangps_user-manual_1286341010.webp)
PiCAN 2 GPS Rev B V1.1
SK Pang Electronics Ltd
Ó
2020
www.skpang.co.uk
10
4.
Writing Your Own Software
You can write your own application software in either C or Python.
1.12.
Application in Python
Download the Python-CAN files from:
https://bitbucket.org/hardbyte/python-can/get/4085cffd2519.zip
Unzip and install by
sudo python3 setup.py install
Bring the CAN interface up if it is not already done:
sudo /sbin/ip link set can0 up type can bitrate 500000
Now start python3
python3
To sent a message out type the following lines:
import can
bus = can.interface.Bus(channel='can0', bustype='socketcan_native')
msg = can.Message(arbitration_id=0x7de,
data=[0, 25, 0, 1, 3, 1, 4, 1],