MoyuruAizawa / Celsius

Thermometer for Android

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Celsius

Hardware Thermometer for Android. See also

Usage

implementation 'com.moyuru:celcius:0.1.0'
val celsius = Celsius()
Timer().also { timer = it }.scheduleAtFixedRate(object : TimerTask() {
  override fun run() {
    celsius.temperatures
        .map { (type, temp) -> "$type: $temp" }
        .fold("") { acc, s -> "$acc\n$s" }
        .let { Log.i("TEMP", "\n$it") }
  }
}, 0, 5000)

About

Thermometer for Android

License:Apache License 2.0


Languages

Language:Kotlin 100.0%