Canbus

canbus
https://forum.arduino.cc/index.php?topic=555608.0 canbus is a multi-master system where are all nodes are equal with each message being priority based. Any node can transmit a message at any time with the highest priorty message getting thru CAN only has masters. One node transmits at a time - if multiple nodes being a transmission at approximately the same time, they will collide, and the node transmitting the lowest ID will win arbitration. The other nodes will listen to the winning node's message and then after some backoff time re-try their own transmissions. ''Are you trying to get remote sensor readings at specific points in time or intervals in time? If so there are strategies that don't involve the request/response cycle of a polled system. Essentially you configure one node to broadcast a clock to which all the other synchronise their activity.''

Each node does'nt have an Unique Address ID like I2C, they messages with any id and react to any message ID's as per the logic you apply in the MCU code you write.

https://electronics.stackexchange.com/questions/106715/is-the-can-bus-protocol-a-master-and-slave-protocol A CAN bus is multi-master and automatically arbitration free. The whole point is that you don't need a single master or main controller to take care of everything. Each message that is sent has a priority, and higher priority messages trump lower priority ones (a lower priority message will wait until there isn't a high priority message being sent). So there are no slaves. It's kind of similar to a peer to peer network, in that it's decentralized. The reason this is done is to reduce failure points. If a single main controller failed, so would the entire network. If there is no central controller, a single component can fail and the rest of the system will keep going. For your network, you should assign priorities to each command sent depending on what's most important. The Wikipedia article is actually quite good. https://en.wikipedia.org/wiki/CAN_bus


 * https://alselectro.wordpress.com/2020/04/29/sensor-data-on-can-bus-arduino-with-can2515/ CANBUS
 * https://github.com/autowp/arduino-mcp2515

canable
https://canable.io/ The CANable is a small low-cost open source USB to CAN adapter. The CANable shows up as a virtual serial port on your computer and acts as a serial-line to CAN bus interface. With the alternative candleLight firmware, the CANable enumerates as a native CAN interface on Linux. The CANable Pro is a galvanically isolated version of the CANable with enhanced ESD protection and breakaway mounting holes. from http://selfracingcars.com/

raspberry
https://www.raspberrypi.org/forums/viewtopic.php?t=141052 links to https://github.com/saper-2/pi-can-mcp2515-qg and https://www.youtube.com/watch?v=44Purrk3-74

https://www.fischl.de/usbtin/ usb to can

https://www.waveshare.com/2-ch-can-hat.htm can hat

CAN bus module SN65HVD230 Waveshare

caraca
http://caraca.sourceforge.net/ The core of the NODE is the AVR AT90S4433 micro controller provided by Atmel. The AVR is surrounded by the CANBus driver PCA82C250, the relay driver ULN2003, the Ir receiver TSOP1836 and the temperature sensor/thermostat DS1621. The node is powered by a 12V dc from the bus.

NODE Schematics

http://www.youtube.com/watch?v=xt6_GWLTxN4

http://blackrynius.wordpress.com/category/can-bus/

http://diydrones.com/profiles/blogs/uavcan-can-bus-for-uav-preliminary-release

https://github.com/Seeed-Studio/CAN_BUS_Shield

https://github.com/watterott/CANdiy-Shield

http://uavcan.org/UAVCAN

http://www.canbushack.com/blog/index.php ,, http://opengarages.org/handbook/  Car Hacker's Handbook

links
Arduino code