top of page
  • sparvez7

Assignment 4

So for this project I decided I wanted to do something simple. In this project we were supposed to use two buttons that are not the microbits buttons and make it play a sound. So naturally, the wiring was a bit hard to get to. In class, I had taken a video and a pic to help me, which it did, but still I was a bit confused on where to add the wires, especially for the second button but after a bit I got the hang of it. After I set up the wires, I only programmed it to work for one button because I wanted to see if the original code even worked for me to adjust it for the second button. Once it did, I duplicated the code for the second button and tested it out. Once I had done that and I knew the buttons were working, I simply added two icons for each different button and a string that would follow it.


Basically, to play the code out for you, when you press one of the buttons that is attached with pin 1, a smiley face comes on and it greets with a power up sound as well as a welcome string to show u its on. I was trying to imitate a computer when you boot it up and it greets you or something of the sort. On the other hand, when you press the other button connected with pin 2, the opposite occurs. A sad face comes on and it plays the power down audio as well as a goodbye string to show you its off now. Here the "computer" is saying goodbye to you when you shut the computer down.


If I wanted to make it a bit more interesting and complicated, I could add two LEDS in which the welcome button will have a green light turn on to indicate its on for as long no other button is pressed and then the goodbye button will have a red light turn on to indicate its off. However, I thought it was a lot of wiring and the code would get more complicated than I wanted (although I do want to try it) so I left it out. However, it definitely would have made the code look more interesting.



VIDEO:


7 views0 comments

Recent Posts

See All

Final Project Idea

For my project, I want to remake flappy bird. I think with all the things we learned, flappy bird has all the elements with a moving object, keeping score, using the keyboard or arrows to move up or d

Maria Ressa - Response

What problems is the author discussing in this article? - The problem that the author is discussing is the fact of technology ruining credibility and how a lot of information gets twisted so easily. H

Post: Blog2_Post
bottom of page