<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[Waveshare 4.2b e-Ink, libraries not working?]]></title><description><![CDATA[<p dir="auto">Hi,<br />
I'm trying to use the Red / Black Waveshare 4.2&quot; e-Ink display with a WiPy. I tried the ayoy and mcauser libraries and got both running without errors after some changes (different SPI syntax, etc.).<br />
However, both libraries produce more or less random images. The mcauser one displays either random noise or solid colors, while the ayoy one colors half the screen black, the other half white, then fades both to 50% grey and adds red to the left half.</p>
<p dir="auto">Is there any proven working library for the 4.2b waveshare Display, or is there any obvious solution to my problems?</p>
]]></description><link>https://forum.pycom.io/topic/5265/waveshare-4-2b-e-ink-libraries-not-working</link><generator>RSS for Node</generator><lastBuildDate>Sat, 10 Oct 2026 10:39:56 GMT</lastBuildDate><atom:link href="https://forum.pycom.io/topic/5265.rss" rel="self" type="application/rss+xml"/><pubDate>Tue, 08 Oct 2019 15:39:27 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Waveshare 4.2b e-Ink, libraries not working? on Tue, 08 Oct 2019 15:39:27 GMT]]></title><description><![CDATA[<p dir="auto">Hi,<br />
I'm trying to use the Red / Black Waveshare 4.2&quot; e-Ink display with a WiPy. I tried the ayoy and mcauser libraries and got both running without errors after some changes (different SPI syntax, etc.).<br />
However, both libraries produce more or less random images. The mcauser one displays either random noise or solid colors, while the ayoy one colors half the screen black, the other half white, then fades both to 50% grey and adds red to the left half.</p>
<p dir="auto">Is there any proven working library for the 4.2b waveshare Display, or is there any obvious solution to my problems?</p>
]]></description><link>https://forum.pycom.io/post/29723</link><guid isPermaLink="true">https://forum.pycom.io/post/29723</guid><dc:creator><![CDATA[Peter Ehses]]></dc:creator><pubDate>Tue, 08 Oct 2019 15:39:27 GMT</pubDate></item><item><title><![CDATA[Reply to Waveshare 4.2b e-Ink, libraries not working? on Tue, 08 Oct 2019 16:03:09 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="https://forum.pycom.io/uid/5237">@Peter-Ehses</a> Look at the repositories of this guy: <a href="https://github.com/mcauser/micropython-waveshare-epaper" target="_blank" rel="noopener noreferrer nofollow">https://github.com/mcauser/micropython-waveshare-epaper</a><br />
He seems to have dedicated a lot of time to e-paper displays</p>
]]></description><link>https://forum.pycom.io/post/29725</link><guid isPermaLink="true">https://forum.pycom.io/post/29725</guid><dc:creator><![CDATA[robert-hh]]></dc:creator><pubDate>Tue, 08 Oct 2019 16:03:09 GMT</pubDate></item><item><title><![CDATA[Reply to Waveshare 4.2b e-Ink, libraries not working? on Tue, 08 Oct 2019 16:05:12 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="https://forum.pycom.io/uid/98">@robert-hh</a> as I wrote above, I have, and his library shows either random noise or solid colors.<br />
Thanks for the help, though.</p>
]]></description><link>https://forum.pycom.io/post/29726</link><guid isPermaLink="true">https://forum.pycom.io/post/29726</guid><dc:creator><![CDATA[Peter Ehses]]></dc:creator><pubDate>Tue, 08 Oct 2019 16:05:12 GMT</pubDate></item><item><title><![CDATA[Reply to Waveshare 4.2b e-Ink, libraries not working? on Tue, 08 Oct 2019 16:06:46 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="https://forum.pycom.io/uid/5237">@Peter-Ehses</a> You may raise an issue in his repository. I'm sure he will respond.</p>
]]></description><link>https://forum.pycom.io/post/29727</link><guid isPermaLink="true">https://forum.pycom.io/post/29727</guid><dc:creator><![CDATA[robert-hh]]></dc:creator><pubDate>Tue, 08 Oct 2019 16:06:46 GMT</pubDate></item><item><title><![CDATA[Reply to Waveshare 4.2b e-Ink, libraries not working? on Tue, 08 Oct 2019 16:23:27 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="https://forum.pycom.io/uid/98">@robert-hh</a> there is one for the same behavior on a different size, from 5 months ago. not solved, though. <a href="https://github.com/mcauser/micropython-waveshare-epaper/issues/5" target="_blank" rel="noopener noreferrer nofollow">https://github.com/mcauser/micropython-waveshare-epaper/issues/5</a></p>
]]></description><link>https://forum.pycom.io/post/29728</link><guid isPermaLink="true">https://forum.pycom.io/post/29728</guid><dc:creator><![CDATA[Peter Ehses]]></dc:creator><pubDate>Tue, 08 Oct 2019 16:23:27 GMT</pubDate></item><item><title><![CDATA[Reply to Waveshare 4.2b e-Ink, libraries not working? on Tue, 08 Oct 2019 17:20:46 GMT]]></title><description><![CDATA[<p dir="auto">For anyone having the same problem:</p>
<p dir="auto">For now these modifications to the ayoy library ( <a href="https://github.com/ayoy/micropython-waveshare-epd" target="_blank" rel="noopener noreferrer nofollow">https://github.com/ayoy/micropython-waveshare-epd</a> ) seem to be working for 4.2b displays:</p>
<p dir="auto">Display resolution is changed in these lines</p>
<pre><code>EPD_WIDTH       = 400
EPD_HEIGHT      = 300
</code></pre>
<p dir="auto">but the init codes need to be changed, too, in order for it to actually use the whole screen and not break lines after 200px (those codes are taken from waveshare's RPi python driver):</p>
<pre><code>def init(self):
        self.reset()
        self.send_command(BOOSTER_SOFT_START)
        self.send_data(0x17)
        self.send_data(0x17)
        self.send_data(0x17)
        self.send_command(POWER_ON)

        self.wait_until_idle()

        self.send_command(PANEL_SETTING)
        self.send_data(0x0F)
        # self.send_command(POWER_SETTING)
        # self.send_data(0x07)
        # self.send_data(0x00)
        # self.send_data(0x08)
        # self.send_data(0x00)
        # self.send_command(BOOSTER_SOFT_START)
        # self.send_data(0x07)
        # self.send_data(0x07)
        # self.send_data(0x07)
        # self.send_command(POWER_ON)
        #
        # self.wait_until_idle()
        #
        # self.send_command(PANEL_SETTING)
        # self.send_data(0xCF)
        # self.send_command(VCOM_AND_DATA_INTERVAL_SETTING)
        # self.send_data(0x17)
        # self.send_command(PLL_CONTROL)
        # self.send_data(0x39)
        # self.send_command(TCON_RESOLUTION)
        # self.send_data(0xC8)
        # self.send_data(0x00)
        # self.send_data(0xC8)
        # self.send_command(VCM_DC_SETTING_REGISTER)
        # self.send_data(0x0E)
        #
        # self.set_lut_bw()
        # self.set_lut_red()
        return 0
</code></pre>
<p dir="auto">then, the display_frame function, which actually sends your frame data to the display driver needs to be changed (this is the method used in the waveshare python driver and mcauser's library):</p>
<pre><code>def display_frame(self, frame_buffer_black, frame_buffer_red=None):
        if (frame_buffer_black != None):
            self.send_command(DATA_START_TRANSMISSION_1)
            self.delay_ms(2)
            for i in range(0, self.width * self.height // 8):
                self.send_data(frame_buffer_black[i])
                # temp = 0x00
                # for bit in range(0, 4):
                #     if (frame_buffer_black[i] &amp; (0x80 &gt;&gt; bit) != 0):
                #         temp |= 0xC0 &gt;&gt; (bit * 2)
                # self.send_data(temp)
                # temp = 0x00
                # for bit in range(4, 8):
                #     if (frame_buffer_black[i] &amp; (0x80 &gt;&gt; bit) != 0):
                #         temp |= 0xC0 &gt;&gt; ((bit - 4) * 2)
                # self.send_data(temp)
            self.delay_ms(2)
        if (frame_buffer_red != None):
            self.send_command(DATA_START_TRANSMISSION_2)
            self.delay_ms(2)
            for i in range(0, self.width * self.height // 8):
                self.send_data(frame_buffer_red[i])
            self.delay_ms(2)

        self.send_command(DISPLAY_REFRESH)
        self.wait_until_idle()
</code></pre>
<p dir="auto">now, you should have yourself a kinda working e-paper library.<br />
It's slow but it might be by design. cheers</p>
]]></description><link>https://forum.pycom.io/post/29730</link><guid isPermaLink="true">https://forum.pycom.io/post/29730</guid><dc:creator><![CDATA[Peter Ehses]]></dc:creator><pubDate>Tue, 08 Oct 2019 17:20:46 GMT</pubDate></item><item><title><![CDATA[Reply to Waveshare 4.2b e-Ink, libraries not working? on Tue, 08 Oct 2019 18:28:25 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="https://forum.pycom.io/uid/5237">@Peter-Ehses</a> i had a wavershare 4.2 b/w display in the drawer which I never used. Now I grabbed that and tested it with mcauser's lib. It worked immediately. I used a ESP32, like WiPy3, with the <a href="http://micropython.org" target="_blank" rel="noopener noreferrer nofollow">micropython.org</a> firmware.</p>
]]></description><link>https://forum.pycom.io/post/29731</link><guid isPermaLink="true">https://forum.pycom.io/post/29731</guid><dc:creator><![CDATA[robert-hh]]></dc:creator><pubDate>Tue, 08 Oct 2019 18:28:25 GMT</pubDate></item></channel></rss>