Pi-Top 2 memory map
Colin Ferris (399) 1814 posts |
Is there anyway of finding out where the battery life info is in the memory map of a Pi-Top 2? Podule space! |
Andrew Conroy (370) 740 posts |
I suspect it’s not ‘in the memory map’. On the Pi-Top 1, battery life info etc. was requested by talking to the battery management chip via I2C. I presume it’s the same on the Pi-Top 2 except they use a different chip and so far haven’t published the spec for how to talk to it (despite saying they had done, and linking to a non-existent page on SorceForge). |
Jon Abbott (1421) 2651 posts |
I seem to recall querying all the I2C addresses to see what responded to find the address for the battery on the original pi-top. If the Debian source is anything to go by its on I2C address &10 and the registers are as follows:
You could try downloading my “pi-top utilities”https://forums.jaspp.org.uk/forum/viewforum.php?f=28 and modify !pi-topUtils.!Runimage, the I2C address and registers are all at the top. |
Jon Abbott (1421) 2651 posts |
I spotted more info is now available on the GitHub page, it looks like they’ve learned the error of their ways and ditched SPI for pi-topHUB v2. Querying the battery should no longer run the risk of putting the hub into an indeterminate state. They’ve also changed pi-topSPEAKER v2 which has a different I2C address and only one this time, instead of up to three. I’ve not looked to see if it’s now mono only. Interestingly the drivers are all written in Python, so no hardware drivers required. RISCOS will still require an HID driver as HID is not something the OS natively supports. |
Chris Evans (457) 1614 posts |
Watch this space for an announcement re pi-top v2 RISC OS monitoring of battery, turning power off, speaker enabling etc.. |
Timo Hartong (2813) 204 posts |
Hi Jon Abbott I changed the source of your pi-top program. It now displays the numbers as it should. Can I send the updated program to you ( if you give me you your contact details ) |
Andrew Conroy (370) 740 posts |
In the absence of Chris posting, I’d better say that CJE /4D now have battery management, screen brightness, power control and speaker enabling software available here: http://cjemicros.co.uk/products/4D-PITOP2-UPSKIT There is also a pi-top compatible RTC now available here: http://cjemicros.co.uk/products/4D-PITOP-RTC-U |
Jon Abbott (1421) 2651 posts |
Yes please (jon at jaspp dot org dot uk), I’m working on the next release as we speak with updates to handle alternative keyboard VID/PID used on the original pi-top, so I’ll roll your changes in.
If you’ve not already noticed, the BASIC code executes a script file (the one bundled with the original driver) to initialise the speaker(s) and the Module the controls the volume from inside the HID driver. Assuming the new driver also has a script, you might be able to just drop it in to get the speaker working.
No, I’ve just read the specification and believe it’s a Pi GPIO board, so is probably covered elsewhere by standard GPIO access. I don’t think it needs a bespoke driver. |
Timo Hartong (2813) 204 posts |
1) I will do hopefully today |
Timo Hartong (2813) 204 posts |
Hi Jon, I just send to you the file. Please let me know if you have received it ( with attachment ;-)). Yours, |
Jon Abbott (1421) 2651 posts |
Received and merged in. If you hop over to the JASPP forum I’ve posted a build for you to test. As I’m currently looking at adding support for the various keyboards pi-top used, its also worth testing the HID driver to see if its compatible with the pi-top2 keyboard. |