Anonymous

Project:TRTL: Difference between revisions

From London Hackspace Wiki
no edit summary
No edit summary
Line 157: Line 157:
Upload the source code and ensure that everything is connected properly. Now note which way the motors spin and change the polarity of 1Y and 2Y (i.e. literally swap 1Y with 2Y as it is connected to the motor) or 3Y with 4Y in order to ensure that the left and right motor are spinning the same way at the same time while the demo code is running.
Upload the source code and ensure that everything is connected properly. Now note which way the motors spin and change the polarity of 1Y and 2Y (i.e. literally swap 1Y with 2Y as it is connected to the motor) or 3Y with 4Y in order to ensure that the left and right motor are spinning the same way at the same time while the demo code is running.


There is a Github Gist of the H-bridge control here: [https://gist.github.com/1205051]
There is a Github Gist of the H-bridge control here: [https://gist.github.com/1217572]


   #define EN_1_2 12
   #define EN_1_2 12
   #define EN_3_4 7
   #define EN_3_4 13
   #define INPUT_1A 11
   #define INPUT_1A 11
   #define INPUT_2A 10
   #define INPUT_2A 10