Pibrella

pibrella-boardThe Pibrella from Cyntech/Pimoroni is a great add-on board for the Raspberry Pi which consists of 3 large LEDs (Red/Amber/Green), 4 digital inputs (A-D), 4 buffered outputs (E-F) with white LEDs to indicate their state, large switch and a Piezo speaker.

PiBrellaDocs1To use it, launch ScratchGPIO5 Plus and create a variable called AddOn and set its value to Pibrella in your On Green Flag event.

 

You can then use the usual AllOn/Off broadcasts and well as individual broadcasts for Red/Amber/Green/OutputE/OutputF/OutputG and OutputH

 

Also there is a special broadcast BeepXX where XX is the equivalent Scratch note value (60 being Middle C) The sound quality from a piezo is not the same as a large speaker so expect to be able to compose a top ten hit πŸ™‚

BeepXX,YY is also available where YY is note duration

 

The 4 inputs are recognised as sensor values InputA to D.Β  These give “off” normally and “on” when activated.Β  The switch is called “switch” and gives off and on.

 

To control the brightness of the LEDs use PowerRed/PowerAmber/PowerGreen

 

PiBrellaDocs2To control the power settings of the outputs, use PowerOutE to H.

 

You can connect up a low-cost 5pin stepper and connect it to the outputs (Red to any left hand one, the other 4 to the 4 right hand ones) and use a variable called Stepper to make it turn.

 

Note new addition – MotorE..H variable

TOPTIP – set a variable called Bright from 1 to 100 and your can control the brightness of the VERY bright LEDs πŸ™‚

14 thoughts on “Pibrella

  1. Thanks for a really useful Scratch version. You have a couple of errors in the examples on this page: the variables for adjusting the brightness of the LEDs are ‘greenpower’ rather than ‘powergreen’ etc as shown. Similarly, the variables needed to adjust the output led brightness are ‘powerg’ rather than ‘poweroutputg’ etc

    • Hi Richard
      The syntax for the Pibrella changed drastically between V4 and V5 to be more consistent.
      So power is now a prefix for everything, powerred, powergreen, poweroutpute etc
      And all the outputs were renamed as outpute.h and all the inputs inputa..d

      At least I hope the documentation does match up correctly with ScratchGPIO5 πŸ™‚
      regards
      Simon

      • Hi Simon,
        I have ScratchGPIO5 and I’m afraid the syntax is as I noted in my first comment. It is definitely ‘AmberPower’ rather than ‘poweramber’. This is as defined in scratchgpio_handler5.py: cLed = [[“redpower”,13],[“amberpower”,11],[“greenpower”,7]]

        So I’m afraid that there is an inconsistency/mismatch somewhere… 😦
        cheers
        Richard

      • mm – I’m hoping you just downloaded V5 before I did the change as its not like that now in either my copy of dev or the stable release. Could you re-download for me please and re-install (won’t affect any existing projects in the Documents folder)

        Simon

  2. Yep you were right. I download ScratchGPIO5 again and it works as described on this page. Thanks again for a great library! Any plans to add support for the Pi_Lite boards?

  3. Great piece of kit!

    We’ve got the basics working but we’re struggling to find details of the inputs and outputs. We’ve already managed to fry an external LED. Are there any projects that we can follow to use the inputs and outputs effectively?

    • I suggest getting a simple add on board like a Β£10 Pibrella or a PiDie and have a play with that as they are “safer” to use

      Remember – standard LEDs need resistors at all times to make sure you don’t fry them πŸ™‚

      Simon

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s