/Celsius

Thermometer for Android

Primary LanguageKotlinApache License 2.0Apache-2.0

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)