Slide 1

Slide 1 text

HCMC KOTLIN USER GROUP MEETUP – 17TH DEC 2019

Slide 2

Slide 2 text

ABOUT SPEAKER

Slide 3

Slide 3 text

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?

Slide 4

Slide 4 text

DISCLAIMER

Slide 5

Slide 5 text

KOTLIN NATIVE How about having Kotlin to run on device like Raspberry Pi?

Slide 6

Slide 6 text

NOT KOTLIN NATIVE

Slide 7

Slide 7 text

WITH KOTLIN NATIVE Kotlin Source Code Kotlin/Native Compiler Intermediate Representation LLVM BINARY 0100101.. Frontend Backend

Slide 8

Slide 8 text

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

Slide 9

Slide 9 text

LET’S DO THIS

Slide 10

Slide 10 text

TERMS konanc: Kotlin/Native compiler cinterop: Kotlin/native interoperability – create Kotlin binding for native lib armhf: Raspberry PI 3 B model architecture

Slide 11

Slide 11 text

RUN THE APP

Slide 12

Slide 12 text

VERIFY

Slide 13

Slide 13 text

CROSS- PLATFORM COMPILING

Slide 14

Slide 14 text

CROSS- PLATFORM COMPILING

Slide 15

Slide 15 text

RUN ON THE PI

Slide 16

Slide 16 text

MANIPULATE THE HARDWARE

Slide 17

Slide 17 text

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