Skip to content

fbiego/CRC16Modbus

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 

Repository files navigation

CRC16Modbus

Usage

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]))

Releases

No releases published

Packages

No packages published

Languages