gloglas / rpi_gui

LCD GUI for P4wnP1 ALOA
18 stars 3 forks source link

Screen appears then the pi crash #4

Closed 7h30th3r0n3 closed 1 year ago

7h30th3r0n3 commented 1 year ago

Hi ! first of all, many thanks for the great work !

I tried to use the script which did not work. So I carried out the different steps by hand with no error.

At this step the main.py not working with an OSError: [Errno 121] Remote I/O error, by looking the code it seem to be an error caused because i have no battery pack on it an the main.py try to read the value of an I/O pin, so i pass the value of the upslite variable to False.

At the first reboot the screen load and the raspberry crash... so i reinstall all the things without startup things.

When I run main.py the screen lights up with your USB drawing, after second , the menu appears.

And the rpi 0w crash... I have no more ssh connection, no more screen, and no more hdmi, impossible to get anything without reboot....

it looks like something is crashing the rpi 0W, but i don't know what... maybe something with the battery pack ? I have no error, no log, just a crash...

can you help me figure out what is going on to make this work? having a p4wnp1 with a screen is an old dream 😌

RPI 0W P4wnp1 aloa v0.1.1-beta 128x128 (1.44") Waveshare LCD HAT with joystick No battery pack

7h30th3r0n3 commented 1 year ago

It's all good, i just removed all the upslite stuff from main.py and it work 🤗

gloglas commented 1 year ago

Hi, I'm glad you like the project and it is awesome that you figured it by yourself.

For you and future readers. You shouldn't have to delete the functions, just set upslite bool in main.py#L1166 to False and that should do the trick.

7h30th3r0n3 commented 1 year ago

Hi, I'm glad you like the project and it is awesome that you figured it by yourself.

For you and future readers. You shouldn't have to delete the functions, just set upslite bool in main.py#L1166 to False and that should do the trick.

I made more modifications than that, precisely the switch from True to False of upslite is not enough, here is what I removed or modified :

from L153 to L183

from L189 to L190

L193 Modification : draw.text((0, 0), str(temp()).split('.')[0] + " °C ", fill="WHITE", font=font)

from L1159 to L1175

from L1211 to L1212

gloglas commented 1 year ago

Oh I see thank you for noticing that. I don't have time to test it. Please take a look at upslite branch: https://github.com/gloglas/rpi_gui/pull/5

7h30th3r0n3 commented 1 year ago

Oh I see thank you for noticing that. I don't have time to test it. Please take a look at upslite branch: #5

Tested on my side just an little indentation error : File "/root/rpi_gui/main.py", line 199 draw.text((0, 0)," " + str(temp()).split('.')[0] + " °C ", fill="WHITE", font=font) TabError: inconsistent use of tabs and spaces in indentation

maybe the way i copy past the code,

and a little bit more of space (21 total) for center the displayed temperature : draw.text((0, 0)," " + str(temp()).split('.')[0] + " C ", fill="WHITE", font=font)

but everything seem to work 👍no more crash, thanks for time taked to fix that

gloglas commented 1 year ago

Thank you for testing that, enjoy.