Smurf Haribos take control of @raspberry_Pi using Scratch GPIO Do they taste any better after electricity has passed through them? @cymplecy @biglesp

 Week 7 – Do Haribo Smurf sweets taste any better once Electricity has passed through them? Answer = No but they do make a good control button! This week we looked at Scratch GPIO. We started off by learning about what GPIO stood for and what sort of things were classed as an input or output. Then we looked at the 40 GPIO pins on the new Pi and talked about how they were labelled with GPIO numbers or PIN numbers. For our first experience of GPIO pins we programmed in Scratch GPIO 7 so we could clearly see how our commands of controls worked rather than jumping straight into a Python script. We had asked Mrs Lowe if we could have a go at the singing Jelly Baby project but instead of using Python as the documentation suggests we tried Scratch GPIO7 and instead of a Jelly baby we used a Smurf Haribo sweet. Unfortunately we hit a problem that every time we tried to add sound Scratch GPIO shut down. After a few attempts we tweeted @cymplecy and @biglesp for help and found out there is a bug when using the new Pi with sounds in Scratch GPIO7. Still in good spirits we quickly changed our project to using the Smurf sweet to act as a control button and changed our Sprite to – you guessed it – a Smurf! We followed a worksheet of how to connect our jumper leads (F-F) to the relevant GPIO pins, one of which of course was ground, then attached straightened out paper clips to the other end of each jumper lead. Then we inserted the other end of the paper clips into the Smurf sweet so they nearly touched but would only make contact when the sweet was squeezed.  Once our set up had been checked we switched on the Raspberry Pi, opened up Scratch GPIO, changed our Sprite to a self drawn Smurf, inserted our code making sure our PIN numbers corresponded with our jumper wires and finally squeezed the Smurf sweet. Hey Presto our Sprite moved round the screen when the sweet was squeezed. Simon at Cymplecy tweeted us a link of how to get round the sound problem of the first project. We will give this a go and report on our progress. Next week we will continue with Scratch GPIO and introduce a breadboard.