benrouse
Posts: 3
Joined: Tue Oct 30, 2012 9:27 pm

Gertboard and D5 not working

Tue Oct 30, 2012 9:40 pm

Hi guys, I've just finished putting together the gertboard but can't get D5 to work with the led test program. I did make the mistake of putting the led's in upside down(because of the line seemed to indicate the neg side and this is not the case!) but have re done it and no joy. if I swap the straps from B5 and B6 then D6 doesn't work so I know it' should be working.

Any ideas?

Beb

User avatar
rurwin
Forum Moderator
Forum Moderator
Posts: 4258
Joined: Mon Jan 09, 2012 3:16 pm
Contact: Website

Re: Gertboard and D% not workig

Tue Oct 30, 2012 10:43 pm

LEDs make rather good fuses. If it is transparent enough, you should be able to see a very thin wire that arcs between the two terminals. That is what generally burns out.

LEDs are easily sourced. search on eBay and you will find rather too many.

benrouse
Posts: 3
Joined: Tue Oct 30, 2012 9:27 pm

Re: Gertboard and D5 not workig

Tue Oct 30, 2012 10:57 pm

All led's are good coz I can move the straps from the gp ports about to get them all working it's just which ever led is connected to gp21 on the gertboard won't light?

Wendo
Posts: 142
Joined: Sun Jun 10, 2012 8:27 pm

Re: Gertboard and D% not workig

Wed Oct 31, 2012 4:22 am

You don't mention what revision board you have, but my guess is it's a rev2 board in which GPIO21 is replaced by GPIO27.

You'll have to edit the test programs to update the code to flip GPIO27 instead of GPIO21 is that's the case

benrouse
Posts: 3
Joined: Tue Oct 30, 2012 9:27 pm

Re: Gertboard and D% not workig

Wed Oct 31, 2012 9:41 am

Yes i think it maybe rev 2, its a 512mb and says 1.2 on the pcb. to change the test program am i changing the leds.c file?

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

Re: Gertboard and D% not workig

Wed Oct 31, 2012 10:13 am

At this very moment I do NOT have immediate access to the source files ( And I don't have time to download unpack etc.)
You should search for a macro definition which looks like this:
#define L0 (1<<17)
#define L1 (1<<21)
#define L2 (1<<22)
#define L3 (1<<23)
#define L4 (1<< 0)
#define L5 (1<< 1)

Those do the mapping of GPIO pins to the LED names in the program.


Change the
#define L1 (1<<21)
to
#define L1 (1<<27)

for a rev2 board.

amateurasu
Posts: 8
Joined: Mon Jan 30, 2012 9:13 am

Re: Gertboard and D5 not working

Tue Feb 19, 2013 1:18 am

Wow. I had the same problem. Altering the code to use 27 instead of 21 worked, but man... I hope there was a good reason for changing the GPIOs between revisions and throwing this kind of monkey wrench into coding for RPi.

User avatar
[email protected]
Posts: 2020
Joined: Tue Feb 07, 2012 2:14 pm
Location: Devon, UK
Contact: Website

Re: Gertboard and D5 not working

Tue Feb 19, 2013 9:15 am

amateurasu wrote:Wow. I had the same problem. Altering the code to use 27 instead of 21 worked, but man... I hope there was a good reason for changing the GPIOs between revisions and throwing this kind of monkey wrench into coding for RPi.
The foundation had a good reason for it - it's all to do with the new camera module AIUI. Note also that the I2C pins have changed - if you used them for GPIO: 0 & 1 are now 2 & 3.

My solution is to use wiringPi (but would say that as I wrote it ;-) as the pin numbers I chose stay constant between Pi board revisions.

But no one solution seems to be ideal though - it's just something that we need to be aware of and work round.

-Gordon
--
Gordons projects: https://projects.drogon.net/

User avatar
silverfox0786
Posts: 215
Joined: Mon Feb 04, 2013 10:32 pm
Location: Slough, UK
Contact: Website

Re: Gertboard and D5 not working

Wed Feb 20, 2013 4:59 pm

the new gertboard software addresses the change in GPIO and all the code is updated

Return to “HATs and other add-ons”