Discussion  - 
 
It's getting colder here in Colorado as we approach the holidays, so I built a candle to keep me warm! This is also a great example of mapping Android concepts to IoT in Android Things.

The code uses ObjectAnimator to vary the output of the PWM connected to a pair of LEDs, and BounceInterpolator to create a flickering effect as the animations run infinitely. No timers or complex logic!

Gist: https://gist.github.com/devunwired/8656c1902ec856e5f4b26f45cd21f2fd
60
9
Adam Brown's profile photoVishal Dubey's profile photoJohannes Bolz's profile photo
3 comments
 
Haha awesome use of ObjectAnimator!
 
Good use of ObjectAnimator! After all, it is an animated UI. :-)
Add a comment...