Usb camera and L298N streaming robot

Hello everyone. Picked up a gopigo and am enjoying it thus far. Im particularly interested in the Browser streaming robot but I have some technical questions. I am rather new to Python programming so go easy on me! What Im trying to achieve here is to substitute the GOPIGO board to just use a L298N board to drive motors. I will eventually be using a second L298N and an arduino. I tinkered with the code a bit but was unsuccessful, I noticed on my terminal I get a ( IOerror ) which according to the motor controller.py is linked to the gopigo board somehow. Can anyone guide me a bit in order to just control 4 output pins from the Browser robot ?

Also, Im sure its an easy switch but I cant find it online, how can I switch to my USB camera instead of the Pi cam? I eventually would like to be able to switch from 2 different cameras in the future.

Hey,
The browser streaming example takes the input from the joystick and uses it to send commands to the GoPiGo. The functionality is defined here: https://github.com/DexterInd/GoPiGo/blob/master/Software/Python/Examples/Browser%20Streaming%20Robot/robot_controller.py#L99 . Be careful when you are using the motor driver directly with the Pi because any backemf or short might kill your Pi.

As for changing the camera to a USB caerma, you might have to update the source for it here: https://bitbucket.org/DawnRobotics/raspberry_pi_camera_streamer.git. It might be a bit challenging to do that.

-Karan

Thank you so much! I managed to get the controls to work with my L298N board. I appreciate it. I am still working on the USB cam but have not been so lucky yet.

I noticed, this code however only has 1 joystick ? I tried to backtrack the original code so that I can still have 2 joysticks. Ideally 1 would be for movement ( as it currently is ) and the second is to control an arm, the arm is not servo driven, it will be driven the same method as with the L298N.

Hey,
We had tries a few setups and people liked the one joystick setup much more so we migrated to it. If you still want to use the two joysick method, then you can checkout to this commit: https://github.com/DexterInd/GoPiGo/commit/f5c658f216bf65e1137d2f2c55e6938c3c6a7b4d with and that should have the the two joystick example.

-Karan