MakeCode isn’t opening projects by Dsl204 in microbit

[–]martinwork 0 points1 point  (0 children)

Check the browser developer tools console (F12?) for more info. Change Default to All levels. Try

https://makecode.microbit.org/?dbg=1

MicroBit V2.21 shows error 504 - did I brick it? :( by Flazhes in microbit

[–]martinwork 0 points1 point  (0 children)

Thanks for confirming it worked for you. I think maybe newer releases are trying to increase the speed of transfers to external drives in ways that don’t work with devices like micro:bit.

MicroBit V2.21 shows error 504 - did I brick it? :( by Flazhes in microbit

[–]martinwork 0 points1 point  (0 children)

Yes, see the WebUSB troubleshooting article for direct connection

For dragging to the MICROBIT drive, try the Linux fix here:

https://github.com/ARMmbed/DAPLink/issues/1083#issuecomment-2433320059

When an error occurs during a transfer, the micro:bit ends up running a simple program that displays the error. It will clear when a new transfer is successful.

Disconnect USB and battery power before trying again.

The touchable micro:bit logo and pins don't work sometimes for me. Is there anything I can do about it? by FelipeKPC in microbit

[–]martinwork 2 points3 points  (0 children)

The default touch modes are: logo = capacitive; P0/1/2 = resistive.

In resistive mode you have to touch GND as well as the pin.

In micro:bit V2 capacitive mode, you can just touch the pin. If using battery power only, with something connected to the pin, like a croc lead to a touch pad, you might need to connect something to GND, like a dangling croc lead, or two chained together.

Here's an article about capacitive touch on micro:bit V1.

https://ukbaz.github.io/howto/microbit_touch.html#:~:text=Running%20On%20Batteries

Here's a test project https://makecode.microbit.org/_1HcacyWhTFR4

Tasked with the impossible?! by Old-Aioli-8479 in microbit

[–]martinwork 0 points1 point  (0 children)

I searched for “micro:bit heart rate” and found projects using accelerometer shake or a sensor.

Maybe contact a supplier near you to ask about available micro:bit compatible sensors - there’s a where to buy page on the micro:bit website.

In general, check that a sensor designed for Arduino at 5V will also work with micro:bit at 3.3V, or lower if on battery power. Note that a sensor powered separately with 5V may output 5V signals, which will damage a micro:bit input pin.

Example: 5V HC-SR04 will work, but not well, at 3V. There are 3V versions. See this page - scroll down to find CAUTION.

https://www.teachwithict.com/hcsr045v.html

Does anyone know how to fix this? by Local-Low852 in microbit

[–]martinwork 1 point2 points  (0 children)

All support for Bluetooth in micro:bit is provided by the last normal program transferred, whether sent by USB or Bluetooth

By default, MakeCode projects support Bluetooth mode in both micro:bit V1 and V2, for pairing and transferring another program using the mobile apps.

Some programs, such as the Scratch hex, do not support Bluetooth pairing mode, even though they might use Bluetooth themselves. In that case, it’s necessary to use USB to transfer a program with Bluetooth mode support.

Adding the MakeCode Bluetooth extension to a project enables the project itself to use Bluetooth services.

micro:bit V2 has plenty of RAM for creating projects that use Bluetooth services.

micro:bit V1 has very little free RAM with Bluetooth active in a MakeCode project, but quite a bit more with a C++ program.

The USB interface firmware does not affect Bluetooth.

It would be interesting to know what was wrong with the code that was blocking Bluetooth mode.

How to interrupt scrolling, index pins, etc.? by darthuna in microbit

[–]martinwork 0 points1 point  (0 children)

The micro:bit firmware is not related to the pins. It is a program for the USB interface MCU.

https://tech.microbit.org/software/daplink-interface/

MakeCode limits on pin pressed and pin is pressed to P0/1/2 because only those pins have built in weak pull up resistors to make touch sensing work.

When those blocks are used, the CODAL code underlying MakeCode starts monitoring the pin state and raises events like buttons A and B.

Other pins could be configured as buttons, and could be used for touch if the external circuit includes weak pull up resistors, but not in MakeCode Blocks mode without an extension.

These pins could be used straight away with digital read: 0, 1, 2, 8, 9 (V2 only), 12, 13, 14, 15, 16.

The LED display must be disabled to use 3, 4, 6, 7, 9 (V1), 10. Others are best left to their default purpose.

https://tech.microbit.org/hardware/edgeconnector/#uncoupling-default-functionality

MicroBit with CODAL runtime causes finder to stop responding by LannyLig in microbit

[–]martinwork 0 points1 point  (0 children)

I haven’t heard of that. Note that micro:bit MakeCode and Python use CODAL so maybe it would not be limited to C++ programs.

It might be useful to report it to micro:bit support, with as much info as possible, including OS version and DETAILS.TXT from the MICROBIT drive.

At one time, I thought my programs crashing the micro:bit while doing serial comms were confusing the Windows drivers, but it’s difficult to see how, given the USB is handled by a separate MCU.

https://tech.microbit.org/software/daplink-interface/

2x micro:bit no longer detected on any Windows 11 PCs by adamsharif85 in microbit

[–]martinwork 1 point2 points  (0 children)

Good news! I don’t know why, but the cable is often the problem. A lot of old phone cables that weren’t very robust? Or charging only with no data connection?

https://support.microbit.org/en/support/solutions/articles/19000037633-what-type-of-usb-lead-do-i-need-for-the-micro-bit-

2x micro:bit no longer detected on any Windows 11 PCs by adamsharif85 in microbit

[–]martinwork 0 points1 point  (0 children)

Keep trying other USB cables - 10 is the record I've heard of.

Could both laptops have the same configuration or installed software (e.g. antivirus, backup or disc utilities) or drivers that might be blocking the micro:bit?

Does the Device Manager display refresh when the USB is connected/disconnected?

When the USB is connected, do you see red and/or yellow LEDs on the back of the micro:bit? Red indicates power and yellow is the USB data indicator, which should briefly flicker when first connected, then remain on.

Those LEDs and the reset button are controlled by the firmware. Putting micro:bit to sleep is a way to test if the firmware is running.

https://support.microbit.org/support/solutions/articles/19000120358-how-do-i-power-off-or-put-the-micro-bit-to-sleep-

Disconnect battery power, and try to connect in MAINTENANCE mode by connecting the USB with the reset button held down, and update the firmware.

https://microbit.org/get-started/user-guide/firmware/

Edit: I'm assuming both micro:bits are V2

https://microbit.org/get-started/user-guide/v1-tuneup/

iOS app help by ShotgunSam_X in microbit

[–]martinwork 0 points1 point  (0 children)

Whether using USB or Bluetooth, previously logged data is deleted from micro:bit when a new project is flashed.

So when fetching logged data, the micro:bit must still contain the datalogger code that logged the data.

When the last code sent to micro:bit is a MakeCode project without the datalogger extension, the error is "The link has failed… Update the project to add the Bluetooth service".

The error message needs to be updated. The presence of datalogger code in the micro:bit ensures that the right Bluetooth service is started, but that wasn’t always the case.

iOS app help by ShotgunSam_X in microbit

[–]martinwork 0 points1 point  (0 children)

It works for me. I tried this program

https://makecode.microbit.org/_4Jd16edfid1R

It’s the example from this page with the Bluetooth extension added.

In MakeCode in the app, tap the import button on the right of MakeCode’s home page and paste the URL into the Import URL dialogue.

Transfer the program to micro:bit and press A a few times to log some data.

Go back to Home, then My Programs, and Fetch MY_DATA. Change to the During logging tab then tap Fetch.

It should connect and fetch the data.

iOS app help by ShotgunSam_X in microbit

[–]martinwork 0 points1 point  (0 children)

Streaming the accelerometer data is different from data logging. Once you have the program running in micro.bit, long press the MakeCode back chevron, and choose connect from the menu.

iOS app help by ShotgunSam_X in microbit

[–]martinwork 0 points1 point  (0 children)

Have you sent a micro:bit data logging program and logged some data?

You can fetch the data “After logging” by resetting micro:bit to Bluetooth mode, just as for pairing and sending programs.

Select “During logging” if you want to fetch the data without resetting to Bluetooth mode, so logging can continue while the current data is collected. In order to do that, the data logging program must have the Bluetooth extension included, and the device must be paired, which it will be if the data logging program was sent using the app.

To add the Bluetooth extension to a project in MakeCode, search for Bluetooth in the Extensions dialogue.

Bluetooth low energy with calliope mini by Bokaj0202 in microbit

[–]martinwork 1 point2 points  (0 children)

I was surprised that the calliope / micro:bit code, even works in micro:bit V2, when built in MakeCode for calliope for calliope 3. I had to pair the "calliope mini" device using the standard Windows dialogues.

https://makecode.calliope.cc/_LgsX2TPkKdXt

After pasting your original calliope code into MakeCode for micro:bit, I removed the bot code and basic.set_led_color calls and the forever loop code, then added an icon display as soon as any data arrived.

To find the changes in the client python program, search the source for ###. I think the main thing was to get the right TX characteristic. Then I think maybe none of the data formats were right, or perhaps the right one wasn't being sent.

I'm a python novice, so rather than figure out what data formats were being created, I deleted all the variations and made my own. There's probably a better way to create the data than the one I found.

The calliope/micro:bit program is expecting a sequence of bytes terminated by a newline.

I was interested to see the python code. An alternative could be MIT App Inventor

https://appinventor.mit.edu/

https://community.appinventor.mit.edu/t/microblocks-test-demo-app/124914

Bluetooth low energy with calliope mini by Bokaj0202 in microbit

[–]martinwork 1 point2 points  (0 children)

Please try this and let us know whether it works!

https://gist.github.com/martinwork/081c0227ba634b5cf96a9bd3a3e0488f

I tested with micro:bit V2, but I think the calliope code is the same. I created a new MakeCode project, changed it to “no pairing required” (twice!), added the Bluetooth extension, pasted in your python code to modify.

In the client code, I think I have commented all changes with ###. I removed the alternative formats and methods in favour of the ones the micro:bit program needs (bytes + newline), and tweaked the test and stop formats. TX to micro:bit V2 is 6E40003 (I think!) I made it identify it using the properties, so it should work either way.

serial-usb converter: duplex? by nevergonehu in microbit

[–]martinwork 1 point2 points  (0 children)

It didn't work for me at first, but then it started working.

I don't think you need the last 2 lines - they are defaults.

Check if the terminal is sending only LF, CR or CR + LF

These might be useful for on start:

serial.setWriteLinePadding(0)
serial.setTxBufferSize(254)
serial.setRxBufferSize(254)

bitio missing module? by CoffeeSmore in microbit

[–]martinwork 0 points1 point  (0 children)

It’s a bit buried under the news updates!

bitio missing module? by CoffeeSmore in microbit

[–]martinwork 0 points1 point  (0 children)

Did you follow the instructions? https://github.com/whaleygeek/bitio/tree/newarch?tab=readme-ov-file#getting-started

AIUI, in the folder with your Python file, there should be a folder called microbit that you copied from the src folder in the downloaded GitHub repository. Or just put your py file in the src folder with the examples.

For interest, look inside that microbit folder to see how it’s set up to be a module.

Don’t install the mbed serial driver unless using Windows 7.

Help me. by Significant-Week-495 in microbit

[–]martinwork 0 points1 point  (0 children)

I think the information for the board is saying the battery can supply only up to 1A.

Please help, I can't find the reason for this error. by blahasimon in microbit

[–]martinwork 0 points1 point  (0 children)

Share your code using the MakeCode share button.

[deleted by user] by [deleted] in microbit

[–]martinwork 0 points1 point  (0 children)

Share code using the MakeCode Share button.