https://github.com/mongonta0716/m5stack-avatar-collection
M5Stack avatar apps
https://github.com/mongonta0716/m5stack-avatar-collection
avatar lovyanlauncher m5stack m5stack-sd-updater
Last synced: about 1 year ago
JSON representation
M5Stack avatar apps
- Host: GitHub
- URL: https://github.com/mongonta0716/m5stack-avatar-collection
- Owner: mongonta0716
- License: gpl-3.0
- Created: 2019-04-04T08:04:09.000Z (about 7 years ago)
- Default Branch: master
- Last Pushed: 2019-11-13T14:48:48.000Z (over 6 years ago)
- Last Synced: 2024-05-01T19:13:28.629Z (about 2 years ago)
- Topics: avatar, lovyanlauncher, m5stack, m5stack-sd-updater
- Language: C
- Size: 742 KB
- Stars: 7
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# M5Stack-Avatar-collection
M5StackでAvatarを表示するアプリです。
Avatar表示は、robo8080さんの[M5Stack_WebRadio_Avator](https://github.com/robo8080/M5Stack_WebRadio_Avator)をベースにさせていただきました。
M5Stack-avatarのオリジナルはmeganetaaanさんの[m5stack-avatar](https://github.com/meganetaaan/m5stack-avatar)です。
背景にJPGファイルを使用したかったのでm5stack-avatarの古いバージョンを利用しています。
# Contents
## Avatar_fugu2

## Avatar_penguin

## AvatarPngGirl1

# 使い方(Usage)
buildフォルダにあるbinファイル,jpgフォルダ,jsonフォルダをmicroSDカードにコピーします。
[M5Stack LovyanLauncher](https://github.com/lovyan03/M5Stack_LovyanLauncher)から起動します。
LovyanLauncherの詳しい使い方は下記のブログを参照してください。
[M5Stack LovyanLauncherの使い方|ラズパイ好きの日記](https://raspberrypi.mongonta.com/howto-use-m5stack-lovyanlauncher/)
# カスタマイズのポイント
## 色について
下記のIn_eSPI.hの500行目ぐらいに定義があります。
https://github.com/m5stack/M5Stack/blob/master/src/utility/In_eSPI.h
自分で色を作成したい場合はM5.Lcd.color565(int r, int g, int b)を使うと変換できます。
例、肌色
const unsigned int HADAIRO = M5.Lcd.color565(255,233,218);
## Avatar_fugu2,Avatar_penguin
sketchbookフォルダにソースや元画像が入っています。
### 背景
背景はavatar_???_bg.cにデータがあります。まずはavatar_???_bg.jpgを作成します。
* サイズは320×240
* MicroSoftペイントは保存すればそのまま使えます。イラストレーターの場合はプログレッシブオフ、マット無しでWeb用に保存をします。
* 背景を作成する場合は目が移動する部分のマージンを取る必要があるので注意してください。(bgColorと同色)
#### JPGデータをCのソースへ変換する
下記リンクにあるbin2code.pyを使用するとcのコードに変換できます。(要Pythonの実行環境)
https://github.com/m5stack/M5Stack/tree/master/tools
### 目と口
目と口の変更はavatar.cppとavatar.hの変更をします。変更は下記のCommitが参考になるかと思います。
[Change from Fugu to UMA](https://github.com/mongonta0716/M5Stack-Avatar-uma/commit/8da0441fec0a3a6d0a4a4a33f9aa40b7c8aa51c7?diff=unified)
## AvatarPngGirl1
sketchbookフォルダにソースがあります。(画像データは入れていません。)
画像は[コミPo!](https://www.comipo.com/)で作成しました。
背景はJPGで320×240でトリミング、目の部分はPNGで5パターン用意して160x44にトリミングします。
### PNGデータをCのソースへ変換する。
下記リンクにあるpng2code.pyを使用するとCのコードに変換できます。(要Pythonの実行環境)
https://github.com/mongonta0716/M5Stack_Test_tools/tree/master/tools
### 目と口
目はeye.cppとeye.h,口の変更はavatar.cppとavatar.hの変更をします。
# Requirement
コンパイルする場合は、以下のライブラリが必要です。
* [M5Stack](https://github.com/m5stack/M5Stack)
* [M5Stack-SD-Updater](https://github.com/tobozo/M5Stack-SD-Updater)
# Licence
[GPLv3](https://github.com/mongonta0716/M5Stack-Avatar-collection/blob/master/LICENSE)
# Author
[Takao Akaki](https://twitter.com/mongonta555)