Yes, if you have time please make more microbit tutorial, if can use MQTT with esp8266 + microbit, it will be good, there are some using low powered bluetooth with microbit and pi, but not common.
AT the "set micro pixel color at" line I thought it was a change sign bug but multiply "**" makes it work to. The source code for that block is probably on GitHub .......
Below is the code used in the above tutorial. It is in Java script you can see it in blocks if you want, just switch to blocks. Before cut and pasting it in load "neopixel extension" I made a change at "set pixel color at " and got good results. let z = 0 let y = 0 let x = 0 let strip = neopixel.create(DigitalPin.P0, 24, NeoPixelMode.RGB) let mode = true input.setAccelerometerRange(AcceleratorRange.EightG) strip.clear() strip.setBrightness(255) while (true) { if (input.buttonIsPressed(Button.A)) { mode = true basic.showLeds(` . . # . . . # # . . . . # . . . . # . . . # # # . `) } else { if (input.buttonIsPressed(Button.B)) { mode = false basic.showLeds(` . # # # . . . . # . . # # # . . # . . . . # # # . `) } if (mode == true) { strip.showRainbow(1, 360) } else { if (mode == false) { x = input.acceleration(Dimension.Y) - 55 y = input.acceleration(Dimension.X) * 2 z = input.acceleration(Dimension.Z) * 2 strip.setPixelColor(0, neopixel.rgb(x, y, z)) strip.shift(1) strip.show() basic.pause(50) } } } }
Yes, if you have time please make more microbit tutorial, if can use MQTT with esp8266 + microbit, it will be good, there are some using low powered bluetooth with microbit and pi, but not common.
Nice project please do some more animations
AT the "set micro pixel color at" line I thought it was a change sign bug but multiply "**" makes it work to. The source code for that block is probably on GitHub .......
Below is the code used in the above tutorial. It is in Java script you can see it in blocks if you want, just switch to blocks. Before cut and pasting it in load "neopixel extension" I made a change at "set pixel color at " and got good results.
let z = 0
let y = 0
let x = 0
let strip = neopixel.create(DigitalPin.P0, 24, NeoPixelMode.RGB)
let mode = true
input.setAccelerometerRange(AcceleratorRange.EightG)
strip.clear()
strip.setBrightness(255)
while (true) {
if (input.buttonIsPressed(Button.A)) {
mode = true
basic.showLeds(`
. . # . .
. # # . .
. . # . .
. . # . .
. # # # .
`)
} else {
if (input.buttonIsPressed(Button.B)) {
mode = false
basic.showLeds(`
. # # # .
. . . # .
. # # # .
. # . . .
. # # # .
`)
}
if (mode == true) {
strip.showRainbow(1, 360)
} else {
if (mode == false) {
x = input.acceleration(Dimension.Y) - 55
y = input.acceleration(Dimension.X) * 2
z = input.acceleration(Dimension.Z) * 2
strip.setPixelColor(0, neopixel.rgb(x, y, z))
strip.shift(1)
strip.show()
basic.pause(50)
}
}
}
}
Great Tutorial by please show us it working!
The download can not be edited in the new makecode Block editor which is a pity. This may be an issue with the new editor or with the code?
I believe the new editor is the issue.