File tree Expand file tree Collapse file tree 1 file changed +25
-2
lines changed
Expand file tree Collapse file tree 1 file changed +25
-2
lines changed Original file line number Diff line number Diff line change 22#include < M5Unified.h>
33#include < SD.h>
44#include " Stackchan_ex_config.h"
5+ #include < Stackchan_servo.h>
6+ #include < Avatar.h>
57
6- StackchanExConfig config;
8+ using namespace m5avatar ;
9+
10+ Avatar avatar;
11+
12+ StackchanSERVO servo;
13+ StackchanExConfig system_config;
714
815void setup () {
916 auto cfg = M5.config ();
@@ -12,7 +19,23 @@ void setup() {
1219 M5.Log .setEnableColor (m5::log_target_serial, false );
1320 SD.begin (GPIO_NUM_4, SPI, 25000000 );
1421 delay (2000 );
15- config.loadConfig (SD, " /yaml/SC_BasicConfig.yaml" );
22+ system_config.loadConfig (SD, " /yaml/SC_BasicConfig.yaml" );
23+
24+ // servo
25+ servo.begin (system_config.getServoInfo (AXIS_X)->pin , system_config.getServoInfo (AXIS_X)->start_degree ,
26+ system_config.getServoInfo (AXIS_X)->offset ,
27+ system_config.getServoInfo (AXIS_Y)->pin , system_config.getServoInfo (AXIS_Y)->start_degree ,
28+ system_config.getServoInfo (AXIS_Y)->offset ,
29+ (ServoType)system_config.getServoType ());
30+ delay (2000 );
31+ avatar.init ();
32+
33+ servo_interval_s* servo_interval = system_config.getServoInterval (AvatarMode::NORMAL); // ノーマルモード時のサーボインターバル情報を取得
34+ servo_interval_s* servo_interval_sing = system_config.getServoInterval (AvatarMode::SINGING); // 歌っているときのサーボインターバル情報を取得
35+
36+ // wifi
37+ wifi_s* wifi_info = system_config.getWiFiSetting ();
38+ api_keys_s* api_key = system_config.getAPISetting ();
1639
1740}
1841
You can’t perform that action at this time.
0 commit comments