1 Star 1 Fork 0

冰冷骨灰/mixly_lu9685舵机

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
lu9685.mix 8.38 KB
一键复制 编辑 原始数据 按行查看 历史
冰冷骨灰 提交于 2023-01-01 13:50 . add
<xml version="Mixly 2.0 rc3" board="Arduino ESP32@ESP32 Dev Module"><block type="make_main" id="wRm6XLea?|tz3a5#RK*n" x="-1513" y="-996"><field name="main_show_is_true">FALSE</field><field name="main_0">LU9685</field><field name="input_drop">inline</field><field name="sharp">sharp_4</field><statement name="main_1"><block type="make_value_input" id="r)dv}]|v]eF{)z6A7P$^"><field name="dummy_input_data">address</field><field name="statement_input_dropdown_data">left</field><statement name="statement_input_data"><block type="make_type_text" id="Of{YATU3k,^,=8PEE1#]"><field name="type_text_data">LU9685 I2C设备地址</field></block></statement><value name="make_value_input_type"><shadow type="math_number" id="+Mbk05GWO6ij0_~V`Z@A"><field name="NUM">任何值</field></shadow></value><next><block type="make_dummy_input" id="0?G6HM]Dkk_dmQDN6Ahh"><field name="statement_input_dropdown_data">left</field><statement name="statement_input_data"><block type="make_type_text" id="SM)vub]I(b=Ik9vlI!av"><field name="type_text_data">通道</field><next><block type="make_type_dropdown" id="A[t=MYiV^FhKg[Ast7;v"><field name="type_text_name">index</field><statement name="type_dropdown_data"><block type="make_type_dropdown_text" id="wp(kZZ3JWv5Knpp.~X^)"><field name="type_dropdown_text">0</field><field name="type_text_name">0x00</field><next><block type="make_type_dropdown_text" id="$H8+H=zi#Gzxu)7LMdJ."><field name="type_dropdown_text">1</field><field name="type_text_name">0x01</field><next><block type="make_type_dropdown_text" id="hkwf{NAG9PDof7coklpB"><field name="type_dropdown_text">2</field><field name="type_text_name">0x02</field><next><block type="make_type_dropdown_text" id=".Gp7S]-Q7kZ?[7.]FK8j"><field name="type_dropdown_text">3</field><field name="type_text_name">0x03</field><next><block type="make_type_dropdown_text" id="0_rM|d_e5=52/+xl|wo6"><field name="type_dropdown_text">4</field><field name="type_text_name">0x04</field><next><block type="make_type_dropdown_text" id="k]|8BB74PY~P]g:;e4fD"><field name="type_dropdown_text">5</field><field name="type_text_name">0x05</field><next><block type="make_type_dropdown_text" id="y$A,`pTYukyTJ!gW/U,v"><field name="type_dropdown_text">6</field><field name="type_text_name">0x06</field><next><block type="make_type_dropdown_text" id="?iAfJ{x?9{OV[rJ$crKf"><field name="type_dropdown_text">7</field><field name="type_text_name">0x07</field><next><block type="make_type_dropdown_text" id="ME$OW9sh21*yz!4_MH|L"><field name="type_dropdown_text">8</field><field name="type_text_name">0x08</field><next><block type="make_type_dropdown_text" id="oX]5G;bAOVKt:$DGLHy/"><field name="type_dropdown_text">9</field><field name="type_text_name">0x09</field><next><block type="make_type_dropdown_text" id="xtqRGv?VjtwLV56uD+)B"><field name="type_dropdown_text">10</field><field name="type_text_name">0x10</field><next><block type="make_type_dropdown_text" id="LDdWag{K~~-?[Jg)zKvQ"><field name="type_dropdown_text">11</field><field name="type_text_name">0x11</field><next><block type="make_type_dropdown_text" id="^:,l=Djhi0D({97^[bd}"><field name="type_dropdown_text">12</field><field name="type_text_name">0x12</field><next><block type="make_type_dropdown_text" id="PN[w3NsqslvHMLT{2Iha"><field name="type_dropdown_text">13</field><field name="type_text_name">0x13</field><next><block type="make_type_dropdown_text" id="ukq7LFjAZS_MQ[Me9Ir`"><field name="type_dropdown_text">14</field><field name="type_text_name">0x14</field><next><block type="make_type_dropdown_text" id="n:a20A6!c2IER3gJ4WEc"><field name="type_dropdown_text">15</field><field name="type_text_name">0x15</field></block></next></block></next></block></next></block></next></block></next></block></next></block></next></block></next></block></next></block></next></block></next></block></next></block></next></block></next></block></next></block></statement></block></next></block></statement><next><block type="make_value_input" id="d9C,I[vxlxXT;?T$o2?:"><field name="dummy_input_data">angle</field><field name="statement_input_dropdown_data">left</field><statement name="statement_input_data"><block type="make_type_text" id="(_eIDn525fDa_vIcCY|W"><field name="type_text_data">角度(0-180)16进制</field></block></statement><value name="make_value_input_type"><shadow type="math_number" id="1H|/uYt4P8Z.Z~[9#ul#"><field name="NUM">任何值</field></shadow></value></block></next></block></next></block></statement><value name="main_2"><block type="text" id="3vz6tsxajGztx{(ud,1`"><field name="TEXT">SCL 22 SDA 21</field></block></value><value name="main_3"><block type="text" id="|rN@VmjGD`k~W}X13#Vp"><field name="TEXT">0-180度</field></block></value><value name="main_4"><block type="make_main_color" id="oV;yRIMetNSW{*7B!^l8"><field name="main_color">135</field></block></value><statement name="make_generator_code_data"><block type="make_generator_loop" id="x6)jm3$8nX[Tb*]ZWJgc"><value name="loop_data"><block type="make_generator_text_input_return" id="R6)B^#ROMi?])siP?]m+"><mutation items="10"></mutation><field name="data1">'Wire.beginTransmission('</field><field name="data2">+value_address</field><field name="data3">+');\n'</field><field name="data4">+ 'Wire.write('</field><field name="data5">+ dropdown_index </field><field name="data6">+');\n'</field><field name="data7">+ 'Wire.write('</field><field name="data8">+value_angle</field><field name="data9">+');\n'</field><field name="data10">+ 'Wire.endTransmission();\n'</field></block></value><next><block type="make_generator_define_setup" id="t0Foe3p!S^@g.$/bW0Sb"><field name="type">definitions</field><field name="definitions_name">'Wire'</field><value name="definitions_data"><block type="make_generator_text_input_return" id="Q-yzg:n:BJeb`(a.W6wp"><mutation items="1"></mutation><field name="data1">'#include &lt;Wire.h&gt;'</field></block></value><next><block type="make_generator_define_setup" id="mnZ9@#cnrBsI{sXh6J;)"><field name="type">setups</field><field name="definitions_name">'NAME'</field><value name="definitions_data"><block type="make_generator_text_input_return" id="2NYoLL+ouLCa4#zx@GcE"><mutation items="1"></mutation><field name="data1">'Wire.begin();'</field></block></value></block></next></block></next></block></statement></block><block type="make_main_show_code" id="c;v0~+#HK?Iay!79g5nm" x="-896" y="-1022"><field name="type">1</field><field name="xml_code">&lt;block type="LU9685"&gt;&amp;#10;&lt;/block&gt;</field><field name="block_code">Blockly.Blocks.LU9685= {&amp;#10; init: function() { &amp;#10; this.appendValueInput("address")&amp;#10; .setCheck(null)&amp;#10; .appendField("LU9685 I2C设备地址");&amp;#10; this.appendDummyInput()&amp;#10; .appendField("通道")&amp;#10; .appendField(new Blockly.FieldDropdown([["0","0x00"],["1","0x01"],["2","0x02"],["3","0x03"],["4","0x04"],["5","0x05"],["6","0x06"],["7","0x07"],["8","0x08"],["9","0x09"],["10","0x10"],["11","0x11"],["12","0x12"],["13","0x13"],["14","0x14"],["15","0x15"]]), "index");&amp;#10; this.appendValueInput("angle")&amp;#10; .setCheck(null)&amp;#10; .appendField("角度(0-180)16进制");&amp;#10; this.setInputsInline(true);&amp;#10; this.setPreviousStatement(true, null);&amp;#10; this.setNextStatement(true, null);&amp;#10; this.setColour(135);&amp;#10; this.setTooltip("SCL 22 SDA 21");&amp;#10; this.setHelpUrl("0-180度");&amp;#10; }&amp;#10;};</field><field name="generator_code">Blockly.Arduino.LU9685 = function() {&amp;#10; var value_address = Blockly.Arduino.valueToCode(this, 'address', Blockly.Arduino.ORDER_ATOMIC);&amp;#10; var dropdown_index = this.getFieldValue('index');&amp;#10; var value_angle = Blockly.Arduino.valueToCode(this, 'angle', Blockly.Arduino.ORDER_ATOMIC);&amp;#10; var code = 'Wire.beginTransmission('&amp;#10; +value_address&amp;#10; +');\n'&amp;#10; + 'Wire.write('&amp;#10; + dropdown_index &amp;#10; +');\n'&amp;#10; + 'Wire.write('&amp;#10; +value_angle&amp;#10; +');\n'&amp;#10; + 'Wire.endTransmission();\n';&amp;#10; Blockly.Arduino.definitions_['Wire'] = '#include &lt;Wire.h&gt;';&amp;#10; Blockly.Arduino.setups_['NAME'] = 'Wire.begin();';&amp;#10; return code;&amp;#10;};</field><field name="zh_hans_code"></field></block></xml><config>{"PSRAM":"disabled","PartitionScheme":"default","CPUFreq":"240","FlashMode":"qio","FlashFreq":"80","FlashSize":"4M","UploadSpeed":"921600","LoopCore":"1","EventsCore":"1"}</config><code>dm9pZCBzZXR1cCgpewoKfQoKdm9pZCBsb29wKCl7Cgp9</code>
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/qihuancode/mixly-lu9685-steering-gear.git
git@gitee.com:qihuancode/mixly-lu9685-steering-gear.git
qihuancode
mixly-lu9685-steering-gear
mixly_lu9685舵机
master

搜索帮助