petr4ppc Well-Known Member Licensed User Longtime User Mar 1, 2022 #1 Dear friends, please, please I need to send 8 bytes via CAN BUS (ESP32): B4X: Dim buf(8) As Byte buf(0) = "0x94"; buf(1) = "0x00"; buf(2) = "0x00"; buf(3) = "0x00"; buf(4) = "0x19"; buf(5) = "0x20"; buf(6) = "0x21"; buf(7) = "0x22"; can.SendMessage(1, buf) Is this right way please? Best regards p4ppc
Dear friends, please, please I need to send 8 bytes via CAN BUS (ESP32): B4X: Dim buf(8) As Byte buf(0) = "0x94"; buf(1) = "0x00"; buf(2) = "0x00"; buf(3) = "0x00"; buf(4) = "0x19"; buf(5) = "0x20"; buf(6) = "0x21"; buf(7) = "0x22"; can.SendMessage(1, buf) Is this right way please? Best regards p4ppc
R RJB Active Member Licensed User Longtime User Mar 1, 2022 #2 I'm afraid I don't know about CAN BUS but in your code you don't need the quotes or semi colons. I think something like: B4X: dim buf() as Byte = array as byte(0x94, 0x00, 0x00, 0x00, 0x19, 0x20, 0x21, 0x22) can.SendMessage(1, buf) would probably be better/ easier Upvote 1
I'm afraid I don't know about CAN BUS but in your code you don't need the quotes or semi colons. I think something like: B4X: dim buf() as Byte = array as byte(0x94, 0x00, 0x00, 0x00, 0x19, 0x20, 0x21, 0x22) can.SendMessage(1, buf) would probably be better/ easier
petr4ppc Well-Known Member Licensed User Longtime User Mar 2, 2022 #3 Dear RJB thank you very much for your advice, p4ppc Upvote 0