poseidon
Posts: 21
Joined: Thu May 31, 2012 9:23 pm

Gertbot on a RPi3 - Need help accessing GPIOs

Sun Mar 19, 2017 12:30 pm

Dear Raspians,

I'd like to drive some LEDs using J3 on my Gertbot stacked onto a Raspberry Pi 3 until I get at some motors to drive them via the Gertbot.

How would I do that?

The manual seems to have some weak spots, e.g. I couldn't find J3 explained: Where is GND? Where is pin 1? How much current will be supplied? Is it 5V (I own some LEDs w/ a built-in resistor, i.e. they can be directly connected to a 5V-source)? Some pictures would be helpful. The picture on page 19 of the manual "Gertbot, Rev 2.5/2.6, 26 April 2015" is a good start.

Some Python code in the manual would be helpful too. After digging through the "Gertbot Debug and Development GUI" sources I eventually found test_drivers.zip on this forum. Alas, calling test_drives -t11 -b0 doesnt' light my LED. I guess, this is because I connected it the wrong way.

So has anyone a description of the J3 pins?

Kind regards
Paul

User avatar
Gert van Loo
Posts: 2487
Joined: Tue Aug 02, 2011 7:27 am
Contact: Website

Re: Gertbot on a RPi3 - Need help accessing GPIOs

Sun Mar 19, 2017 6:21 pm

Paul,
first: if you post questions about the gertbot in the 'gert board classic' section I get to see them sooner
as I get an email for posts in there.

As to the J3: yes it is an omission in the main manual. I am working on an updated version.
Below is a picture to get you started. A bit more about the pins can be found in the Gert bot Gui manual. From page 10 onwards is a section about the J3 connector. https://www.gertbot.com/gbdownload/man/Gertbot_GUI.pdf
J3.png
J3.png (15.27 KiB) Viewed 518 times
If you don't have motors you can connect LEDs to the motor pins. As the minimum operating voltage is 8V the series resistor needs to be a bit bigger then for 3V3 or 5V. 4700 ohms should do. If you connect a RED and a GREEN LED back-to back you can even see the
direction "the motor" is turning. I have quickly drawn a picture using Paint:
diodes.png
diodes.png (2.53 KiB) Viewed 518 times
Some Python code in the manual would be helpful too. After digging through the "Gertbot Debug and Development GUI" sources I eventually found test_drivers.zip on this forum. Alas, calling test_drives -t11 -b0 doesnt' light my LED. I guess, this is because I connected it the wrong way.
Full drivers, source code, examples and test code can be found on the gertbot website: http://www.gertbot.com.
See https://www.gertbot.com/download.html

Especially to sort out your connections I recommended you use the Gert-bot GUI as first tool.
When you got things working with that, then it is time to start playing with your own code, drivers etc.

Return to “Beginners”