GithubHelp home page GithubHelp logo

meganetaaan / stack-chan Goto Github PK

View Code? Open in Web Editor NEW
751.0 29.0 91.0 133.69 MB

A JavaScript-driven M5Stack-embedded super-kawaii robot.

License: Apache License 2.0

TypeScript 58.75% Dockerfile 0.21% Shell 0.20% JavaScript 35.06% HTML 4.71% CSS 1.08%
m5stack moddable robots fusion360 kicad kawaii schematics esp32 stackchan javascript

stack-chan's Introduction

Stack-chan

Build Stack-chan Firmware Discord server invitation

日本語

stackchan

Stack-chan is a JavaScript-driven M5Stack-embedded super-kawaii robot.

Features

  • 😐 Show cute face
  • 😄 Expression(Happy, Angry, Sad etc.)
  • 😺 Customize face
  • 👀 Glance/stare/gaze
  • 💬 Say things
  • 💡 Addon M5Units
  • 🌀 Drive Serial(TTL)/PWM servos
  • 🎲 Make applications on your own

Contents

This repository includes all the component of the robot.

  • firmware : Source codes of the firmware.
  • case : Stereolithography(STL) of the case.
  • schematics : Schematics and board layout data.

Installation

Assemble board

Flash firmware to M5Stack

Contribution

Feature requests/Bug reports are extremely welcome! See issues page to post some.

Wanna be a sponsor? It would be my great honor. please visit my sponsor page.

License

Resources of this repository are distributed under Apache version 2.0 license. See LICENSE.

stack-chan's People

Contributors

aoki-rt avatar kennel-org avatar kim-xps12 avatar meganetaaan avatar mongonta0716 avatar ronron-gh avatar satuki-mk avatar shikarunochi avatar stc1988 avatar tanakamasayuki avatar tiryoh avatar tomorrow56 avatar toshihiromakuuchi avatar washishi avatar yh1224 avatar yoshipon avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

stack-chan's Issues

NOT Working with M5Stack Core2

After flashing the latest master (dockerised procedure) like described in the README the M5Stack Core2 is not booting or showing anything on the screen.

  • flashed master as well as the feature/core2 branch.
  • did a clean erase und reflashed multiple times
  • the stock M5 firmware is still working
  • no compile/flash issues

the only thing that I did not is attaching any kinds or servos. The M5Stack Core2 is in default configuration.

Unfortunately there is almost no community instructions on how to customize (disable servos) the FW (at least english readable)

Any thoughts?

thx

Failed to generate-apidoc

不具合の概要
npm run generate-apidoc を実行すると失敗します。

環境

その他

Docker環境でないため、tsconfig.json内のパスを手元の環境に合わせて更新しましたが、一部モジュールの定義が見つからないようでした。

stackchanビルド時に生成されたtsconfig.jsonに内容を差し替えることで成功しました。
tsconfig.jsonの内容が古いように見えます。

Rewrite mods according to new API/ 新しいAPIに合わせてmodを改修する

Is your feature request related to a problem? Please describe.
Stack-chan's mod API has been changed on dev/v1.0 branch. But mod examples are not.
スタックチャンのmodのAPIがdev/v1.0ブランチで変更されましたが、modの記載例のほうは過去のままになっています。

Describe the solution you'd like
Need to rewrite them according to the new API.
新しいAPIに合わせて書き換える必要があります。

Should use Map instead of Headers

In reading through your code, I noticed a very small mistake. The tts-voicevox module uses the WavStreamer streamer module for HTTP streaming. The WavStreamer uses the ECMA-419 HTTP Client referenced through device.network.http. The tts-voicevox sets the HTTP request headers here:

headers: new Headers([
['Content-Type', 'application/json'],
['Content-Length', `${query.byteLength}`],
]),

This code uses the Headers constructor from the fetch module. It should the Map constructor instead, as specified by the ECMA-419 HTTP Client. The tts-voicevox code works because Headers is implemented as a Map. Then you can also eliminate the import of Headers from the fetch module.

Interestingly, the getQuery method in the same source file uses Map as expected.

Windows環境でnpm run buildが失敗する

不具合の概要
Windows環境においてnpm run build を実施すると以下エラーが発生します。

C:\Users\satt6\Projects\stack-chan\firmware>npm run build

> [email protected] build
> cross-var mcconfig -d -m -p ${npm_config_target=esp32/m5stack} -t build ./stackchan/manifest.json

### Error: '$(BLEMODULEPATH)/modBLEServer': directory not found!
npm ERR! code 1
npm ERR! path C:\Users\satt6\Projects\stack-chan\firmware
npm ERR! command failed
npm ERR! command C:\WINDOWS\system32\cmd.exe /d /s /c cross-var mcconfig -d -m -p ${npm_config_target=esp32/m5stack} -t build ./stackchan/manifest.json

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\satt6\AppData\Local\npm-cache\_logs\2023-03-12T13_27_52_386Z-debug.log

環境 (次の項目を埋めてください):

  • OS: Windows
  • スタックチャンのバージョン: cfc1924
  • 使用するM5Stackの種類: M5stack

その他

package.json でターゲットデバイスを指定するために${npm_config_target=esp32/m5stack} という記載がありますが、Windowsではこの記法が使えないようです。%で囲う必要があります。

cross-varcross-conf-env といったパッケージを導入するとLinux/macとも統一した記載ができますが、--target省略時の初期値を設定する方法は分かっていません。

初期値を設定する方法がなければ、esp32/m5stackの場合でも明示的に指定することで解決はできます。

短絡させるパッドの説明がCore1とCore2で逆になっている

不具合の概要

短絡させるパッドの説明がCore1とCore2で逆になっている。

  • Core1PWM: R9/R11
  • Core2PWM: R10/R12

  • Core1PWM: R10/R12
  • Core2PWM: R9/R11

基板の組立説明(README.md)と基板のシルクが該当。
回路図のラベルは正しい。

環境 (次の項目を埋めてください):

  • スタックチャンのバージョン: v0.2.1 alpha

M5Stack Core2がエラーと再起動を繰り返す

不具合の概要

M5Stack Core2がエラーと再起動を繰り返す。

https://twitter.com/tomolld/status/1634547949618495488

再現手順
不具合を再現できる手順を記述してください

  1. npm run debug --target=esp32/m5stack_core2を実行
  2. 下記エラーが発生する

ログ

xsbugのログ

No Wi-Fi SSID
/root/Projects/moddable/modules/drivers/ft6206/modFt6206.c (131) # Break: FT6202: bad FT6206_REG_VENDID!

環境 (次の項目を埋めてください):

  • OS: [Windows, MacOS, Linux(Ubuntu/Arch/etc.)] Docker
  • IDE: [Arduino IDE, VSCode, UIFlow]
  • スタックチャンのバージョン M5Bottom版キット
  • 使用するM5Stackの種類 M5Stack Core2

Add tests/ テストを追加する

Is your feature request related to a problem? Please describe.

As the number of modules increases it is likely to find more regression, especially the variation of the same base class.

モジュールの数が増えるにつれて、特に同じベースクラスを持つ複数のクラス間でリグレッション(今まで動いていた機能が改修によって壊れること)が増えてきました。

