In mBlock5 I created a program to control a “RC Car”.
when [up arrow] key is pressed
encoder motor [port1] rotates at power [50]%
encoder motor [port2] rotates at power [-50]%
when [up arrow] key is released
encoder motor [port1] rotates at power [0]%
encoder motor [port2] rotates at power [0]%
when [down arrow] key is pressed
encoder motor [port1] rotates at power [-50]%
encoder motor [port2] rotates at power [50]%
when [down arrow] key is released
encoder motor [port1] rotates at power [0]%
when [left arrow] key is pressed
encoder motor [port3] rotates at power [-50]%
when [left arrow] key is released
encoder motor [port3] rotates at power [0]%
when [right arrow] key is pressed
encoder motor [port3] rotates at power [50]%
when [right arrow] key is released
encoder motor [port3] rotates at power [0]%
In mBlock Blockly App for Android tablets
I created two sliders but the “RC Car” has two motors driving rear wheels. One wheel spins froward and other wheel spins backwards. The app doesn’t let me add negative values to slider values. How can I fix the problem?