Posts

Showing posts from September, 2022

Project Vortex

Image
During the previous 4 blog posts we have been teaching you the skills required to do a Vortex. Let me explain you what Vortex is. In August my school had a school Fair. We had the idea of making an arcade game to raise money for the school. We wanted to charge for playing the game. If you won at the game you would get prizes. We built it over 3 weeks. The code was part of it. We used the Micro:bit. The physical build took a big part of effort as well. We called the game "Vortex". The Fair was hard work as we had to be in the stand for 4 hours. More than 100 people came to play but in the end we managed to raise good money for the school. This is a photo of the stand with people playing Vortex The game is about a light that spins around and you have to stop it in a certain position with a button. The light starts spinning slow and then gets faster with every loop. You get more points for stopping it when it goes faster. This is a video of the game in action We are going to sho...

LED strips with Micro:bit

Image
One of the funnest things to play with are LEDs. These are a type lights. They can be single colour or you can code them to be any colour you like. The type where you can select their colour are called RGB. You can get individual LED or multiple ones arranged like a strip or sometimes like a ring The Micro:bit can have more blocks that the ones you see. You have to add them as extensions. There are many extensions available. You can add them by clicking on "Extensions" like this The one we need for LED strips is called "neopixel" Once you add the "neopixel" extension there will be a new category with new blocks to control your LED strip. You can see them in the following picture To test it do the code below. With the first block we are telling the Micro:bit that there is an LED strip connected to pin 0 with 7 LEDs. Every time you connect something external to the Micro:bit you connect it to the pins, so it is important to let it know exactly what pin is co...

How to save the code to your Micro:bit

Image
So far we have only used the simulator but today we are going to learn how to save the code to our Micro:bit. So, hopefully you have already got yourself a physical Micro:bit, so let's go First, once you have your code ready, click the "Save" button, like in this picture: A ".hex" file will be created and downloaded to your computer. A message like the one below will appear. Then click "Done" This is the file we will upload to our Micro:bit. To find the file in your computer, click on the downloaded file at the bottom of your browser and select "Show in folder" Now, connect the Micro:bit to the USB port in your computer. It will show up as if it was a USB stick. As you can see in my computer shows as "MICROBIT(D:)" Now simply right-click on the file, select "Send to MICROBIT(D:)". An orange light starts flashing on the Micro:bit. The code is fully uploaded when the light stops flashing and your Micro:bit is ready to go

Making sounds with Micro:bit

Image
Today we are going to show you to make sounds with Micro:bit. Did you know that there two versions of Micro:bit? They are the original Micro:bit and the V2. The original doesn't have a speaker sadly. But V2 does. If you can, get yourself a V2. Nowadays it is hard to buy the original Micro:bit anyway. Let's write some code. First open a browser such as Chrome, go to this site and click "New Project": https://makecode.microbit.org/# I am going to call my project "Star Wars sounds" ... you will see why later. Now the project opens. All the sound related commands are in the category "Music". You can make your own songs with "Melody" and "Tones". Further down, there are some melodies ready to use. And at the very bottom there are some advanced functionalities that are only for Micro:bit V2. They are pretty cool! I have created with my Dad two melodies from Stars Wars: one for the good guys and one for the bad guys. They have about 10...