bbc-microbit

Flash microbit embedding a class .py file

ⅰ亾dé卋堺 提交于 2021-02-10 17:32:16
问题 Using BBC micro:bit with the scroll:bit pimoroni extension device, I need to embed the scrollbit.py file in my HEX file. I use my favorite editor to produce my python file and uFlash to flash the micro:bit. For now I just copy the code from inside the scrollbit.py into my own python script. Is there any alternative without using Mu editor ? Edit I found microfs and the ufs line command, I had to change my python script in main.py and transfer it to the microbit using : ufs put scrollbit.py

write_analog in microPython on BBC micro:bit does not do anything

元气小坏坏 提交于 2021-02-10 04:13:53
问题 I have a simple one line of micro:bit javascript that works, but the same line in microPython does not. I have a potentiometer wired to the micro:bit and the readings from the potentiometer are sent to a pin attached to an LED in order to control the brightness of the LED. The javascript code pins.analogWritePin(AnalogPin.P1, pins.analogReadPin(AnalogPin.P0)) which is the result of the block code works fine and the brightness of the LED changes as the potentiometer is changed. But using a

write_analog in microPython on BBC micro:bit does not do anything

南笙酒味 提交于 2021-02-10 04:12:44
问题 I have a simple one line of micro:bit javascript that works, but the same line in microPython does not. I have a potentiometer wired to the micro:bit and the readings from the potentiometer are sent to a pin attached to an LED in order to control the brightness of the LED. The javascript code pins.analogWritePin(AnalogPin.P1, pins.analogReadPin(AnalogPin.P0)) which is the result of the block code works fine and the brightness of the LED changes as the potentiometer is changed. But using a

write_analog in microPython on BBC micro:bit does not do anything

只愿长相守 提交于 2021-02-10 04:12:35
问题 I have a simple one line of micro:bit javascript that works, but the same line in microPython does not. I have a potentiometer wired to the micro:bit and the readings from the potentiometer are sent to a pin attached to an LED in order to control the brightness of the LED. The javascript code pins.analogWritePin(AnalogPin.P1, pins.analogReadPin(AnalogPin.P0)) which is the result of the block code works fine and the brightness of the LED changes as the potentiometer is changed. But using a

write_analog in microPython on BBC micro:bit does not do anything

空扰寡人 提交于 2021-02-10 04:12:27
问题 I have a simple one line of micro:bit javascript that works, but the same line in microPython does not. I have a potentiometer wired to the micro:bit and the readings from the potentiometer are sent to a pin attached to an LED in order to control the brightness of the LED. The javascript code pins.analogWritePin(AnalogPin.P1, pins.analogReadPin(AnalogPin.P0)) which is the result of the block code works fine and the brightness of the LED changes as the potentiometer is changed. But using a

write_analog in microPython on BBC micro:bit does not do anything

丶灬走出姿态 提交于 2021-02-10 04:07:52
问题 I have a simple one line of micro:bit javascript that works, but the same line in microPython does not. I have a potentiometer wired to the micro:bit and the readings from the potentiometer are sent to a pin attached to an LED in order to control the brightness of the LED. The javascript code pins.analogWritePin(AnalogPin.P1, pins.analogReadPin(AnalogPin.P0)) which is the result of the block code works fine and the brightness of the LED changes as the potentiometer is changed. But using a

How do I pass a value back to this string?

大憨熊 提交于 2020-12-23 15:48:39
问题 Summary: I have a microbit connected to a rpi-zero. I coded the microbit, when A button is pressed it will then send data through uart.write to the rpi-zero. In this test, the microbit will uart.write("Test") , write a "Test" word to the rpi-zero. My ultimate goal is to use rpi-zero's BLE capabilities to act as a control device with instructions sent from microbit buttons. I found this GATT Server Code written in python for rpi. Which it ran with no problem at all. The code below will be used

BBC micro:bit - Radio string transfer random carriage returns

二次信任 提交于 2019-12-10 23:32:25
问题 I have two BBC Micro Bit and using Radio function to transfer data from one slave to the master Micro Bit. When the data is transferred I am getting random carriage returns, I am not sure what is the problem, I have tried to strip any random CR etc, but still getting the same problem. a=1,On, 12 =2, Off, 77 =3, On, 88 =================================================== Gateway code from microbit import * import radio radio.config(group=0) radio.on() while True: incoming = radio.receive() if