UART Can’t? Arduino CANSerial Can!

[Jacob Geigle] had a dilemma. A GPS unit and a Bluetooth-to-serial had been tying up all the components UARTs on an AVR Arduino venture. “Software serial”, I listen to you say. But what if I told you [Jacob] currently had the board in dilemma sending out data in excess of CAN bus?

[Jacob]’s sweet hack generates an arbitrary quantity of CAN “devices” inside the Arduino code, and can treat just about every a person of them as its individual serial details channel. The “N” in CAN stands for community, following all. The trick is to build a gadget ID for each preferred CANSerial interface, which is completed in his library utilizing the regular Arduino set up action. A buffer normally takes treatment of storing all the distinct channels until finally they can be pushed out in excess of the hardware CAN peripheral. On the huge-computer system aspect of factors, some computer software listens for the distinctive “device” enumeration IDs and assigns each and every a digital serial port.

Whilst this was a hack born of necessity, we can see it as a clever option to segregate facts coming from the microcontroller into various streams. Possibly a debug channel, a command channel, and a facts channel? They’re digital products, so go nuts!

When we typically see CANbus in its native habitat – within your auto – it’s also amazing to consider of the works by using we could place it to. For instance, managing a 3D printer. Require a CAN refresher? We’ve acquired just the ticket.

[Bus photo: Malta Bus; The terminus, Valletta by John Haslam. Can photo: Paint Cans by Daniel R. Blume. Horrible visual pun: I’m afraid that’s on us. You try finding images for CANbus code!]

Next Post

Singapore’s Financial Authority To Bring In Tighter Crypto Restrictions

According to a senior minister in the government, the Monetary Authority of Singapore, or MAS, has been “seriously reviewing” additional rules that would influence how ordinary investors deal with cryptocurrency. Tharman Shanmugaratnam, a senior minister in Singapore and the head of the MAS, reportedly stated that the financial watchdog may […]
Singapore’s Financial Authority To Bring In Tighter Crypto Restrictions

You May Like