Describe the solution you'd like

Add automated unit tests. Better if they are triggered by GitHub Actions. 

自動単体テストを追加します。GitHub Actionsでトリガーできるとなお良いです。

Mods fail to run

Describe the bug
If ``onLaunchis not implemented in a mod, it will fail to start withap==null`.
This PR broke the behavior. It should null-check and override with default each methods.

To Reproduce
Steps to reproduce the behavior:

  1. Flash firmware
  2. Flash look-at-target mod
  3. Throws Application not crated error

Expected behavior
mods can run.

ファームウェアを転送した際の正しい挙動をドキュメントに入れる

既存の機能に問題がある場合、その説明

ファームウェアをM5Stackに転送した際、どのような動作をすれば正しく動いているのかが判断できない。

あなたが望む解決策

ファームウェアをM5Stackに転送した際の正しい挙動をドキュメントに入れる。
動画または画像付きが望ましい。

デバッグ方法の案内を載せる

既存の機能に問題がある場合、その説明
デバッグ方法の案内がありません。package.jsonにdebugコマンドはありますが使い方がドキュメントで示されていません。

あなたが望む解決策
デバッグ方法をドキュメントに掲載します。

  • コマンド
  • xsbugの使い方概要
  • 本家ドキュメントへのリンク

M5Stack BasicでVOICEVOXを使う場合、音声が遅くなる

不具合の概要
M5Stack BasicでVOICEVOXを使う場合、音声がスロー再生したように遅くなる。

再現手順
不具合を再現できる手順を記述してください

  1. 'mods/chatgpt`を手順に従いセットアップする
  2. modを実行する
  3. スタックチャンが喋るときの音声がスロー再生したように遅くなる。

想定する挙動
音声が通常の速度で再生される。

