Coding Of BO motor with Arduino Uno


 


Steps to do coding in Tinkercad

1. Click the code editor button to open the coding panel.










 

2.The coding panel has different sections of code. We will be using code blocks in the Output section. Drag the set pin code onto the coding canvas.




3. We will code to move the BO Motor in the Forward direction, Backward direction, and then will stop the BO motor.

For writing the code, first, we will define two variables as in1 & in2 and then 

Code For moving the motor in Forward Direction

Code For moving the motor in Backward Direction

Code to stop the movement of motor