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
1
vote
1 answer

How to set up serial communication with micro:bit using PySerial?

I'm currently trying to send accelerometer data from my microbit to a python program running on my computer. I've decided to use uart and pyserial to attempt to do this. from microbit import * while True: x = accelerometer.get_x() …
darkrai
  • 113
  • 3
  • 13
1
vote
1 answer

Micro:bit Extension "Program Error: Dereferencing Null/Undefined values"

I am writing an extension for Micro:Bit that controls an OLED. I have an array that I declare outside of any function. When I try to use it inside of a function I get the error "Program Error: Dereferencing Null/Undefined Value" in an orange pop-up.…
1
vote
2 answers

Forcing Micro:Bit Shutdown

I have this code for a parking system. When the number of spaces goes above 20 it sends and error message due to 20 being the limit of spaces. I want to try shutdown the program after this point. I have tried doing what you can do in Python. This…
Jeff
  • 11
  • 1
1
vote
1 answer

bbc-microbit: micropython AttributeError: 'str' object has no attribute 'partition'

On a BBC microbit, I am getting this error and I don't know why: AttributeError: 'str' object has no attribute 'partition' when running this code: uart.write('Received: "' + incoming + '"\n') head, mid, tail = incoming.partition(' ') incoming is a…
monok
  • 494
  • 5
  • 16
1
vote
0 answers

MPU 6050 in Microbit, can read Who Am I, but no gyro, accel, or temp values (all zeros)

I have the following code to use in a Microbit connecting to an MPU 6050 (on a gy521 board) basic.showIcon(IconNames.Heart) SSD1306oled.useBuffer(); const MPU = 0x68; pins.i2cWriteNumber(MPU, 0x6B, NumberFormat.UInt8LE,…
Aerik
  • 2,307
  • 1
  • 27
  • 39
1
vote
2 answers

Display image before event in micropython

I'm trying to use a BBC:Microbit to display a flash for 1 second on it's led's when button a is pressed. This works but I want it to display an animation(standby) whilst it waits for the button to be pressed. The code below only shows the standby…
JulianJ
  • 1,259
  • 3
  • 22
  • 52
1
vote
1 answer

Flash microbit embedding a class .py file

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…
david
  • 1,302
  • 1
  • 10
  • 21
1
vote
3 answers

Generating micropython + python code `.hex` file from the command line for the BBC micro:bit

Is it possible to generate a .hex file with MicroPython and my own python program code at a Linux command line, rather than in one of the editors?
Ben Clifford
  • 1,398
  • 1
  • 12
  • 23
1
vote
1 answer

Arm mbed online Compiler error 230 (or -230?)

I tried to compile some examples for the microbit with the arm-embed online compiler however no matter what I do I can't get anything compiled. Tried also an empty project, log-out and log-in again, close the browser and open the browser, switch off…
Codebeat
  • 6,501
  • 6
  • 57
  • 99
1
vote
1 answer

Micro:bit classes instead of global variables - memory allocation error in micropython

I've just created my first little truth or dare/spin the bottle game for a senior/high school coding club on the Micro:bit. I would like to introduce using oop/classes/objects instead of (dreaded) global vars. The game works great on emulators such…
1
vote
1 answer

Microbit Platformio development - 'PlatformIOLibBuilder' object has no attribute 'get_inc_dirs'

I am currently trying to play around with developing on a BBC microbit on c++ through the Platformio IDE on Atom. I have got the software working with other boards (various NUCLEO boards that I own), and the code itself for the mircobit is the…
falcoso
  • 362
  • 3
  • 10
1
vote
1 answer

Micro:bit BBC programming bluetooth

I recently purchased Micro:Bit. I've seen that micro-python and bluetooth cannot be used at the same time due to memory capacity. Does anyone know if I would be able to build a decent application using the javascript block programming? The app…
Lechucico
  • 1,914
  • 7
  • 27
  • 60
1
vote
0 answers

Android App communicating with the BBC Micro:Bit

Im trying to write an Android app that connects to and communicates with a BBC Micro:bit board. I'm writing the application using Xamarin (C#) and i've got a few things working already (Scanning for BLE devices and connecting to the Micro:Bit). The…
user2549874
  • 11
  • 1
  • 2
1
vote
1 answer

module radio for micro:bit (python)

here is my code for my microbit in python so i want to know how do i send the target_x and the target_y from the microbit 1 to the second microbit ? microbit 1 : radio.on() target_x = random.randint(0,4) target_y = random.randint(0,4) if…
1
vote
2 answers

Can micro:bit read while in another while?

so i have got a problem programming micro:bit. I code it in internet page, then download the hex file and transfer it into the micro:bit. On the internet simulator everything works. Apparently when i transfer it to micro:bit code is not working. The…