{"id":1613,"date":"2014-11-20T14:17:49","date_gmt":"2014-11-20T14:17:49","guid":{"rendered":"https:\/\/readysaltedcode-wordpress.appspot.com\/lesson-for-rpi-and-momentary-push-button\/"},"modified":"2014-11-20T14:17:49","modified_gmt":"2014-11-20T14:17:49","slug":"lesson-for-rpi-and-momentary-push-button","status":"publish","type":"page","link":"http:\/\/www.readysaltedcode.org\/lesson-for-rpi-and-momentary-push-button\/","title":{"rendered":"Lesson for RPi and Momentary Push Button"},"content":{"rendered":"
Link to main project page<\/a><\/p>\n This is a Scratch\u00a0\u00a0GPIO\u00a0coding project using the RPi and\u00a0Push Buttons\u00a0on the duration of your lesson this project should take 1-3 lessons (1 hour per lesson).<\/p>\n This works well in pairs or small groups depending on the number of students and the equipment that you have available.<\/p>\n RPi Starter<\/p>\n <\/p>\n This activity should take between 40-60mins depending size class, experience and dexterity. This can be spilt into 2 lesson one focusing on the circuit \/ build and the other focusing on the code. Take your time.<\/p>\n Hand out RPiano Worksheet<\/a>\u00a0and ask the students (in pairs) to work out how to wire up the RPi to the breadboard. Use multiple colours if you have them. Use the Black for Ground, Red for Power and Blue or Green for the GPIO pins. Be consistent with your choice of colours. \u00a0 Check out Jumper (hook-up)cables for more information. \u00a0Students may wish to label each wire for each button. \u00a0This helps if you have a large gap between lessons and you wish to continue the project over more than one lesson.<\/p>\n This project works well by building a smaller single button circuit first and the allowing the students to continue creating the RPI-ano independently until that have a adding all the buttons.<\/p>\n This activity is to get the students familiar with the names of the names and their corresponding PIN location. \u00a0The PIN name is important as these terms are used for higher level projects and will also be in the updated version of Scratch GPIO for RPI once it is released.<\/p>\n Below in image one we can the see a single LED and resistor attached to the RPI using the GPIO pins. \u00a0This site<\/a> has great interactive RPI Pin diagram (link opens another tab). \u00a0<\/em>This is a fabulous resource to use to introduce GPIO pins\u00a0to your students.<\/span><\/span><\/p>\n Image 1 RPi GPIO with LED<\/p><\/div>\n Image 2 RPI GPIO pin layout<\/p><\/div>\n <\/p>\n Decide which option you are going to use and state (display on the board) this to the class or let the students decide depending on their age\/ ability and class size.<\/p>\n Hand out the kit for each group\/ pair or individual. (RPI, Breadboard, Ultrasonic sensor, jumper cables, LEDs and resistors). Give the students plenty of time wire this up. \u00a0It can be very ‘fiddly’ with the small components and this can lead to some students feeling a little frustrated. If this is the case then give them another set of cables\/ breadboard\/ resistors to practice on while the ‘group’ finish the circuit. If there are no spare kits\/ resources then get some students to be journalist and document the whole process with pictures video and interviews. During this time some students can be working on the code while others are building the circuit.<\/p>\n What is the code doing? Show case each ‘groups’ work and ask each one what was the most challenging \/ interesting thing about this project.<\/p>\n Ask the students what could this new device be used for and what enhancements\/ changes could the make to make it ‘better’ for them?<\/p>\n Give the student a copy of the Standards\/ Programme of Study \/ State Level Content Standards. 1)\u00a0The students, in their groups, should select (tick or colour- in) all the points that they feel the project covers.\u00a02) Get the students to mark themselves as a group on wether or not the partially or fully achieved each point.\u00a03) Mark themselves individually.\u00a0This type of activity is really useful in getting the students to understand how you as an educator have evidence their learning and progression.<\/p>\n Using the pseudo code\/ animations you will be able to see what the students actually understand about the project and relate this back to the assessment criteria\/ standards.<\/p>\n Below will find the curricular mapping for UK, USA and AUS\/NZ<\/p>\n Curriculum Mapping:<\/strong><\/span> design, use and evaluate computation abstractions hat model the state and behaviour of real-world problems and physical systems.<\/p>\n understand several key algorithms that reflect computational thinking, such as ones for sorting and searching; use logical reasoning to compare the utility of alternative algorithms for the same problem<\/p>\n use programming languages\u00a0(graphical), to solve a variety of computational problems; make appropriate use of data structures such as lists, tables or arrays; design and develop modular programs that use procedures or functions<\/p>\n understand simple Boolean logic [such as AND, OR and NOT]\u00a0and some of its uses in circuits and programming; understand how numbers can be\u00a0represented\u00a0in binary, and be able to carry out\u00a0simple\u00a0operations on binary numbers [for example, binary addition, and\u00a0conversation\u00a0between binary and\u00a0decimal<\/p>\n undertake creative projects that involve selecting, using, and combining multiple applications, preferably across a range of devices, to achieve challenging goals, including collecting and analysing data and meeting the needs of known users.<\/p>\n develop their capability, creativity and knowledge in computer science, digital media and information technology.<\/p>\n develop and apply their analytic, problem-solving, design, and computational thinking skills.<\/p>\n USA<\/strong><\/span>Overview:<\/strong><\/span><\/h2>\n
Kit List:<\/span><\/h2>\n
\nMomentary Push Button (5)
\nJumper cables male to Female solderless
\nResistors 1K
\nGPIO expansion cable optional
\nSolderless Breadboard \u00a0large enough for the buttons<\/em><\/p>\n\n
<\/a><\/p>\n
Main – Wire Up \/ Code It<\/span><\/h2>\n
Activity 1<\/span><\/h3>\n
\n
Activity 2<\/span><\/h3>\n
Raspberry Pi Pin name and numbering:<\/span><\/h3>\n
Activity 3 Single button circuit<\/span><\/h2>\n
<\/a><\/p>\n
\n
\n
\n
<\/a><\/li>\n<\/ul>\n<\/li>\n<\/ul>\n
Activity 4 Adding all the Buttons<\/span><\/h3>\n
\n
Code<\/span><\/h3>\n
\nAll the code contain variables, loops <\/strong>and boolean <\/strong>values.<\/strong> This a really clear way of explaining boolean in a simple physical way. By using code and push buttons \u00a0why not use it\u00a0your classroom as a buzzer or instead of you asking the class to be quiet. Make your own teaching voice assistatn. This project could be enhanced further by having appropriate animation\u00a0that are triggered when the buttons are pressed. A possible fun way to make their own music \/ musical instruments. \u00a0Create game controller using the push buttons, sounds and game animation.<\/p>\nWrap Up<\/span><\/h2>\n
Assessment<\/h4>\n
\nUK Keystage 3 \/ 4<\/span><\/strong><\/p>\n
\nProject mapped to commoncore<\/a>
\n