<라즈베리파이> RS485_CAN_HAT

TaeWoo·2024년 4월 23일
0

RaspberryPi

목록 보기
8/10
post-thumbnail
  1. boot config 편집기 열기
sudo nano /boot/config.txt
  1. 명령어 추가 (띄어쓰기 조심. 복사해서 할 것)
    dtparam=spi=on
    dtoverlay=mcp2515-can0,oscillator=12000000,interrupt=25,spimaxfrequency=2000000
  2. 재부팅
sudo reboot
  1. 설치
sudo apt-get install can-utils
  1. CAN 장비 연결 확인
sudo ifconfig -a | grep can
  1. CAN bitrate 설정
sudo ip link set can0 down
sudo ip link set can0 up type can bitrate 500000
  1. CAN 데이터 확인(test => $ cansend can0 100#1122334455667788)
candump can0
profile
코드와 아이디어의 소통, 기록하는 개발자. 🚀✨

0개의 댓글