From 2219094bcecb2901029377849d187192df43e349 Mon Sep 17 00:00:00 2001 From: pique_n Date: Thu, 22 Dec 2022 09:14:05 +0100 Subject: [PATCH] update readme install --- ReadMe.md | 17 ++++++++++++++++- resetCAN.sh | 2 ++ 2 files changed, 18 insertions(+), 1 deletion(-) create mode 100644 resetCAN.sh diff --git a/ReadMe.md b/ReadMe.md index c4468d6..7e271f9 100644 --- a/ReadMe.md +++ b/ReadMe.md @@ -7,4 +7,19 @@ There are 2 options, via the USB to CAN adapter (from seeed studio) or via the c Because we don't need it anymore, i will not further document this, but i published it because may someone want to use it to control the TEC directly -in the tec.py file are also some TEST Routines for testing the TEC and controlling it, also with logs \ No newline at end of file +in the tec.py file are also some TEST Routines for testing the TEC and controlling it, also with logs + + +## Install the CAN interface (for RPi CAN Hat) + +Add the following line to your /boot/config.txt file: +`dtoverlay=mcp2515-can0,oscillator=12000000,interrupt=25,spimaxfrequency=2000000` + +`sudo reboot` + +`pip3 install python-can` +... for python module + +maybe edit permissions +`./resetCAN.sh` +... for starting can0 \ No newline at end of file diff --git a/resetCAN.sh b/resetCAN.sh new file mode 100644 index 0000000..462426b --- /dev/null +++ b/resetCAN.sh @@ -0,0 +1,2 @@ + +sudo ip link set can0 down; sudo ip link set can0 type can bitrate 125000; sudo ip link set can0 up