Code

img
Here are another couple of RGB led examples for the Micro:bit Layout     Code The first example just shows some extra colour combinations [codesyntax lang="python"] from microbit import * while True: pin0.write_digital(0) pin1.write_digital(1) pin2.write_digital(1) sleep(500) pin0.write_digital(1) pin1.write_digital(0) pin2.write_digital(1) sleep(500) pin0.write_digital(1) pin1.write_digital(1) pin2.write_digital(0) sleep(500) pin0.write_digital(0) pin1.write_digital(0)...

A photoresistor (or light-dependent resistor, LDR, or photocell) is a light-controlled variable resistor. The resistance of a photoresistor decreases with increasing incident light intensity; in other words, it exhibits photoconductivity..

The micro:bit also has a compass (magnetometer) The compass has to be calibrated before it can give accurate readings. Calibration involves moving a dot to make a circle on the matrix. Once this is complete you get a smiling face image displayed to show you...
Here we show you how to create a custom image on the led matrix, we use the Mu editor - http://codewith.mu/ [codesyntax lang="python"] from microbit import * im = Image('99999:90009:90009:90009:99999:') display.show(im) [/codesyntax]   You can vary the brightness by changing the value of the digits from...
1 14 15
This div height required for enabling the sticky sidebar
Ad Clicks : Ad Views : Ad Clicks : Ad Views :