On the 24th of May 2018 5C switched from Arduino with Mr. McKie to Hummingbirds with Mrs. Watson. We got to choose our groups, Euan Slimming and I chose to work together. There were a heap of tasks we had to do but the majority so far have been really fun.
Exercise 1.1 Q. Change the 50 to 0 and click on the block again. This should make the LED turn off. Change the 0 to 100 and click on the block. This is the maximum brightness of the LED. Try out other numbers between 0 and 100 to explore the different levels of brightness that are possible.
Exercise 1.1 A.For the first exercise we were supposed to make a light turn on by using the Hummingbird LED brick. We succeeded pretty easily. We found out that on the second option of the Hummingbird Led brick, for example 100=very light and 0=very dim.
Single LED Lights
Here are some pictures of the first exercise.
Exercise 1.2 Q.You may have already discovered that you can write multiple scripts in the Scripts area. Add a second script that turns the LED off when you press ‘x.’
Exercise 1.2 A. Once Euan and I had accomplished the first task we had to complete the second. Exercise 1.2 didn’t need much of a change because Euan and I added another script. In exercise 1.1 the main part was to turn the single LED light on but in the second exercise the main part was to add another script to turn it off by pressing a different key. Euan and I succeeded pretty easily we just made the second option in the HummingBird single LED 0 instead of 100.
Here are a few photos and videos of exercise 1.2.
Exercise 1.3 Q. Connect a second LED to LED port 2. Write a script that turns the first LED on and then waits 2 seconds. Then the script should turn the second LED on for 2 seconds. Then the program should turn both LEDs off. Remember to save your work!
Exercise 1.3 A. The third task wasn’t that hard either, all we had to do was have 2 scripts, and one script had to have a 2 in it on the 1 option of the Hummingbird LED brick instead of 1. Euan and I had to also change the second option of the script with the 2 on it, because if it was on 0 the light wouldn’t work for the second LED, so we put it on 100.
Here are some pictures for the third exercise.
Exercise 1.4 Q. Write a program that turns two LEDs on at different intensities, waits five seconds, and then turns both LEDs off.
Exercise 1.4 A. For the fourth task we had to make a code to turn on the single LED and turn it off after a few seconds. Euan and I started off going really well but then we found a problem, the second light wasn’t turning on. Then we realised that for the second script that we had to make the first option be on 2 for the LED Hummingbird brick, so the second light would turn on and then turn off after (what we did) five seconds.
Here is a picture and a video for the fourth task.
Tri-Coloured LED Lights
The second module was probably even more fun then the first module. The second module was Tri-Coloured LED lights. Instead of using the HummingBird single LED brick we used the HummingBird Tri-coloured LED brick. This brick is different because it makes the Tri-coloured LED bricks work.
Exercise 2.1 Q. What do you think this script will do? Make a prediction and then try it out. How do you turn the Tri-colour LED off?
Exercise 2.1 A. Euan and I made our project work by finding out what each option in the Tri-coloured LED did. Euan and I found out that: B=blue, R=red, G=green and the first option is for the module they are in.
Here is a picture of Euan and I completing exercise 2.1.
Exercise 2.2 Q. Write four scripts to turn the Tri-colour LED four different colours. Each script should use a when key pressed block and a HB Tri-LED block. For example, the ‘a’ key might make the LED aqua.
Exercise 2.2 A. This exercise was more fun because Euan and I just had to know what colours make if they are blended together. We used our knowledge about colours to know what colours made, for example Blue and Red made Pink, also Green and Blue made Aqua. We also had to make our scripts do something like making the ‘a’ key make the LED Aqua. Euan and I succeeded pretty easily and underneath is a photo of the coding
Exercise 2.3 Q. Make a Tri-colour LED blink on and off in your favourite colour at least ten times in five seconds. The Tri-colour LED should blink evenly – in other words, it should be off for the same amount of time that it is on. Next, add a single colour LED. The single colour LED should be off when the Tri-colour is on and on when the Tri-colour is off.
Exercise 2.3 A. Euan and I found this project pretty easy as well. All we had to do was make our code make the Tri-coloured LED flash off and on every half a second. Euan and I made our light flash green. Below are a video with our light flashing different colours and the other blinking green blended into one video.
The distance sensor measures the distance to an object in centimetres. The use of the distance sensor is between about 8 cm and 100 cm. The sensor cannot sense objects very close to the sensor or very far from it. It works best in the range of 20 cm to 60 cm.
Exercise 5.1 Q. Run the script above and watch the value of the distance variable change as you move an object back and forth in front of the sensor.
Exercise 5.1 A. Euan and I didn’t find this exercise that hard, all we had to do was use a if else brick and put a few bricks into the if else brick.
Here is a video of us using the Distance sensor.
Exercise 5.2 Q. Write a program that blinks a red light and moves a servo motor when an object is close to the distance sensor. When nothing is near the distance sensor, the light should be off and the servo should not move.
Exercise 5.2 A. Euan and I did not complete this Exercise because we did not know how the Servo motor worked or what coding we needed to do it.
Exercise 5.3 Q. The Boolean block for the if then else is checked each time the program repeats the decision. However, the Boolean block is not checked during the statements inside the top or the bottom of the if then else block. Try out this script. In this script, the motor should be on when something is close to the distance sensor. When you run this program, you will notice that the program does not respond quickly when you move an object toward or away from the distance sensor. How can you modify this program to make it respond more quickly to a change in the value of the distance sensor?
Exercise 5.3 Q. Euan and I got this program to work, even though we didn’t know what it did, It was pretty fun especially understanding the brick that I did not know what it did.
I found Hummingbirds a really good experience, it was fun because because I worked with my friend and I also learnt a lot. One of our teachers said Simple machines will be like Hummingbirds so I am ready to take what I learnt from what I learnt in Hummingbird and use it in Simple machines and other projects throughout the year and my life.