Go Back

Configure the directions of your motors

Execute these commands:

  cd ~/GugusseRoller
  ./manualControl.py

Wait the few seconds it takes for this app to initialize everything. Don't press the letters w, s, x, e, d or c, they'll mess up our following tests:

Press the letter “q” on your keyboard, the left turntable should rotate counter-clockwise. If reversed, take note for later that you'll have to toggle the “feeder”.

Then Press the letter “z” on your keyboard, the right turntable should rotate counter-clockwise. If reversed, take note for later that you'll have to toggle the “pickup”.

Then Press the letter “a” on your keyboard, the small shaft should turn clockwise (which will make the longboard wheel turn counter-clockwise). If reversed take note that you'll have to toggle the “filmdrive”

Press the Escape key to exit the manualControl.py application.

If you have any of the 3 motors to toggle direction then execute the following command:

  nano hardwarecfg.json

You'll see something like this:

  {
      "filmdrive": {
          "pinEnable":18,
          "pinDirection":14,
          "pinStep":15,
          "invert": true,
          "stopPin": 2,
          "stopState":1
      },
      "feeder": {
          "pinEnable":25,
          "pinDirection":23,
          "pinStep":24,
          "invert": false,
          "stopPin": 3,
          "stopState":1,
          "DefaultTargetTime": 0.25,
          "minSpeed": 20,
          "maxSpeed": 20000
      },
      "pickup": {
          "pinEnable":21,
          "pinDirection":8,
          "pinStep":7,
          "invert": false,
          "stopPin": 5,
          "stopState":1,
          "DefaultTargetTime": 0.25,
          "minSpeed": 20,
          "maxSpeed": 20000
      }
  }

For any of the motors that you need to toggle, just toggle the Boolean value of its “invert” variable.

When done just press Control-o and then press Enter to confirm the filename. Press Ctrl-X to exit nano.

Redo the test to insure that everything runs in the proper direction and also that you didn't corrupted the json file as this type of file is strict in its format, you must not remove or add any coma, accolade, quotes and etc.. true or false must be in lower caps without quotes. If you are struggling with the format and want to restart from scratch use the command:

  git checkout hardwarecfg.json

This will reset the file to what it was before and you could retry to edit it again.