Questions tagged [bbc-microbit]

The BBC micro:bit is a small but yet powerful learning computer for kids and grown ups.

The BBC micro:bit is a small but yet powerful learning computer for kids and grown ups.

https://microbit.org

170 questions
0
votes
1 answer

Resetting the count of variable in a while loop

from microbit import * from ssd1306 import initialize, clear_oled from ssd1306_stamp import draw_stamp from ssd1306_img import create_stamp from ssd1306_text import add_text import utime as time window = [] threshold = 550 # limit count = 0…
Yoru Ka
  • 3
  • 2
0
votes
1 answer

Micro:bit serial pins

I'm looking to port some C++ code to the micro:bit and I would like to use the USB-UART capabilities of the board. My current project uses the nrfx library to set up peripherals such as the UART. I need to know which GPIO are connected to the…
edoput
  • 1,212
  • 9
  • 17
0
votes
1 answer

Microbit v2 radio HiFive Inventor esp32

While there is also a microbit forum this is quite specific to having both a microbit and hifive inventor device. I was curious if anyone has done it. Question is: Of course I know the difference in the boards as I will state below. I just can't get…
envymike
  • 155
  • 2
  • 7
0
votes
1 answer

How to use external modules in MicroPython on micro:bit from VSCode

I’m new to both micro:bit and MicroPython (or Python in general) - but I want to have it all running in VSCode. I grabbed this extension which was really smooth working with. My problem now is that I want to leverage external modules, for things…
EinarI
  • 627
  • 1
  • 9
  • 14
0
votes
1 answer

Python Serial Ports not Reading in Microbit Data

I have code for sending analog data from a microbit that should print it out in the shell in Python. I've done this exact code before using an internal microbit sensor (light sensor) but now I'm using an external sensor that reads from the…
Lucia
  • 31
  • 1
  • 12
0
votes
0 answers

How do I fix 'nan'

I am not sure why this is returning nan and what to do. g = accelerometer.get_z() G = (6.67*10)**-11 m = (5.972*10)**24 c = 299792458 r = 38.5*(5.972*10)**24/ g* G deltatgprime = 5 * math.sqrt(1 - (2 * G * m / r * c**2)) …
crvcio
  • 321
  • 2
  • 5
  • 11
0
votes
1 answer

How do you create global variables in Microsoft MakeCode for micro:bit?

I'm currently trying to create snake inside a micro:bit. But one problem is when I use an if statement to detect if the snake is touching an apple it'll work once but then I call the function which says function createApple() { let apple =…
Ametrine
  • 73
  • 6
0
votes
2 answers

Unable to upgrade the firmware of a Micro Bit

I have a Micro bit v1. Days before, I was unable to search the Bluetooth signal of it, so I followed the instruction on microbit.org to upgrade its firmware. But after I copied the firmware file into it, a FAIL.TXT file showed up in the disk…
Jason
  • 7
  • 2
0
votes
1 answer

BBC micro:bit extension adding failed for Scratch

I bought a new micro:bit v2 board, and want to add it to Scratch as an extension. I followed the 2 steps from https://scratch.mit.edu/microbit. The step 1 is ok, the led lights of my micro:bit board is flashing 5 characters "zepiv", but the step 2…
choes
  • 141
  • 1
  • 1
  • 11
0
votes
1 answer

How can I convert Unicode characters to their Unicode codepoint in hex format?

Summary I've been trying so solve this via an array that holds the Unicode codepoint table, but it is so large I am getting memory errors. Details of my effort so far I am using Typescript in combination with a Micro:Bit. I have a large array (128…
Jxns
  • 19
  • 3
0
votes
1 answer

Read and show a serial string from a Pi on a microbit v2

I have a v2 microbit attached to a Raspberry Pi via USB (/dev/ttyACM0), which is running Node-Red. I want to show a weather icon on the Microbit, based on the 'weather' icon returned from the openweathermap node-red module. I can extract the icon…
0
votes
1 answer

microbit why blinking leds is so slow?

Using this basic example code from microbit, blinking heart, I tried to change the delay of blinking with the pause argument. However, the minimum actual blinking frequency is around 500ms, no matter what value i put. Do you know why, and how I can…
agenis
  • 8,069
  • 5
  • 53
  • 102
0
votes
1 answer

Is it possible to directly convert JS to a hex-file for the BBC Micro:bit?

I am trying to develop a simple JavaScript/Blockly IDE for programming the Micro:bit. Similar to how you write some JavaScript in MakeCode, click download and then MakeCode gives you a hex-file for the micro:bit, I would like to generate exactly the…
frede1994
  • 247
  • 2
  • 4
0
votes
1 answer

Problem with connecting microbit to the microbit python editor

I tried to connect to my microbit, which is plugged into my computer on the micropython editor - https://python.microbit.org/v/2. Whenever I connect, it shows an error that access denied. I tried closing tabs and replugging my microbit, but nothing…
SuPythony
  • 875
  • 8
  • 23
0
votes
1 answer

I can't find what's wrong with my micro bit code, variables are not found even if i have specified them

i'm trying to code a simple game inside micro:bit with python, this is the code: def on_button_pressed_a(): global imput_navicella22, navicella2 if imput_navicella22 == 0: imput_navicella22 += 1 navicella2 =…
biz
  • 1