top of page
  • colleenguirand1

Midterm Project

For my midterm, I created a fake home security system. I used sensor wires to detect when "someone" crosses through the front door, a speaker to project the "alarm" sound, and LED lights to visibly show what is going on.


Steps to code:

  1. First, I set all variables that I was planning on using (buttonValue- for buttons A+B, irSensor) to zero. Along with variables, I had to set my pull pin 8 to up to activate my sensor.

  2. After, I laid out the conditions for what my sensor was supposed to do. The plan was if the sensor is not interrupted by "anyone" or object, the LED lights would stay off since no one is intruding the home. So I set the variable to the pin I was intending on using (pin 8) and said if the sensor is 1 or off in this case, all LED will be off. Then I said if it is at zero or off, then the lights would turn on along with a sound to play once and sting of text.

  3. After the person breaks sensor beam, a password must be placed. In my project, both buttons A+B pressed together would be considered the password. So in that block, I created statements saying when both buttons are pressed, turn off all sounds and play a ba ding sound to confirm password success. if else, don't make a sound.

  4. Lastly, I created two separate blocks to show what will happen when both a and b are pressed separately.

The functionality in the project works, but I have to press both buttons A+B together multiple times for the microbit to read that the password has been "activated". During this time the microbit figures that out, the sound is continuing in a loop and it gets annoying, maybe because I had the nyan sound in the forever loop. Also, I am not sure if the sensor is wired correctly, but regardless if someone steps in or not the sound goes off







8 views0 comments

Recent Posts

See All

Final Exam Project

Originally, I was planning on creating a doodle jump game where the player presses the space key to make an object jump from platform to platform, but I didn't seem to figure out how to make the objec

Final Project Idea

For my final project, I have two game ideas as to what I want to create. The first one was going to be a platform game, where there are thin rectangles floating on the canvas moving side to side depen

Algorithmic Bias Reading Respone

Where do we see examples of algorithmic bias around us? ​ - AI has been seen used in job applications, police departments and with our personal devices Had you heard of any of these examples?​ - I hav

Post: Blog2_Post
bottom of page