boochow / micropython-raspberrypi

bare metal Raspberry Pi Zero / Zero W port of MicroPython
MIT License
215 stars 24 forks source link

Rainbow Screen on RPi Zero #32

Open nogleo opened 4 years ago

nogleo commented 4 years ago

I'm trying to make it work but no success... Follow the instructions and just rainbow... help please

boochow commented 4 years ago

Hi @nogleo, if you got the binary from v1.0.0, the main.py need to be edited to enable the frame buffer console. If you already edited the main.py as described in the README.txt and still couldn't get the frame buffer enabled, try to replace main.py with this single-file alternative.

nogleo commented 4 years ago

Screenshot from 2020-08-05 10-57-07 sadly I've tried both cases and got nothing...

maybe I'm just noobing on something

nogleo commented 4 years ago

is it really all I have to put into de SD to make it work?

boochow commented 4 years ago

Your files seem OK. To test whether the boot process is succeeded or not, try this:

The attached file is a simple bare-metal program that blinks Pi's LED eternally. (source code is here.) Extract blink_led.img from zip and copy it to your SD card. Edit config.txt and replace the line kernel=firmware.img to kernel=blink_led.img then save the file. If your Pi's LED blinks, then your bootcode.bin and start.elf have no problem.

I know there are some compatibility issues between some SD cards and the SD card driver in micropython. Using other SD cards may solve the problem.

blink_led.zip

nogleo commented 4 years ago

Tested it with 2 different SDcards ando no hope, not even the rainbow was appearing anymore

boochow commented 4 years ago

I made the disk image of my SD card that runs correctly. Try writing this image to your SD card with Raspberry Pi Imager. The disk size will become 128MB regardless of the actual size of your SD card, but don't mind. It is because I set the size of the first partition to 128MB.

upyrpi_usb.zip

nogleo commented 4 years ago

IT'S ALIIIIIIVE!!!

Thank you very much!!! I'm still not sure what is the thing that made it work hahahahaha. Maybe working on linux has something to do with that? Actually the usb host is not working and gives me erros

Just one question now, can it work through repl?

boochow commented 4 years ago

Congratulations! Some USB keyboards works, others not. If you could find one that works, it would work with REPL. I have tested several USB keyboards, but have not yet found the conditions that determine whether a keyboard works or not. I'm using this keyboard for testing. => https://www.amazon.com/dp/B00W7WSIKS/

nogleo commented 4 years ago

when I ask about repl I mean run the repl in the PC like with a ESP32. Is it possible?

boochow commented 4 years ago

Yeah, it is possible, but you need a USB-UART adapter. Most of the ESP32 development boards have a USB-serial converter chip on board, but RPi doesn't. An external USB-serial module should be connected to your PC and Pi like the attached image. rpi-zero-serial