Things used in this project

Hardware components:
Microbitheart
BBC micro:bit board
×1
61vhxtmzbyl
AA Batteries
×1
Adafruit industries ada592 image 75px
USB-A to Micro-USB Cable
×1
826 04
Male/Female Jumper Wires
×1
Rg srv180 a
RobotGeek 180 Degree Robot Servo
×1
Software apps and online services:
Screen shot 2017 06 26 at 3 41 02 pm sfoohotutu
Microsoft MakeCode

Schematics

Connection
Connection for the servo
Screenshot from 2018 03 29 20 39 17 8qp9kybeeq

Code

Code for temperature gaugeJavaScript
This is the code for temperature gauge
let temperature = 0
basic.forever(() => {
    temperature = input.temperature()
    if (temperature < 20) {
        temperature = 20
    } else if (temperature > 35) {
        temperature = 35
    }
    pins.servoWritePin(AnalogPin.P0, pins.map(
    temperature,
    20,
    35,
    0,
    180
    ))
})

Credits

Dv02qg8c 1b5m7ruhek
Anish Ansari
4 projects • 11 followers
YouthSpark Advocate and MSP
__hypernova_render_token[72600845f0cd9500c229ed52d71c226b]__Contact

Comments

Add projectSign up / Login