For this project we coded a micro:bit. A micro:bit is micro controller or a tiny computer that holds one program. What I was told to do for this assignment was to code the micro:bit to show my name on the LEDs. I named it Hello World. The second assignment was to make it show different expressions which was called Expressions. The input of the micro:bit are the buttons, and the output could be your name or an expression.
This is the code for the Hello World
This is the code for the Expressions
This is the video of the Expressions.
For this project I made my micro:bit play a song according to the light level. I created code so if the light level is over 90 its will play various notes that chose. The input is the light on the micro:bit. The output is the light level shown on the micro:bit and the sound. A little difficulty I encountered was that my micro:bit was not receiving enough light to work. Also at first my code was not written correctly but i figured it out and correct it.
This is my code and my photo of the setup for the finish.
For my assignment I made a step counter. What it does is practically its name but it counts all the steps you take throughout the day. How I made it was I first made a code that was given by Mrs. Sedgwick. When I learned about it I made it my own by adding code saying when you have taking less the five steps it shows and arrow which I drew with LEDs. When you have taken more then five step you would get a smile from the LEDs. Of course you can make it more than five steps, but I am presenting the project and I didn't want people having to take 90 steps to get a smile.The input was the movement and the output was the number of steps you took. Also another input was button "A", when pressed it would clear all of the numbers. After creating the code a made a bracelet out of duck-tape. I used little rubber-bands to attach the micro:bit to the bracelet. Before attaching the micro:bit to the bracelet I attached a potable battery pack. I chose the step counter because I have always wanted one and there was an opportunity for me to make it and experience the fun. If I had additional time I would add sound to let the person know they need to walk more for the day.
This is the code and video for the project.
I enjoyed doing the micro:bit because it let me make my own device that would help people. It also let me see that coding isn't as difficult as I thought it would be. I hope I will be able to do something with coding in the future. I preferred the micro:bit better then the Arduino because there was less wires involved. I really enjoyed the micro:bit.