Jan 232013
 

I’ve been sitting on this for a while, but I’m now delighted to announce that the manual for the new Rev 2, fully assembled Gertboard, which officially went on sale yesterday, includes full documentation of my Python Gertboard Test Suite.

I wrote the Python-specific sections and Myra’s done a great job of weaving them into the fully updated manual.

You can download the new manual here

You can download the Python Gertboard software here.

The Python software was fully tested by Myra before Christmas on the only Rev 2 Gertboard in existence at the time. Mine hasn’t arrived yet. But you can be sure that when it does I will be posting some HiRes photos, as is my habit.

Quite a short blog post for me heh? ;) (I couldn’t sit on it any longer).

  24 Responses to “V2 Gertboard Officially Adopts my Python Test Suite”

  1. Congrats, Alex. Awesome news :-)

  2. Congrats! Your Python posts really got me started. Now look at how many people you have helped! I can’t tell you how thrilled I am to see SPI support. Thank You Alex!

    • Great stuff – thanks :)

      Yeah I got the SPI working in December. I thought it was going to be really hard. The ADC wasn’t because I was able to snatch a snippet of code from Jeremy Blythe’s blog and adapt it for the smaller ADC. But I was on my own for the DAC – had to read the datasheet and try to understand what binary bits to send to the DAC and how to create them with py-spidev. Got there though. :)

      I just totted up the numbers and we’re at 1240 downloads now. I’ve a feeling there will be a lot more by this time next year ;)

  3. My son and I have spent a day on this and eventually got all your python programs working on our pi. Thanks for making these available.

    Do you know where we can get the schematics from? They are missing from the manual.

    • You’re welcome. Enjoy. :)
      The schematics are in the V1 manual and I believe Gert has sent them to Farnell, so they will make it into the document at some point. Rev 1 manual can be found in this thread here…

      http://www.raspberrypi.org/phpBB3/viewtopic.php?f=42&t=20410

      OK so the schematic won’t be identical but it should be close enough to see how things work.

      Also please note I posted a bug fix today for the three SPI programs dad, atod and dtoa. There was a bug such that if you ran the leds program and then tried to use the spi without rebooting the spi programs would fail. This was tracked down and squashed by reloading the spi drivers each time.
      (I’d never run the leds program and the spi ones in the same session before – hence never spotted the issue.) :)

  4. Thanks for putting the wiringPi Gertboard tests together. I tried them all with by GB. Just wondering if you had tried doing anything with interrupts as far as using wiringPi in Python. I haven’t been successful getting Gordon’s new wiringPiISR function to work in Python. It’s not that it does or doesn’t trigger an interrupt for me. I can’t get past the stage of coding it properly in Python. I did find a few examples of using wiringPiISR in C but nothing in Python. My experience in C is limited to extremely simple code. BTW, I want to use my Parallax motion sensor to trigger an interrupt instead of having my RPi tied up in a loop.

    • The latest wiringpi python update is several months old, so anything Gordon has done which is remotely new in the C version is unlikely to be available yet in the Python version (unless I misunderstand how it all fits together). So, no. No interrupt playing in Python yet. Although, if you use the Quick2wire system, there is apparently epoll support – although I haven’t tried it yet. Have a look at the Quick2Wire stuff on Github :) Perhaps that will do what you need?

  5. I did check out the Quick2Wire site. Their library modules seem to require their expansion board, but I’m not 100% sure. I did find this program referenced in the Nov. MagPi, and it does work with my motion sensor. It doesn’t use wiringPi or RPi.GPIO. It sets up a polling object to watch for interrupts. It runs under Python3. http://ryniker.ods.org/raspberrypi/MagPi/interrupt_test23.py
    Now I have to study it to see how I can use the concept in my own motion sensor code.

  6. I had been using your Python codes with success until I inadvertently connected a 18V AC supply to the motor controller and ran the test code (attempting to control a scalextric car, which has a 12V DC motor but the rectifier is in the track which I had by-passed). Pi is dead but not sure if I have damaged the Gertboard (is the motor supply earth connected to the Gertboard earth?). Any idea how I can test the motor controller without risking a new Pi on it?

    • Ouch. RIP RPi :(

      I just multimetered the Motor supply earth to Gertboard Earth and they are not directly connected. Could you try sending a PWM signal from the ATMega? That would put an easily replaceable £3 chip in the firing line instead of the Pi. Failing that, Gert might have a suggestion in the Gertboard section of the Pi forums.

      Are you chucking the dead Pi or keeping it? If you’re chucking it, I can think of an interesting video project if you’d care to send it to me ;)
      (I can PayPal you the postage). But no worries if you’re keeping it.

    • Actually Jonathan it should be even easier to test the motor controller than that. Just connect a 3v3 source to J5 pin MOTA, and 0V to MOTB. Then connect your power supply to the motor controller and a motor. When the pins MOTA and MOTB are different the motor should spin. Swap them over it should spin the other way.

      You may need to power the Gertboard for this though (I’m not sure)

      I tried it – you don’t even need to power up the Gertboard for this.

      • Alex

        Many thanks. I don’t have a 3V3 supply knocking about, will two AA cells in series do the job? (I will take great care with the polarity!). Otherwise I could just about scrape a potential divider together.

        I don’t have a use for the dead RPi no. I would be happy to send it to you, but the owner (my son) does not yet know of its demise. Send me your details and when I get the replacement I will send it.
        Intrigued as to what use you are planning for it.

        Thanks again

        • Two AAs should be fine and the polarity won’t matter. + to MotA pin – to MotB pin, or the other way round to change motor direction.

          • All failed…Gertboard motor controller dead, but I think the rest may be okay. The part doesn’t look so easy to replace as on the self assembled version, so will replace the whole board. Quite an expensive mistake that. I am determined to get my scalextric project going as it seems to have inspired the Pi’s owner, but I will use 12V batteries from now on!

            Thanks again for the advice

          • Can you not dremel through the legs and then desolder them individually?
            (No, it’s tiny isn’t it?)
            Couldn’t you make up a separate circuit just for the Scalextric? Motor controller, two input wires for ports 18 & 17, earth, power and a couple of caps? (It’ll all be there in the schematic)

  7. That sounds interesting, but probably a little advanced for us yet – but certainly one for the next stage of the project. What do you mean by caps?
    Got the new boards up and running and ran your motor tests using a spare 6V motor we had – both programs worked. Any idea why are we only getting max 1V across the motor with 6V supplied to the motor controller? Not only with your program, but even with steady 3.3V sent to either input only produced a volt across the motor.

    • Caps are capacitors. The motor voltage won’t really be constant because of the way a brushed motor works. It’s quite likely your voltmeter is giving an average reading. You’d get a true picture with an oscilloscope. If I get a chance, I’ll try and scope the voltage across a running motor and see what it looks like. (I’m guessing, but I would expect it to be wavy).

  8. Alex,
    Thanks. I got my Gert way back when (whenever V2 1st came out – I had to wait for the pre-order to be filled). Promptly misplaced it. 8 years later (last week) I found it. And I found your site also (thank goodness!). My friend and I are experimenting with “stuff” in his aquaponics greenhouse and this will help much in sensing and controlling.

    I’ll be trying to get everything to work in one of the new OS’s on a RPi-2.

    Thanks again,
    Scott

Leave a Reply