<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.geekworm.com/index.php?action=history&amp;feed=atom&amp;title=CommentStreams%3A1bc8235b86460d85f5d767079aae53bf</id>
	<title>CommentStreams:1bc8235b86460d85f5d767079aae53bf - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.geekworm.com/index.php?action=history&amp;feed=atom&amp;title=CommentStreams%3A1bc8235b86460d85f5d767079aae53bf"/>
	<link rel="alternate" type="text/html" href="https://wiki.geekworm.com/index.php?title=CommentStreams:1bc8235b86460d85f5d767079aae53bf&amp;action=history"/>
	<updated>2026-06-19T01:20:43Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.43.8</generator>
	<entry>
		<id>https://wiki.geekworm.com/index.php?title=CommentStreams:1bc8235b86460d85f5d767079aae53bf&amp;diff=33350&amp;oldid=prev</id>
		<title>37.170.87.133: Migrated comment #3831</title>
		<link rel="alternate" type="text/html" href="https://wiki.geekworm.com/index.php?title=CommentStreams:1bc8235b86460d85f5d767079aae53bf&amp;diff=33350&amp;oldid=prev"/>
		<updated>2023-07-19T16:44:41Z</updated>

		<summary type="html">&lt;p&gt;Migrated comment #3831&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;Hi, in the python battery code :&lt;br /&gt;
    def readVoltage(self):&lt;br /&gt;
        address = 0x36&lt;br /&gt;
        read = self._bus.read_word_data(address, 2)&lt;br /&gt;
        swapped = struct.unpack(&amp;quot;&amp;lt;H&amp;quot;, struct.pack(&amp;quot;&amp;gt;H&amp;quot;, read))[0]&lt;br /&gt;
        self.voltage = swapped * 1.25 / 1000 / 16&lt;br /&gt;
        return self.voltage&lt;br /&gt;
&lt;br /&gt;
    def readCapacity(self):&lt;br /&gt;
        address = 0x36&lt;br /&gt;
        read = self._bus.read_word_data(address, 4)&lt;br /&gt;
        swapped = struct.unpack(&amp;quot;&amp;lt;H&amp;quot;, struct.pack(&amp;quot;&amp;gt;H&amp;quot;, read))[0]&lt;br /&gt;
        self.capacity = swapped / 256&lt;br /&gt;
        if self.capacity &amp;gt; 100:&lt;br /&gt;
            self.capacity = 100&lt;br /&gt;
        return self.capacity&lt;br /&gt;
&lt;br /&gt;
what value i need to chnage to fit my battery spec ? Thank you !&amp;lt;!-- migrated from Comments; original IP: 37.170.87.133 --&amp;gt;&lt;/div&gt;</summary>
		<author><name>37.170.87.133</name></author>
	</entry>
</feed>