What is your age in binary? I am is a decimal number Use this table to convert a decimal number into a binary number. To make 12 I need to add 8 and 4. Put a 1 under these numbers. Put a 0 under the numbers that are not needed 8421 In binary I am 1100 Can you work out your own age in binary?
Can you make your micro:bit count up to 7 in binary? Gnd3V 210 Show the number in decimal on here. Press one of these to make it count up from 0 to Write the number in binary on the pins
If Button is pressed: Increment variable “decimal” by 1 Output Decimal Assign variable “binary” to same value as “decimal” if “binary” >= 4 Make pin0 High Subtract 4 from “binary” else Make pin0 Low if “binary” >= 2 Make pin1 High Subtract 2 from “binary” else Make pin1 Low if “binary” = 1 Make pin2 High else Make pin2 Low
Can you make your micro:bit talk to a Raspberry Pi over the GPIO pins?
Make some GPIO connector wires You will need Male to Female jumpers Paperclips Tin foil Sticky Tape
Put the paperclip, tin foil and male end of the jumper together. Make sure the two loops of the paperclip are pointing outwards.
Wrap it all up tightly with the tinfoil.
Wrap the tinfoil up with sticky tape. Make sure you leave the paperclip clear.
Connect the wires to Gnd, pin0, pin1, pin2. Use a bit more sticky tape to secure them in place. Connect the other ends of the jumpers to the Raspberry Pi GPIO pins. Micro:bit gnd pin Micro:bit pin0 Micro:bit pin1 Micro:bit pin2
Can you program Scratch so that the cat says in decimal the binary number sent from the micro:bit?
Can you give the raspberry pi robot more senses using the micro:bit? How can you get all that data across those 3 wires? DISCUSS Forwards Backwards Left Right Temperature Light Level Compass Heading Buttons pushed Tilt Shake