val bytes = ByteArray(10)
for (x in 0 until 10){
bytes[9-x] = x.toByte()
}
val crc = CRC16Modbus()
crc.update(bytes)
val checkSum = crc.crcBytes
println(String.format("CheckSum = 0x%02X, 0x%02X", checkSum[0], checkSum[1]))
-
Notifications
You must be signed in to change notification settings - Fork 0
fbiego/CRC16Modbus
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
About
CRC16-MODBUS Checksum calculator, Kotlin
Topics
Resources
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published