Anish Ansari
Published © GPL3+

How to Read Temperature Using BBC Micro:bit

By the end of this project, you will be able to know how to read temperature using BBC micro:bit.

EasyFull instructions provided30 minutes1,272

Things used in this project

Story

Read more

Code

Javascript code

JavaScript
let item = 0  
basic.forever(() => {  
    item = input.temperature()  
    basic.showNumber(item)  
})  

MicroPython Code

MicroPython
from microbit import *  
while True:  
   temp = temperature()  
   display.scroll(str(temp) + 'C')  
   sleep(500) 

Credits

Anish Ansari

Anish Ansari

11 projects • 22 followers
Azure and IoT

Comments