h-akanuma / M5StackAvatarPython

M5Stack Python avatar module
2 stars 1 forks source link

M5StackAvatarPython

MicroPython module for M5Stack to render avatar face.

M5StackAvatarPython

Features

Installation

Download m5stack_avatar.py and put it to the flash directory.

Usage

Initialize

from m5stack_avatar import M5StackAvatar

avatar = M5StackAvatar()
avatar.start()

Show text

avatar.speak('Hello from M5StackAvatarPython!!')

Turn on/off exclamation mark

avatar.exclamation_on()
avatar.exclamation_off()

Turn on/off pale face

avatar.pale_on()
avatar.pale_off()

Example

from m5stack_avatar import M5StackAvatar

import time

avatar = M5StackAvatar()
avatar.start()

while True:
    avatar.speak('Hello from M5StackAvatarPython!!')
    time.sleep(10)
    avatar.exclamation_on()
    time.sleep(5)
    avatar.exclamation_off()
    time.sleep(5)
    avatar.pale_on()
    time.sleep(5)
    avatar.pale_off()
    time.sleep(5)

Licence

Copyright (c) 2018 Akanuma Hiroaki
Released under the MIT license
https://opensource.org/licenses/mit-license.php