0% found this document useful (0 votes)
22 views

Microbit Convert Character To Code

Uploaded by

soreal98
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
22 views

Microbit Convert Character To Code

Uploaded by

soreal98
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 21

micro:bit

Ali Jafri
micro:bit, a small computer
USB interface

• Radio
LED array
• Compass
• Accelerometer button A button B
• Detects movement
• Speaker (external)

pins
micro:bit, a small computer (contd.)
Radio antenna Reset Power connection

Processor

Compass

Accelerometer
Programming a micro:bit (contd.)
• In a browser window navigate to https://makecode.microbit.org
• Click on “New Project”
• You will see the programming environment
Simulator Coding block categories Coding area

Project name
Programming the micro:bit (contd.)
• Write the code in the coding area
• Test functionality in the simulator
• Download the program onto your PC
• Downloaded as hex file
• Connect micro:bit to PC via USB
• Will see micro:bit drive appear in windows explorer
• Copy the hex file into the micro:bit drive
• Press the reset button in the back
• Micro:bit will start executing your program
Coding Blocks: On Start
• Executes once at the start
• Or when ever you press the reset button
• Useful to set initial value of variables

• Let’s try an example:


Coding Blocks: forever
• Executes forever

• Let’s try an example:

• Multiple other kinds of loops available


• Similar to scratch
Coding Blocks: On button # pressed
• Defines the behaviour of button press
• A, B and A+B press events available

• Let’s try an example:


Coding Blocks: acceleration (x, y, z)
• Gives a measure of movement in the x, y, and z planes

• Allows measurement of the micro:bit’s tilted

• Let’s try an example:


• Code the program on the next slide
Coding Blocks: On Shake
• Allows code to recognize different kinds of movements
• Let’s try an example:
Coding Blocks: Radio receive & send
• Allows transmission and receival of wireless messages
Text Chat
Text Chat – contd.
Text Chat – contd.
Text Chat – contd.
Remote
Car
Other blocks …
• Temperature (needs sensor)
• Moisture (needs sensor)
• Compass
• Light (LEDs emit light and also detect light)
• Reading from and writing to pins

You might also like