Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
val = 0
-- transmit on CAN1 and receive on CAN2
function onTick()
--transmit value on CAN1
txCAN(0, 1234, 0, {val})
--receive on CAN2
id, e, data = rxCAN(1)
if id ~= nil then
println(id ..' : '.. data[1])
else
println('no data')
end
val= val + 1
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.