環境 (次の項目を埋めてください):

  • OS: Ubuntu 20.04
  • IDE: VSCode
  • スタックチャンのバージョン: dev/v1.0最新(19a69b2
  • 使用するM5Stackの種類: M5Stack Basic(無印)

その他

esp-idfのv4系では再生速度まわりの挙動が変わってしまった。M5Stack公式ライブラリのM5Unifiedではクロック分周比の計算ロジックをライブラリ側に自前実装しているとのこと。

https://twitter.com/lovyan03/status/1645286458859884545

Getting CI faster

Is your feature request related to a problem? Please describe.
The current CI pipeline is very slow. Mainly because it downloads Moddable SDK and ESP-IDF every time without making caches.

Describe the solution you'd like

  • Use a CI-ready base image that includes Moddable SDK, ESP-IDF, and all the dependencies.
  • Make a cache using cache action.

possible issue pinning tilt angle in rs30x

I have recently had the pleasure of exploring the Stack-chan implementation by running it on the Stack-chan hardware! I don't know much about robotics, so I'm not sure about this issue.

I was exploring how to use the motors to have Stack-chan look side-to-side and up-and-down. Using the yaw to control side-to-side works well:

robot._driver.applyPose({yaw: Math.PI / 3, pitch: 0});
robot._driver.applyPose({yaw: -Math.PI / 3, pitch: 0});

However, using the pitch to control up-and-down did not move the motors much, if at all.

robot._driver.applyPose({yaw: 0, pitch: 0.43});
robot._driver.applyPose({yaw: 0, pitch: -0.17});

Eventually, I noticed this line in the RS30X driver:

const tiltAngle = Math.max(Math.min(-pose.pitch * 180 / Math.PI, -25), 10)

This expression always evaluates to 10 in my tests. As an experiment, I changed it to the following:

    let tiltAngle = -pose.pitch * 180 / Math.PI;
    if (tiltAngle < -25)
      tiltAngle = -25;
    else if (tiltAngle > 10)
      tiltAngle = 10;

I'm not sure whether I'm using the APIs incorrectly or if there is a mistake in the code that pins tiltAngle.

Make a single binary ready to flash

既存の機能に問題がある場合、その説明

現在、スタックチャンのファームウェアは自分でModdableとesp-idfをインストールしてビルドする必要があります。インストールスクリプトの導入でだいぶ簡単にはなりましたが、初心者の方やとりあえず試してみたい人などには環境構築が障壁となります。

あなたが望む解決策

スタックチャンのビルド時に、M5Stackにそのまま書き込める単一のバイナリを生成したいです。

M5StackはM5Burnerというファームウェアフラッシュ用のツールを公開していますM5Burnerにはユーザ製のアプリケーションを登録、公開できます。

スタックチャンもM5Burnerに対応したイメージを作り、登録できると良さそうです。

検討した代替案

WebSerialに対応したesptoolを使うとウェブブラウザだけで書き込みができそうです。スタックチャンとしてはプロプライエタリなM5Burnerよりもオープンなツールを使いたいので、こちらも検討する価値はあります。

suggested improvements to manifest.json

I would like to suggest a few small improvements to firmware/stackchan/manifest.json.

  1. For the HTTP module, use the manifest provided by the Moddable SDK. Simply add $(MODDABLE)/modules/network/http/manifest.json to the include section and remove http from the modules and preload sections. This will keep Stackchan in-sync with future changes to HTTP.
  2. Add button and sg90-driver to the preload section. This saves memory.
  3. Increase creation/keys from 128 to 512. This is the number of unique property names a mod can contain. In my experiments, 128 was not enough. Each key in this table uses 4 bytes, so this uses an additional 1.5 KB. The ESP32 has lots of free memory running Stackchan, so this shouldn't be a problem.

Additionally, the M5Stack Core 2 port now implements support for the touch buttons. I think this means that you may be able to remove the button module and the code to set-up the pseudo-buttons from main.ts.

Thank you for considering these suggestions.

SG-90 case broken when inserting servo

https://twitter.com/shikarunochi/status/1419838804064575493

組み立て中にブラケットのサーボに当たる部分が折れてしまったようです。

  • 元ツイートにあるように、この箇所を水平にしてプリントするよう注記を加える
  • モデルを修正(この箇所を補強する)

のいずれか対策したいと思います。

--

It looks like the part of the bracket that hits the servo broke off during assembly.

So I would like to:

  • Add a note to print the model on this part horizontal, as written in the original tweet.
  • Modify the model (reinforce the broken part of the model)

Firmware build fails with latest Moddable SDK

Describe the bug
Firmware build fails with latest Moddable SDK.

To Reproduce
Steps to reproduce the behavior:

  1. Setup latest ModdableSDK on public branch
  2. Build firmware
  3. See typescript error

Expected behavior
The firmware build without errors.

Logs

root@sskw-XF:/workspaces/stack-chan/firmware/stackchan# mcconfig -m -p esp32/m5stack -t build
# warning: no modules match: /workspaces/stack-chan/firmware/extern/rs30x/rs30x!
# warning: no resources match: /workspaces/stack-chan/firmware/stackchan/assets/sounds/*!
# Reconfiguring ESP-IDF...
Your environment is not configured to handle unicode filenames outside of ASCII range. Environment variable LC_ALL is temporary set to C.UTF-8 for unicode support.
Executing action: reconfigure
Running cmake in directory /root/Projects/moddable/build/tmp/esp32/m5stack/release/stackchan/xsProj-esp32/build
Executing "cmake -G Ninja -DPYTHON_DEPS_CHECKED=1 -DESP_PLATFORM=1 -DSDKCONFIG_DEFAULTS=/root/Projects/moddable/build/tmp/esp32/m5stack/release/stackchan/xsProj-esp32/sdkconfig.mc -DSDKCONFIG_HEADER=/root/Projects/moddable/build/tmp/esp32/m5stack/release/stackchan/xsProj-esp32/build/config/sdkconfig.h -DCMAKE_MESSAGE_LOG_LEVEL=ERROR -DDEBUGGER_SPEED=460800 -DIDF_TARGET=esp32 -DESP32_SUBCLASS=esp32 -DCCACHE_ENABLE=1 /root/Projects/moddable/build/tmp/esp32/m5stack/release/stackchan/xsProj-esp32"...
-- Found Git: /usr/bin/git (found version "2.17.1") 
-- ccache will be used for faster recompilation
-- The C compiler identification is GNU 8.4.0
-- The CXX compiler identification is GNU 8.4.0
-- The ASM compiler identification is GNU
-- Found assembler: /opt/esp/tools/xtensa-esp32-elf/esp-2021r1-8.4.0/xtensa-esp32-elf/bin/xtensa-esp32-elf-gcc
-- Check for working C compiler: /opt/esp/tools/xtensa-esp32-elf/esp-2021r1-8.4.0/xtensa-esp32-elf/bin/xtensa-esp32-elf-gcc
-- Check for working C compiler: /opt/esp/tools/xtensa-esp32-elf/esp-2021r1-8.4.0/xtensa-esp32-elf/bin/xtensa-esp32-elf-gcc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /opt/esp/tools/xtensa-esp32-elf/esp-2021r1-8.4.0/xtensa-esp32-elf/bin/xtensa-esp32-elf-g++
-- Check for working CXX compiler: /opt/esp/tools/xtensa-esp32-elf/esp-2021r1-8.4.0/xtensa-esp32-elf/bin/xtensa-esp32-elf-g++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Building ESP-IDF components for target esp32
-- Project sdkconfig file /root/Projects/moddable/build/tmp/esp32/m5stack/release/stackchan/xsProj-esp32/sdkconfig
Loading defaults file /root/Projects/moddable/build/tmp/esp32/m5stack/release/stackchan/xsProj-esp32/sdkconfig.mc...
/root/Projects/moddable/build/tmp/esp32/m5stack/release/stackchan/xsProj-esp32/sdkconfig.mc:230 CONFIG_ESP_CONSOLE_UART_NONE was replaced with CONFIG_ESP_CONSOLE_NONE
-- Found PythonInterp: /opt/esp/python_env/idf4.3_py3.6_env/bin/python (found version "3.6.9") 
-- Found Perl: /usr/bin/perl (found version "5.26.1") 
-- App "xs_esp32" version: OS210826-592-ga4e0ec57-dirty
-- Adding linker script /opt/esp/idf/components/esp_rom/esp32/ld/esp32.rom.ld
-- Adding linker script /opt/esp/idf/components/esp_rom/esp32/ld/esp32.rom.api.ld
-- Adding linker script /opt/esp/idf/components/esp_rom/esp32/ld/esp32.rom.libgcc.ld
-- Adding linker script /opt/esp/idf/components/esp_rom/esp32/ld/esp32.rom.newlib-data.ld
-- Adding linker script /opt/esp/idf/components/esp_rom/esp32/ld/esp32.rom.syscalls.ld
-- Adding linker script /opt/esp/idf/components/esp_rom/esp32/ld/esp32.rom.newlib-funcs.ld
-- Adding linker script /opt/esp/idf/components/esp_rom/esp32/ld/esp32.rom.newlib-time.ld
-- Adding linker script /root/Projects/moddable/build/tmp/esp32/m5stack/release/stackchan/xsProj-esp32/build/esp-idf/esp32/esp32_out.ld
-- Adding linker script /opt/esp/idf/components/esp32/ld/esp32.project.ld.in
-- Adding linker script /opt/esp/idf/components/esp32/ld/esp32.peripherals.ld
-- Components: app_trace app_update asio bootloader bootloader_support bt cbor cmock coap console cxx driver efuse esp-tls esp32 esp_adc_cal esp_common esp_eth esp_event esp_gdbstub esp_hid esp_http_client esp_http_server esp_https_ota esp_https_server esp_hw_support esp_ipc esp_local_ctrl esp_netif esp_pm esp_ringbuf esp_rom esp_serial_slave_link esp_system esp_timer esp_websocket_client esp_wifi espcoredump esptool_py expat fatfs freemodbus freertos hal heap idf_test jsmn json libsodium log lwip main mbedtls mdns mqtt newlib nghttp nvs_flash openssl partition_table perfmon protobuf-c protocomm pthread sdmmc soc spi_flash spiffs tcp_transport tcpip_adapter tinyusb ulp unity vfs wear_levelling wifi_provisioning wpa_supplicant xtensa
-- Component paths: /opt/esp/idf/components/app_trace /opt/esp/idf/components/app_update /opt/esp/idf/components/asio /opt/esp/idf/components/bootloader /opt/esp/idf/components/bootloader_support /opt/esp/idf/components/bt /opt/esp/idf/components/cbor /opt/esp/idf/components/cmock /opt/esp/idf/components/coap /opt/esp/idf/components/console /opt/esp/idf/components/cxx /opt/esp/idf/components/driver /opt/esp/idf/components/efuse /opt/esp/idf/components/esp-tls /opt/esp/idf/components/esp32 /opt/esp/idf/components/esp_adc_cal /opt/esp/idf/components/esp_common /opt/esp/idf/components/esp_eth /opt/esp/idf/components/esp_event /opt/esp/idf/components/esp_gdbstub /opt/esp/idf/components/esp_hid /opt/esp/idf/components/esp_http_client /opt/esp/idf/components/esp_http_server /opt/esp/idf/components/esp_https_ota /opt/esp/idf/components/esp_https_server /opt/esp/idf/components/esp_hw_support /opt/esp/idf/components/esp_ipc /opt/esp/idf/components/esp_local_ctrl /opt/esp/idf/components/esp_netif /opt/esp/idf/components/esp_pm /opt/esp/idf/components/esp_ringbuf /opt/esp/idf/components/esp_rom /opt/esp/idf/components/esp_serial_slave_link /opt/esp/idf/components/esp_system /opt/esp/idf/components/esp_timer /opt/esp/idf/components/esp_websocket_client /opt/esp/idf/components/esp_wifi /opt/esp/idf/components/espcoredump /opt/esp/idf/components/esptool_py /opt/esp/idf/components/expat /opt/esp/idf/components/fatfs /opt/esp/idf/components/freemodbus /opt/esp/idf/components/freertos /opt/esp/idf/components/hal /opt/esp/idf/components/heap /opt/esp/idf/components/idf_test /opt/esp/idf/components/jsmn /opt/esp/idf/components/json /opt/esp/idf/components/libsodium /opt/esp/idf/components/log /opt/esp/idf/components/lwip /root/Projects/moddable/build/tmp/esp32/m5stack/release/stackchan/xsProj-esp32/main /opt/esp/idf/components/mbedtls /opt/esp/idf/components/mdns /opt/esp/idf/components/mqtt /opt/esp/idf/components/newlib /opt/esp/idf/components/nghttp /opt/esp/idf/components/nvs_flash /opt/esp/idf/components/openssl /opt/esp/idf/components/partition_table /opt/esp/idf/components/perfmon /opt/esp/idf/components/protobuf-c /opt/esp/idf/components/protocomm /opt/esp/idf/components/pthread /opt/esp/idf/components/sdmmc /opt/esp/idf/components/soc /opt/esp/idf/components/spi_flash /opt/esp/idf/components/spiffs /opt/esp/idf/components/tcp_transport /opt/esp/idf/components/tcpip_adapter /opt/esp/idf/components/tinyusb /opt/esp/idf/components/ulp /opt/esp/idf/components/unity /opt/esp/idf/components/vfs /opt/esp/idf/components/wear_levelling /opt/esp/idf/components/wifi_provisioning /opt/esp/idf/components/wpa_supplicant /opt/esp/idf/components/xtensa
-- Configuring done
-- Generating done
CMake Warning:
  Manually-specified variables were not used by the project:

    CMAKE_MESSAGE_LOG_LEVEL


-- Build files have been written to: /root/Projects/moddable/build/tmp/esp32/m5stack/release/stackchan/xsProj-esp32/build
# cc xsAll.c (strings in flash)
# cc xsAPI.c (strings in flash)
# cc xsArguments.c (strings in flash)
# cc xsArray.c (strings in flash)
# cc xsAtomics.c (strings in flash)
# cc xsBigInt.c (strings in flash)
# cc xsBoolean.c (strings in flash)
# cc xsCode.c (strings in flash)
# cc xsCommon.c (strings in flash)
# cc xsDataView.c (strings in flash)
# cc xsDate.c (strings in flash)
# cc xsDebug.c (strings in flash)
# cc xsError.c (strings in flash)
# cc xsFunction.c (strings in flash)
# cc xsGenerator.c (strings in flash)
# cc xsGlobal.c (strings in flash)
# cc xsJSON.c (strings in flash)
# cc xsLexical.c (strings in flash)
# cc xsMapSet.c (strings in flash)
# cc xsMarshall.c (strings in flash)
# cc xsMath.c (strings in flash)
# cc xsMemory.c (strings in flash)
# cc xsModule.c (strings in flash)
# cc xsNumber.c (strings in flash)
# cc xsObject.c (strings in flash)
# cc xsPromise.c (strings in flash)
# cc xsProperty.c (strings in flash)
# cc xsProxy.c (strings in flash)
# cc xsRegExp.c (strings in flash)
# cc xsRun.c (strings in flash)
# cc xsScope.c (strings in flash)
# cc xsScript.c (strings in flash)
# cc xsSourceMap.c (strings in flash)
# cc xsString.c (strings in flash)
# cc xsSymbol.c (strings in flash)
# cc xsSyntaxical.c (strings in flash)
# cc xsTree.c (strings in flash)
# cc xsType.c (strings in flash)
# cc xsdtoa.c (strings in flash)
# cc xsre.c (strings in flash)
# cc xsmc.c (strings in flash)
# cc e_pow.c (strings in flash)
# cc xsPlatform.c (strings in flash)
/tmp/ccdvz4ds.s: Assembler messages:
/tmp/ccdvz4ds.s:260: Warning: setting incorrect section attributes for .rodata.mod.0
# cc xsHost.c (strings in flash)
# cc xsHosts.c (strings in flash)
# xsc pins/digital.xsb
# xsc ili9341.xsb
# xsc m5button.xsb
# xsc time.xsb
# xsc timer.xsb
# xsc Resource.xsb
# xsc mdns.xsb
# xsc dns.xsb
# xsc modules.xsb
# xsc wifi.xsb
# xsc socket.xsb
# xsc net.xsb
# xsc sntp.xsb
# xsc websocket.xsb
# xsc base64.xsb
# xsc logical.xsb
# xsc crypt.xsb
# xsc tts-remote.xsb
# xsc tts-local.xsb
# xsc http.xsb
# xsc commodetto/Bitmap.xsb
# xsc pins/digital/monitor.xsb
# xsc pins/audioout.xsb
# xsc setup/target.xsb
# xsc m5stack/screen.xsb
# xsc commodetto/Poco.xsb
# xsc commodetto/parseBMP.xsb
# xsc commodetto/parseRLE.xsb
# xsc piu/All.xsb
# xsc piu/Timeline.xsb
# xsc piu/CombTransition.xsb
# xsc piu/MC.xsb
# xsc piu/WipeTransition.xsb
# xsc setup/piu.xsb
# xsc dns/parser.xsb
# xsc dns/serializer.xsb
# xsc pins/servo.xsb
# xsc serial.xsb
# xsc init-network.xsb
# xsc speeches.xsb
# xsc mc/config.xsb
# tsc tsconfig.json
main.ts:47:18 - error TS2339: Property 'onLaunch' does not exist on type 'unknown'.

47   onLaunch = mod.onLaunch
                    ~~~~~~~~

main.ts:48:24 - error TS2339: Property 'onButtonChange' does not exist on type 'unknown'.

48   onButtonChange = mod.onButtonChange
                          ~~~~~~~~~~~~~~

main.ts:49:24 - error TS2339: Property 'onRobotCreated' does not exist on type 'unknown'.

49   onRobotCreated = mod.onRobotCreated
                          ~~~~~~~~~~~~~~

main.ts:50:18 - error TS2339: Property 'autoLoop' does not exist on type 'unknown'.

50   autoLoop = mod.autoLoop ?? true
                    ~~~~~~~~


Found 4 errors.

/root/Projects/moddable/build/tmp/esp32/m5stack/release/stackchan/makefile:1060: recipe for target '/root/Projects/moddable/build/tmp/esp32/m5stack/release/stackchan/modules//extern/avatar/src/avatar.js' failed
make: *** [/root/Projects/moddable/build/tmp/esp32/m5stack/release/stackchan/modules//extern/avatar/src/avatar.js] Error 2

Screenshot.
Please attach a screenshot or picture to illustrate the bug, if any.

Environment (please fill in the following fields):.

  • OS: Ubuntu 20.04 and devcontainer
  • IDE: VSCode
  • Stack Chan Version: 97b5489
  • Type of M5Stack to use: every type

Other.
Please describe any other information that may be related to the problem.

Moddable is old in Dockerfile

Describe the bug
Build application failed because Moddable is old.

To Reproduce

Using Docker images.

$ ./build-container.sh
$ ./launch-container.sh
# Run inside container
$ npm install

# run application
root@docker-desktop:/workspace/stackchan# mcconfig -d -m -p esp32/m5stack
### Error: '/root/Projects/moddable/examples/pins/audioout/resource-stream/manifest_streamer.json': manifest not found!

Other.
Git commit hash of Moddable in Dockerfile is old.

Flashが4MBのM5Stack Basicで書き込みに失敗する

不具合の概要
Flashが4MBのM5Stack Basicで書き込みに失敗する。

再現手順
不具合を再現できる手順を記述してください

  1. Flashが4MBのM5Stack Basicを用意する
  2. ファームウェアを書き込む
  3. 再起動時と異常終了を繰り返す

想定する挙動
4MB版M5Stackでも動作する。

環境 (次の項目を埋めてください):

  • OS: Ubuntu 20.04
  • IDE: VSCode
  • スタックチャンのバージョン: dev/v1.0の最新
  • 使用するM5Stackの種類: M5Stack Basic 2018.3

その他
その他、不具合に関係していそうな情報があれば記述してください。

Which capacitor is recommended?

Hi, I have a question about the capacitor.

According to the BOM in schematics/README.md, it says that 25V 100uF capacitor is recommended,

| C1 |1|"100u"|"Capacitor_THT:C_Radial_D6.3mm_H11.0mm_P2.50mm"|"https://www.sengoku.co.jp/mod/sgk_cart/detail.php?code=46S8-5GL7"|

but the 10V 100uF capacitor is listed in the parts list in the same document. What are the requirements for the capacitor?

* Capacitor 10V/100uF * 1pc

There seem to be several types of the same series of capacitors sold by Sengoku Densho.

Manufacturer Product Number Rated Voltage Capacitance Diamiter (D) Height (L) URL
1EUTES101M0 25V 100uF 6.3 mm 11 mm https://www.sengoku.co.jp/mod/sgk_cart/detail.php?code=46S8-5GL7
1CUTES101M0 16V 100uF 5.0 mm 11 mm https://www.sengoku.co.jp/mod/sgk_cart/detail.php?code=2678-5GLR
1AUTES101M0 10V 100uF 5.0 mm 11 mm https://www.sengoku.co.jp/mod/sgk_cart/detail.php?code=76S8-53LK

Screenshot from 2021-11-13 13-13-42
source: https://www.mepc.jp/store/pdf/UTES_Series.pdf

Considering the above, I assume that the requirements for capacitors are as follows, is that right?

  • Rated Voltage >= 10V
  • Diamiter <= 6.3 mm
  • Height <= 11 mm

Build error with `npm run deploy:m5stack` on Docker environment

Describe the bug

npm run deploy:m5stack fails on the tsc phase.

To Reproduce
Steps to reproduce the behavior:

  1. Open stack-chan/firmware with VSCode
  2. Open devcontainer
  3. npm run deploy:m5stack_core2
  4. Error appears

Expected behavior
Type check succeeds.

Logs
If any compile error occurs, add a full compile log.

# tsc tsconfig.json
../extern/scservo/src/scservo.ts:53:3 - error TS2376: A 'super' call must be the first statement in the constructor when a class contains initialized properties, parameter properties, or private identifiers.

 53   constructor(option) {
      ~~~~~~~~~~~~~~~~~~~~~
 54     const onReadable = function (this: PacketHandler, bytes: number) {
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
... 
114     this.#state = RX_STATE.SEEK
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
115   }
    ~~~

../extern/scservo/src/scservo.ts:185:9 - error TS18022: A method cannot be named with a private identifier.

185   async #sendCommand(command: Command, address: Address, ...values: number[]): Promise<number[]> {
            ~~~~~~~~~~~~

../extern/scservo/src/scservo.ts:213:9 - error TS18022: A method cannot be named with a private identifier.

213   async #lock(): Promise<unknown> {
            ~~~~~
...
  • OS: Ubuntu 18.04
  • IDE: VSCode and Docker
  • Stack Chan Version: latest main b35e2e4
  • Type of M5Stack to use: Any M5Stack leads the same result

Writing a guideline for derivative works / 二次創作ガイドラインを追加する

「スタックチャンのグッズを作って販売したい」という問い合わせをいただいた。
スタックチャンキットを作って売るのと同じ考え方で、二次創作の同人誌やグッズの頒布も許可する方針にしたいと考えている。
二次創作ガイドラインを追加する。

I received a question from the one who wanted to "make and sell Stackchan merchandise."
I'd like to be permissive about the distribution of fanzine and goods of secondary productions by the open source mind. I think I should add a guideline for secondary creation.

Integrate submodules into this project

Is your feature request related to a problem? Please describe.
Stack-chan's firmware uses a number of submodules such as SCServo driver and Avatar. The git submodule is good for maintainability as the codebase grows but difficult for beginners.
スタックチャンは幾つかの機能をsubmoduleとして使っています。git submoduleはプロジェクトの規模が大きくなると保守性を高めるために良いですが、初心者にとって理解しづらい面もあります。

Describe the solution you'd like
It might be an option to integrate submodules into this project.
サブモジュールを本プロジェクトに統合してしまうのもひとつの手かもしれません。

Add M5Stack UNIT examples (as mod)/ M5Stack UNITの例を(modとして)追加する

Is your feature request related to a problem? Please describe.

There is no mod using M5Stack UNIT like ToF, NeoPixel, Environment Sensor, Gesture and so on.

M5Stackのユニット(ToF、NeoPixel、環境センサ、ジェスチャー認識など)を使ったmodの例がまだありません。

Describe the solution you'd like

Add mods. modを追加します。

Preference for Wi-Fi connection Wi-Fi接続設定の追加

Is your feature request related to a problem? Please describe.

So far there is a way to specify SSID and password in the mcconfig command line option or in the manifest file, but there is no way to specify it when writing the mod.

Wi-Fiの設定について、今の所mcconfigのコマンドラインオプションかmanifestファイルで指定する方法がありますが、modの書き込み時に指定する方法がありません。

Describe the solution you'd like

Add preference to set Wi-Fi SSID and password

Wi-FiのSSIDとパスワードを設定する手段を追加します。

Add software implementation guide/ ソフトウェアの実装ガイドを追加する

Is your feature request related to a problem? Please describe.

Stack-chan's firmware is built on a number of platforms and middleware

  • npm
  • Moddable SDK
  • Stack-chan modules (text-to-speech, servo motor driver, face renderer, and more)

There is no document about how to build and flash the firmware.


スタックチャンのソフトウェアは様々なプラットフォームやミドルウェアを使ってビルドされます。

  • npm
  • Moddable SDK
  • スタックチャンのモジュール(音声合成、サーボモータのドライバ、顔の描画など)

ファームウェアをビルドして書き込む方法の説明資料がまだありません。

Describe the solution you'd like

Add software guidelines. For example:

  • First steps
  • Writing mod
  • Customizing face
  • Text to speech
  • BLE
  • API

ソフトウェア実装のガイドラインを追加します。例えば次のようなものです。

  • 最初のステップ
  • modを書く
  • 顔のカスタマイズ
  • 音声合成
  • BLEについて
  • APIの説明

Which type of servo should I use?

Thank you for making and sharing the nice robot!!

I'm now thinking about which type of servo motors should I use for making a stack-chan.
I would appriciate it if I could know the pros. and cons. of the PWM and TTL servos.

# 素晴らしい活動ありがとうございます!

Integrate ChatGPT

The time has come! As soon as ChatGPT's API was opened, one of Stack-chan's users demonstrated a demonstration of integrating ChatGPT with Stack-chan.

https://twitter.com/robo8080/status/1631224076005179393?s=20

Mr. robo8080 created it using Arduino stacks such as M5Stack-Avatar.
"A robot that can talk to users" is the destiny of Stack-chan, and we would like to achieve this in our repository as well.

First, it is good to start with providing a thin wrapper for the ChatGPT Web API, followed by implementing a DialogManager.

The following functions are probably already present in existing dialogue systems and are desirable to implement:

  • Easily set the context (system message in ChatGPT)
  • Context presets to output extended syntax to change the generation method and facial expressions of Stack-chan
  • Manage the user's and assistant's speech history
  • Switch multiple contexts according to rules.

`memory full` error occurs on startup

Describe the bug
memory full error occurs on startup

To Reproduce
Steps to reproduce the behavior:

  1. Run npm run build target=esp32/m5stack_core2
  2. See the error below

Logs
If any compile error occurs, add a full compile log.

on xsbug console:

# Chunk allocation: 72 bytes failed in fixed size heap
XS abort: memory full

Environment (please fill in the following fields):.

Making firmware environment setup more friendly

Is your feature request related to a problem? Please describe.

The setup steps for Moddable SDK are still tricky for beginners.
So we should help them to build the first Stack-chan application.

Describe the solution you'd like

Several solutions are considerable.

  • Adding a description to README. Showing this situation makes surprises most negligible.
  • Adopting environment setup tool like xs-dev. Building on the top of the docker container is more than tricky, especially for M1 Mac/Win(WSL).

Outline face/アウトラインを使った顔の描画

Moddable has Outline features that can build a path or shape. This is convenient for customizing Stack-chan's face.

I would like to switch from piu to commodetto the implementation for drawing Stack-chan's face, then define its own outline face renderer.

Mac devContainer環境でビルドがうまくいかない

不具合の概要
Mac devContainer環境でビルドがうまくいかない

再現手順

  1. '/firmware '下でvscodeからソースコードを開く。dev containerで開きますかと聞かれるのではい -> remote desktopコンテナ内でVScodeが開く
  2. root@docker-desktop:/workspaces/stack-chan/firmware# で npm install 後, m5stack core2のみ(他パーツなし)をUSB接続し、/stackchan/firmware/ 以下で npm run build --target=esp32/m5stack_core2 を走らせる
  3. ''./scservo/src/manifest-driver.json': manifest not found!'というエラーが発生する

想定する挙動
Buildが通り /build 以下ディレクトリに配置される

ログ

root@docker-desktop:/workspaces/stack-chan/firmware# npm run build  --target=esp32/m5stack_core2

> [email protected] build /workspaces/stack-chan/firmware
> mcconfig -d -m -p ${npm_config_target=esp32/m5stack} -t build ./stackchan/manifest.json

### Error: './scservo/src/manifest-driver.json': manifest not found!
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] build: `mcconfig -d -m -p ${npm_config_target=esp32/m5stack} -t build ./stackchan/manifest.json`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the [email protected] build script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /root/.npm/_logs/2023-03-17T07_08_19_669Z-debug.log

0 info it worked if it ends with ok
1 verbose cli [
1 verbose cli   '/usr/bin/node',
1 verbose cli   '/usr/bin/npm',
1 verbose cli   'run',
1 verbose cli   'build',
1 verbose cli   '--target=esp32/m5stack_core2'
1 verbose cli ]
2 info using [email protected]
3 info using [email protected]
4 verbose run-script [ 'prebuild', 'build', 'postbuild' ]
5 info lifecycle [email protected]~prebuild: [email protected]
6 info lifecycle [email protected]~build: [email protected]
7 verbose lifecycle [email protected]~build: unsafe-perm in lifecycle true
8 verbose lifecycle [email protected]~build: PATH: /usr/lib/node_modules/npm/node_modules/npm-lifecycle/node-gyp-bin:/workspaces/stack-chan/firmware/node_modules/.bin:/opt/esp/idf/components/esptool_py/esptool:/opt/esp/idf/components/espcoredump:/opt/esp/idf/components/partition_table:/opt/esp/idf/components/app_update:/vscode/vscode-server/bin/linux-x64/5e805b79fcb6ba4c2d23712967df89a089da575b/bin/remote-cli:/opt/esp/idf/components/esptool_py/esptool:/opt/esp/idf/components/espcoredump:/opt/esp/idf/components/partition_table:/opt/esp/idf/components/app_update:/opt/esp/tools/xtensa-esp32-elf/esp-2021r2-patch5-8.4.0/xtensa-esp32-elf/bin:/opt/esp/tools/xtensa-esp32s2-elf/esp-2021r2-patch5-8.4.0/xtensa-esp32s2-elf/bin:/opt/esp/tools/xtensa-esp32s3-elf/esp-2021r2-patch5-8.4.0/xtensa-esp32s3-elf/bin:/opt/esp/tools/riscv32-esp-elf/esp-2021r2-patch5-8.4.0/riscv32-esp-elf/bin:/opt/esp/tools/esp32ulp-elf/2.35_20220830/esp32ulp-elf/bin:/opt/esp/tools/cmake/3.23.1/bin:/opt/esp/tools/openocd-esp32/v0.11.0-esp32-20220706/openocd-esp32/bin:/opt/esp/python_env/idf4.4_py3.8_env/bin:/opt/esp/idf/tools:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/root/Projects/moddable/build/bin/lin/release
9 verbose lifecycle [email protected]~build: CWD: /workspaces/stack-chan/firmware
10 silly lifecycle [email protected]~build: Args: [
10 silly lifecycle   '-c',
10 silly lifecycle   'mcconfig -d -m -p ${npm_config_target=esp32/m5stack} -t build ./stackchan/manifest.json'
10 silly lifecycle ]
11 silly lifecycle [email protected]~build: Returned: code: 1  signal: null
12 info lifecycle [email protected]~build: Failed to exec build script
13 verbose stack Error: [email protected] build: `mcconfig -d -m -p ${npm_config_target=esp32/m5stack} -t build ./stackchan/manifest.json`
13 verbose stack Exit status 1
13 verbose stack     at EventEmitter.<anonymous> (/usr/lib/node_modules/npm/node_modules/npm-lifecycle/index.js:332:16)
13 verbose stack     at EventEmitter.emit (events.js:400:28)
13 verbose stack     at ChildProcess.<anonymous> (/usr/lib/node_modules/npm/node_modules/npm-lifecycle/lib/spawn.js:55:14)
13 verbose stack     at ChildProcess.emit (events.js:400:28)
13 verbose stack     at maybeClose (internal/child_process.js:1088:16)
13 verbose stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:296:5)
14 verbose pkgid [email protected]
15 verbose cwd /workspaces/stack-chan/firmware
16 verbose Linux 5.10.124-linuxkit
17 verbose argv "/usr/bin/node" "/usr/bin/npm" "run" "build" "--target=esp32/m5stack_core2"
18 verbose node v14.21.3
19 verbose npm  v6.14.18
20 error code ELIFECYCLE
21 error errno 1
22 error [email protected] build: `mcconfig -d -m -p ${npm_config_target=esp32/m5stack} -t build ./stackchan/manifest.json`
22 error Exit status 1
23 error Failed at the [email protected] build script.
23 error This is probably not a problem with npm. There is likely additional logging output above.
24 verbose exit [ 1, true ]

環境

  • OS: [MacOS]
  • IDE: [VSCode]
  • MacbookAir M1chip
  • 使用するM5Stackの種類:Core2
  • dev/1.0 latest

その他

  1. extern/manifest_extern.jsonからエラーとみられる行をコメントアウトするとビルドは完了するが、他のエラーがでる
./scservo/src/manifest-driver.json",
      "./rs30x/src/manifest-driver.json"
drivers/rs30x-driver.ts:1:19 - error TS2792: Cannot find module 'rs30x'. Did you mean to set the 'moduleResolution' option to 'node', or to add aliases to the 'paths' option?

1 import RS30X from 'rs30x'
                    ~~~~~~~

drivers/scservo-driver.ts:1:21 - error TS2792: Cannot find module 'scservo'. Did you mean to set the 'moduleResolution' option to 'node', or to add aliases to the 'paths' option?

1 import SCServo from 'scservo'
                      ~~~~~~~~~


Found 2 errors in 2 files.

Errors  Files
     1  drivers/rs30x-driver.ts:1
     1  drivers/scservo-driver.ts:1
make: *** [/root/Projects/moddable/build/tmp/esp32/m5stack_core2/debug/stackchan/makefile:1733: /root/Projects/moddable/build/tmp/esp32/m5stack_core2/debug/stackchan/modules/workspaces/stack-chan/firmware/stackchan/ble/beacon-packet.js] Error 2
make: *** Waiting for unfinished jobs....
Loading defaults file /root/Projects/moddable/build/tmp/esp32/m5stack_core2/debug/stackchan/xsProj-esp32/sdkconfig.mc...
/tmp/confgen_tmpp22cs8zt:62 line was updated to CONFIG_ESPTOOLPY_FLASHSIZE_4MB=n
-- Configuring done
-- Generating done
-- Build files have been written to: /root/Projects/moddable/build/tmp/esp32/m5stack_core2/debug/stackchan/xsProj-esp32/build
npm ERR! code ELIFECYCLE
npm ERR! errno 2
npm ERR! [email protected] debug: `mcconfig -d -m -p ${npm_config_target=esp32/m5stack} ./stackchan/manifest.json`
npm ERR! Exit status 2
npm ERR! 
npm ERR! Failed at the [email protected] debug script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
  1. m1(arm64)ホスト上で、amd64イメージからできたコンテナで動いていることが原因?

スクリーンショット 2023-03-17 16 15 22

m1mac上のdevcontainerからdeployが上手くいかない

不具合の概要
m5stack_core2hrdevcontainerからdeployがうまくいかない

再現手順
不具合を再現できる手順を記述してください

  1. devcontainer 中でnpm run build --target=esp32/m5stack_core2の後で、npm run deploy --target=esp32/m5stack_core2を実行する

A fatal error occurred: Failed to connect to ESP32: No serial data received.というエラーが発生する

想定する挙動
deployが上手く走り、hostがm5stack_core2へ書き込まれる

ログ

root@docker-desktop:/workspaces/stack-chan/firmware# npm run deploy --target=esp32/m5stack_core2

> [email protected] deploy /workspaces/stack-chan/firmware
> mcconfig -d -m -p ${npm_config_target=esp32/m5stack} -t deploy ./stackchan/manifest.json

/opt/esp/idf/tools/idf.py
/root/Projects/moddable/build/tmp/esp32/m5stack_core2/debug/stackchan/makefile:2127: warning: overriding recipe for target '/root/Projects/moddable/build/tmp/esp32/m5stack_core2/debug/stackchan/ftimage.h.xsi'
/root/Projects/moddable/build/tmp/esp32/m5stack_core2/debug/stackchan/makefile:2058: warning: ignoring old recipe for target '/root/Projects/moddable/build/tmp/esp32/m5stack_core2/debug/stackchan/ftimage.h.xsi'
# uploading to esp32
[1/5] cd /root/Projects/moddable/build/tmp/esp32/m5stack_core2/debug/stackchan/xsProj-esp32/build/esp-idf/esptool_py && /opt/esp/python_env/idf4.4_py3.8_env/bin/python /opt/esp/idf/components/partition_table/check_sizes.py --offset 0x8000 partition --type app /root/Projects/moddable/build/tmp/esp32/m5stack_core2/debug/stackchan/xsProj-esp32/build/partition_table/partition-table.bin /root/Projects/moddable/build/tmp/esp32/m5stack_core2/debug/stackchan/xsProj-esp32/build/xs_esp32.bin
xs_esp32.bin binary size 0x1df790 bytes. Smallest app partition is 0x200000 bytes. 0x20870 bytes (6%) free.
[2/5] Performing build step for 'bootloader'
[1/1] cd /root/Projects/moddable/build/tmp/esp32/m5stack_core2/debug/stackchan/xsProj-esp32/build/bootloader/esp-idf/esptool_py && /opt/esp/python_env/idf4.4_py3.8_env/bin/python /opt/esp/idf/components/partition_table/check_sizes.py --offset 0x8000 bootloader 0x1000 /root/Projects/moddable/build/tmp/esp32/m5stack_core2/debug/stackchan/xsProj-esp32/build/bootloader/bootloader.bin
Bootloader binary size 0x4420 bytes. 0x2be0 bytes (39%) free.
[2/3] cd /opt/esp/idf/components/esptool_py && /opt/esp/tools/cmake/3.23.1/bin/cmake -D IDF_PATH="/opt/esp/idf" -D SERIAL_TOOL="/opt/esp/python_env/idf4.4_py3.8_env/bin/python /opt/esp/idf/components/esptool_py/esptool/esptool.py --chip esp32" -D SERIAL_TOOL_ARGS="--before=default_reset --after=hard_reset write_flash @flash_args" -D WORKING_DIRECTORY="/root/Projects/moddable/build/tmp/esp32/m5stack_core2/debug/stackchan/xsProj-esp32/build" -P /opt/esp/idf/components/esptool_py/run_serial_tool.cmake
esptool.py esp32 -p /dev/ttyAMA0 -b 1500000 --before=default_reset --after=hard_reset write_flash --flash_mode dio --flash_freq 80m --flash_size 8MB 0x1000 bootloader/bootloader.bin 0x10000 xs_esp32.bin 0x8000 partition_table/partition-table.bin
esptool.py v3.3.2
Serial port /dev/ttyAMA0
Connecting......................................

A fatal error occurred: Failed to connect to ESP32: No serial data received.
For troubleshooting steps visit: https://docs.espressif.com/projects/esptool/en/latest/troubleshooting.html
CMake Error at run_serial_tool.cmake:56 (message):
  /opt/esp/python_env/idf4.4_py3.8_env/bin/python
  /opt/esp/idf/components/esptool_py/esptool/esptool.py --chip esp32 failed


FAILED: CMakeFiles/flash /root/Projects/moddable/build/tmp/esp32/m5stack_core2/debug/stackchan/xsProj-esp32/build/CMakeFiles/flash 
cd /opt/esp/idf/components/esptool_py && /opt/esp/tools/cmake/3.23.1/bin/cmake -D IDF_PATH="/opt/esp/idf" -D SERIAL_TOOL="/opt/esp/python_env/idf4.4_py3.8_env/bin/python /opt/esp/idf/components/esptool_py/esptool/esptool.py --chip esp32" -D SERIAL_TOOL_ARGS="--before=default_reset --after=hard_reset write_flash @flash_args" -D WORKING_DIRECTORY="/root/Projects/moddable/build/tmp/esp32/m5stack_core2/debug/stackchan/xsProj-esp32/build" -P /opt/esp/idf/components/esptool_py/run_serial_tool.cmake
ninja: build stopped: subcommand failed.
ninja failed with exit code 1
Executing action: flash
Running ninja in directory /root/Projects/moddable/build/tmp/esp32/m5stack_core2/debug/stackchan/xsProj-esp32/build
Executing "ninja flash"...

スクリーンショット
host OS側では m5stack_core2 は /dev/以下に認識されている (UARTでは出てこないがm5burner, arduinoではこのデバイスポートから接続できる)
スクリーンショット 2023-03-21 16 36 12

container側では /dev/以下にusbserial が反映されていない
スクリーンショット 2023-03-21 16 37 18

元々自動で登録される/dev/ttyAMA0 には日時が更新されている模様だが、こちらがUSBserial port用なのか不明
スクリーンショット 2023-03-21 16 39 31

環境 (次の項目を埋めてください):

  • OS: [MacOS , m1 chip]
  • IDE: [VSCode]
  • M5Stack_core2

その他

#140 の続きです。

Connections of SG90s

Hi, now I'm testing the stack-chan's firmware with Core 2, and I, if I correctly understand the schematic, found that the "pan" servo is assigned to J3 (GPIO 27) and the "tilt" servo is assigned to J2 (GPIO 19).

This assignment may be confusing because of the following two reasons:

  1. The "tilt" servo is located upper than the "pan" servo, whereas the J2 is lower than the J3.
  2. The correct assignment is not documented in the READMEs.

I would like you to confirm my understanding, and, if you like, I'll make a PR to add information to some README.

By the way, I also found that schematics/README.md is a bit old because the images/photos are for the older version board, and we need to solder additional jump patterns (JP1, 2, 6, and 8).
If you also like, I'll try to take photos of my board and update the READMEs.

I imagine that it is so tough to maintain OSH by oneself, please feel free to ask me to make some help.

modをアンインストールする

既存の機能に問題がある場合、その説明

modをインストール後にデフォルト(modのインストール前)の挙動に戻したいケースがあると思います。
そこで、modをアンインストールする方法が必要と考えています。

あなたが望む解決策

過去にModdable SDK側のディカッションでmodのアンインストール方法を確認すると、serial2xsbugを使えるようです。
この手段でstack-chanのmodをアンインストールできることを確認しています。

ただし、serial pathを調べる必要があるため自動的に検出できるコマンド化されると望ましいです。

検討した代替案

現状stack-chanのmodの実装では、modにonRobotCreatedが実装されていなければデフォルトの挙動となるため、このような空のmodをインストールすることでも実現できると思います。

本リポジトリに掲載いただいているModの期待値を教えていただきたい(可能であればRead meに記載します)

既存の機能に問題がある場合、その説明
現在本リポジトリに掲載いただいているModの期待値を教えていただきたい(可能であればRead meに記載します)

あなたが望む解決策
現在下記環境でLook atのModを導入したのだが、どのように動作させれば良いかがわからない。
→xsbug起動後適当にボタンを押すとlooking atとapply poseを呼び出すようになるが、looking atの呼び出し頻度が低そうで首振り頻度が低い様子
また、Mod導入後はPCに接続せずスタンドアロンで機能を使用できるのかが知りたい
→xsbugでデバッグしつつでないと動作しない様子?

環境:
OS:MacOS Ventura 13.2.1(M1)MacBook Air 
IDE:CLI(ModdableSDK)
スタックチャンのバージョン:M5Bottom版キット
使用するM5Stackの種類:M5Stack Core2(3/5頃購入)

Battery charging capability

Sorry for my multiple issues, but I thought it's better to separate issues having different topics.

Does the stack-chan's board (or M5Stack itself) have a capability to charge the Li-Po battery?
Should I buy some charging device?
Since I could not read this info from the READMEs, please let me know about it.

If it's preferable, I'd like to make a PR adding the information from your answer to the README.

Thanks,
Yoshiaki

How to connect to WiFi and use the features (Expressions/Text2Speech)? HTTP API?

Hey @meganetaaan !

Although I googled my fingers off, I did not manage to connect the stack-chan to my WiFi. I looked also at the code (searched for SSID) but you created a really complex project that is a little bit hard to understand.

Dont get me wrong, I really like your project and would like to use and contribute to it....but it is lacking a guide on how to get started with extending or customizing the SW.

Thank you in advance for helping!

M5StackCore2にファームウェアを入れるとスタックチャンの顔が表示されるが何も動かない

不具合の概要
ファームウェアを入れるとスタックチャンの顔が表示されるが何も動かない

再現手順
Core2にファームウェアを導入

想定する挙動
「ランダムに動く」が正だと思われる
https://twitter.com/fuji_producer/status/1636011112587214848?s=20

ログ
なし

スクリーンショット
https://twitter.com/fuji_producer/status/1635994410079879170?s=20

環境:
OS:MacOS Ventura 13.2.1(M1)MacBook Air 
IDE:CLI(ModdableSDK)
スタックチャンのバージョン:M5Bottom版キット
使用するM5Stackの種類:M5Stack Core2(3/5頃購入)

その他
設定例: スタックチャン M5Bottom版キットを動かすスタックチャン で始める M5Stackの記述で気になったのですが、
サーボの設定はstack-chan/firmware/stackchan/manifest.jsonに記載するのか、stack-chan/firmware/stackchan/manifest_local.jsonに書き込むのかがわかりませんでした。

manifest.jsonの

    "platforms": {
        "esp32/m5stack_core2": {
            "include": ["./manifest_8mb_flash.json"],
            "config": {
                "driver": {
                    "pwmPan": 19,
                    "pwmTilt": 27
                },

    "platforms": {
        "esp32/m5stack_core2": {
            "include": ["./manifest_8mb_flash.json"],
            "config": {
                "driver": {
                    "type": "pwm",
                    "pwmPan": 19,
                    "pwmTilt": 27
                },

とするのか

manifest_local.jsonの

        "driver": {
            "type": "scservo",
            "panId": 1,
            "tiltId": 2,
            "offsetTilt": 0,
            "offsetPan": 0
        }

        "driver": {
            "type": "pwm",
            "pwmPan": 13,
            "pwmTilt": 14
        }

とするのか

Share STEP files

Current case file format is STL.
This is not a best choice for public project since it does not include edit history.
It would be better to share STEP files so that anyone can import and edit them.

Port B/C pin assign is wrong

Describe the bug

This bug is dangerous and should be fixed in higher priority. It could apply a 5V voltage to pins that are not 5V tolerant, leading to damage to the M5Stack and the unit.

Port B/C pin assign is wrong.

Screenshot from 2022-07-11 00-05-37

  • For PortB, the correct assign is 36, 26 5V and GND from the left.
  • For PortC, the correct assign is Rx, Tx, 5V and GND from the left

PXL_20220710_151138798

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.