Created
November 20, 2019 01:25
-
-
Save brentpicasso/dc8f9930675b766b8b6ff299c751f58e to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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