top of page
  • ffatima1

Assignment 4

Starting the assignment was a bit challenging since I lost the code I worked on in class. I spent two days analyzing how the if-else block would work in order to align the two different sounds with different buttons. Today, I tried working on it again and the first few tries were a complete fail because the wiring for the buttons was mixed up or sometimes the code wasn't constructed properly. After many tries, I finally built the right code by making a simple version of one button and then building upon that. The process of breaking down the project into small sections helped me build two separate buttons with different sounds. After I successfully made and tested the sounds and buttons multiple times, I added animation of squares to add a little visual hint for me to differentiate between the two sounds. Here is the code and some images of the process leading to the final result.


Here is the link to the code: https://makecode.microbit.org/_7khA76HXD9Wc

These images document the whole process:

The first image is of the first few tries that did not execute accurately.


I then divided the project by taking it one step at a time. This image is of one button and sound that runs perfectly.



These last two images show that I built upon the one-button constructed in the image earlier. The final outcome was executed perfectly, with two buttons that run separate sounds and have separate screen visual animations.





8 views0 comments

Recent Posts

See All

Response to "4/19 Space invader step one"

Dimitri made a ping pong project that bounces off the two rectangular blocks on the screen. The idea was great as of the gaming aspect but I think the only problem that he was facing was having the ba

Post: Blog2_Post
bottom of page