This is a platformio project for testing the palm board's CAN Bus and SPI Bus.
In main.cpp, the program will read an encoder and send random CAN messages for testing SPI and CAN Bus.
In the line 7 of main.cpp:
#define ENCODER1_CS 4 // CS Pin 4. This can be replaced with other CS Pins.You can switch bwteen different ports by switching the CS Pin number within 14, 6, 5, 4, 3, 2, 18, 15 as shown in the image above.
The output is printed in the serial monitor.
The program is sending random CAN messages on the CAN Bus. If you're using a canable device on your Ubuntu laptop to monitor CAN messages, set it up:
sudo ip link set can0 up type can bitrate 1000000Then monitor all messages on the CAN Bus:
candump can0