Files
uiflow-micropython/examples/controllers/stackchan/stackchan_servo_zero_calibrate.m5f2
hlym123 e099fc94c2 board: Add StackChan board support.
Signed-off-by: hlym123 <lwylwt@qq.com>
2026-05-09 15:33:17 +08:00

1 line
9.0 KiB
Plaintext

{"version":"V2.0","versionNumber":"V2.4.4","type":"stack-chan","components":[{"name":"page0","type":"lvgl_page","layer":0,"screenId":"builtin","screenName":"","id":"teNpCyR$w5CvU+1l","createTime":1777349923217,"backgroundColor":"#000000","isLVGL":true,"isSelected":true},{"name":"label_title","type":"lvgl_label","layer":1,"screenId":"builtin","screenName":"","id":"scvMeojHD_YViR^!","createTime":1777349962474,"x":55,"y":5,"color":"#0dc9f4","backgroundColor":"#000000","bg_opacity":0,"text":"Servo Calibration","font":"lv.font_montserrat_24","pageId":"teNpCyR$w5CvU+1l","isLVGL":true,"isSelected":false},{"name":"button_save","type":"lvgl_button","layer":2,"screenId":"builtin","screenName":"","id":"zOK`d4G-%y%Gi^iK","createTime":1777350028641,"x":128,"y":195,"width":0,"height":0,"color":"#ffffff","backgroundColor":"#2196f3","text":"Save","font":"lv.font_montserrat_14","pageId":"teNpCyR$w5CvU+1l","isLVGL":true,"isSelected":false},{"name":"label_angle_x","type":"lvgl_label","layer":3,"screenId":"builtin","screenName":"","id":"s^z$Baaa4wz^lrb+","createTime":1777349962474,"x":10,"y":130,"color":"#0dc9f4","backgroundColor":"#000000","bg_opacity":0,"text":"X-Axis Servo Angle:","font":"lv.font_montserrat_18","pageId":"teNpCyR$w5CvU+1l","isLVGL":true,"isSelected":false,"width":173,"height":20},{"name":"label_angle_y","type":"lvgl_label","layer":4,"screenId":"builtin","screenName":"","id":"wPgIyXrZDnu%M@se","createTime":1777349962474,"x":8,"y":160,"color":"#0dc9f4","backgroundColor":"#000000","bg_opacity":0,"text":"Y-Axis Servo Angle:","font":"lv.font_montserrat_18","pageId":"teNpCyR$w5CvU+1l","isLVGL":true,"isSelected":false,"width":172,"height":20},{"name":"label_tip","type":"lvgl_label","layer":5,"screenId":"builtin","screenName":"","id":"aq#N74fR-+kK7zCq","createTime":1777351964876,"x":33,"y":70,"color":"#d2e711","backgroundColor":"#ffffff","bg_opacity":0,"text":"Tip:Move by hand, tap Save.","font":"lv.font_montserrat_18","pageId":"teNpCyR$w5CvU+1l","isLVGL":true,"isSelected":false,"width":250,"height":20}],"resources":[{"hardware":["hardware_button","hardware_pin_button","imu","rgb","speaker","touch","als","ir","mic","touchpad","hardware_servo","hardware_nfc","sdcard"]}],"units":[],"hats":[],"caps":[],"chains":[],"bases":[],"plcmodules":[],"i2cs":[],"chainBus":[],"blockly":"<variables><variable id=\"W{N@uwe5U;BPm`.e:90u\">x_angle</variable><variable id=\"_bXzo!FsGGtPR+sW9%h-\">y_angle</variable><variable id=\"x@+J(*87Q7WUVrPwyIVj\">last_time</variable></variables><block type=\"basic_on_setup\" id=\"setup_block\" deletable=\"false\" x=\"50\" y=\"50\"><mutation isBegin=\"true\"></mutation><field name=\"UPDATEOP\">true</field><statement name=\"FUNC\"><block type=\"system_m5_begin\" id=\"zv^)^ZaezkjyKNn6pz~|\"><next><block type=\"system_stackchan_init\" id=\"HvOrG|-|N*gox(|C_P*#\"><field name=\"I2C\">1</field><field name=\"UART\">1</field><next><block type=\"lvgl_page_screen_load\" id=\"9ll/Y]37_]-eQ37N}q1@\"><field name=\"NAME\">page0</field><next><block type=\"hardware_servo_set_servo_power\" id=\"Q![pR3HC:`Nx$Y-=/:|4\"><value name=\"VALUE\"><shadow type=\"hardware_servo_power_option\" id=\"gykl*,~KaqAjE,vS(cfg\"><field name=\"VALUE\">True</field></shadow></value><next><block type=\"hardware_servo_set_servo_torque\" id=\"H1R9e+e0?o0tN2EUt4Mh\"><field name=\"ID\">SERVO_ID_X</field><value name=\"VALUE\"><shadow type=\"hardware_servo_power_option\" id=\"MbZX:]-g/h;cmg%ex`_p\"><field name=\"VALUE\">False</field></shadow></value><next><block type=\"hardware_servo_set_servo_torque\" id=\"b6cXFBsmwl6}5M=p;P3d\"><field name=\"ID\">SERVO_ID_Y</field><value name=\"VALUE\"><shadow type=\"hardware_servo_power_option\" id=\")c^7[.N]m_zv[Wl{3g;4\"><field name=\"VALUE\">False</field></shadow></value><next><block type=\"speaker_begin\" id=\"5L#3ZNshdM,gnkCFz^uI\"><next><block type=\"speaker_set_volume_percentage\" id=\"fQDmjw557N$8:Sjy+I_c\"><value name=\"VOLUME\"><shadow type=\"math_slider\" id=\")z,f=^^;H~_SWdr.*=(N\"><mutation max=\"100\" min=\"0\" step=\"1\" precision=\"1\"></mutation><field name=\"NUM\">60</field></shadow></value><next><block type=\"speaker_tone\" id=\"3nDuLE8-]9=PX}Gg6c3^\"><value name=\"FREQ\"><shadow type=\"math_number\" id=\"TBb2}n-9WYXK%q:ZavJ+\"><mutation max=\"Infinity\" min=\"-Infinity\" precision=\"0\"></mutation><field name=\"NUM\">1000</field></shadow></value><value name=\"MS\"><shadow type=\"math_number\" id=\"q_Z/C2QJH;uFYBeD}5jh\"><mutation max=\"Infinity\" min=\"-Infinity\" precision=\"0\"></mutation><field name=\"NUM\">100</field></shadow></value></block></next></block></next></block></next></block></next></block></next></block></next></block></next></block></next></block></statement></block><block type=\"basic_on_loop\" id=\"loop_block\" deletable=\"false\" x=\"50\" y=\"470\"><mutation isUpdate=\"true\"></mutation><field name=\"UPDATEOP\">true</field><statement name=\"FUNC\"><block type=\"system_m5_update\" id=\"Q6wpD)}KTBAXB)2t=S~:\"><next><block type=\"controls_if\" id=\"CYTCl07j6ltf^3%!|/g,\"><value name=\"IF0\"><block type=\"logic_compare\" id=\"(h_Lb!XO5!?GDbMv]5|j\"><field name=\"OP\">GTE</field><value name=\"A\"><block type=\"time_get_ticks_diff\" id=\"%}j/m*X74_2fUWHiw3J0\"><value name=\"TICKS1\"><shadow type=\"math_number\" id=\"wnXN3Y$Ki._19]iPtF4S\" disabled=\"true\"><mutation max=\"Infinity\" min=\"-Infinity\" precision=\"0\"></mutation><field name=\"NUM\">1</field></shadow><block type=\"time_get_ticks_ms\" id=\"pwyf:kzwbp~N3g%083;[\"></block></value><value name=\"TICKS2\"><shadow type=\"math_number\" id=\"IU%j;!5D4a9In.%CbQA;\" disabled=\"true\"><mutation max=\"Infinity\" min=\"-Infinity\" precision=\"0\"></mutation><field name=\"NUM\">1</field></shadow><block type=\"variables_get\" id=\":.,zAjF{=_66OGjf~B+$\"><field name=\"VAR\" id=\"x@+J(*87Q7WUVrPwyIVj\">last_time</field></block></value></block></value><value name=\"B\"><block type=\"math_number\" id=\"]jrmBRzZ4{2[gsM255jg\"><mutation max=\"Infinity\" min=\"-Infinity\" precision=\"0\"></mutation><field name=\"NUM\">100</field></block></value></block></value><statement name=\"DO0\"><block type=\"variables_set\" id=\"gh[YNTRC83`zbBYsK7XO\"><field name=\"VAR\" id=\"W{N@uwe5U;BPm`.e:90u\">x_angle</field><value name=\"VALUE\"><block type=\"hardware_servo_get_servo_angle\" id=\"-3:V7V$pFoY2U^U[Q4g]\"><field name=\"ID\">SERVO_ID_X</field></block></value><next><block type=\"variables_set\" id=\"B~i{-puaxtNk{Mg|[_0c\"><field name=\"VAR\" id=\"_bXzo!FsGGtPR+sW9%h-\">y_angle</field><value name=\"VALUE\"><block type=\"hardware_servo_get_servo_angle\" id=\"Ku9j%le{*{xO?ioF`uZe\"><field name=\"ID\">SERVO_ID_Y</field></block></value><next><block type=\"lvgl_label_set_text\" id=\"6K}rXEt?|(o:F|-3oPQ,\"><field name=\"NAME\">label_angle_x</field><value name=\"VALUE\"><shadow type=\"text\" id=\"N(s/*3H/NrX/mwnJrJkW\"><field name=\"TEXT\">hello M5</field></shadow><block type=\"text_add_str\" id=\";WBa$mv{sc!WG(FSmzDu\"><value name=\"VALUE1\"><shadow type=\"text\" id=\"(Z^N^TxH_betaoFpZPZ8\"><field name=\"TEXT\">X-Axis Servo Angle:</field></shadow></value><value name=\"VALUE2\"><block type=\"variables_get\" id=\"q{=_~-6*?D9UvOpqw/eT\"><field name=\"VAR\" id=\"W{N@uwe5U;BPm`.e:90u\">x_angle</field></block></value></block></value><next><block type=\"lvgl_label_set_text\" id=\"$CS8gE)28M0P{ej@*?T6\"><field name=\"NAME\">label_angle_y</field><value name=\"VALUE\"><shadow type=\"text\" id=\"N(s/*3H/NrX/mwnJrJkW\"><field name=\"TEXT\">hello M5</field></shadow><block type=\"text_add_str\" id=\"j0ta^ogSenOHigq7OzrO\"><value name=\"VALUE1\"><shadow type=\"text\" id=\"F3zYFRJm!eThhAA:L]`@\"><field name=\"TEXT\">Y-Axis Servo Angle:</field></shadow></value><value name=\"VALUE2\"><block type=\"variables_get\" id=\"UyR:uV671HC:i*0NX6%-\"><field name=\"VAR\" id=\"_bXzo!FsGGtPR+sW9%h-\">y_angle</field></block></value></block></value></block></next></block></next></block></next></block></statement></block></next></block></statement></block><block type=\"lvgl_button_event\" id=\"7wH%.:`,}O=[KScj5gQt\" x=\"50\" y=\"830\"><field name=\"NAME\">button_save</field><field name=\"OPTION\">SHORT_CLICKED</field><statement name=\"FUNC\"><block type=\"hardware_servo_set_servo_zero\" id=\"T1!bkL_@S@o0nQqS)Z6s\"><next><block type=\"lvgl_label_set_text\" id=\"XSO2qcdy;On.aMD6?WDs\"><field name=\"NAME\">label_tip</field><value name=\"VALUE\"><shadow type=\"text\" id=\"?g2Q.E^yR,WAi?;T$1Ot\"><field name=\"TEXT\">Tip: Calibration success</field></shadow></value><next><block type=\"speaker_tone\" id=\"u.,`75?pm]Z}qHUHP4g^\"><value name=\"FREQ\"><shadow type=\"math_number\" id=\"O8/ZCkLsYlXBEFg_xo.R\"><mutation max=\"Infinity\" min=\"-Infinity\" precision=\"0\"></mutation><field name=\"NUM\">1000</field></shadow></value><value name=\"MS\"><shadow type=\"math_number\" id=\"Z*Hbo^^9GFc[,@^~2ln~\"><mutation max=\"Infinity\" min=\"-Infinity\" precision=\"0\"></mutation><field name=\"NUM\">100</field></shadow></value></block></next></block></next></block></statement></block>","screen":[{"simulationName":"Built-in","type":"builtin","width":320,"height":239.99999999999997,"scale":0.63,"screenName":"","blockId":"","screenColorType":0,"rotation":1,"id":"builtin","createTime":1777349923216}],"logicWhenNum":0,"customList":[]}