Google Chat: zj734465502@gmail.com
+86-0755-88291180
sales01@spotpear.com
dragon_manager@163.com
services01@spotpear.com
manager01@spotpear.com
WhatsApp:13246739196
RS485 CAN Expansion Board for Jetson Nano.
sudo apt-get install minicom sudo apt-get install python-pip nano sudo pip install pyserial sudo pip install spidev==3.1
After executing the above, add in the following file:
sudo nano /etc/modules-load.d/modules.conf
add a line
spidev
Press ctrl+x and then press Y, press Enter to save and exit, and then open the hardware SPI:
sudo /opt/nvidia/jetson-io/jetson-io.py
as shown
Choose to configure 40PIN pin
Use the keyboard to select, configure the pins
Use the keyboard to select, move to SPI1 and press Enter to confirm
Save and select restart (keep Enter to restart)
After restarting, ls /dev/spidev* can see the device number
In the user main directory, execute the following command:
wget https://www.waveshare.com/wiki/File:RS485_CAN_for_JetsonNano_Code.zip sudo unzip ./RS485_CAN_for_JetsonNano_Code.zip -d ./RS485_CAN_for_JetsonNano_Code/
Please connect the hardware first, and then run the program. As SPI to CAN and the default crystal oscillator is 8M, the temporary baud rate is 500Kbps.
The Python driver provided by this product currently supports a baud rate of 500Kbps (the default is 500Kbps), pay attention to select the baud rate of the other end of the communication:
cd RS485_CAN_for_JetsonNano_Code sudo python cantest.py
The test demo will send 1-8 when a message is received;
Please connect the hardware first, and then run the program. RS485 is transferred from UART, so please do not occupy UART.
sudo python rs485test.py