Swap the position of motor 1,2 for mithon cc
@@ -513,17 +513,6 @@ Blockly.Python.FUNCTION_MIXLY_RGB_SHOW_ALL = 'def mixly_rgb_show_all(r, g, b):\n
' np[led] = (r, g, b)\n' +
' np.show()\n';
Blockly.Python.FUNCTION_MIXLY_MOTOR1 = 'def motor1(v,d=1):\n' +
- ' v = min(12,max(0,v))\n' +
- ' if v==0:\n' +
- ' pin14.write_analog(0)\n' +
- ' pin13.write_analog(0)\n' +
- ' elif d==1:\n' +
- ' pin14.write_analog(int(v/12*1023))\n' +
- ' pin13.write_analog(0)\n' +
- ' elif d==0:\n' +
- ' pin14.write_analog(0)\n' +
- ' pin13.write_analog(int(v/12*1023))\n'
-Blockly.Python.FUNCTION_MIXLY_MOTOR2 = 'def motor2(v,d=1):\n' +
' v = min(12,max(0,v))\n' +
' if v==0:\n' +
' pin8.write_analog(0)\n' +
@@ -534,6 +523,17 @@ Blockly.Python.FUNCTION_MIXLY_MOTOR2 = 'def motor2(v,d=1):\n' +
' elif d==0:\n' +
' pin8.write_analog(0)\n' +
' pin16.write_analog(int(v/12*1023))\n'
+Blockly.Python.FUNCTION_MIXLY_MOTOR2 = 'def motor2(v,d=1):\n' +
+ ' v = min(12,max(0,v))\n' +
+ ' if v==0:\n' +
+ ' pin14.write_analog(0)\n' +
+ ' pin13.write_analog(0)\n' +
+ ' elif d==1:\n' +
+ ' pin14.write_analog(int(v/12*1023))\n' +
+ ' pin13.write_analog(0)\n' +
+ ' elif d==0:\n' +
+ ' pin14.write_analog(0)\n' +
+ ' pin13.write_analog(int(v/12*1023))\n'
Blockly.Python.FUNCTION_MIXLY_MOTOR3 = 'def motor3(v,d=1):\n' +
' v = min(12,max(0,v))\n' +
' if v==0:\n' +
