====== Christmas decoration ====== A simple Christmas decoration that flashes in many colors. {{ :fr:instructions:dsc0863.jpg?400 |}} For that you will have to use the buttons and the LED of color. ===== Programming ===== Here's how to build an angel or a Christmas tree step by step for Christmas. Use the displayed blocks and put them in the correct order and test your code by clicking on {{:en:instructions:play.png?direct&30|}}. ==== Step 1: Turn on the LED in green ==== If I press the button A turns on the LED in green. Use the following blocks and add them in Kniwwelino My program: {{:en:instructions:wristband03.png?200|}} {{:en:programmingblocks:led_1.png?200|}} You can test your code. ==== Step 2: Change the color when you press the B button ==== If I press the B button then turn on the LED in another color. Add the following blocks below what you already did in step 1: {{:en:programmingblocks:wristband04.png?200|}} {{:en:programmingblocks:led_colors.png?200|}} ==== Step 3: Turn off the LED ==== Turn off the LED if buttons A & B are clicked at the same time. {{:en:programmingblocks:aandb.png?200|}} {{:en:programmingblocks:led_2.png?200|}} ==== Solution ==== * Open the solution [[https://code.kniwwelino.lu/?lang=en&xml=examples/Xmas.xml|KniwwelinoBlockly]] * [[https://doku.kniwwelino.lu/_media/en/instructions/pe_xmas_decoration_en_instruction.pdf|Download version]] {{:en:instructions:xmas_decoration_solution1_en.png?400|}} ===== Crafting ===== ==== Material ==== * 1 Kniwwelino * 1 USB cable * 1 elastic * 1 ice cream stick * Tape * Scissors * Glue * 1 sheet of A4 paper in white or colored * [optional] 2 other sheets of paper colors * [optional] glitter, markers, stickers, punch, ... all material needed to decorate * [optional] 1 sheet of tracing paper * [optional] 1 external battery ==== Model ==== [[ https://doku.kniwwelino.lu/_media/fr/instructions/templatexmastreeangel_3.pdf |Model]] ==== Instructions ==== - Download the template and print it. - Choose the model of your choice: angel, single fir or three-story fir. - Follow [[https://doku.kniwwelino.lu/_media/en/instructions/pe_xmas_decoration_en_instruction.pdf| downloadable instructions]] {{:fr:instructions:dsc0863.jpg?400|Engel}} {{:fr:instructions:dsc0842.jpg?200|}} {{:fr:instructions:dsc0846.jpg?200|}} {{:fr:instructions:dsc0848.jpg?200|}} {{:fr:instructions:dsc0849.jpg?200|}} {{:fr:instructions:dsc0891.jpg?400|Einzeltanne }} {{:fr:instructions:dsc0902.jpg?400|Dreistöckige Tanne}} ===== Your turn! ===== * You can play on the blinking effects of the LED. {{:en:programmingblocks:led_effects.png?200|}} * You can play on the brightness of the LED. {{:en:programmingblocks:led_6.png?200|}} * You can use the time to add an effect on the LED and make it change color. {{:en:programmingblocks:led_1.png?200|}} {{:en:programmingblocks:time_1.png?200|}} {{:en:programmingblocks:led_colors.png?200|}} {{:en:programmingblocks:time_1.png?200|}} * You can also use the loops to repeat your effect 10 times in a row. {{:en:programmingblocks:loops_1.png?200|}} ==== Solution ==== Downloadable version [[https://code.kniwwelino.lu/?xml=examples/XmasDecoration_complete.xml|in Blockly]].