Skip to content

Latest commit

 

History

History
114 lines (71 loc) · 3.68 KB

README_en.md

File metadata and controls

114 lines (71 loc) · 3.68 KB

stackchan-bluetooth-simple

日本語 | English

Overview

Based on the M5Stack-Avatar, a simple Bluetooth speaker function and servo control function for the stack chan are added. It is modified based on Bluetooth_with_ESP32A2DP, which is an example of M5Unified.

environment

  • VSCode

  • PlatformIO

Support Devices

  • M5Stack Basic/Gray/M5Go
    Basic is only available with 16MB of Flash memory.

  • M5Stack Fire

  • M5Stack Core2 / Core2 for AWSIoT

Requirement

Arduino-ESP32 is confirmed to work with 2.0.4 (Fire only 2.0.0). M5Stack Fire has a problem with arduino-esp32v2.0.4 and does not start.

See platformio.ini for detailed version information.

Compile Notes

  • M5Stack Fire V2.6/M5Stack Basic V2.6
    When using a TF card, we have confirmed an event that SD.begin() cannot be read at 20MHz. Lower it to 15MHz.

  • M5Stack Basic V2.6
    Please select env:m5stack-grey for env when compiling with VSCode+PlatformIO.

Settings

If there is no YAML file for configuration on the SD card, the default values are used. (It is configured to connect servos to PortA.) If you put /yaml/SC_Config.yaml in your SD card, you can use your own settings.

Please refer to YAML file for the default settings.

Setting Items

(Initial values in parentheses)

  • servo

    • pin

      • x(Core1 22, Core2 33)
        GPIO No of Servo X
      • y(Core1 21, Core2 32)
        GPIO No of Servo Y
    • offset

      • x(0)
        Offset x
      • y(0)
        Offset y
    • speed
      Specify the standby time and servo travel time when the sound is on standby and Bluetooth speaker. Specify a range with minimum and maximum values and use random values.

      • normal_mode
        • interval_min(5000)
        • interval_max(10000)
        • move_min(500)
        • move_max(1500)
      • sing_mode
        • interval_min(1000)
        • interval_max(2000)
        • move_min(500)
        • move_max(1500)
  • bluetooth

    • device_name(M5Stack_BTSPK)
      Specify the device name of the Bluetooth speaker.
    • starting_state("false")
      Specify whether Bluetooth mode is enabled or disabled at startup.
    • start_volume(100)
      Initial volume of Bluetooth speaker.
  • auto_power_off_time(0)
    Core2 only. power off after USB power supply is turned off and after a set time elapses. (0 does not power off)

  • balloon
    Set up callouts.

    • font_language("JA")
      Specifies the language of the font." JA" or "CN", otherwise Latin font is used.
    • lyrics("おはよう","Hello","你好","Bonjour")
      Sets lines to be displayed at random in Normal mode. Up to 10 lines.

Usage

  • BtnA
    Enters Bluetooth mode. (Only valid when bluetooth_mode = false)

  • BtnB
    Volume down.

  • BtnC
    Volume up.

Credit

LICENSE

MIT

Author

Takao Akaki