Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Kotlin with IoT Applications

A88d9a18fa8d8d5b2b29c5cc3a387931?s=47 Toan Tran
December 17, 2019

Kotlin with IoT Applications

Kotlin is warm welcomed by the Android world. But is that the only use-case Kotlin can help? This presentation brings the trial of Kotlin to the IoT world by working on a prototype device called CI Lighthouse.

A88d9a18fa8d8d5b2b29c5cc3a387931?s=128

Toan Tran

December 17, 2019
Tweet

More Decks by Toan Tran

Other Decks in Programming

Transcript

  1. HCMC KOTLIN USER GROUP MEETUP – 17TH DEC 2019

  2. ABOUT SPEAKER

  3. KOTLIN WITH IOT APPLICATIONS • Popular use case of Kotlin

    for Android app development • Extended use case to have Kotlin run on Backend, just like Java language based on JVM • What else? KOTLIN WITH IOT APPLICATIONS • Popular use case of Kotlin for Android app development • Extended use case to have Kotlin run on Backend, just like Java language based on JVM • What else?
  4. DISCLAIMER

  5. KOTLIN NATIVE How about having Kotlin to run on device

    like Raspberry Pi?
  6. NOT KOTLIN NATIVE

  7. WITH KOTLIN NATIVE Kotlin Source Code Kotlin/Native Compiler Intermediate Representation

    LLVM BINARY 0100101.. Frontend Backend
  8. WHAT TO BUILD? • A lighthouse device. • Read the

    status of CI pipeline. • Display the CI status of trunk branch: GREEN (passed), YELLOW (running) and RED (failed). Example for Build light indicator
  9. LET’S DO THIS

  10. TERMS konanc: Kotlin/Native compiler cinterop: Kotlin/native interoperability – create Kotlin

    binding for native lib armhf: Raspberry PI 3 B model architecture
  11. RUN THE APP

  12. VERIFY

  13. CROSS- PLATFORM COMPILING

  14. CROSS- PLATFORM COMPILING

  15. RUN ON THE PI

  16. MANIPULATE THE HARDWARE

  17. WHAT I HAVE LEARNED You need to learn a bit

    about hardware along the way Not so much tutorials on this topic yet Controlled experiment