Raspberry Pi Pico Keeps Ejecting - thonny

I've just gotten my Raspberry Pi Pico and am trying to get it ready to accept code. I've tried dragging and dropping MicroPython from the webpage and using Thonny to handle it automatically, but when I do either, it ejects itself and nothing has loaded. I'm trying to do this from a Pi 4. Any help would be greatly appreciated.

This is how I do it (but not on a RaspPI)... hold the BootSel button on the Pico and then plug it in. A new "disk" should appear to the OS (or on the desktop). Drag the Micropython UF2 file onto the new disk - this installs Micropython on the Pico. The file gets copied, the Pico saves it to flash, and the "disk" ejects itself.
Now, in Thonny, you have to select the correct board (Pico) and the correct serial interface device (/dev/it-depends-on-your-system). The Thonny page has notes for this. At this point, with Micropython, we talk to it over the serial line, not as a disk.
HTH.

I really does sound as if you are trying to install MicroPython without downloading it and/or to run a MicroPython program without installing the MicroPython system. You first have to install the MicroPython system, download a uf2 file, and only then can you install and run a MicroPython program using Thonny.

Answering here because I had trouble getting mine to work too. In my case, I somehow got my pico into such a state that Mass Storage Device mode would randomly disconnect / eject, often before I could even drag a new UF2 file to the device.
Since I didn't have the time to be successful with drag/drop before the device disconnected, I built and used picotool to push the "nuke memory" UF2 file (see link here). (BOOTSEL held down, plugin, hit enter on the terminal to run ASAP before the pico disconnects)
I actually had to do this two or three times, but after that it stopped being weird and Mass Storage mode works correctly again; I was able to install the MicroPython UF2 file with the normal drag and drop method and Thonny no longer disconnects.

Related

Buildroot struggling to transfer alsa library

buildroot make issue
I am relatively new to buildroot and linux in general.
I am trying to make an image for an atmel sama5. Basically after I configure the menu and the Linux kernel, I run the "make" command. During execution of make, the program cannot seem to download alsa-lib 1.1.7.tar.bz2. Make starts at this point until the data connection times out at which point it starts again. any ideas on how to resolve this?
Thanks

disable HDMI in raspberry Pi zero with no tvservice

I'm trying to get my raspberry pi zero power consumption to a minimum.
For this I want to disable the HDMI because I'm not going to use it, but can't find how.
I used buildroot to create my kernel, rootfs and dtb.
I tried disabling the HDMI in the kernel build but it is not possible, menuconfig forces me to have it set to Y.
I tried adding to the HDMI section in the dts "status = "disabled";". It was compiled successfully but no change in power consumption.
I thought maybe I can add something in boot/config.txt but couldn't find anything disabling HDMI from the rpi documentation here.
I know in a raspian OS there is a tvservice I can use to acheive this but my build doesn't have tvservice nor can I add it.
Does anyone know how I can disable the HDMI from the config.txt or any other way?
Thanks,
Robbie

How do I get GTK based GUI in a Yocto project?

I am developing a kiosk type application using Yocto and a raspberry pi3. I have an hdmi touchscreen attached and have a USB keyboard attached for development only. My problem starts when I try to start GTK in one of my processes.
My project involves creating the kernel, has several processes running for various tasks, and will have a touchscreen GUI based on GTK+3 (using Glade).
My kernel is working and my processes are running and able to communicate with each other. But, now I'm having problems getting any kind of graphical output on the screen. Right now, all I have is console access as root.
When I start my 'display-mgr' process it tries to start up GTK. When it tries to 'gtk_init()', I get:
Gtk-WARNING ++: ...timeinfo...: cannot open display:
I've tried the usual 'export DISPLAY' stuff, but it looks like I don't even have the Xserver installed on the board.
I have:
DEPENDS = "libconfig pkgconfig-native gtk+ gtk+3 glib-2.0 libxml2 gnome-common glade"
in the recipe for my process. I also have: DISTRO_FEATURES_append = " x11" in my image recipe. Is there some package that I've missed?
I would recommend you start with core-image-sato from poky distro, and gradually replace the pieces. Alternatively, use core-image-weston, which would use that instead of x11.

Persistent error coming from libusb0

I'm using a Python application that accesses a USB device (pipsta printer) and executes a routine. It's running fine outside the container, but when it comes to the container it returns a error like this:
(File "usr/local/lib/python2.7/dist-packages/usb/backend/libusb0.py", line 386, in _check:
raise USBError(errmsg, ret)
USB.core.USBError: [Errno None] couldn't opendir(): No such a file or directory)
In my dockerfile, I've included all the packages relevant to Python and USB, and I also moved the relevant files to /etc/udev/rules.d and restarted udev.
Make sure you:
followed every step from assembly instruction and https://bitbucket.org/ablesystems/pipsta/wiki/Pipsta%20First-Time%20Setup
printer is connected to the power
printer is connected via usb to raspberry
printer's led doesn't blink (should be green constantly)
proper usb library is installed (or try to install different version of the usb library). What version are you using? python: print(usb.__version__) , it works fine for me with version 1.0.0rc1
is printer visible to the os? command: ls /dev/ap1400
I know this is an old question (I've only just encountered it). The following is a paraphrasing of the FAQ. The following steps should help diagnose the problem.
Download the latest set of Pipsta examples..
Extract the contents of the zip file.
Change directory to where the files were extracted
Change directory to the Examples folder.
Using a terminal run the command python verify_pipsta_install.py. This will try and help diagnose problems.
The following will should fix the python usb library error.
If your Pipsta printer firmware is V9.2.03 please upgrade the firmware to V9.2.08 using the fpu (both can be found in the downloads section of bit bucket.
Install the latest version of the Pipsta examples (download from bitbucket).
Copy the new pipsta/Examples/system_scripts/ to /etc/udev/rules.d/60-ablesystems-pyusb.rules
Restart the Raspberry Pi
If the printer still fails to be discovered then -
The following workaround may work.
1. Unplug the printer from the USB port
1. Enter the command sudo lsusb
1. Reconnect the printer
1. Enter the command sudo lsusb
If the printer has been detected by the Linux environment then either /dev/ap1400 or /dev/pipsta should exist in the filesystem.
NOTE The Pipsta now has Debian packages to help with installation. I have a link limit on my account but search for pipsta-printer-utilities-1.1.1-Linux.deb and pipsta-cups-driver-0.3.0-armhf.deb for more information.

Raspberry Pi, qt creator GUI executable issue

Created a GUI on Raspbian with qtcreator. Program runs in qt creator but executable does not run (i.e. trying to run it out of qt). Interestingly the same executable runs on a different Raspberry Pi.
Both Pi's have qt creator installed, same versions, etc. When you click run in qt creator the program appears to run fine. I will note that the second Pi (the one with the issue) is the Pi 2 and the original one is the previous model.
Interestingly the Size on disk of the first one is around 1.4mb and the total size of files is 175.2kb. However the second is 175.2kb for both.