Skip to content

Latest commit

 

History

History
20 lines (14 loc) · 423 Bytes

README.md

File metadata and controls

20 lines (14 loc) · 423 Bytes

Kurubo

A Firmata Client written in Kotlin.

Install

Client

val transport = SerialTransport("/dev/ttyUSB0")
// val transport = NetworkTransport("192.168.31.137", 27016)
val arduino = ArduinoUno(transport)

arduino.run()
arduino.ensureInitializationIsDone()

val am2320 = AM2320(arduino)
am2320.addThermometerListener { println(it.temperature) }
am2320.addHygrometerListener { println(it.humidity) }