Software?

Hello i use 6x 12v 100rpm motors, 1x Tuhnderborg motor controller and a raspberry pi 3. And a chassis from the 3D printer. No sensors!
Which software? Monsterborg Software or Didiborg Software.?

piborg's picture

Both the MonsterBorg and DiddyBorg v2 software can work with ThunderBorg based robots. I would recommend starting with the DiddyBorg v2 software.

Before running the scripts you will need to make sure that the power settings are correct. By default they are setup for 12V motors and a 12V battery pack (10x rechargeable AAs).

To change the power settings look for this section in each of the scripts starting with diddy:

# Power settings
voltageIn = 12.0           # Total battery voltage to the ThunderBorg
voltageOut = 12.0 * 0.95   # Maximum motor voltage, we limit it to 95%...

voltageIn should be set to the voltage of your battery pack and voltageOut should be set to the voltage of your motors.

Thanks a lot! I use 12v motors and 10x AA pack so I do not need any changes here. Are there any other changes regarding smaller engines and Monsterborg software?

piborg's picture

No other changes are needed for the MonsterBorg software. As long as the voltages are correct the motors will work as intended :)

The only major difference between the code for the two robots is how the motors are wired to the ThunderBorg. In the MonsterBorg scripts the left side motors are connected to M2, for the DiddyBorg v2 the left side motors are connected to M1.

The scripts are easy to fix if the wiring does not match your robot. In both cases look for these lines in the scripts (they are in different places in each script):

                TB.SetMotor1(driveLeft  * maxPower)
                TB.SetMotor2(driveRight * maxPower)

First check if driving forwards works. If the robot spins then one side needs to be driven the other way. If the robot moves backwards then both sides need to be driven the other way. This can be done one of two ways:

  1. Swap the + and - connections to the motors on the side that needs to be the other way
  2. Add a - sign when setting the motor power like this:
    TB.SetMotor1( driveLeft  * maxPower) # Normal
    TB.SetMotor2(-driveRight * maxPower) # Swapped
    

The other potential difference is that left and right are swapped. Once forward motion works check the steering. If left and right seem to be swapped over then the outputs in the code do no match the robot. This is probably best fixed in code by swapping SetMotor1 and SetMotor2 like this:

                TB.SetMotor2(driveLeft  * maxPower)
                TB.SetMotor1(driveRight * maxPower)

can you tell me how I can adjust the camera resolution?

piborg's picture

If you are talking about the Web UI there are two resolutions you might want to change.

The first is the actual camera resolution, which affects the quality of the shown image and the size of the photos taken. This is set by the imageWidth and imageHeight values in the settings section towards the top of the script.

The second is the size the image is shown as on screen. To adjust this you need to look for this line:

httpText += '<center><img src="/cam.jpg" style="width:600;height:480;" name="rpicam" /></center>\n'

You can change the size by adjusting the numbers after width: and height:.

Subscribe to Comments for &quot;Software? &quot;