A simple note as I could not find anything on the net.
An example of how to write digital outputs 1 to 16 in CanOPEN in PDO with “cansend” command on Linux.
ifconfig can0 down
ip link set can0 type can bitrate 500000
ip link set up can0
cansend can0 -i 0 0x0101
while [ 1 ]; do
cansend can0 -i 0x601 0x2f 0x00 0x62 0x01 0x01
sleep 0.1
cansend can0 -i 0x601 0x2f 0x00 0x62 0x01 0x02
sleep 0.1
cansend can0 -i 0x601 0x2f 0x00 0x62 0x01 0x04
sleep 0.1
cansend can0 -i 0x601 0x2f 0x00 0x62 0x01 0x08
sleep 0.1
cansend can0 -i 0x601 0x2f 0x00 0x62 0x01 0x10
sleep 0.1
cansend can0 -i 0x601 0x2f 0x00 0x62 0x01 0x20
sleep 0.1
cansend can0 -i 0x601 0x2f 0x00 0x62 0x01 0x40
sleep 0.1
cansend can0 -i 0x601 0x2f 0x00 0x62 0x01 0x80
sleep 0.1
cansend can0 -i 0x601 0x2f 0x00 0x62 0x01 0x00
sleep 0.1
cansend can0 -i 0x601 0x2f 0x00 0x62 0x02 0x01
sleep 0.1
cansend can0 -i 0x601 0x2f 0x00 0x62 0x02 0x02
sleep 0.1
cansend can0 -i 0x601 0x2f 0x00 0x62 0x02 0x04
sleep 0.1
cansend can0 -i 0x601 0x2f 0x00 0x62 0x02 0x08
sleep 0.1
cansend can0 -i 0x601 0x2f 0x00 0x62 0x02 0x10
sleep 0.1
cansend can0 -i 0x601 0x2f 0x00 0x62 0x02 0x20
sleep 0.1
cansend can0 -i 0x601 0x2f 0x00 0x62 0x02 0x40
sleep 0.1
cansend can0 -i 0x601 0x2f 0x00 0x62 0x02 0x80
sleep 0.1
cansend can0 -i 0x601 0x2f 0x00 0x62 0x02 0x00
sleep 0.1
done
SwitchBot Hub Mini Smart Remote - Dispositivo IR, collegamento a Wi-Fi, controllo del condizionatore d'aria, compatibile con Alexa, Google Home, HomePod, IFTTT (White)…
35,00 € (a partire da 18 Novembre 2024 07:42 GMT +01:00 - Altre informazioniProduct prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on [relevant Amazon Site(s), as applicable] at the time of purchase will apply to the purchase of this product.)Facile da usare - L’Hub Mini è facile da configurare nell'applicazione SwitchBot. Con la modalità “Smart Learning”, può imitare il telecomando esistente in 5s. Alimentato tramite USB e portatile, si può portare e posizionare ovunque. (*SwitchBot Hub ... read more