MicroBlocks loading issue

Issue #505 resolved
Hans Braakmann created an issue

When connecting the Raspberry Pi Pico/W to Microblocks the Mac loading color wheel keeps turning…and turning. The same is occurring when using the MicroBlocks Pilot version. (Mac Sonoma 14.4.1)

Comments (11)

  1. John Maloney repo owner

    It sounds like the Pico may not have MicroBlocks firmware installed.

    To install firmware on Pico boards you need to put the chip into bootloader mode by holding down the button as you plug in the USB cable. When you do that, the RPI-RP2 virtual USB drive will appear. (If it doesn't, try again.)

    Once the Pico is in bootloader mode, you can install the firmware.

    After the firmware is intalled, MicroBlocks should be able to connect to the board. If it doesn't, unconnect and reconnect the board (making sure you do NOT hold down the button while connecting.)

  2. John Maloney repo owner

    I just checked both firmware installation on connecting and both the web app and the stand-alone app are working as expected for me (Mac OS Sonoma 14.1.1 on an M1 Powerbook).

  3. Hans Braakmann reporter

    Thank you for trying it out. I disconnected everything including the 6 pin GY-BME280 (headache) sensor. Now the MicroBlocks standard and Pilot versions work just fine.

  4. John Maloney repo owner

    A common issue when using I2C is that if the wiring is not correct then the SDA and SCL lines are not connected to the pull-up resistors that are usually provided by I2C sensors such as your GY-BME280. Some microcontroller boards have on-board I2C devices and thus already have pull-up resistors on the I2C bus lines but the Pico board does not.

    Unfortunately, if one attempts to access an I2C bus that lacks pull-up resistors the hardware will just hang waiting for the I2C bus to become idle (high state), which will never happen. It sounds like that might be what was happening to you.

    Your GY-BME280 should work with MicroBlocks.

    Make sure to connect the sensor board's SDA and SCL pins to Pico pins GP4 (SDA) and GP5 (SCL). You'll also need to connect power and ground, of course. You can leave CSB and SD0 unconnected.

    A quick test is to see if you get a non-negative response from the board with:

    scriptImage187191246.png

    A non-negative response indicates that the board responded to the given I2C address. If hex 76 doesn't work, try the alternate address, hex 77.

    If MicroBlocks hangs, check your wiring again.

    Assuming the board responds, the MicroBlocks "Barometric Pressure" library should work with the GY-BME280.

  5. John Maloney repo owner

    If things still don't work you could have a bad sensor board. You could test that using an Arduino test program. If the Arduino program also hangs then you probably have a defective GY-BME280.

  6. Renato

    Just received a Picobricks (Raspberry Pi Pico W Starter Kit) and seeing the same behavior. The Microblocks just hangs when I connect the Pico except when the Pico is on bootloader mode.

    This thread here helped me figure out that by removing the Pico from the board the Microblocks loads fine without freezing. But removing the pico from the board every time I want to deploy the changes is very cumbersome and defeats the entire purpose of rapid prototyping.

    John, you mentioned that I could “Make sure to connect the sensor board's SDA and SCL pins to Pico pins GP4 (SDA) and GP5 (SCL).”, I think I did that but probably not correct. Would you have more instructions on how to do that?

    My Pico board is this one here: https://picobricks.com/products/picobricks-iot-project-kit

    Thank you!

  7. John Maloney repo owner

    Thanks for letting me know. I am traveling but will look into this when I return next week.

    Which version of the MicroBlocks firmware do you have on the Pico board? I think I may have introduced a bug when I added support for Bluetooth BLE in the latest version of the firmware (v242).

    You might try installing the Pico W firmware from the stable release (v210, I believe).

    Do you have anything extra connected to your picobricks board? (That was Hans' issue...)

  8. Renato

    That worked! I downloaded and used the vm_pico_w.uf2 v1.2.24 and everything is working fine. So, indeed looks like the latest version (v1.2.46) has a bug on it.

    Thank you very much!

  9. Log in to comment