I have written a python script to set the screen brightness of the pi-top on standard Raspbian. It is based on the concepts and some code snippets of pi-topOS (thanks to the programmers at pi-top!), but works without any pi-top software. A link to the github repository is attached. Your feedback is welcome. It can be used with the latest and greatest Raspbian.
A link to the repository is attached.
The Raspbian programs (link above) have been tested with the latest Raspbian Jessie and they work properly.
I tested github.com/rricharz/pi-top-install with the newest version of Raspbian. Works fine.
I tested github.com/rricharz/pi-top-install with the latest Raspbian. Works fine.
So I started up the other day and brightness is 0. brightness 9 works in that it acknowledges the required setting but current setting stays 0 .
No sure whats happened now!
Power off also does not work so guess the hub controller is not working properly...
Ok it is sorted. My replacement Battery only lasted about 2 months, and i'm still waiting for the replacement so I need to keep power on it the whole time. Once I removed power and restarted it came right. ( I had already tried a new stretch SD card where brightness changes just turned the screen off)
What i have done is put brightness 8 in /etc/rc.local as a backup.
I was testing a system that "works" but when it ran, somehow brightness gets set to 2 and if I manage to change it the pi reboots after about a minute. I guess my Hub controller is not good.. waiting for my replacement... Disconnect the battery for my is not needed as the battery voltage is 0...
Good to see you are still aroound, Rene.
I am about to give up on my pi-top due to the continued battery/hub issue. it gets tiresome to have kickstart the battery by running the patch. My second battery has shudown at odd percentages lets (I've seen it shutdown with 30% charge remaining at one point, but mostly it will discharge fully) after it has fully recharged I have found i have to run the patch to be able to use the battery.
this is getting tiresome. I am beginning to wonder if I wasted my time and money on this pi-top.
It has been an adventure, but with no permanent fixes in sight,. I am beginning to wonder "was it worth it?"
I'll try and keep the pi-top together as long as I am able to but right now something just doesn't seem right about this...
Jesse you are lucky at the least the patchworks for you. I tend to agree the unreliability of PiTop means i will not buy again. I may try and remove the hub and battery at some stage in the future..
Yes, you have to poll a register on the spi bus in approx. 100 msec intervals.
I have been told by Pi-top, that they are working on making their version of the shutdown handling available for Raspbian users, which will include the shutdown button. They also promised that it will include proper documentation.
If you cannot wait, you can look at shutdown.c in my repository at github.com/rricharz/pi-top-install. It shows how to first write a hex 0xFF and then read the byte which includes the shutdown bit. But be very careful. I would definitely not experiment with talking to the hub controller without having ssh enabled and the brightness command installed and tested, because if you do anything wrong you might end up with a very low brightness, or even a turned off screen, which cannot be corrected by just powering down and booting up again.