additional examples and doc update

pull/3/head
russhughes 2021-12-23 10:54:40 -08:00
rodzic 1f0d890f3f
commit 36b238cf7a
67 zmienionych plików z 2350 dodań i 4063 usunięć

Wyświetl plik

@ -1,4 +1,4 @@
# Sphinx build info version 1
# This file hashes the configuration used when building these files. When it is not found, a full rebuild will be done.
config: db5947919316628e816682c8ca6bb96d
config: c3ee77c984b40f5f1fa8edd7fd2d47af
tags: 645f666f9bcd5a90fca523b33c5a78b7

Wyświetl plik

@ -1,71 +1,31 @@
<!DOCTYPE html>
<html class="writer-html5" lang="en" >
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Overview: module code &mdash; st7789py 0.1.0 documentation</title>
<link rel="stylesheet" href="../_static/css/theme.css" type="text/css" />
<link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
<link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
<link rel="stylesheet" href="../_static/css/theme.css" type="text/css" />
<link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
<link rel="stylesheet" href="../_static/css/theme.css" type="text/css" />
<!--[if lt IE 9]>
<script src="../_static/js/html5shiv.min.js"></script>
<![endif]-->
<script type="text/javascript" id="documentation_options" data-url_root="../" src="../_static/documentation_options.js"></script>
<script data-url_root="../" id="documentation_options" src="../_static/documentation_options.js"></script>
<script src="../_static/jquery.js"></script>
<script src="../_static/underscore.js"></script>
<script src="../_static/doctools.js"></script>
<script type="text/javascript" src="../_static/js/theme.js"></script>
<script src="../_static/js/theme.js"></script>
<link rel="index" title="Index" href="../genindex.html" />
<link rel="search" title="Search" href="../search.html" />
</head>
<body class="wy-body-for-nav">
<body class="wy-body-for-nav">
<div class="wy-grid-for-nav">
<nav data-toggle="wy-nav-shift" class="wy-nav-side">
<div class="wy-side-scroll">
<div class="wy-side-nav-search" style="background: #2980B9" >
<a href="../index.html" class="icon icon-home"> st7789py
</a>
<div role="search">
<form id="rtd-search-form" class="wy-form" action="../search.html" method="get">
<input type="text" name="q" placeholder="Search docs" />
@ -73,30 +33,32 @@
<input type="hidden" name="area" value="default" />
</form>
</div>
</div>
<div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="main navigation">
</div><div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="Navigation menu">
<p class="caption" role="heading"><span class="caption-text">Contents:</span></p>
<ul>
<li class="toctree-l1"><a class="reference internal" href="../index.html">st7789py Driver</a></li>
<li class="toctree-l1"><a class="reference internal" href="../st7789py.html">st7789py Reference</a></li>
<li class="toctree-l1"><a class="reference internal" href="../examples.html">Example Programs</a><ul>
<li class="toctree-l2"><a class="reference internal" href="../examples.html#ttgo-lines-py">ttgo_lines.py</a></li>
<li class="toctree-l2"><a class="reference internal" href="../examples.html#ttgo-hello-py">ttgo_hello.py</a></li>
<li class="toctree-l2"><a class="reference internal" href="../examples.html#ttgo-fonts-py">ttgo_fonts.py</a></li>
<li class="toctree-l2"><a class="reference internal" href="../examples.html#ttgo-scroll-py">ttgo_scroll.py</a></li>
<li class="toctree-l2"><a class="reference internal" href="../examples.html#toasters-py">toasters.py</a></li>
<li class="toctree-l2"><a class="reference internal" href="../examples.html#chango-py">chango.py</a></li>
<li class="toctree-l2"><a class="reference internal" href="../examples.html#noto-fonts-py">noto_fonts.py</a></li>
<li class="toctree-l2"><a class="reference internal" href="../examples.html#x240-example-programs">320x240 Example Programs</a><ul>
<li class="toctree-l3"><a class="reference internal" href="../examples.html#x240-lines-py">320x240 lines.py</a></li>
<li class="toctree-l3"><a class="reference internal" href="../examples.html#x240-hello-py">320x240 hello.py</a></li>
<li class="toctree-l3"><a class="reference internal" href="../examples.html#x240-feathers-py">320x240 feathers.py</a></li>
<li class="toctree-l3"><a class="reference internal" href="../examples.html#x240-fonts-py">320x240 fonts.py</a></li>
<li class="toctree-l3"><a class="reference internal" href="../examples.html#x240-scroll-py">320x240 scroll.py</a></li>
<li class="toctree-l3"><a class="reference internal" href="../examples.html#x240-toasters-py">320x240 toasters.py</a></li>
</ul>
</li>
<li class="toctree-l2"><a class="reference internal" href="../examples.html#x240-ttgo-t-display-example-programs">135x240 TTGO T-Display Example Programs</a><ul>
<li class="toctree-l3"><a class="reference internal" href="../examples.html#lines-py">lines.py</a></li>
<li class="toctree-l3"><a class="reference internal" href="../examples.html#hello-py">hello.py</a></li>
<li class="toctree-l3"><a class="reference internal" href="../examples.html#feathers-py">feathers.py</a></li>
<li class="toctree-l3"><a class="reference internal" href="../examples.html#fonts-py">fonts.py</a></li>
<li class="toctree-l3"><a class="reference internal" href="../examples.html#scroll-py">scroll.py</a></li>
<li class="toctree-l3"><a class="reference internal" href="../examples.html#toasters-py">toasters.py</a></li>
<li class="toctree-l3"><a class="reference internal" href="../examples.html#chango-py">chango.py</a></li>
<li class="toctree-l3"><a class="reference internal" href="../examples.html#noto-fonts-py">noto_fonts.py</a></li>
</ul>
</li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="../fonts.html">Fonts</a><ul>
@ -110,111 +72,58 @@
</li>
</ul>
</div>
</div>
</nav>
<section data-toggle="wy-nav-shift" class="wy-nav-content-wrap">
<nav class="wy-nav-top" aria-label="top navigation">
<section data-toggle="wy-nav-shift" class="wy-nav-content-wrap"><nav class="wy-nav-top" aria-label="Mobile navigation menu" style="background: #2980B9" >
<i data-toggle="wy-nav-top" class="fa fa-bars"></i>
<a href="../index.html">st7789py</a>
</nav>
<div class="wy-nav-content">
<div class="rst-content style-external-links">
<div role="navigation" aria-label="breadcrumbs navigation">
<div role="navigation" aria-label="Page navigation">
<ul class="wy-breadcrumbs">
<li><a href="../index.html" class="icon icon-home"></a> &raquo;</li>
<li>Overview: module code</li>
<li class="wy-breadcrumbs-aside">
</li>
</ul>
<hr/>
</div>
<div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
<div itemprop="articleBody">
<h1>All modules for which code is available</h1>
<ul><li><a href="st7789py.html">st7789py</a></li>
</ul>
</div>
</div>
<footer>
<hr/>
<div role="contentinfo">
<p>
</p>
<p></p>
</div>
Built with <a href="https://www.sphinx-doc.org/">Sphinx</a> using a
Built with <a href="https://www.sphinx-doc.org/">Sphinx</a> using a
<a href="https://github.com/readthedocs/sphinx_rtd_theme">theme</a>
provided by <a href="https://readthedocs.org">Read the Docs</a>.
provided by <a href="https://readthedocs.org">Read the Docs</a>.
</footer>
</div>
</div>
</section>
</div>
<script type="text/javascript">
<script>
jQuery(function () {
SphinxRtdTheme.Navigation.enable(true);
});
</script>
</script>
</body>
</html>

Wyświetl plik

@ -1,71 +1,31 @@
<!DOCTYPE html>
<html class="writer-html5" lang="en" >
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>st7789py &mdash; st7789py 0.1.0 documentation</title>
<link rel="stylesheet" href="../_static/css/theme.css" type="text/css" />
<link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
<link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
<link rel="stylesheet" href="../_static/css/theme.css" type="text/css" />
<link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
<link rel="stylesheet" href="../_static/css/theme.css" type="text/css" />
<!--[if lt IE 9]>
<script src="../_static/js/html5shiv.min.js"></script>
<![endif]-->
<script type="text/javascript" id="documentation_options" data-url_root="../" src="../_static/documentation_options.js"></script>
<script data-url_root="../" id="documentation_options" src="../_static/documentation_options.js"></script>
<script src="../_static/jquery.js"></script>
<script src="../_static/underscore.js"></script>
<script src="../_static/doctools.js"></script>
<script type="text/javascript" src="../_static/js/theme.js"></script>
<script src="../_static/js/theme.js"></script>
<link rel="index" title="Index" href="../genindex.html" />
<link rel="search" title="Search" href="../search.html" />
</head>
<body class="wy-body-for-nav">
<body class="wy-body-for-nav">
<div class="wy-grid-for-nav">
<nav data-toggle="wy-nav-shift" class="wy-nav-side">
<div class="wy-side-scroll">
<div class="wy-side-nav-search" style="background: #2980B9" >
<a href="../index.html" class="icon icon-home"> st7789py
</a>
<div role="search">
<form id="rtd-search-form" class="wy-form" action="../search.html" method="get">
<input type="text" name="q" placeholder="Search docs" />
@ -73,30 +33,32 @@
<input type="hidden" name="area" value="default" />
</form>
</div>
</div>
<div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="main navigation">
</div><div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="Navigation menu">
<p class="caption" role="heading"><span class="caption-text">Contents:</span></p>
<ul>
<li class="toctree-l1"><a class="reference internal" href="../index.html">st7789py Driver</a></li>
<li class="toctree-l1"><a class="reference internal" href="../st7789py.html">st7789py Reference</a></li>
<li class="toctree-l1"><a class="reference internal" href="../examples.html">Example Programs</a><ul>
<li class="toctree-l2"><a class="reference internal" href="../examples.html#ttgo-lines-py">ttgo_lines.py</a></li>
<li class="toctree-l2"><a class="reference internal" href="../examples.html#ttgo-hello-py">ttgo_hello.py</a></li>
<li class="toctree-l2"><a class="reference internal" href="../examples.html#ttgo-fonts-py">ttgo_fonts.py</a></li>
<li class="toctree-l2"><a class="reference internal" href="../examples.html#ttgo-scroll-py">ttgo_scroll.py</a></li>
<li class="toctree-l2"><a class="reference internal" href="../examples.html#toasters-py">toasters.py</a></li>
<li class="toctree-l2"><a class="reference internal" href="../examples.html#chango-py">chango.py</a></li>
<li class="toctree-l2"><a class="reference internal" href="../examples.html#noto-fonts-py">noto_fonts.py</a></li>
<li class="toctree-l2"><a class="reference internal" href="../examples.html#x240-example-programs">320x240 Example Programs</a><ul>
<li class="toctree-l3"><a class="reference internal" href="../examples.html#x240-lines-py">320x240 lines.py</a></li>
<li class="toctree-l3"><a class="reference internal" href="../examples.html#x240-hello-py">320x240 hello.py</a></li>
<li class="toctree-l3"><a class="reference internal" href="../examples.html#x240-feathers-py">320x240 feathers.py</a></li>
<li class="toctree-l3"><a class="reference internal" href="../examples.html#x240-fonts-py">320x240 fonts.py</a></li>
<li class="toctree-l3"><a class="reference internal" href="../examples.html#x240-scroll-py">320x240 scroll.py</a></li>
<li class="toctree-l3"><a class="reference internal" href="../examples.html#x240-toasters-py">320x240 toasters.py</a></li>
</ul>
</li>
<li class="toctree-l2"><a class="reference internal" href="../examples.html#x240-ttgo-t-display-example-programs">135x240 TTGO T-Display Example Programs</a><ul>
<li class="toctree-l3"><a class="reference internal" href="../examples.html#lines-py">lines.py</a></li>
<li class="toctree-l3"><a class="reference internal" href="../examples.html#hello-py">hello.py</a></li>
<li class="toctree-l3"><a class="reference internal" href="../examples.html#feathers-py">feathers.py</a></li>
<li class="toctree-l3"><a class="reference internal" href="../examples.html#fonts-py">fonts.py</a></li>
<li class="toctree-l3"><a class="reference internal" href="../examples.html#scroll-py">scroll.py</a></li>
<li class="toctree-l3"><a class="reference internal" href="../examples.html#toasters-py">toasters.py</a></li>
<li class="toctree-l3"><a class="reference internal" href="../examples.html#chango-py">chango.py</a></li>
<li class="toctree-l3"><a class="reference internal" href="../examples.html#noto-fonts-py">noto_fonts.py</a></li>
</ul>
</li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="../fonts.html">Fonts</a><ul>
@ -110,69 +72,30 @@
</li>
</ul>
</div>
</div>
</nav>
<section data-toggle="wy-nav-shift" class="wy-nav-content-wrap">
<nav class="wy-nav-top" aria-label="top navigation">
<section data-toggle="wy-nav-shift" class="wy-nav-content-wrap"><nav class="wy-nav-top" aria-label="Mobile navigation menu" style="background: #2980B9" >
<i data-toggle="wy-nav-top" class="fa fa-bars"></i>
<a href="../index.html">st7789py</a>
</nav>
<div class="wy-nav-content">
<div class="rst-content style-external-links">
<div role="navigation" aria-label="breadcrumbs navigation">
<div role="navigation" aria-label="Page navigation">
<ul class="wy-breadcrumbs">
<li><a href="../index.html" class="icon icon-home"></a> &raquo;</li>
<li><a href="index.html">Module code</a> &raquo;</li>
<li>st7789py</li>
<li class="wy-breadcrumbs-aside">
</li>
</ul>
<hr/>
</div>
<div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
<div itemprop="articleBody">
<h1>Source code for st7789py</h1><div class="highlight"><pre>
<span></span><span class="sd">&quot;&quot;&quot;</span>
<span class="sd">Copyright (c) 2020, 2021 Russ Hughes</span>
@ -295,10 +218,10 @@
<span class="c1"># Rotation tables (width, height, xstart, ystart)[rotation % 4]</span>
<span class="n">WIDTH_320</span> <span class="o">=</span> <span class="p">[(</span><span class="mi">320</span><span class="p">,</span> <span class="mi">240</span><span class="p">,</span> <span class="mi">0</span><span class="p">,</span> <span class="mi">0</span><span class="p">),</span>
<span class="p">(</span><span class="mi">240</span><span class="p">,</span> <span class="mi">320</span><span class="p">,</span> <span class="mi">0</span><span class="p">,</span> <span class="mi">0</span><span class="p">),</span>
<span class="n">WIDTH_320</span> <span class="o">=</span> <span class="p">[(</span><span class="mi">240</span><span class="p">,</span> <span class="mi">320</span><span class="p">,</span> <span class="mi">0</span><span class="p">,</span> <span class="mi">0</span><span class="p">),</span>
<span class="p">(</span><span class="mi">320</span><span class="p">,</span> <span class="mi">240</span><span class="p">,</span> <span class="mi">0</span><span class="p">,</span> <span class="mi">0</span><span class="p">),</span>
<span class="p">(</span><span class="mi">240</span><span class="p">,</span> <span class="mi">320</span><span class="p">,</span> <span class="mi">0</span><span class="p">,</span> <span class="mi">0</span><span class="p">)]</span>
<span class="p">(</span><span class="mi">240</span><span class="p">,</span> <span class="mi">320</span><span class="p">,</span> <span class="mi">0</span><span class="p">,</span> <span class="mi">0</span><span class="p">),</span>
<span class="p">(</span><span class="mi">320</span><span class="p">,</span> <span class="mi">240</span><span class="p">,</span> <span class="mi">0</span><span class="p">,</span> <span class="mi">0</span><span class="p">)]</span>
<span class="n">WIDTH_240</span> <span class="o">=</span> <span class="p">[(</span><span class="mi">240</span><span class="p">,</span> <span class="mi">240</span><span class="p">,</span> <span class="mi">0</span><span class="p">,</span> <span class="mi">0</span><span class="p">),</span>
<span class="p">(</span><span class="mi">240</span><span class="p">,</span> <span class="mi">240</span><span class="p">,</span> <span class="mi">0</span><span class="p">,</span> <span class="mi">0</span><span class="p">),</span>
@ -656,10 +579,7 @@
<span class="n">dx</span> <span class="o">=</span> <span class="n">x1</span> <span class="o">-</span> <span class="n">x0</span>
<span class="n">dy</span> <span class="o">=</span> <span class="nb">abs</span><span class="p">(</span><span class="n">y1</span> <span class="o">-</span> <span class="n">y0</span><span class="p">)</span>
<span class="n">err</span> <span class="o">=</span> <span class="n">dx</span> <span class="o">//</span> <span class="mi">2</span>
<span class="k">if</span> <span class="n">y0</span> <span class="o">&lt;</span> <span class="n">y1</span><span class="p">:</span>
<span class="n">ystep</span> <span class="o">=</span> <span class="mi">1</span>
<span class="k">else</span><span class="p">:</span>
<span class="n">ystep</span> <span class="o">=</span> <span class="o">-</span><span class="mi">1</span>
<span class="n">ystep</span> <span class="o">=</span> <span class="mi">1</span> <span class="k">if</span> <span class="n">y0</span> <span class="o">&lt;</span> <span class="n">y1</span> <span class="k">else</span> <span class="o">-</span><span class="mi">1</span>
<span class="k">while</span> <span class="n">x0</span> <span class="o">&lt;=</span> <span class="n">x1</span><span class="p">:</span>
<span class="k">if</span> <span class="n">steep</span><span class="p">:</span>
<span class="bp">self</span><span class="o">.</span><span class="n">pixel</span><span class="p">(</span><span class="n">y0</span><span class="p">,</span> <span class="n">x0</span><span class="p">,</span> <span class="n">color</span><span class="p">)</span>
@ -828,14 +748,13 @@
<span class="ow">and</span> <span class="n">x0</span><span class="o">+</span><span class="n">font</span><span class="o">.</span><span class="n">WIDTH</span> <span class="o">&lt;=</span> <span class="bp">self</span><span class="o">.</span><span class="n">width</span>
<span class="ow">and</span> <span class="n">y0</span><span class="o">+</span><span class="n">font</span><span class="o">.</span><span class="n">HEIGHT</span> <span class="o">&lt;=</span> <span class="bp">self</span><span class="o">.</span><span class="n">height</span><span class="p">):</span>
<span class="n">each</span> <span class="o">=</span> <span class="mi">16</span>
<span class="k">if</span> <span class="n">font</span><span class="o">.</span><span class="n">HEIGHT</span> <span class="o">==</span> <span class="mi">16</span><span class="p">:</span>
<span class="n">passes</span> <span class="o">=</span> <span class="mi">2</span>
<span class="n">size</span> <span class="o">=</span> <span class="mi">32</span>
<span class="n">each</span> <span class="o">=</span> <span class="mi">16</span>
<span class="k">else</span><span class="p">:</span>
<span class="n">passes</span> <span class="o">=</span> <span class="mi">4</span>
<span class="n">size</span> <span class="o">=</span> <span class="mi">64</span>
<span class="n">each</span> <span class="o">=</span> <span class="mi">16</span>
<span class="k">for</span> <span class="n">line</span> <span class="ow">in</span> <span class="nb">range</span><span class="p">(</span><span class="n">passes</span><span class="p">):</span>
<span class="n">idx</span> <span class="o">=</span> <span class="p">(</span><span class="n">ch</span><span class="o">-</span><span class="n">font</span><span class="o">.</span><span class="n">FIRST</span><span class="p">)</span><span class="o">*</span><span class="n">size</span><span class="o">+</span><span class="p">(</span><span class="n">each</span><span class="o">*</span><span class="n">line</span><span class="p">)</span>
@ -1010,7 +929,7 @@
<span class="k">for</span> <span class="n">i</span> <span class="ow">in</span> <span class="nb">range</span><span class="p">(</span><span class="mi">0</span><span class="p">,</span> <span class="n">buffer_len</span><span class="p">,</span> <span class="mi">2</span><span class="p">):</span>
<span class="n">color_index</span> <span class="o">=</span> <span class="mi">0</span>
<span class="k">for</span> <span class="n">bit</span> <span class="ow">in</span> <span class="nb">range</span><span class="p">(</span><span class="n">bitmap</span><span class="o">.</span><span class="n">BPP</span><span class="p">):</span>
<span class="k">for</span> <span class="n">_</span> <span class="ow">in</span> <span class="nb">range</span><span class="p">(</span><span class="n">bitmap</span><span class="o">.</span><span class="n">BPP</span><span class="p">):</span>
<span class="n">color_index</span> <span class="o">&lt;&lt;=</span> <span class="mi">1</span>
<span class="n">color_index</span> <span class="o">|=</span> <span class="p">(</span><span class="n">bitmap</span><span class="o">.</span><span class="n">BITMAP</span><span class="p">[</span><span class="n">bs_bit</span> <span class="o">//</span> <span class="mi">8</span><span class="p">]</span>
<span class="o">&amp;</span> <span class="mi">1</span> <span class="o">&lt;&lt;</span> <span class="p">(</span><span class="mi">7</span> <span class="o">-</span> <span class="p">(</span><span class="n">bs_bit</span> <span class="o">%</span> <span class="mi">8</span><span class="p">)))</span> <span class="o">&gt;</span> <span class="mi">0</span>
@ -1076,7 +995,7 @@
<span class="n">to_row</span> <span class="o">=</span> <span class="n">y</span> <span class="o">+</span> <span class="n">font</span><span class="o">.</span><span class="n">HEIGHT</span> <span class="o">-</span> <span class="mi">1</span>
<span class="k">if</span> <span class="bp">self</span><span class="o">.</span><span class="n">width</span> <span class="o">&gt;</span> <span class="n">to_col</span> <span class="ow">and</span> <span class="bp">self</span><span class="o">.</span><span class="n">height</span> <span class="o">&gt;</span> <span class="n">to_row</span><span class="p">:</span>
<span class="bp">self</span><span class="o">.</span><span class="n">_set_window</span><span class="p">(</span><span class="n">x</span><span class="p">,</span> <span class="n">y</span><span class="p">,</span> <span class="n">to_col</span><span class="p">,</span> <span class="n">to_row</span><span class="p">)</span>
<span class="bp">self</span><span class="o">.</span><span class="n">_write</span><span class="p">(</span><span class="kc">None</span><span class="p">,</span> <span class="n">buffer</span><span class="p">[</span><span class="mi">0</span><span class="p">:</span><span class="n">buffer_needed</span><span class="p">])</span>
<span class="bp">self</span><span class="o">.</span><span class="n">_write</span><span class="p">(</span><span class="kc">None</span><span class="p">,</span> <span class="n">buffer</span><span class="p">[:</span><span class="n">buffer_needed</span><span class="p">])</span>
<span class="n">x</span> <span class="o">+=</span> <span class="n">char_width</span>
@ -1105,45 +1024,30 @@
</pre></div>
</div>
</div>
<footer>
<hr/>
<div role="contentinfo">
<p>
</p>
<p></p>
</div>
Built with <a href="https://www.sphinx-doc.org/">Sphinx</a> using a
Built with <a href="https://www.sphinx-doc.org/">Sphinx</a> using a
<a href="https://github.com/readthedocs/sphinx_rtd_theme">theme</a>
provided by <a href="https://readthedocs.org">Read the Docs</a>.
provided by <a href="https://readthedocs.org">Read the Docs</a>.
</footer>
</div>
</div>
</section>
</div>
<script type="text/javascript">
<script>
jQuery(function () {
SphinxRtdTheme.Navigation.enable(true);
});
</script>
</script>
</body>
</html>

Wyświetl plik

@ -1,39 +1,109 @@
****************
Example Programs
================
****************
320x240 Example Programs
========================
These examples run on a ESP32 board with a 320x240 display. They are were tested using a SparkFun
ESP32 Thing and a Waveshare 2 inch LCD ST7789 Module. You may need to modify the pin use for your
device.
320x240 lines.py
----------------
.. literalinclude:: ../../examples/esp32_320x240/lines.py
:linenos:
:language: python
320x240 hello.py
-----------------
.. literalinclude:: ../../examples/esp32_320x240/hello.py
:linenos:
:language: python
320x240 feathers.py
-------------------
.. literalinclude:: ../../examples/esp32_320x240/feathers.py
:linenos:
:language: python
320x240 fonts.py
----------------
.. literalinclude:: ../../examples/esp32_320x240/fonts.py
:linenos:
:language: python
320x240 scroll.py
-----------------
.. literalinclude:: ../../examples/esp32_320x240/scroll.py
:linenos:
:language: python
320x240 toasters.py
-------------------
Flying toasters sprite demo using bitmaps created from spritesheet using the sprites2bitmap.py
utility. See the maketoast shell script for the command line used to create the toast_bitmaps.py from the
toasters.bmp image.
.. literalinclude:: ../../examples/esp32_320x240/toasters/toasters.py
:linenos:
:language: python
135x240 TTGO T-Display Example Programs
=======================================
These examples run on the LilyGo TTGO-T-Display available from the usual
locations. See https://github.com/Xinyuan-LilyGO/TTGO-T-Display for more
information.
ttgo_lines.py
-------------
lines.py
--------
.. literalinclude:: ../../examples/ttgo_lines.py
.. literalinclude:: ../../examples/ttgo_tdisplay/lines.py
:linenos:
:language: python
ttgo_hello.py
-------------
hello.py
--------
.. literalinclude:: ../../examples/ttgo_hello.py
.. literalinclude:: ../../examples/ttgo_tdisplay/hello.py
:linenos:
:language: python
feathers.py
-----------
.. literalinclude:: ../../examples/ttgo_tdisplay/feathers.py
:linenos:
:language: python
ttgo_fonts.py
-------------
fonts.py
--------
.. literalinclude:: ../../examples/ttgo_fonts.py
.. literalinclude:: ../../examples/ttgo_tdisplay/fonts.py
:linenos:
:language: python
ttgo_scroll.py
--------------
scroll.py
---------
.. literalinclude:: ../../examples/ttgo_scroll.py
.. literalinclude:: ../../examples/ttgo_tdisplay/scroll.py
:linenos:
:language: python
@ -41,10 +111,11 @@ ttgo_scroll.py
toasters.py
-----------
Flying toasters sprite demo using bitmaps created from spritesheet using
ImageMagick's convert and imgtobitmap.py utility. See the maketoast script in the utils directory for details.
Flying toasters sprite demo using bitmaps created from spritesheet using the imgtobitmap.py utility.
See the maketoast script in the utils directory for details. See the 320x240 toasters example for
a more advanced example that uses the sprites2bitmap utility and indexed bitmaps.
.. literalinclude:: ../../examples/toasters/toasters.py
.. literalinclude:: ../../examples/ttgo_tdisplay/toasters/toasters.py
:linenos:
:language: python
@ -55,7 +126,7 @@ chango.py
Test for font2bitmap converter for the driver.
See the font2bitmap program in the utils directory.
.. literalinclude:: ../../examples/truetype/chango.py
.. literalinclude:: ../../examples/ttgo_tdisplay/truetype/chango.py
:linenos:
:language: python
@ -66,7 +137,7 @@ noto_fonts.py
Test for font2bitmap converter for the driver.
See the font2bitmap program in the utils directory.
.. literalinclude:: ../../examples/truetype/noto_fonts.py
.. literalinclude:: ../../examples/ttgo_tdisplay/truetype/noto_fonts.py
:linenos:
:language: python

Wyświetl plik

@ -731,8 +731,9 @@ dl.glossary dt {
.classifier:before {
font-style: normal;
margin: 0.5em;
margin: 0 0.5em;
content: ":";
display: inline-block;
}
abbr, acronym {

File diff suppressed because one or more lines are too long

Plik binarny nie jest wyświetlany.

Plik binarny nie jest wyświetlany.

Plik binarny nie jest wyświetlany.

Plik binarny nie jest wyświetlany.

Plik binarny nie jest wyświetlany.

Plik binarny nie jest wyświetlany.

Plik binarny nie jest wyświetlany.

Plik binarny nie jest wyświetlany.

Plik binarny nie jest wyświetlany.

Plik binarny nie jest wyświetlany.

Plik binarny nie jest wyświetlany.

Plik binarny nie jest wyświetlany.

Plik binarny nie jest wyświetlany.

Plik binarny nie jest wyświetlany.

Plik binarny nie jest wyświetlany.

Plik binarny nie jest wyświetlany.

Plik binarny nie jest wyświetlany.

Plik binarny nie jest wyświetlany.

Plik binarny nie jest wyświetlany.

Plik binarny nie jest wyświetlany.

Plik binarny nie jest wyświetlany.

Plik binarny nie jest wyświetlany.

Plik binarny nie jest wyświetlany.

Plik binarny nie jest wyświetlany.

Plik binarny nie jest wyświetlany.

Plik binarny nie jest wyświetlany.

Plik binarny nie jest wyświetlany.

Plik binarny nie jest wyświetlany.

Plik binarny nie jest wyświetlany.

Plik binarny nie jest wyświetlany.

Plik binarny nie jest wyświetlany.

Plik binarny nie jest wyświetlany.

Plik diff jest za duży Load Diff

Przed

Szerokość:  |  Wysokość:  |  Rozmiar: 434 KiB

Plik binarny nie jest wyświetlany.

Plik binarny nie jest wyświetlany.

Plik binarny nie jest wyświetlany.

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

Wyświetl plik

@ -282,7 +282,10 @@ var Search = {
complete: function(jqxhr, textstatus) {
var data = jqxhr.responseText;
if (data !== '' && data !== undefined) {
listItem.append(Search.makeSearchSummary(data, searchterms, hlterms));
var summary = Search.makeSearchSummary(data, searchterms, hlterms);
if (summary) {
listItem.append(summary);
}
}
Search.output.append(listItem);
setTimeout(function() {
@ -325,7 +328,9 @@ var Search = {
var results = [];
for (var prefix in objects) {
for (var name in objects[prefix]) {
for (var iMatch = 0; iMatch != objects[prefix].length; ++iMatch) {
var match = objects[prefix][iMatch];
var name = match[4];
var fullname = (prefix ? prefix + '.' : '') + name;
var fullnameLower = fullname.toLowerCase()
if (fullnameLower.indexOf(object) > -1) {
@ -339,7 +344,6 @@ var Search = {
} else if (parts[parts.length - 1].indexOf(object) > -1) {
score += Scorer.objPartialMatch;
}
var match = objects[prefix][name];
var objname = objnames[match[1]][2];
var title = titles[match[0]];
// If more than one term searched for, we require other words to be
@ -498,6 +502,9 @@ var Search = {
*/
makeSearchSummary : function(htmlText, keywords, hlwords) {
var text = Search.htmlToText(htmlText);
if (text == "") {
return null;
}
var textLower = text.toLowerCase();
var start = 0;
$.each(keywords, function() {

Plik diff jest za duży Load Diff

Wyświetl plik

@ -1,72 +1,33 @@
<!DOCTYPE html>
<html class="writer-html5" lang="en" >
<head>
<meta charset="utf-8" />
<meta charset="utf-8" /><meta name="generator" content="Docutils 0.17.1: http://docutils.sourceforge.net/" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Fonts &mdash; st7789py 0.1.0 documentation</title>
<link rel="stylesheet" href="_static/css/theme.css" type="text/css" />
<link rel="stylesheet" href="_static/pygments.css" type="text/css" />
<link rel="stylesheet" href="_static/pygments.css" type="text/css" />
<link rel="stylesheet" href="_static/css/theme.css" type="text/css" />
<link rel="stylesheet" href="_static/pygments.css" type="text/css" />
<link rel="stylesheet" href="_static/css/theme.css" type="text/css" />
<!--[if lt IE 9]>
<script src="_static/js/html5shiv.min.js"></script>
<![endif]-->
<script type="text/javascript" id="documentation_options" data-url_root="./" src="_static/documentation_options.js"></script>
<script data-url_root="./" id="documentation_options" src="_static/documentation_options.js"></script>
<script src="_static/jquery.js"></script>
<script src="_static/underscore.js"></script>
<script src="_static/doctools.js"></script>
<script type="text/javascript" src="_static/js/theme.js"></script>
<script src="_static/js/theme.js"></script>
<link rel="index" title="Index" href="genindex.html" />
<link rel="search" title="Search" href="search.html" />
<link rel="prev" title="Example Programs" href="examples.html" />
</head>
<body class="wy-body-for-nav">
<body class="wy-body-for-nav">
<div class="wy-grid-for-nav">
<nav data-toggle="wy-nav-shift" class="wy-nav-side">
<div class="wy-side-scroll">
<div class="wy-side-nav-search" style="background: #2980B9" >
<a href="index.html" class="icon icon-home"> st7789py
</a>
<div role="search">
<form id="rtd-search-form" class="wy-form" action="search.html" method="get">
<input type="text" name="q" placeholder="Search docs" />
@ -74,30 +35,32 @@
<input type="hidden" name="area" value="default" />
</form>
</div>
</div>
<div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="main navigation">
</div><div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="Navigation menu">
<p class="caption" role="heading"><span class="caption-text">Contents:</span></p>
<ul class="current">
<li class="toctree-l1"><a class="reference internal" href="index.html">st7789py Driver</a></li>
<li class="toctree-l1"><a class="reference internal" href="st7789py.html">st7789py Reference</a></li>
<li class="toctree-l1"><a class="reference internal" href="examples.html">Example Programs</a><ul>
<li class="toctree-l2"><a class="reference internal" href="examples.html#ttgo-lines-py">ttgo_lines.py</a></li>
<li class="toctree-l2"><a class="reference internal" href="examples.html#ttgo-hello-py">ttgo_hello.py</a></li>
<li class="toctree-l2"><a class="reference internal" href="examples.html#ttgo-fonts-py">ttgo_fonts.py</a></li>
<li class="toctree-l2"><a class="reference internal" href="examples.html#ttgo-scroll-py">ttgo_scroll.py</a></li>
<li class="toctree-l2"><a class="reference internal" href="examples.html#toasters-py">toasters.py</a></li>
<li class="toctree-l2"><a class="reference internal" href="examples.html#chango-py">chango.py</a></li>
<li class="toctree-l2"><a class="reference internal" href="examples.html#noto-fonts-py">noto_fonts.py</a></li>
<li class="toctree-l2"><a class="reference internal" href="examples.html#x240-example-programs">320x240 Example Programs</a><ul>
<li class="toctree-l3"><a class="reference internal" href="examples.html#x240-lines-py">320x240 lines.py</a></li>
<li class="toctree-l3"><a class="reference internal" href="examples.html#x240-hello-py">320x240 hello.py</a></li>
<li class="toctree-l3"><a class="reference internal" href="examples.html#x240-feathers-py">320x240 feathers.py</a></li>
<li class="toctree-l3"><a class="reference internal" href="examples.html#x240-fonts-py">320x240 fonts.py</a></li>
<li class="toctree-l3"><a class="reference internal" href="examples.html#x240-scroll-py">320x240 scroll.py</a></li>
<li class="toctree-l3"><a class="reference internal" href="examples.html#x240-toasters-py">320x240 toasters.py</a></li>
</ul>
</li>
<li class="toctree-l2"><a class="reference internal" href="examples.html#x240-ttgo-t-display-example-programs">135x240 TTGO T-Display Example Programs</a><ul>
<li class="toctree-l3"><a class="reference internal" href="examples.html#lines-py">lines.py</a></li>
<li class="toctree-l3"><a class="reference internal" href="examples.html#hello-py">hello.py</a></li>
<li class="toctree-l3"><a class="reference internal" href="examples.html#feathers-py">feathers.py</a></li>
<li class="toctree-l3"><a class="reference internal" href="examples.html#fonts-py">fonts.py</a></li>
<li class="toctree-l3"><a class="reference internal" href="examples.html#scroll-py">scroll.py</a></li>
<li class="toctree-l3"><a class="reference internal" href="examples.html#toasters-py">toasters.py</a></li>
<li class="toctree-l3"><a class="reference internal" href="examples.html#chango-py">chango.py</a></li>
<li class="toctree-l3"><a class="reference internal" href="examples.html#noto-fonts-py">noto_fonts.py</a></li>
</ul>
</li>
</ul>
</li>
<li class="toctree-l1 current"><a class="current reference internal" href="#">Fonts</a><ul>
@ -111,81 +74,40 @@
</li>
</ul>
</div>
</div>
</nav>
<section data-toggle="wy-nav-shift" class="wy-nav-content-wrap">
<nav class="wy-nav-top" aria-label="top navigation">
<section data-toggle="wy-nav-shift" class="wy-nav-content-wrap"><nav class="wy-nav-top" aria-label="Mobile navigation menu" style="background: #2980B9" >
<i data-toggle="wy-nav-top" class="fa fa-bars"></i>
<a href="index.html">st7789py</a>
</nav>
<div class="wy-nav-content">
<div class="rst-content style-external-links">
<div role="navigation" aria-label="breadcrumbs navigation">
<div role="navigation" aria-label="Page navigation">
<ul class="wy-breadcrumbs">
<li><a href="index.html" class="icon icon-home"></a> &raquo;</li>
<li>Fonts</li>
<li class="wy-breadcrumbs-aside">
<a href="_sources/fonts.rst.txt" rel="nofollow"> View page source</a>
</li>
</ul>
<hr/>
</div>
<div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
<div itemprop="articleBody">
<div class="section" id="fonts">
<h1>Fonts<a class="headerlink" href="#fonts" title="Permalink to this headline"></a></h1>
<section id="fonts">
<h1>Fonts<a class="headerlink" href="#fonts" title="Permalink to this headline"></a></h1>
<p>Two type of fonts are supported by this driver fixed size bitmap fonts
converted from PC Bios images using the font_from_romfont utility and fixed or proportional fonts converted from True-Type fonts using the font2bitmap utility.</p>
<p>The rom fonts are available in 128 and 256 PC character sets in 8x8, 8x16, 16x6 and 16x32 pixel sizes. They written using the text method.</p>
<p>The True-Type fonts can be converted to any size as long as the widest
character is 256 pixels or less. They are written using the write method.</p>
<p>Pre-compiling the font files to .mpy files will significantly reduce the memory required for the fonts.</p>
<div class="section" id="rom-font-conversion">
<h2>Rom Font Conversion<a class="headerlink" href="#rom-font-conversion" title="Permalink to this headline"></a></h2>
<section id="rom-font-conversion">
<h2>Rom Font Conversion<a class="headerlink" href="#rom-font-conversion" title="Permalink to this headline"></a></h2>
<p>The <cite>utils</cite> directory contains the font_from_romfont.py program used to convert PC BIOS bitmap fonts from the font-bin directory of spaceraces
<a class="reference external" href="https://github.com/spacerace/romfont">https://github.com/spacerace/romfont</a> repo.</p>
<p>The utility converts all romfont bin files in the specified -input-directory (-i) and writes python font files to the specified -output-directory (-o).</p>
@ -195,7 +117,7 @@ character is 256 pixels or less. They are written using the write method.</p>
<div><p>font_from_romfont -i font-bin -o fonts -f 32 -l 127</p>
</div></blockquote>
<div class="literal-block-wrapper docutils container" id="id2">
<div class="code-block-caption"><span class="caption-text">Sample converted romfont font module.</span><a class="headerlink" href="#id2" title="Permalink to this code"></a></div>
<div class="code-block-caption"><span class="caption-text">Sample converted romfont font module.</span><a class="headerlink" href="#id2" title="Permalink to this code"></a></div>
<div class="highlight-python notranslate"><div class="highlight"><pre><span></span><span class="linenos"> 1</span><span class="sd">&quot;&quot;&quot;converted from vga_8x8.bin &quot;&quot;&quot;</span>
<span class="linenos"> 2</span>
<span class="linenos"> 3</span><span class="c1"># font width</span>
@ -226,9 +148,9 @@ character is 256 pixels or less. They are written using the write method.</p>
</pre></div>
</div>
</div>
</div>
<div class="section" id="true-type-font-conversion">
<h2>True-Type Font Conversion<a class="headerlink" href="#true-type-font-conversion" title="Permalink to this headline"></a></h2>
</section>
<section id="true-type-font-conversion">
<h2>True-Type Font Conversion<a class="headerlink" href="#true-type-font-conversion" title="Permalink to this headline"></a></h2>
<p>The <cite>utils</cite> directory contains the <cite>font2bitmap.py</cite> program used to convert True-Type font into bitmap font modules. Use the -h option to see details of the available options. The <cite>font2bitmap.py</cite> program uses font handling classes from Dan Bader blog post on using freetype
<a class="reference external" href="http://dbader.org/blog/monochrome-font-rendering-with-freetype-and-python">http://dbader.org/blog/monochrome-font-rendering-with-freetype-and-python</a> and
the negative glyph.left fix from peterhinchs font conversion program
@ -240,7 +162,7 @@ the negative glyph.left fix from peterhinchs font conversion program
<li><p>./font2bitmap.py Chango-Regular.ttf 16 -c 0x20-0x7f</p></li>
</ul>
<div class="literal-block-wrapper docutils container" id="id3">
<div class="code-block-caption"><span class="caption-text">Sample converted TrueType font module.</span><a class="headerlink" href="#id3" title="Permalink to this code"></a></div>
<div class="code-block-caption"><span class="caption-text">Sample converted TrueType font module.</span><a class="headerlink" href="#id3" title="Permalink to this code"></a></div>
<div class="highlight-python notranslate"><div class="highlight"><pre><span></span><span class="linenos"> 1</span><span class="c1"># -*- coding: utf-8 -*-</span>
<span class="linenos"> 2</span><span class="c1"># Converted from Chango-Regular.ttf using:</span>
<span class="linenos"> 3</span><span class="c1"># ./font2bitmap.py Chango-Regular.ttf 16 -c 0x20-0x7f</span>
@ -291,149 +213,157 @@ the negative glyph.left fix from peterhinchs font conversion program
</pre></div>
</div>
</div>
</div>
<div class="section" id="x8-rom-fonts">
<h2>8x8 Rom Fonts<a class="headerlink" href="#x8-rom-fonts" title="Permalink to this headline"></a></h2>
<div class="figure align-center" id="id4">
</section>
<section id="x8-rom-fonts">
<h2>8x8 Rom Fonts<a class="headerlink" href="#x8-rom-fonts" title="Permalink to this headline"></a></h2>
<figure class="align-center" id="id4">
<img alt="_images/vga1_8x8.png" src="_images/vga1_8x8.png" />
<p class="caption"><span class="caption-text">vga1_8x8.py: 128 Character 8x8 Font</span><a class="headerlink" href="#id4" title="Permalink to this image"></a></p>
</div>
<figcaption>
<p><span class="caption-text">vga1_8x8.py: 128 Character 8x8 Font</span><a class="headerlink" href="#id4" title="Permalink to this image"></a></p>
</figcaption>
</figure>
<div class="line-block">
<div class="line"><br /></div>
</div>
<div class="figure align-center" id="id5">
<figure class="align-center" id="id5">
<img alt="_images/vga2_8x8.png" src="_images/vga2_8x8.png" />
<p class="caption"><span class="caption-text">vga2_8x8.py: 256 Character 8x8 Font</span><a class="headerlink" href="#id5" title="Permalink to this image"></a></p>
</div>
<figcaption>
<p><span class="caption-text">vga2_8x8.py: 256 Character 8x8 Font</span><a class="headerlink" href="#id5" title="Permalink to this image"></a></p>
</figcaption>
</figure>
<div class="line-block">
<div class="line"><br /></div>
</div>
</div>
<div class="section" id="x16-rom-fonts">
<h2>8x16 Rom Fonts<a class="headerlink" href="#x16-rom-fonts" title="Permalink to this headline"></a></h2>
<div class="figure align-center" id="id6">
</section>
<section id="x16-rom-fonts">
<h2>8x16 Rom Fonts<a class="headerlink" href="#x16-rom-fonts" title="Permalink to this headline"></a></h2>
<figure class="align-center" id="id6">
<img alt="_images/vga1_8x16.png" src="_images/vga1_8x16.png" />
<p class="caption"><span class="caption-text">vga1_8x16.py: 128 Character 8x16 Font</span><a class="headerlink" href="#id6" title="Permalink to this image"></a></p>
</div>
<figcaption>
<p><span class="caption-text">vga1_8x16.py: 128 Character 8x16 Font</span><a class="headerlink" href="#id6" title="Permalink to this image"></a></p>
</figcaption>
</figure>
<div class="line-block">
<div class="line"><br /></div>
</div>
<div class="figure align-center" id="id7">
<figure class="align-center" id="id7">
<img alt="_images/vga2_8x16.png" src="_images/vga2_8x16.png" />
<p class="caption"><span class="caption-text">vga2_8x16.py: 256 Character 8x16 Font</span><a class="headerlink" href="#id7" title="Permalink to this image"></a></p>
</div>
<figcaption>
<p><span class="caption-text">vga2_8x16.py: 256 Character 8x16 Font</span><a class="headerlink" href="#id7" title="Permalink to this image"></a></p>
</figcaption>
</figure>
<div class="line-block">
<div class="line"><br /></div>
</div>
</div>
<div class="section" id="id1">
<h2>16x16 Rom Fonts<a class="headerlink" href="#id1" title="Permalink to this headline"></a></h2>
<div class="figure align-center" id="id8">
</section>
<section id="id1">
<h2>16x16 Rom Fonts<a class="headerlink" href="#id1" title="Permalink to this headline"></a></h2>
<figure class="align-center" id="id8">
<img alt="_images/vga1_16x16.png" src="_images/vga1_16x16.png" />
<p class="caption"><span class="caption-text">vga1_16x16.py: 128 Character 16x16 Thin Font</span><a class="headerlink" href="#id8" title="Permalink to this image"></a></p>
</div>
<figcaption>
<p><span class="caption-text">vga1_16x16.py: 128 Character 16x16 Thin Font</span><a class="headerlink" href="#id8" title="Permalink to this image"></a></p>
</figcaption>
</figure>
<div class="line-block">
<div class="line"><br /></div>
</div>
<div class="figure align-center" id="id9">
<figure class="align-center" id="id9">
<img alt="_images/vga1_bold_16x16.png" src="_images/vga1_bold_16x16.png" />
<p class="caption"><span class="caption-text">vga1_bold_16x16.py: 128 Character 16x16 Bold Font</span><a class="headerlink" href="#id9" title="Permalink to this image"></a></p>
</div>
<figcaption>
<p><span class="caption-text">vga1_bold_16x16.py: 128 Character 16x16 Bold Font</span><a class="headerlink" href="#id9" title="Permalink to this image"></a></p>
</figcaption>
</figure>
<div class="line-block">
<div class="line"><br /></div>
</div>
<div class="figure align-center" id="id10">
<figure class="align-center" id="id10">
<img alt="_images/vga2_16x16.png" src="_images/vga2_16x16.png" />
<p class="caption"><span class="caption-text">vga2_16x16.py: 256 Character 16x16 Thin Font</span><a class="headerlink" href="#id10" title="Permalink to this image"></a></p>
</div>
<figcaption>
<p><span class="caption-text">vga2_16x16.py: 256 Character 16x16 Thin Font</span><a class="headerlink" href="#id10" title="Permalink to this image"></a></p>
</figcaption>
</figure>
<div class="line-block">
<div class="line"><br /></div>
</div>
<div class="figure align-center" id="id11">
<figure class="align-center" id="id11">
<img alt="_images/vga2_bold_16x16.png" src="_images/vga2_bold_16x16.png" />
<p class="caption"><span class="caption-text">vga2_bold_16x16.py: 256 Character 16x16 Bold Font</span><a class="headerlink" href="#id11" title="Permalink to this image"></a></p>
</div>
<figcaption>
<p><span class="caption-text">vga2_bold_16x16.py: 256 Character 16x16 Bold Font</span><a class="headerlink" href="#id11" title="Permalink to this image"></a></p>
</figcaption>
</figure>
<div class="line-block">
<div class="line"><br /></div>
</div>
</div>
<div class="section" id="x32-rom-fonts">
<h2>16x32 Rom Fonts<a class="headerlink" href="#x32-rom-fonts" title="Permalink to this headline"></a></h2>
<div class="figure align-center" id="id12">
</section>
<section id="x32-rom-fonts">
<h2>16x32 Rom Fonts<a class="headerlink" href="#x32-rom-fonts" title="Permalink to this headline"></a></h2>
<figure class="align-center" id="id12">
<img alt="_images/vga1_16x32.png" src="_images/vga1_16x32.png" />
<p class="caption"><span class="caption-text">vga1_16x32.py: 128 Character 16x32 Thin Font</span><a class="headerlink" href="#id12" title="Permalink to this image"></a></p>
</div>
<figcaption>
<p><span class="caption-text">vga1_16x32.py: 128 Character 16x32 Thin Font</span><a class="headerlink" href="#id12" title="Permalink to this image"></a></p>
</figcaption>
</figure>
<div class="line-block">
<div class="line"><br /></div>
</div>
<div class="figure align-center" id="id13">
<figure class="align-center" id="id13">
<img alt="_images/vga1_bold_16x32.png" src="_images/vga1_bold_16x32.png" />
<p class="caption"><span class="caption-text">vga1_bold_16x32.py: 128 Character 16x32 Bold Font</span><a class="headerlink" href="#id13" title="Permalink to this image"></a></p>
</div>
<figcaption>
<p><span class="caption-text">vga1_bold_16x32.py: 128 Character 16x32 Bold Font</span><a class="headerlink" href="#id13" title="Permalink to this image"></a></p>
</figcaption>
</figure>
<div class="line-block">
<div class="line"><br /></div>
</div>
<div class="figure align-center" id="id14">
<figure class="align-center" id="id14">
<img alt="_images/vga2_16x32.png" src="_images/vga2_16x32.png" />
<p class="caption"><span class="caption-text">vga2_16x32.py: 256 Character 16x32 Thin Font</span><a class="headerlink" href="#id14" title="Permalink to this image"></a></p>
</div>
<figcaption>
<p><span class="caption-text">vga2_16x32.py: 256 Character 16x32 Thin Font</span><a class="headerlink" href="#id14" title="Permalink to this image"></a></p>
</figcaption>
</figure>
<div class="line-block">
<div class="line"><br /></div>
</div>
<div class="figure align-center" id="id15">
<figure class="align-center" id="id15">
<img alt="_images/vga2_bold_16x32.png" src="_images/vga2_bold_16x32.png" />
<p class="caption"><span class="caption-text">vga2_bold_16x32.py: 256 Character 16x32 Bold Font</span><a class="headerlink" href="#id15" title="Permalink to this image"></a></p>
</div>
<figcaption>
<p><span class="caption-text">vga2_bold_16x32.py: 256 Character 16x32 Bold Font</span><a class="headerlink" href="#id15" title="Permalink to this image"></a></p>
</figcaption>
</figure>
<div class="line-block">
<div class="line"><br /></div>
</div>
</div>
</div>
</section>
</section>
</div>
</div>
<footer>
<div class="rst-footer-buttons" role="navigation" aria-label="footer navigation">
<footer><div class="rst-footer-buttons" role="navigation" aria-label="Footer">
<a href="examples.html" class="btn btn-neutral float-left" title="Example Programs" accesskey="p" rel="prev"><span class="fa fa-arrow-circle-left" aria-hidden="true"></span> Previous</a>
</div>
<hr/>
<div role="contentinfo">
<p>
</p>
<p></p>
</div>
Built with <a href="https://www.sphinx-doc.org/">Sphinx</a> using a
Built with <a href="https://www.sphinx-doc.org/">Sphinx</a> using a
<a href="https://github.com/readthedocs/sphinx_rtd_theme">theme</a>
provided by <a href="https://readthedocs.org">Read the Docs</a>.
provided by <a href="https://readthedocs.org">Read the Docs</a>.
</footer>
</div>
</div>
</section>
</div>
<script type="text/javascript">
<script>
jQuery(function () {
SphinxRtdTheme.Navigation.enable(true);
});
</script>
</script>
</body>
</html>

Wyświetl plik

@ -1,71 +1,31 @@
<!DOCTYPE html>
<html class="writer-html5" lang="en" >
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Index &mdash; st7789py 0.1.0 documentation</title>
<link rel="stylesheet" href="_static/css/theme.css" type="text/css" />
<link rel="stylesheet" href="_static/pygments.css" type="text/css" />
<link rel="stylesheet" href="_static/pygments.css" type="text/css" />
<link rel="stylesheet" href="_static/css/theme.css" type="text/css" />
<link rel="stylesheet" href="_static/pygments.css" type="text/css" />
<link rel="stylesheet" href="_static/css/theme.css" type="text/css" />
<!--[if lt IE 9]>
<script src="_static/js/html5shiv.min.js"></script>
<![endif]-->
<script type="text/javascript" id="documentation_options" data-url_root="./" src="_static/documentation_options.js"></script>
<script data-url_root="./" id="documentation_options" src="_static/documentation_options.js"></script>
<script src="_static/jquery.js"></script>
<script src="_static/underscore.js"></script>
<script src="_static/doctools.js"></script>
<script type="text/javascript" src="_static/js/theme.js"></script>
<script src="_static/js/theme.js"></script>
<link rel="index" title="Index" href="#" />
<link rel="search" title="Search" href="search.html" />
</head>
<body class="wy-body-for-nav">
<body class="wy-body-for-nav">
<div class="wy-grid-for-nav">
<nav data-toggle="wy-nav-shift" class="wy-nav-side">
<div class="wy-side-scroll">
<div class="wy-side-nav-search" style="background: #2980B9" >
<a href="index.html" class="icon icon-home"> st7789py
</a>
<div role="search">
<form id="rtd-search-form" class="wy-form" action="search.html" method="get">
<input type="text" name="q" placeholder="Search docs" />
@ -73,30 +33,32 @@
<input type="hidden" name="area" value="default" />
</form>
</div>
</div>
<div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="main navigation">
</div><div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="Navigation menu">
<p class="caption" role="heading"><span class="caption-text">Contents:</span></p>
<ul>
<li class="toctree-l1"><a class="reference internal" href="index.html">st7789py Driver</a></li>
<li class="toctree-l1"><a class="reference internal" href="st7789py.html">st7789py Reference</a></li>
<li class="toctree-l1"><a class="reference internal" href="examples.html">Example Programs</a><ul>
<li class="toctree-l2"><a class="reference internal" href="examples.html#ttgo-lines-py">ttgo_lines.py</a></li>
<li class="toctree-l2"><a class="reference internal" href="examples.html#ttgo-hello-py">ttgo_hello.py</a></li>
<li class="toctree-l2"><a class="reference internal" href="examples.html#ttgo-fonts-py">ttgo_fonts.py</a></li>
<li class="toctree-l2"><a class="reference internal" href="examples.html#ttgo-scroll-py">ttgo_scroll.py</a></li>
<li class="toctree-l2"><a class="reference internal" href="examples.html#toasters-py">toasters.py</a></li>
<li class="toctree-l2"><a class="reference internal" href="examples.html#chango-py">chango.py</a></li>
<li class="toctree-l2"><a class="reference internal" href="examples.html#noto-fonts-py">noto_fonts.py</a></li>
<li class="toctree-l2"><a class="reference internal" href="examples.html#x240-example-programs">320x240 Example Programs</a><ul>
<li class="toctree-l3"><a class="reference internal" href="examples.html#x240-lines-py">320x240 lines.py</a></li>
<li class="toctree-l3"><a class="reference internal" href="examples.html#x240-hello-py">320x240 hello.py</a></li>
<li class="toctree-l3"><a class="reference internal" href="examples.html#x240-feathers-py">320x240 feathers.py</a></li>
<li class="toctree-l3"><a class="reference internal" href="examples.html#x240-fonts-py">320x240 fonts.py</a></li>
<li class="toctree-l3"><a class="reference internal" href="examples.html#x240-scroll-py">320x240 scroll.py</a></li>
<li class="toctree-l3"><a class="reference internal" href="examples.html#x240-toasters-py">320x240 toasters.py</a></li>
</ul>
</li>
<li class="toctree-l2"><a class="reference internal" href="examples.html#x240-ttgo-t-display-example-programs">135x240 TTGO T-Display Example Programs</a><ul>
<li class="toctree-l3"><a class="reference internal" href="examples.html#lines-py">lines.py</a></li>
<li class="toctree-l3"><a class="reference internal" href="examples.html#hello-py">hello.py</a></li>
<li class="toctree-l3"><a class="reference internal" href="examples.html#feathers-py">feathers.py</a></li>
<li class="toctree-l3"><a class="reference internal" href="examples.html#fonts-py">fonts.py</a></li>
<li class="toctree-l3"><a class="reference internal" href="examples.html#scroll-py">scroll.py</a></li>
<li class="toctree-l3"><a class="reference internal" href="examples.html#toasters-py">toasters.py</a></li>
<li class="toctree-l3"><a class="reference internal" href="examples.html#chango-py">chango.py</a></li>
<li class="toctree-l3"><a class="reference internal" href="examples.html#noto-fonts-py">noto_fonts.py</a></li>
</ul>
</li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="fonts.html">Fonts</a><ul>
@ -110,69 +72,29 @@
</li>
</ul>
</div>
</div>
</nav>
<section data-toggle="wy-nav-shift" class="wy-nav-content-wrap">
<nav class="wy-nav-top" aria-label="top navigation">
<section data-toggle="wy-nav-shift" class="wy-nav-content-wrap"><nav class="wy-nav-top" aria-label="Mobile navigation menu" style="background: #2980B9" >
<i data-toggle="wy-nav-top" class="fa fa-bars"></i>
<a href="index.html">st7789py</a>
</nav>
<div class="wy-nav-content">
<div class="rst-content style-external-links">
<div role="navigation" aria-label="breadcrumbs navigation">
<div role="navigation" aria-label="Page navigation">
<ul class="wy-breadcrumbs">
<li><a href="index.html" class="icon icon-home"></a> &raquo;</li>
<li>Index</li>
<li class="wy-breadcrumbs-aside">
</li>
</ul>
<hr/>
</div>
<div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
<div itemprop="articleBody">
<h1 id="index">Index</h1>
@ -343,45 +265,30 @@
</div>
</div>
<footer>
<hr/>
<div role="contentinfo">
<p>
</p>
<p></p>
</div>
Built with <a href="https://www.sphinx-doc.org/">Sphinx</a> using a
Built with <a href="https://www.sphinx-doc.org/">Sphinx</a> using a
<a href="https://github.com/readthedocs/sphinx_rtd_theme">theme</a>
provided by <a href="https://readthedocs.org">Read the Docs</a>.
provided by <a href="https://readthedocs.org">Read the Docs</a>.
</footer>
</div>
</div>
</section>
</div>
<script type="text/javascript">
<script>
jQuery(function () {
SphinxRtdTheme.Navigation.enable(true);
});
</script>
</script>
</body>
</html>

Wyświetl plik

@ -1,72 +1,33 @@
<!DOCTYPE html>
<html class="writer-html5" lang="en" >
<head>
<meta charset="utf-8" />
<meta charset="utf-8" /><meta name="generator" content="Docutils 0.17.1: http://docutils.sourceforge.net/" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>st7789py Driver &mdash; st7789py 0.1.0 documentation</title>
<link rel="stylesheet" href="_static/css/theme.css" type="text/css" />
<link rel="stylesheet" href="_static/pygments.css" type="text/css" />
<link rel="stylesheet" href="_static/pygments.css" type="text/css" />
<link rel="stylesheet" href="_static/css/theme.css" type="text/css" />
<link rel="stylesheet" href="_static/pygments.css" type="text/css" />
<link rel="stylesheet" href="_static/css/theme.css" type="text/css" />
<!--[if lt IE 9]>
<script src="_static/js/html5shiv.min.js"></script>
<![endif]-->
<script type="text/javascript" id="documentation_options" data-url_root="./" src="_static/documentation_options.js"></script>
<script data-url_root="./" id="documentation_options" src="_static/documentation_options.js"></script>
<script src="_static/jquery.js"></script>
<script src="_static/underscore.js"></script>
<script src="_static/doctools.js"></script>
<script type="text/javascript" src="_static/js/theme.js"></script>
<script src="_static/js/theme.js"></script>
<link rel="index" title="Index" href="genindex.html" />
<link rel="search" title="Search" href="search.html" />
<link rel="next" title="st7789py Reference" href="st7789py.html" />
</head>
<body class="wy-body-for-nav">
<body class="wy-body-for-nav">
<div class="wy-grid-for-nav">
<nav data-toggle="wy-nav-shift" class="wy-nav-side">
<div class="wy-side-scroll">
<div class="wy-side-nav-search" style="background: #2980B9" >
<a href="#" class="icon icon-home"> st7789py
</a>
<div role="search">
<form id="rtd-search-form" class="wy-form" action="search.html" method="get">
<input type="text" name="q" placeholder="Search docs" />
@ -74,30 +35,32 @@
<input type="hidden" name="area" value="default" />
</form>
</div>
</div>
<div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="main navigation">
</div><div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="Navigation menu">
<p class="caption" role="heading"><span class="caption-text">Contents:</span></p>
<ul class="current">
<li class="toctree-l1 current"><a class="current reference internal" href="#">st7789py Driver</a></li>
<li class="toctree-l1"><a class="reference internal" href="st7789py.html">st7789py Reference</a></li>
<li class="toctree-l1"><a class="reference internal" href="examples.html">Example Programs</a><ul>
<li class="toctree-l2"><a class="reference internal" href="examples.html#ttgo-lines-py">ttgo_lines.py</a></li>
<li class="toctree-l2"><a class="reference internal" href="examples.html#ttgo-hello-py">ttgo_hello.py</a></li>
<li class="toctree-l2"><a class="reference internal" href="examples.html#ttgo-fonts-py">ttgo_fonts.py</a></li>
<li class="toctree-l2"><a class="reference internal" href="examples.html#ttgo-scroll-py">ttgo_scroll.py</a></li>
<li class="toctree-l2"><a class="reference internal" href="examples.html#toasters-py">toasters.py</a></li>
<li class="toctree-l2"><a class="reference internal" href="examples.html#chango-py">chango.py</a></li>
<li class="toctree-l2"><a class="reference internal" href="examples.html#noto-fonts-py">noto_fonts.py</a></li>
<li class="toctree-l2"><a class="reference internal" href="examples.html#x240-example-programs">320x240 Example Programs</a><ul>
<li class="toctree-l3"><a class="reference internal" href="examples.html#x240-lines-py">320x240 lines.py</a></li>
<li class="toctree-l3"><a class="reference internal" href="examples.html#x240-hello-py">320x240 hello.py</a></li>
<li class="toctree-l3"><a class="reference internal" href="examples.html#x240-feathers-py">320x240 feathers.py</a></li>
<li class="toctree-l3"><a class="reference internal" href="examples.html#x240-fonts-py">320x240 fonts.py</a></li>
<li class="toctree-l3"><a class="reference internal" href="examples.html#x240-scroll-py">320x240 scroll.py</a></li>
<li class="toctree-l3"><a class="reference internal" href="examples.html#x240-toasters-py">320x240 toasters.py</a></li>
</ul>
</li>
<li class="toctree-l2"><a class="reference internal" href="examples.html#x240-ttgo-t-display-example-programs">135x240 TTGO T-Display Example Programs</a><ul>
<li class="toctree-l3"><a class="reference internal" href="examples.html#lines-py">lines.py</a></li>
<li class="toctree-l3"><a class="reference internal" href="examples.html#hello-py">hello.py</a></li>
<li class="toctree-l3"><a class="reference internal" href="examples.html#feathers-py">feathers.py</a></li>
<li class="toctree-l3"><a class="reference internal" href="examples.html#fonts-py">fonts.py</a></li>
<li class="toctree-l3"><a class="reference internal" href="examples.html#scroll-py">scroll.py</a></li>
<li class="toctree-l3"><a class="reference internal" href="examples.html#toasters-py">toasters.py</a></li>
<li class="toctree-l3"><a class="reference internal" href="examples.html#chango-py">chango.py</a></li>
<li class="toctree-l3"><a class="reference internal" href="examples.html#noto-fonts-py">noto_fonts.py</a></li>
</ul>
</li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="fonts.html">Fonts</a><ul>
@ -111,73 +74,32 @@
</li>
</ul>
</div>
</div>
</nav>
<section data-toggle="wy-nav-shift" class="wy-nav-content-wrap">
<nav class="wy-nav-top" aria-label="top navigation">
<section data-toggle="wy-nav-shift" class="wy-nav-content-wrap"><nav class="wy-nav-top" aria-label="Mobile navigation menu" style="background: #2980B9" >
<i data-toggle="wy-nav-top" class="fa fa-bars"></i>
<a href="#">st7789py</a>
</nav>
<div class="wy-nav-content">
<div class="rst-content style-external-links">
<div role="navigation" aria-label="breadcrumbs navigation">
<div role="navigation" aria-label="Page navigation">
<ul class="wy-breadcrumbs">
<li><a href="#" class="icon icon-home"></a> &raquo;</li>
<li>st7789py Driver</li>
<li class="wy-breadcrumbs-aside">
<a href="_sources/index.rst.txt" rel="nofollow"> View page source</a>
</li>
</ul>
<hr/>
</div>
<div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
<div itemprop="articleBody">
<div class="section" id="st7789py-driver">
<h1>st7789py Driver<a class="headerlink" href="#st7789py-driver" title="Permalink to this headline"></a></h1>
<section id="st7789py-driver">
<h1>st7789py Driver<a class="headerlink" href="#st7789py-driver" title="Permalink to this headline"></a></h1>
<p>st7789 tft driver in MicroPython based on devbis st7789py_mpy module from
<a class="reference external" href="https://github.com/devbis/st7789py_mpy">https://github.com/devbis/st7789py_mpy</a>.</p>
<p>I added support for display rotation, scrolling and drawing text using 8 and 16
@ -189,13 +111,8 @@ bitmap fonts derived from classic pc text mode fonts.</p>
<li class="toctree-l1 current"><a class="current reference internal" href="#">st7789py Driver</a></li>
<li class="toctree-l1"><a class="reference internal" href="st7789py.html">st7789py Reference</a></li>
<li class="toctree-l1"><a class="reference internal" href="examples.html">Example Programs</a><ul>
<li class="toctree-l2"><a class="reference internal" href="examples.html#ttgo-lines-py">ttgo_lines.py</a></li>
<li class="toctree-l2"><a class="reference internal" href="examples.html#ttgo-hello-py">ttgo_hello.py</a></li>
<li class="toctree-l2"><a class="reference internal" href="examples.html#ttgo-fonts-py">ttgo_fonts.py</a></li>
<li class="toctree-l2"><a class="reference internal" href="examples.html#ttgo-scroll-py">ttgo_scroll.py</a></li>
<li class="toctree-l2"><a class="reference internal" href="examples.html#toasters-py">toasters.py</a></li>
<li class="toctree-l2"><a class="reference internal" href="examples.html#chango-py">chango.py</a></li>
<li class="toctree-l2"><a class="reference internal" href="examples.html#noto-fonts-py">noto_fonts.py</a></li>
<li class="toctree-l2"><a class="reference internal" href="examples.html#x240-example-programs">320x240 Example Programs</a></li>
<li class="toctree-l2"><a class="reference internal" href="examples.html#x240-ttgo-t-display-example-programs">135x240 TTGO T-Display Example Programs</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="fonts.html">Fonts</a><ul>
@ -209,58 +126,42 @@ bitmap fonts derived from classic pc text mode fonts.</p>
</li>
</ul>
</div>
</div>
<div class="section" id="index">
<h1>Index<a class="headerlink" href="#index" title="Permalink to this headline"></a></h1>
</section>
<section id="index">
<h1>Index<a class="headerlink" href="#index" title="Permalink to this headline"></a></h1>
<ul class="simple">
<li><p><a class="reference internal" href="genindex.html"><span class="std std-ref">Index</span></a></p></li>
</ul>
</div>
</section>
</div>
</div>
<footer>
<div class="rst-footer-buttons" role="navigation" aria-label="footer navigation">
<footer><div class="rst-footer-buttons" role="navigation" aria-label="Footer">
<a href="st7789py.html" class="btn btn-neutral float-right" title="st7789py Reference" accesskey="n" rel="next">Next <span class="fa fa-arrow-circle-right" aria-hidden="true"></span></a>
</div>
<hr/>
<div role="contentinfo">
<p>
</p>
<p></p>
</div>
Built with <a href="https://www.sphinx-doc.org/">Sphinx</a> using a
Built with <a href="https://www.sphinx-doc.org/">Sphinx</a> using a
<a href="https://github.com/readthedocs/sphinx_rtd_theme">theme</a>
provided by <a href="https://readthedocs.org">Read the Docs</a>.
provided by <a href="https://readthedocs.org">Read the Docs</a>.
</footer>
</div>
</div>
</section>
</div>
<script type="text/javascript">
<script>
jQuery(function () {
SphinxRtdTheme.Navigation.enable(true);
});
</script>
</script>
</body>
</html>

Plik binarny nie jest wyświetlany.

Wyświetl plik

@ -1,44 +1,20 @@
<!DOCTYPE html>
<html class="writer-html5" lang="en" >
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Python Module Index &mdash; st7789py 0.1.0 documentation</title>
<link rel="stylesheet" href="_static/css/theme.css" type="text/css" />
<link rel="stylesheet" href="_static/pygments.css" type="text/css" />
<link rel="stylesheet" href="_static/pygments.css" type="text/css" />
<link rel="stylesheet" href="_static/css/theme.css" type="text/css" />
<link rel="stylesheet" href="_static/pygments.css" type="text/css" />
<link rel="stylesheet" href="_static/css/theme.css" type="text/css" />
<!--[if lt IE 9]>
<script src="_static/js/html5shiv.min.js"></script>
<![endif]-->
<script type="text/javascript" id="documentation_options" data-url_root="./" src="_static/documentation_options.js"></script>
<script data-url_root="./" id="documentation_options" src="_static/documentation_options.js"></script>
<script src="_static/jquery.js"></script>
<script src="_static/underscore.js"></script>
<script src="_static/doctools.js"></script>
<script type="text/javascript" src="_static/js/theme.js"></script>
<script src="_static/js/theme.js"></script>
<link rel="index" title="Index" href="genindex.html" />
<link rel="search" title="Search" href="search.html" />
@ -50,29 +26,13 @@
</head>
<body class="wy-body-for-nav">
<body class="wy-body-for-nav">
<div class="wy-grid-for-nav">
<nav data-toggle="wy-nav-shift" class="wy-nav-side">
<div class="wy-side-scroll">
<div class="wy-side-nav-search" style="background: #2980B9" >
<a href="index.html" class="icon icon-home"> st7789py
</a>
<div role="search">
<form id="rtd-search-form" class="wy-form" action="search.html" method="get">
<input type="text" name="q" placeholder="Search docs" />
@ -80,30 +40,32 @@
<input type="hidden" name="area" value="default" />
</form>
</div>
</div>
<div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="main navigation">
</div><div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="Navigation menu">
<p class="caption" role="heading"><span class="caption-text">Contents:</span></p>
<ul>
<li class="toctree-l1"><a class="reference internal" href="index.html">st7789py Driver</a></li>
<li class="toctree-l1"><a class="reference internal" href="st7789py.html">st7789py Reference</a></li>
<li class="toctree-l1"><a class="reference internal" href="examples.html">Example Programs</a><ul>
<li class="toctree-l2"><a class="reference internal" href="examples.html#ttgo-lines-py">ttgo_lines.py</a></li>
<li class="toctree-l2"><a class="reference internal" href="examples.html#ttgo-hello-py">ttgo_hello.py</a></li>
<li class="toctree-l2"><a class="reference internal" href="examples.html#ttgo-fonts-py">ttgo_fonts.py</a></li>
<li class="toctree-l2"><a class="reference internal" href="examples.html#ttgo-scroll-py">ttgo_scroll.py</a></li>
<li class="toctree-l2"><a class="reference internal" href="examples.html#toasters-py">toasters.py</a></li>
<li class="toctree-l2"><a class="reference internal" href="examples.html#chango-py">chango.py</a></li>
<li class="toctree-l2"><a class="reference internal" href="examples.html#noto-fonts-py">noto_fonts.py</a></li>
<li class="toctree-l2"><a class="reference internal" href="examples.html#x240-example-programs">320x240 Example Programs</a><ul>
<li class="toctree-l3"><a class="reference internal" href="examples.html#x240-lines-py">320x240 lines.py</a></li>
<li class="toctree-l3"><a class="reference internal" href="examples.html#x240-hello-py">320x240 hello.py</a></li>
<li class="toctree-l3"><a class="reference internal" href="examples.html#x240-feathers-py">320x240 feathers.py</a></li>
<li class="toctree-l3"><a class="reference internal" href="examples.html#x240-fonts-py">320x240 fonts.py</a></li>
<li class="toctree-l3"><a class="reference internal" href="examples.html#x240-scroll-py">320x240 scroll.py</a></li>
<li class="toctree-l3"><a class="reference internal" href="examples.html#x240-toasters-py">320x240 toasters.py</a></li>
</ul>
</li>
<li class="toctree-l2"><a class="reference internal" href="examples.html#x240-ttgo-t-display-example-programs">135x240 TTGO T-Display Example Programs</a><ul>
<li class="toctree-l3"><a class="reference internal" href="examples.html#lines-py">lines.py</a></li>
<li class="toctree-l3"><a class="reference internal" href="examples.html#hello-py">hello.py</a></li>
<li class="toctree-l3"><a class="reference internal" href="examples.html#feathers-py">feathers.py</a></li>
<li class="toctree-l3"><a class="reference internal" href="examples.html#fonts-py">fonts.py</a></li>
<li class="toctree-l3"><a class="reference internal" href="examples.html#scroll-py">scroll.py</a></li>
<li class="toctree-l3"><a class="reference internal" href="examples.html#toasters-py">toasters.py</a></li>
<li class="toctree-l3"><a class="reference internal" href="examples.html#chango-py">chango.py</a></li>
<li class="toctree-l3"><a class="reference internal" href="examples.html#noto-fonts-py">noto_fonts.py</a></li>
</ul>
</li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="fonts.html">Fonts</a><ul>
@ -117,67 +79,29 @@
</li>
</ul>
</div>
</div>
</nav>
<section data-toggle="wy-nav-shift" class="wy-nav-content-wrap">
<nav class="wy-nav-top" aria-label="top navigation">
<section data-toggle="wy-nav-shift" class="wy-nav-content-wrap"><nav class="wy-nav-top" aria-label="Mobile navigation menu" style="background: #2980B9" >
<i data-toggle="wy-nav-top" class="fa fa-bars"></i>
<a href="index.html">st7789py</a>
</nav>
<div class="wy-nav-content">
<div class="rst-content style-external-links">
<div role="navigation" aria-label="breadcrumbs navigation">
<div role="navigation" aria-label="Page navigation">
<ul class="wy-breadcrumbs">
<li><a href="index.html" class="icon icon-home"></a> &raquo;</li>
<li>Python Module Index</li>
<li class="wy-breadcrumbs-aside">
</li>
</ul>
<hr/>
</div>
<div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
<div itemprop="articleBody">
<h1>Python Module Index</h1>
@ -198,45 +122,30 @@
</div>
</div>
<footer>
<hr/>
<div role="contentinfo">
<p>
</p>
<p></p>
</div>
Built with <a href="https://www.sphinx-doc.org/">Sphinx</a> using a
Built with <a href="https://www.sphinx-doc.org/">Sphinx</a> using a
<a href="https://github.com/readthedocs/sphinx_rtd_theme">theme</a>
provided by <a href="https://readthedocs.org">Read the Docs</a>.
provided by <a href="https://readthedocs.org">Read the Docs</a>.
</footer>
</div>
</div>
</section>
</div>
<script type="text/javascript">
<script>
jQuery(function () {
SphinxRtdTheme.Navigation.enable(true);
});
</script>
</script>
</body>
</html>

Wyświetl plik

@ -1,74 +1,34 @@
<!DOCTYPE html>
<html class="writer-html5" lang="en" >
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Search &mdash; st7789py 0.1.0 documentation</title>
<link rel="stylesheet" href="_static/css/theme.css" type="text/css" />
<link rel="stylesheet" href="_static/pygments.css" type="text/css" />
<link rel="stylesheet" href="_static/pygments.css" type="text/css" />
<link rel="stylesheet" href="_static/css/theme.css" type="text/css" />
<link rel="stylesheet" href="_static/pygments.css" type="text/css" />
<link rel="stylesheet" href="_static/css/theme.css" type="text/css" />
<!--[if lt IE 9]>
<script src="_static/js/html5shiv.min.js"></script>
<![endif]-->
<script type="text/javascript" id="documentation_options" data-url_root="./" src="_static/documentation_options.js"></script>
<script data-url_root="./" id="documentation_options" src="_static/documentation_options.js"></script>
<script src="_static/jquery.js"></script>
<script src="_static/underscore.js"></script>
<script src="_static/doctools.js"></script>
<script type="text/javascript" src="_static/js/theme.js"></script>
<script type="text/javascript" src="_static/searchtools.js"></script>
<script type="text/javascript" src="_static/language_data.js"></script>
<script src="_static/js/theme.js"></script>
<script src="_static/searchtools.js"></script>
<script src="_static/language_data.js"></script>
<link rel="index" title="Index" href="genindex.html" />
<link rel="search" title="Search" href="#" />
</head>
<body class="wy-body-for-nav">
<body class="wy-body-for-nav">
<div class="wy-grid-for-nav">
<nav data-toggle="wy-nav-shift" class="wy-nav-side">
<div class="wy-side-scroll">
<div class="wy-side-nav-search" style="background: #2980B9" >
<a href="index.html" class="icon icon-home"> st7789py
</a>
<div role="search">
<form id="rtd-search-form" class="wy-form" action="#" method="get">
<input type="text" name="q" placeholder="Search docs" />
@ -76,30 +36,32 @@
<input type="hidden" name="area" value="default" />
</form>
</div>
</div>
<div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="main navigation">
</div><div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="Navigation menu">
<p class="caption" role="heading"><span class="caption-text">Contents:</span></p>
<ul>
<li class="toctree-l1"><a class="reference internal" href="index.html">st7789py Driver</a></li>
<li class="toctree-l1"><a class="reference internal" href="st7789py.html">st7789py Reference</a></li>
<li class="toctree-l1"><a class="reference internal" href="examples.html">Example Programs</a><ul>
<li class="toctree-l2"><a class="reference internal" href="examples.html#ttgo-lines-py">ttgo_lines.py</a></li>
<li class="toctree-l2"><a class="reference internal" href="examples.html#ttgo-hello-py">ttgo_hello.py</a></li>
<li class="toctree-l2"><a class="reference internal" href="examples.html#ttgo-fonts-py">ttgo_fonts.py</a></li>
<li class="toctree-l2"><a class="reference internal" href="examples.html#ttgo-scroll-py">ttgo_scroll.py</a></li>
<li class="toctree-l2"><a class="reference internal" href="examples.html#toasters-py">toasters.py</a></li>
<li class="toctree-l2"><a class="reference internal" href="examples.html#chango-py">chango.py</a></li>
<li class="toctree-l2"><a class="reference internal" href="examples.html#noto-fonts-py">noto_fonts.py</a></li>
<li class="toctree-l2"><a class="reference internal" href="examples.html#x240-example-programs">320x240 Example Programs</a><ul>
<li class="toctree-l3"><a class="reference internal" href="examples.html#x240-lines-py">320x240 lines.py</a></li>
<li class="toctree-l3"><a class="reference internal" href="examples.html#x240-hello-py">320x240 hello.py</a></li>
<li class="toctree-l3"><a class="reference internal" href="examples.html#x240-feathers-py">320x240 feathers.py</a></li>
<li class="toctree-l3"><a class="reference internal" href="examples.html#x240-fonts-py">320x240 fonts.py</a></li>
<li class="toctree-l3"><a class="reference internal" href="examples.html#x240-scroll-py">320x240 scroll.py</a></li>
<li class="toctree-l3"><a class="reference internal" href="examples.html#x240-toasters-py">320x240 toasters.py</a></li>
</ul>
</li>
<li class="toctree-l2"><a class="reference internal" href="examples.html#x240-ttgo-t-display-example-programs">135x240 TTGO T-Display Example Programs</a><ul>
<li class="toctree-l3"><a class="reference internal" href="examples.html#lines-py">lines.py</a></li>
<li class="toctree-l3"><a class="reference internal" href="examples.html#hello-py">hello.py</a></li>
<li class="toctree-l3"><a class="reference internal" href="examples.html#feathers-py">feathers.py</a></li>
<li class="toctree-l3"><a class="reference internal" href="examples.html#fonts-py">fonts.py</a></li>
<li class="toctree-l3"><a class="reference internal" href="examples.html#scroll-py">scroll.py</a></li>
<li class="toctree-l3"><a class="reference internal" href="examples.html#toasters-py">toasters.py</a></li>
<li class="toctree-l3"><a class="reference internal" href="examples.html#chango-py">chango.py</a></li>
<li class="toctree-l3"><a class="reference internal" href="examples.html#noto-fonts-py">noto_fonts.py</a></li>
</ul>
</li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="fonts.html">Fonts</a><ul>
@ -113,67 +75,29 @@
</li>
</ul>
</div>
</div>
</nav>
<section data-toggle="wy-nav-shift" class="wy-nav-content-wrap">
<nav class="wy-nav-top" aria-label="top navigation">
<section data-toggle="wy-nav-shift" class="wy-nav-content-wrap"><nav class="wy-nav-top" aria-label="Mobile navigation menu" style="background: #2980B9" >
<i data-toggle="wy-nav-top" class="fa fa-bars"></i>
<a href="index.html">st7789py</a>
</nav>
<div class="wy-nav-content">
<div class="rst-content style-external-links">
<div role="navigation" aria-label="breadcrumbs navigation">
<div role="navigation" aria-label="Page navigation">
<ul class="wy-breadcrumbs">
<li><a href="index.html" class="icon icon-home"></a> &raquo;</li>
<li>Search</li>
<li class="wy-breadcrumbs-aside">
</li>
</ul>
<hr/>
</div>
<div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
<div itemprop="articleBody">
<noscript>
<div id="fallback" class="admonition warning">
<p class="last">
@ -188,50 +112,35 @@
</div>
</div>
</div>
<footer>
<hr/>
<div role="contentinfo">
<p>
</p>
<p></p>
</div>
Built with <a href="https://www.sphinx-doc.org/">Sphinx</a> using a
Built with <a href="https://www.sphinx-doc.org/">Sphinx</a> using a
<a href="https://github.com/readthedocs/sphinx_rtd_theme">theme</a>
provided by <a href="https://readthedocs.org">Read the Docs</a>.
provided by <a href="https://readthedocs.org">Read the Docs</a>.
</footer>
</div>
</div>
</section>
</div>
<script type="text/javascript">
<script>
jQuery(function () {
SphinxRtdTheme.Navigation.enable(true);
});
</script>
<script type="text/javascript">
<script>
jQuery(function() { Search.loadIndex("searchindex.js"); });
</script>
<script type="text/javascript" id="searchindexloader"></script>
<script id="searchindexloader"></script>

File diff suppressed because one or more lines are too long

Wyświetl plik

@ -1,73 +1,34 @@
<!DOCTYPE html>
<html class="writer-html5" lang="en" >
<head>
<meta charset="utf-8" />
<meta charset="utf-8" /><meta name="generator" content="Docutils 0.17.1: http://docutils.sourceforge.net/" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>st7789py Reference &mdash; st7789py 0.1.0 documentation</title>
<link rel="stylesheet" href="_static/css/theme.css" type="text/css" />
<link rel="stylesheet" href="_static/pygments.css" type="text/css" />
<link rel="stylesheet" href="_static/pygments.css" type="text/css" />
<link rel="stylesheet" href="_static/css/theme.css" type="text/css" />
<link rel="stylesheet" href="_static/pygments.css" type="text/css" />
<link rel="stylesheet" href="_static/css/theme.css" type="text/css" />
<!--[if lt IE 9]>
<script src="_static/js/html5shiv.min.js"></script>
<![endif]-->
<script type="text/javascript" id="documentation_options" data-url_root="./" src="_static/documentation_options.js"></script>
<script data-url_root="./" id="documentation_options" src="_static/documentation_options.js"></script>
<script src="_static/jquery.js"></script>
<script src="_static/underscore.js"></script>
<script src="_static/doctools.js"></script>
<script type="text/javascript" src="_static/js/theme.js"></script>
<script src="_static/js/theme.js"></script>
<link rel="index" title="Index" href="genindex.html" />
<link rel="search" title="Search" href="search.html" />
<link rel="next" title="Example Programs" href="examples.html" />
<link rel="prev" title="st7789py Driver" href="index.html" />
</head>
<body class="wy-body-for-nav">
<body class="wy-body-for-nav">
<div class="wy-grid-for-nav">
<nav data-toggle="wy-nav-shift" class="wy-nav-side">
<div class="wy-side-scroll">
<div class="wy-side-nav-search" style="background: #2980B9" >
<a href="index.html" class="icon icon-home"> st7789py
</a>
<div role="search">
<form id="rtd-search-form" class="wy-form" action="search.html" method="get">
<input type="text" name="q" placeholder="Search docs" />
@ -75,30 +36,32 @@
<input type="hidden" name="area" value="default" />
</form>
</div>
</div>
<div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="main navigation">
</div><div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="Navigation menu">
<p class="caption" role="heading"><span class="caption-text">Contents:</span></p>
<ul class="current">
<li class="toctree-l1"><a class="reference internal" href="index.html">st7789py Driver</a></li>
<li class="toctree-l1 current"><a class="current reference internal" href="#">st7789py Reference</a></li>
<li class="toctree-l1"><a class="reference internal" href="examples.html">Example Programs</a><ul>
<li class="toctree-l2"><a class="reference internal" href="examples.html#ttgo-lines-py">ttgo_lines.py</a></li>
<li class="toctree-l2"><a class="reference internal" href="examples.html#ttgo-hello-py">ttgo_hello.py</a></li>
<li class="toctree-l2"><a class="reference internal" href="examples.html#ttgo-fonts-py">ttgo_fonts.py</a></li>
<li class="toctree-l2"><a class="reference internal" href="examples.html#ttgo-scroll-py">ttgo_scroll.py</a></li>
<li class="toctree-l2"><a class="reference internal" href="examples.html#toasters-py">toasters.py</a></li>
<li class="toctree-l2"><a class="reference internal" href="examples.html#chango-py">chango.py</a></li>
<li class="toctree-l2"><a class="reference internal" href="examples.html#noto-fonts-py">noto_fonts.py</a></li>
<li class="toctree-l2"><a class="reference internal" href="examples.html#x240-example-programs">320x240 Example Programs</a><ul>
<li class="toctree-l3"><a class="reference internal" href="examples.html#x240-lines-py">320x240 lines.py</a></li>
<li class="toctree-l3"><a class="reference internal" href="examples.html#x240-hello-py">320x240 hello.py</a></li>
<li class="toctree-l3"><a class="reference internal" href="examples.html#x240-feathers-py">320x240 feathers.py</a></li>
<li class="toctree-l3"><a class="reference internal" href="examples.html#x240-fonts-py">320x240 fonts.py</a></li>
<li class="toctree-l3"><a class="reference internal" href="examples.html#x240-scroll-py">320x240 scroll.py</a></li>
<li class="toctree-l3"><a class="reference internal" href="examples.html#x240-toasters-py">320x240 toasters.py</a></li>
</ul>
</li>
<li class="toctree-l2"><a class="reference internal" href="examples.html#x240-ttgo-t-display-example-programs">135x240 TTGO T-Display Example Programs</a><ul>
<li class="toctree-l3"><a class="reference internal" href="examples.html#lines-py">lines.py</a></li>
<li class="toctree-l3"><a class="reference internal" href="examples.html#hello-py">hello.py</a></li>
<li class="toctree-l3"><a class="reference internal" href="examples.html#feathers-py">feathers.py</a></li>
<li class="toctree-l3"><a class="reference internal" href="examples.html#fonts-py">fonts.py</a></li>
<li class="toctree-l3"><a class="reference internal" href="examples.html#scroll-py">scroll.py</a></li>
<li class="toctree-l3"><a class="reference internal" href="examples.html#toasters-py">toasters.py</a></li>
<li class="toctree-l3"><a class="reference internal" href="examples.html#chango-py">chango.py</a></li>
<li class="toctree-l3"><a class="reference internal" href="examples.html#noto-fonts-py">noto_fonts.py</a></li>
</ul>
</li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="fonts.html">Fonts</a><ul>
@ -112,73 +75,32 @@
</li>
</ul>
</div>
</div>
</nav>
<section data-toggle="wy-nav-shift" class="wy-nav-content-wrap">
<nav class="wy-nav-top" aria-label="top navigation">
<section data-toggle="wy-nav-shift" class="wy-nav-content-wrap"><nav class="wy-nav-top" aria-label="Mobile navigation menu" style="background: #2980B9" >
<i data-toggle="wy-nav-top" class="fa fa-bars"></i>
<a href="index.html">st7789py</a>
</nav>
<div class="wy-nav-content">
<div class="rst-content style-external-links">
<div role="navigation" aria-label="breadcrumbs navigation">
<div role="navigation" aria-label="Page navigation">
<ul class="wy-breadcrumbs">
<li><a href="index.html" class="icon icon-home"></a> &raquo;</li>
<li>st7789py Reference</li>
<li class="wy-breadcrumbs-aside">
<a href="_sources/st7789py.rst.txt" rel="nofollow"> View page source</a>
</li>
</ul>
<hr/>
</div>
<div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
<div itemprop="articleBody">
<div class="section" id="module-st7789py">
<span id="st7789py-reference"></span><h1>st7789py Reference<a class="headerlink" href="#module-st7789py" title="Permalink to this headline"></a></h1>
<section id="module-st7789py">
<span id="st7789py-reference"></span><h1>st7789py Reference<a class="headerlink" href="#module-st7789py" title="Permalink to this headline"></a></h1>
<p>Copyright (c) 2020, 2021 Russ Hughes</p>
<p>This file incorporates work covered by the following copyright and
permission notice and is licensed under the same terms:</p>
@ -214,13 +136,13 @@ BIOS text mode fonts.</p></li>
</ul>
<dl class="py function">
<dt class="sig sig-object py" id="st7789py.color565">
<span class="sig-prename descclassname"><span class="pre">st7789py.</span></span><span class="sig-name descname"><span class="pre">color565</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">red</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">green</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">0</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">blue</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">0</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/st7789py.html#color565"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#st7789py.color565" title="Permalink to this definition"></a></dt>
<span class="sig-prename descclassname"><span class="pre">st7789py.</span></span><span class="sig-name descname"><span class="pre">color565</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">red</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">green</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">0</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">blue</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">0</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/st7789py.html#color565"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#st7789py.color565" title="Permalink to this definition"></a></dt>
<dd><p>Convert red, green and blue values (0-255) into a 16-bit 565 encoding.</p>
</dd></dl>
<dl class="py class">
<dt class="sig sig-object py" id="st7789py.ST7789">
<em class="property"><span class="pre">class</span> </em><span class="sig-prename descclassname"><span class="pre">st7789py.</span></span><span class="sig-name descname"><span class="pre">ST7789</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">spi</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">width</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">height</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">reset</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">dc</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">cs</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">backlight</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">rotation</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">0</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/st7789py.html#ST7789"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#st7789py.ST7789" title="Permalink to this definition"></a></dt>
<em class="property"><span class="pre">class</span><span class="w"> </span></em><span class="sig-prename descclassname"><span class="pre">st7789py.</span></span><span class="sig-name descname"><span class="pre">ST7789</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">spi</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">width</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">height</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">reset</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">dc</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">cs</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">backlight</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">rotation</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">0</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/st7789py.html#ST7789"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#st7789py.ST7789" title="Permalink to this definition"></a></dt>
<dd><p>ST7789 driver class</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
@ -242,19 +164,19 @@ BIOS text mode fonts.</p></li>
</dl>
<dl class="py method">
<dt class="sig sig-object py" id="st7789py.ST7789.hard_reset">
<span class="sig-name descname"><span class="pre">hard_reset</span></span><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="_modules/st7789py.html#ST7789.hard_reset"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#st7789py.ST7789.hard_reset" title="Permalink to this definition"></a></dt>
<span class="sig-name descname"><span class="pre">hard_reset</span></span><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="_modules/st7789py.html#ST7789.hard_reset"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#st7789py.ST7789.hard_reset" title="Permalink to this definition"></a></dt>
<dd><p>Hard reset display.</p>
</dd></dl>
<dl class="py method">
<dt class="sig sig-object py" id="st7789py.ST7789.soft_reset">
<span class="sig-name descname"><span class="pre">soft_reset</span></span><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="_modules/st7789py.html#ST7789.soft_reset"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#st7789py.ST7789.soft_reset" title="Permalink to this definition"></a></dt>
<span class="sig-name descname"><span class="pre">soft_reset</span></span><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="_modules/st7789py.html#ST7789.soft_reset"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#st7789py.ST7789.soft_reset" title="Permalink to this definition"></a></dt>
<dd><p>Soft reset display.</p>
</dd></dl>
<dl class="py method">
<dt class="sig sig-object py" id="st7789py.ST7789.sleep_mode">
<span class="sig-name descname"><span class="pre">sleep_mode</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">value</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/st7789py.html#ST7789.sleep_mode"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#st7789py.ST7789.sleep_mode" title="Permalink to this definition"></a></dt>
<span class="sig-name descname"><span class="pre">sleep_mode</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">value</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/st7789py.html#ST7789.sleep_mode"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#st7789py.ST7789.sleep_mode" title="Permalink to this definition"></a></dt>
<dd><p>Enable or disable display sleep mode.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
@ -268,7 +190,7 @@ BIOS text mode fonts.</p></li>
<dl class="py method">
<dt class="sig sig-object py" id="st7789py.ST7789.inversion_mode">
<span class="sig-name descname"><span class="pre">inversion_mode</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">value</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/st7789py.html#ST7789.inversion_mode"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#st7789py.ST7789.inversion_mode" title="Permalink to this definition"></a></dt>
<span class="sig-name descname"><span class="pre">inversion_mode</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">value</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/st7789py.html#ST7789.inversion_mode"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#st7789py.ST7789.inversion_mode" title="Permalink to this definition"></a></dt>
<dd><p>Enable or disable display inversion mode.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
@ -282,7 +204,7 @@ BIOS text mode fonts.</p></li>
<dl class="py method">
<dt class="sig sig-object py" id="st7789py.ST7789.rotation">
<span class="sig-name descname"><span class="pre">rotation</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">rotation</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/st7789py.html#ST7789.rotation"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#st7789py.ST7789.rotation" title="Permalink to this definition"></a></dt>
<span class="sig-name descname"><span class="pre">rotation</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">rotation</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/st7789py.html#ST7789.rotation"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#st7789py.ST7789.rotation" title="Permalink to this definition"></a></dt>
<dd><p>Set display rotation.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
@ -299,7 +221,7 @@ BIOS text mode fonts.</p></li>
<dl class="py method">
<dt class="sig sig-object py" id="st7789py.ST7789.vline">
<span class="sig-name descname"><span class="pre">vline</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">x</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">y</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">length</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">color</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/st7789py.html#ST7789.vline"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#st7789py.ST7789.vline" title="Permalink to this definition"></a></dt>
<span class="sig-name descname"><span class="pre">vline</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">x</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">y</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">length</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">color</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/st7789py.html#ST7789.vline"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#st7789py.ST7789.vline" title="Permalink to this definition"></a></dt>
<dd><p>Draw vertical line at the given location and color.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
@ -315,7 +237,7 @@ BIOS text mode fonts.</p></li>
<dl class="py method">
<dt class="sig sig-object py" id="st7789py.ST7789.hline">
<span class="sig-name descname"><span class="pre">hline</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">x</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">y</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">length</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">color</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/st7789py.html#ST7789.hline"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#st7789py.ST7789.hline" title="Permalink to this definition"></a></dt>
<span class="sig-name descname"><span class="pre">hline</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">x</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">y</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">length</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">color</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/st7789py.html#ST7789.hline"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#st7789py.ST7789.hline" title="Permalink to this definition"></a></dt>
<dd><p>Draw horizontal line at the given location and color.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
@ -331,7 +253,7 @@ BIOS text mode fonts.</p></li>
<dl class="py method">
<dt class="sig sig-object py" id="st7789py.ST7789.pixel">
<span class="sig-name descname"><span class="pre">pixel</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">x</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">y</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">color</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/st7789py.html#ST7789.pixel"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#st7789py.ST7789.pixel" title="Permalink to this definition"></a></dt>
<span class="sig-name descname"><span class="pre">pixel</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">x</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">y</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">color</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/st7789py.html#ST7789.pixel"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#st7789py.ST7789.pixel" title="Permalink to this definition"></a></dt>
<dd><p>Draw a pixel at the given location and color.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
@ -346,7 +268,7 @@ BIOS text mode fonts.</p></li>
<dl class="py method">
<dt class="sig sig-object py" id="st7789py.ST7789.blit_buffer">
<span class="sig-name descname"><span class="pre">blit_buffer</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">buffer</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">x</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">y</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">width</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">height</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/st7789py.html#ST7789.blit_buffer"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#st7789py.ST7789.blit_buffer" title="Permalink to this definition"></a></dt>
<span class="sig-name descname"><span class="pre">blit_buffer</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">buffer</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">x</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">y</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">width</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">height</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/st7789py.html#ST7789.blit_buffer"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#st7789py.ST7789.blit_buffer" title="Permalink to this definition"></a></dt>
<dd><p>Copy buffer to display at the given location.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
@ -363,7 +285,7 @@ BIOS text mode fonts.</p></li>
<dl class="py method">
<dt class="sig sig-object py" id="st7789py.ST7789.rect">
<span class="sig-name descname"><span class="pre">rect</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">x</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">y</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">w</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">h</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">color</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/st7789py.html#ST7789.rect"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#st7789py.ST7789.rect" title="Permalink to this definition"></a></dt>
<span class="sig-name descname"><span class="pre">rect</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">x</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">y</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">w</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">h</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">color</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/st7789py.html#ST7789.rect"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#st7789py.ST7789.rect" title="Permalink to this definition"></a></dt>
<dd><p>Draw a rectangle at the given location, size and color.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
@ -380,7 +302,7 @@ BIOS text mode fonts.</p></li>
<dl class="py method">
<dt class="sig sig-object py" id="st7789py.ST7789.fill_rect">
<span class="sig-name descname"><span class="pre">fill_rect</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">x</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">y</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">width</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">height</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">color</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/st7789py.html#ST7789.fill_rect"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#st7789py.ST7789.fill_rect" title="Permalink to this definition"></a></dt>
<span class="sig-name descname"><span class="pre">fill_rect</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">x</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">y</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">width</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">height</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">color</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/st7789py.html#ST7789.fill_rect"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#st7789py.ST7789.fill_rect" title="Permalink to this definition"></a></dt>
<dd><p>Draw a rectangle at the given location, size and filled with color.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
@ -397,7 +319,7 @@ BIOS text mode fonts.</p></li>
<dl class="py method">
<dt class="sig sig-object py" id="st7789py.ST7789.fill">
<span class="sig-name descname"><span class="pre">fill</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">color</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/st7789py.html#ST7789.fill"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#st7789py.ST7789.fill" title="Permalink to this definition"></a></dt>
<span class="sig-name descname"><span class="pre">fill</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">color</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/st7789py.html#ST7789.fill"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#st7789py.ST7789.fill" title="Permalink to this definition"></a></dt>
<dd><p>Fill the entire FrameBuffer with the specified color.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
@ -408,7 +330,7 @@ BIOS text mode fonts.</p></li>
<dl class="py method">
<dt class="sig sig-object py" id="st7789py.ST7789.line">
<span class="sig-name descname"><span class="pre">line</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">x0</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">y0</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">x1</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">y1</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">color</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/st7789py.html#ST7789.line"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#st7789py.ST7789.line" title="Permalink to this definition"></a></dt>
<span class="sig-name descname"><span class="pre">line</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">x0</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">y0</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">x1</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">y1</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">color</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/st7789py.html#ST7789.line"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#st7789py.ST7789.line" title="Permalink to this definition"></a></dt>
<dd><p>Draw a single pixel wide line starting at x0, y0 and ending at x1, y1.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
@ -425,7 +347,7 @@ BIOS text mode fonts.</p></li>
<dl class="py method">
<dt class="sig sig-object py" id="st7789py.ST7789.vscrdef">
<span class="sig-name descname"><span class="pre">vscrdef</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">tfa</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">vsa</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">bfa</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/st7789py.html#ST7789.vscrdef"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#st7789py.ST7789.vscrdef" title="Permalink to this definition"></a></dt>
<span class="sig-name descname"><span class="pre">vscrdef</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">tfa</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">vsa</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">bfa</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/st7789py.html#ST7789.vscrdef"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#st7789py.ST7789.vscrdef" title="Permalink to this definition"></a></dt>
<dd><p>Set Vertical Scrolling Definition.</p>
<p>To scroll a 135x240 display these values should be 40, 240, 40.
There are 40 lines above the display that are not shown followed by
@ -445,7 +367,7 @@ changing the TFA, VSA and BFA values.</p>
<dl class="py method">
<dt class="sig sig-object py" id="st7789py.ST7789.vscsad">
<span class="sig-name descname"><span class="pre">vscsad</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">vssa</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/st7789py.html#ST7789.vscsad"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#st7789py.ST7789.vscsad" title="Permalink to this definition"></a></dt>
<span class="sig-name descname"><span class="pre">vscsad</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">vssa</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/st7789py.html#ST7789.vscsad"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#st7789py.ST7789.vscsad" title="Permalink to this definition"></a></dt>
<dd><p>Set Vertical Scroll Start Address of RAM.</p>
<p>Defines which line in the Frame Memory will be written as the first
line after the last line of the Top Fixed Area on the display</p>
@ -464,7 +386,7 @@ utime.sleep(0.01)</p>
<dl class="py method">
<dt class="sig sig-object py" id="st7789py.ST7789.text">
<span class="sig-name descname"><span class="pre">text</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">font</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">text</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">x0</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">y0</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">color</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">micropython.const</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">background</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">micropython.const</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/st7789py.html#ST7789.text"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#st7789py.ST7789.text" title="Permalink to this definition"></a></dt>
<span class="sig-name descname"><span class="pre">text</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">font</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">text</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">x0</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">y0</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">color</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">micropython.const</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">background</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">micropython.const</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/st7789py.html#ST7789.text"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#st7789py.ST7789.text" title="Permalink to this definition"></a></dt>
<dd><p>Draw text on display in specified font and colors. 8 and 16 bit wide
fonts are supported.</p>
<dl class="field-list simple">
@ -483,7 +405,7 @@ fonts are supported.</p>
<dl class="py method">
<dt class="sig sig-object py" id="st7789py.ST7789.bitmap">
<span class="sig-name descname"><span class="pre">bitmap</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">bitmap</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">x</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">y</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">index</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">0</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/st7789py.html#ST7789.bitmap"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#st7789py.ST7789.bitmap" title="Permalink to this definition"></a></dt>
<span class="sig-name descname"><span class="pre">bitmap</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">bitmap</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">x</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">y</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">index</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">0</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/st7789py.html#ST7789.bitmap"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#st7789py.ST7789.bitmap" title="Permalink to this definition"></a></dt>
<dd><p>Draw a bitmap on display at the specified column and row</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
@ -500,7 +422,7 @@ module</p></li>
<dl class="py method">
<dt class="sig sig-object py" id="st7789py.ST7789.write">
<span class="sig-name descname"><span class="pre">write</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">font</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">string</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">x</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">y</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">fg</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">micropython.const</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">bg</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">micropython.const</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/st7789py.html#ST7789.write"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#st7789py.ST7789.write" title="Permalink to this definition"></a></dt>
<span class="sig-name descname"><span class="pre">write</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">font</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">string</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">x</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">y</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">fg</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">micropython.const</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">bg</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">micropython.const</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/st7789py.html#ST7789.write"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#st7789py.ST7789.write" title="Permalink to this definition"></a></dt>
<dd><p>Write a string using a converted true-type font on the display starting
at the specified column and row</p>
<dl class="field-list simple">
@ -519,7 +441,7 @@ at the specified column and row</p>
<dl class="py method">
<dt class="sig sig-object py" id="st7789py.ST7789.write_width">
<span class="sig-name descname"><span class="pre">write_width</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">font</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">string</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/st7789py.html#ST7789.write_width"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#st7789py.ST7789.write_width" title="Permalink to this definition"></a></dt>
<span class="sig-name descname"><span class="pre">write_width</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">font</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">string</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/st7789py.html#ST7789.write_width"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#st7789py.ST7789.write_width" title="Permalink to this definition"></a></dt>
<dd><p>Returns the width in pixels of the string if it was written with the
specified font</p>
<dl class="field-list simple">
@ -534,53 +456,37 @@ specified font</p>
</dd></dl>
</div>
</section>
</div>
</div>
<footer>
<div class="rst-footer-buttons" role="navigation" aria-label="footer navigation">
<a href="examples.html" class="btn btn-neutral float-right" title="Example Programs" accesskey="n" rel="next">Next <span class="fa fa-arrow-circle-right" aria-hidden="true"></span></a>
<footer><div class="rst-footer-buttons" role="navigation" aria-label="Footer">
<a href="index.html" class="btn btn-neutral float-left" title="st7789py Driver" accesskey="p" rel="prev"><span class="fa fa-arrow-circle-left" aria-hidden="true"></span> Previous</a>
<a href="examples.html" class="btn btn-neutral float-right" title="Example Programs" accesskey="n" rel="next">Next <span class="fa fa-arrow-circle-right" aria-hidden="true"></span></a>
</div>
<hr/>
<div role="contentinfo">
<p>
</p>
<p></p>
</div>
Built with <a href="https://www.sphinx-doc.org/">Sphinx</a> using a
Built with <a href="https://www.sphinx-doc.org/">Sphinx</a> using a
<a href="https://github.com/readthedocs/sphinx_rtd_theme">theme</a>
provided by <a href="https://readthedocs.org">Read the Docs</a>.
provided by <a href="https://readthedocs.org">Read the Docs</a>.
</footer>
</div>
</div>
</section>
</div>
<script type="text/javascript">
<script>
jQuery(function () {
SphinxRtdTheme.Navigation.enable(true);
});
</script>
</script>
</body>
</html>

Wyświetl plik

@ -8,7 +8,7 @@ feathers.py
import random
import math
import utime
from machine import Pin, SoftSPI
from machine import Pin, SPI
import st7789py as st7789
@ -39,13 +39,7 @@ def main():
'''
#enable display and clear screen
spi = SoftSPI(
baudrate=20000000,
polarity=1,
phase=0,
sck=Pin(18),
mosi=Pin(19),
miso=Pin(13))
spi = SPI(1, baudrate=31250000, sck=Pin(18), mosi=Pin(19))
tft = st7789.ST7789(
spi,

Wyświetl plik

@ -5,7 +5,7 @@ fonts.py
"""
import utime
from machine import Pin, SoftSPI
from machine import Pin, SPI
import st7789py as st7789
# Choose fonts
@ -25,13 +25,7 @@ from romfonts import vga2_bold_16x32 as font4
def main():
spi = SoftSPI(
baudrate=20000000,
polarity=1,
phase=0,
sck=Pin(18),
mosi=Pin(19),
miso=Pin(13))
spi = SPI(1, baudrate=31250000, sck=Pin(18), mosi=Pin(19))
tft = st7789.ST7789(
spi,

Wyświetl plik

@ -5,7 +5,7 @@ hello.py
"""
import random
from machine import Pin, SoftSPI
from machine import Pin, SPI
import st7789py as st7789
# Choose a font
@ -25,13 +25,7 @@ from romfonts import vga2_bold_16x32 as font
def main():
spi = SoftSPI(
baudrate=20000000,
polarity=1,
phase=0,
sck=Pin(18),
mosi=Pin(19),
miso=Pin(13))
spi = SPI(1, baudrate=31250000, sck=Pin(18), mosi=Pin(19))
tft = st7789.ST7789(
spi,

Wyświetl plik

@ -6,20 +6,14 @@ lines.py
"""
import random
from machine import Pin, SoftSPI
from machine import Pin, SPI
import st7789py as st7789
def main():
# configure display
spi = SoftSPI(
baudrate=20000000,
polarity=1,
phase=0,
sck=Pin(18),
mosi=Pin(19),
miso=Pin(13))
spi = SPI(1, baudrate=31250000, sck=Pin(18), mosi=Pin(19))
tft = st7789.ST7789(
spi,

Wyświetl plik

@ -8,7 +8,7 @@ fonts.py
"""
import utime
import random
from machine import Pin, SoftSPI
from machine import Pin, SPI
import st7789py as st7789
# choose a font
@ -24,13 +24,7 @@ from romfonts import vga2_bold_16x16 as font
def main():
spi = SoftSPI(
baudrate=20000000,
polarity=1,
phase=0,
sck=Pin(18),
mosi=Pin(19),
miso=Pin(13))
spi = SPI(1, baudrate=31250000, sck=Pin(18), mosi=Pin(19))
tft = st7789.ST7789(
spi,

Wyświetl plik

@ -0,0 +1,3 @@
#!/bin/sh
sprites2bitmap.py toasters.bmp 64 64 4 >toast_bitmaps.py

Wyświetl plik

@ -0,0 +1,649 @@
BITMAPS = 5
HEIGHT = 64
WIDTH = 64
COLORS = 16
BITS = 81920
BPP = 4
PALETTE = [0x0000,0x00f8,0x4082,0xe0ff,0x609b,0x4049,0xff07,0xffff,0xdbde,0xb6b5,0x9294,0x6d6b,0x494a,0x2421,0x00d8,0x00b0]
_bitmap =\
b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x77\x77\x77\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x77\x77\x77\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x00\x00\x00\x77\x77\x77\x00\x00\x77\x00\x00'\
b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x00\x00\x00\x77\x77\x77\x00\x00\x77\x00\x00'\
b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x00\x00\x77\x77\x77\x00\x00\x77\x77\x00\x00'\
b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x00\x00\x77\x77\x77\x00\x00\x77\x77\x00\x00'\
b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x00\x77\x77\x00\x77\x77\x77\x00\x00\x77\x00'\
b'\x99\x99\x99\x99\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x00\x77\x77\x00\x77\x77\x77\x00\x00\x77\x00'\
b'\x99\x99\x99\x99\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x77\x77\x77\x77\x77\x77\x00\x00\x99\x99\x99'\
b'\x99\x99\x99\x99\x99\x99\x99\x00\x00\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x77\x77\x77\x77\x77\x77\x00\x00\x99\x99\x99'\
b'\x99\x99\x99\x99\x99\x99\x99\x00\x00\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x77\x77\x77\x77\x00\x99\x99\x99\x99\x00\x00'\
b'\x00\xff\xff\xff\xff\x99\x99\x99\x99\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x77\x77\x77\x77\x00\x99\x99\x99\x99\x00\x00'\
b'\x00\xff\xff\xff\xff\x99\x99\x99\x99\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x77\x77\x77\x77\x99\x99\x99\x00\x00\x00\xff\xff'\
b'\xff\x99\x99\x99\x99\x99\x99\x99\x99\x99\x99\x00\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x77\x77\x77\x77\x99\x99\x99\x00\x00\x00\xff\xff'\
b'\xff\x99\x99\x99\x99\x99\x99\x99\x99\x99\x99\x00\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x77\x77\x99\x99\x99\x00\x00\x00\xff\xff\x99\x99'\
b'\x99\x99\x00\x00\x00\xff\xff\xff\xff\x99\x99\xbb\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x77\x77\x99\x99\x99\x00\x00\x00\xff\xff\x99\x99'\
b'\x99\x99\x00\x00\x00\xff\xff\xff\xff\x99\x99\xbb\x00\x00\x00\x00'\
b'\x00\x00\x00\x77\x99\x99\x99\x00\x00\x00\xff\xff\x99\x99\x99\x00'\
b'\x00\x00\xff\xff\xff\x99\x99\x99\x00\x00\x00\x00\xbb\x00\x00\x00'\
b'\x00\x00\x00\x77\x99\x99\x99\x00\x00\x00\xff\xff\x99\x99\x99\x00'\
b'\x00\x00\xff\xff\xff\x99\x99\x99\x00\x00\x00\x00\xbb\x00\x00\x00'\
b'\x00\x00\x00\x99\x99\x00\x00\x00\xff\xff\x99\x99\x99\x00\x00\x00'\
b'\xff\xff\x99\x99\x99\x00\x00\x00\x77\x77\x77\x77\x77\x77\x77\x77'\
b'\x00\x00\x00\x99\x99\x00\x00\x00\xff\xff\x99\x99\x99\x00\x00\x00'\
b'\xff\xff\x99\x99\x99\x00\x00\x00\x77\x77\x77\x77\x77\x77\x77\x77'\
b'\x00\x00\x99\x99\x00\x00\x00\xff\x99\x99\x99\x00\x00\x00\xff\xff'\
b'\x99\x99\x99\xbb\x00\x77\x77\x77\x77\x77\x00\x77\x00\x77\x00\x00'\
b'\x00\x00\x99\x99\x00\x00\x00\xff\x99\x99\x99\x00\x00\x00\xff\xff'\
b'\x99\x99\x99\xbb\x00\x77\x77\x77\x77\x77\x00\x77\x00\x77\x00\x00'\
b'\x00\x99\x99\x00\x00\x00\xff\x99\x99\x00\x00\x00\xff\xff\x99\x99'\
b'\x99\xbb\xbb\x00\x77\x77\x77\x00\x77\x77\x77\x77\x77\x77\x77\x77'\
b'\x00\x99\x99\x00\x00\x00\xff\x99\x99\x00\x00\x00\xff\xff\x99\x99'\
b'\x99\xbb\xbb\x00\x77\x77\x77\x00\x77\x77\x77\x77\x77\x77\x77\x77'\
b'\x00\x99\x99\x99\x99\xff\x99\x99\x00\x00\x00\xff\x99\x99\x99\xbb'\
b'\xbb\xbb\x00\x77\x77\x77\x77\x77\x77\x00\x77\x00\x77\x00\x00\x00'\
b'\x00\x99\x99\x99\x99\xff\x99\x99\x00\x00\x00\xff\x99\x99\x99\xbb'\
b'\xbb\xbb\x00\x77\x77\x77\x77\x77\x77\x00\x77\x00\x77\x00\x00\x00'\
b'\xbb\x22\x22\x99\x99\x99\x99\x00\x00\x00\xff\x99\x99\xcc\xbb\xbb'\
b'\xbb\xbb\x00\x77\x77\x77\x00\x77\x77\x77\x77\x77\x77\x77\x77\x00'\
b'\xbb\x22\x22\x99\x99\x99\x99\x00\x00\x00\xff\x99\x99\xcc\xbb\xbb'\
b'\xbb\xbb\x00\x77\x77\x77\x00\x77\x77\x77\x77\x77\x77\x77\x77\x00'\
b'\xbb\x22\x22\x22\x22\x99\x99\x99\x99\xff\x99\x99\xcc\xbb\xbb\xbb'\
b'\xbb\x00\x77\x77\x77\x77\x77\x77\x00\x77\x00\x77\x00\x00\x00\x00'\
b'\xbb\x22\x22\x22\x22\x99\x99\x99\x99\xff\x99\x99\xcc\xbb\xbb\xbb'\
b'\xbb\x00\x77\x77\x77\x77\x77\x77\x00\x77\x00\x77\x00\x00\x00\x00'\
b'\xbb\x22\x99\x99\x22\x22\x22\x99\x99\x99\x99\xcc\xbb\xbb\xbb\xbb'\
b'\xbb\x00\x77\x77\x77\x00\x77\x77\x77\x77\x77\x77\x77\x00\x00\x00'\
b'\xbb\x22\x99\x99\x22\x22\x22\x99\x99\x99\x99\xcc\xbb\xbb\xbb\xbb'\
b'\xbb\x00\x77\x77\x77\x00\x77\x77\x77\x77\x77\x77\x77\x00\x00\x00'\
b'\xbb\x22\x99\xcc\x99\x99\x22\x22\x22\xbb\xbb\xcc\xbb\xbb\xbb\xbb'\
b'\x00\x77\x77\x77\x77\x77\x77\x00\x00\x00\x00\x00\x00\x00\x00\x00'\
b'\xbb\x22\x99\xcc\x99\x99\x22\x22\x22\xbb\xbb\xcc\xbb\xbb\xbb\xbb'\
b'\x00\x77\x77\x77\x77\x77\x77\x00\x00\x00\x00\x00\x00\x00\x00\x00'\
b'\xbb\x22\x99\xcc\xcc\xcc\x99\x99\x22\xbb\x22\xbb\xbb\xbb\xbb\xbb'\
b'\x00\x77\x77\x00\x77\x77\x77\x77\x77\x00\xbb\x22\x22\x00\x00\x00'\
b'\xbb\x22\x99\xcc\xcc\xcc\x99\x99\x22\xbb\x22\xbb\xbb\xbb\xbb\xbb'\
b'\x00\x77\x77\x00\x77\x77\x77\x77\x77\x00\xbb\x22\x22\x00\x00\x00'\
b'\xbb\x22\x22\x22\x22\xcc\x99\x99\x22\xbb\x22\xbb\xbb\xbb\xbb\x00'\
b'\x77\x77\x77\x77\x77\x00\x00\x00\x00\xbb\xbb\x22\xbb\x00\x00\x00'\
b'\xbb\x22\x22\x22\x22\xcc\x99\x99\x22\xbb\x22\xbb\xbb\xbb\xbb\x00'\
b'\x77\x77\x77\x77\x77\x00\x00\x00\x00\xbb\xbb\x22\xbb\x00\x00\x00'\
b'\xbb\x22\x22\x22\x99\x22\x99\x99\x22\xbb\x22\xbb\xbb\xbb\xbb\x00'\
b'\x77\x77\x00\x77\x77\x77\x77\x00\xbb\xbb\x22\x22\x22\x00\x00\x00'\
b'\xbb\x22\x22\x22\x99\x22\x99\x99\x22\xbb\x22\xbb\xbb\xbb\xbb\x00'\
b'\x77\x77\x00\x77\x77\x77\x77\x00\xbb\xbb\x22\x22\x22\x00\x00\x00'\
b'\xbb\x22\x22\x22\x22\x22\x22\x22\x22\xbb\x22\x22\xbb\x00\xbb\x00'\
b'\x77\x77\x77\x77\x00\x00\x00\xbb\xbb\xbb\x22\x22\xbb\x00\x00\x00'\
b'\xbb\x22\x22\x22\x22\x22\x22\x22\x22\xbb\x22\x22\xbb\x00\xbb\x00'\
b'\x77\x77\x77\x77\x00\x00\x00\xbb\xbb\xbb\x22\x22\xbb\x00\x00\x00'\
b'\xbb\x22\x22\x22\x99\x22\x22\x22\x22\xbb\x22\x22\xbb\xbb\xbb\xbb'\
b'\x00\x77\x77\x00\xbb\xbb\xbb\xbb\xbb\x22\x22\x22\x22\x00\x00\x00'\
b'\xbb\x22\x22\x22\x99\x22\x22\x22\x22\xbb\x22\x22\xbb\xbb\xbb\xbb'\
b'\x00\x77\x77\x00\xbb\xbb\xbb\xbb\xbb\x22\x22\x22\x22\x00\x00\x00'\
b'\xbb\x22\x22\x22\x22\x22\x22\x22\x22\xbb\x22\x22\xbb\x00\xbb\xbb'\
b'\xbb\x00\x00\xbb\xbb\xbb\xbb\xbb\x22\x22\x22\x22\xbb\x00\x00\x00'\
b'\xbb\x22\x22\x22\x22\x22\x22\x22\x22\xbb\x22\x22\xbb\x00\xbb\xbb'\
b'\xbb\x00\x00\xbb\xbb\xbb\xbb\xbb\x22\x22\x22\x22\xbb\x00\x00\x00'\
b'\xbb\x22\x22\x22\x99\x22\x22\x22\x22\xbb\x22\x22\x22\xbb\x00\x00'\
b'\xbb\xbb\xbb\xbb\xbb\xbb\x22\x22\x22\x22\x22\xbb\x00\x00\x00\x00'\
b'\xbb\x22\x22\x22\x99\x22\x22\x22\x22\xbb\x22\x22\x22\xbb\x00\x00'\
b'\xbb\xbb\xbb\xbb\xbb\xbb\x22\x22\x22\x22\x22\xbb\x00\x00\x00\x00'\
b'\xbb\x22\x22\x22\x22\x22\x22\x22\x22\xbb\x22\x22\x22\x22\xbb\xbb'\
b'\xbb\xbb\xbb\xbb\x22\x22\x22\x22\x22\x22\xbb\x00\x00\x00\x00\x00'\
b'\xbb\x22\x22\x22\x22\x22\x22\x22\x22\xbb\x22\x22\x22\x22\xbb\xbb'\
b'\xbb\xbb\xbb\xbb\x22\x22\x22\x22\x22\x22\xbb\x00\x00\x00\x00\x00'\
b'\xbb\x22\x22\x22\x99\x22\x22\x22\x22\xbb\x22\x22\x22\x22\x22\x22'\
b'\x22\x22\x22\x22\x22\x22\x22\x22\xbb\xbb\x00\x00\x00\x00\x00\x00'\
b'\xbb\x22\x22\x22\x99\x22\x22\x22\x22\xbb\x22\x22\x22\x22\x22\x22'\
b'\x22\x22\x22\x22\x22\x22\x22\x22\xbb\xbb\x00\x00\x00\x00\x00\x00'\
b'\xbb\x22\x22\x22\x22\x22\x22\x22\x22\xbb\x22\x22\x22\x22\x22\x22'\
b'\x22\x22\x22\x22\x22\x22\xbb\xbb\x00\x00\x00\x00\x00\x00\x00\x00'\
b'\xbb\x22\x22\x22\x22\x22\x22\x22\x22\xbb\x22\x22\x22\x22\x22\x22'\
b'\x22\x22\x22\x22\x22\x22\xbb\xbb\x00\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\xbb\x22\x22\x22\x22\x22\x22\x22\xbb\x22\x22\x22\x22\x22\x22'\
b'\x22\x22\x22\x22\xbb\xbb\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\xbb\x22\x22\x22\x22\x22\x22\x22\xbb\x22\x22\x22\x22\x22\x22'\
b'\x22\x22\x22\x22\xbb\xbb\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\xbb\x22\x22\x22\x22\x22\x22\xbb\x22\x22\x22\x22\x22\x22'\
b'\x22\x22\xbb\xbb\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\xbb\x22\x22\x22\x22\x22\x22\xbb\x22\x22\x22\x22\x22\x22'\
b'\x22\x22\xbb\xbb\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x00\xbb\xbb\x22\x22\x22\x22\xbb\x22\x22\x22\x22\x22\xbb'\
b'\xbb\xbb\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x00\xbb\xbb\x22\x22\x22\x22\xbb\x22\x22\x22\x22\x22\xbb'\
b'\xbb\xbb\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\xbb\xbb\x22\x22\xbb\x22\x22\xbb\xbb\xbb\x00'\
b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\xbb\xbb\x22\x22\xbb\x22\x22\xbb\xbb\xbb\x00'\
b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x00\x00\xbb\xbb\xbb\xbb\xbb\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x00\x00\xbb\xbb\xbb\xbb\xbb\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x77\x77\x00\x00\x00\x00'\
b'\x99\x99\x99\x99\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x77\x77\x00\x00\x00\x00'\
b'\x99\x99\x99\x99\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x00\x00\x00\x77\x77\x77\x77\x00\x99\x99\x99'\
b'\x99\x99\x99\x99\x99\x99\x99\x00\x00\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x00\x00\x00\x77\x77\x77\x77\x00\x99\x99\x99'\
b'\x99\x99\x99\x99\x99\x99\x99\x00\x00\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x00\x00\x77\x77\x00\x99\x99\x99\x99\x00\x00'\
b'\x00\xff\xff\xff\xff\x99\x99\x99\x99\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x00\x00\x77\x77\x00\x99\x99\x99\x99\x00\x00'\
b'\x00\xff\xff\xff\xff\x99\x99\x99\x99\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x00\x77\x77\x99\x99\x99\x00\x00\x00\xff\xff'\
b'\xff\x99\x99\x99\x99\x99\x99\x99\x99\x99\x99\x00\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x00\x77\x77\x99\x99\x99\x00\x00\x00\xff\xff'\
b'\xff\x99\x99\x99\x99\x99\x99\x99\x99\x99\x99\x00\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x77\x99\x99\x99\x00\x00\x00\xff\xff\x99\x99'\
b'\x99\x99\x00\x00\x00\xff\xff\xff\xff\x99\x99\xbb\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x77\x99\x99\x99\x00\x00\x00\xff\xff\x99\x99'\
b'\x99\x99\x00\x00\x00\xff\xff\xff\xff\x99\x99\xbb\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x99\x99\x99\x00\x00\x00\xff\xff\x99\x99\x99\x00'\
b'\x00\x00\xff\xff\xff\x99\x99\x99\x99\x99\x99\xbb\xbb\x00\x00\x00'\
b'\x00\x00\x00\x00\x99\x99\x99\x00\x00\x00\xff\xff\x99\x99\x99\x00'\
b'\x00\x00\xff\xff\xff\x99\x99\x99\x99\x99\x99\xbb\xbb\x00\x00\x00'\
b'\x00\x00\x00\x99\x99\x00\x00\x00\xff\xff\x99\x99\x99\x00\x00\x00'\
b'\xff\xff\x99\x99\x99\x99\x99\x00\x00\x00\x00\xbb\xbb\x00\x00\x00'\
b'\x00\x00\x00\x99\x99\x00\x00\x00\xff\xff\x99\x99\x99\x00\x00\x00'\
b'\xff\xff\x99\x99\x99\x99\x99\x00\x00\x00\x00\xbb\xbb\x00\x00\x00'\
b'\x00\x00\x99\x99\x00\x00\x00\xff\x99\x99\x99\x00\x00\x00\xff\xff'\
b'\x99\x99\x99\xbb\xbb\x00\x00\xbb\xbb\xbb\xbb\x00\xbb\x00\x00\x00'\
b'\x00\x00\x99\x99\x00\x00\x00\xff\x99\x99\x99\x00\x00\x00\xff\xff'\
b'\x99\x99\x99\xbb\xbb\x00\x00\xbb\xbb\xbb\xbb\x00\xbb\x00\x00\x00'\
b'\x00\x99\x99\x00\x00\x00\xff\x99\x99\x00\x00\x00\xff\xff\x99\x99'\
b'\x99\xbb\xbb\xbb\xbb\xbb\xbb\xbb\xbb\xbb\xbb\xbb\xbb\x00\x00\x00'\
b'\x00\x99\x99\x00\x00\x00\xff\x99\x99\x00\x00\x00\xff\xff\x99\x99'\
b'\x99\xbb\xbb\xbb\xbb\xbb\xbb\xbb\xbb\xbb\xbb\xbb\xbb\x00\x00\x00'\
b'\x00\x99\x99\x99\x99\xff\x99\x99\x00\x00\x00\xff\x99\x99\x99\xbb'\
b'\xbb\xbb\xbb\xbb\xbb\x00\x00\x00\x00\x00\x00\x00\xbb\x00\x00\x00'\
b'\x00\x99\x99\x99\x99\xff\x99\x99\x00\x00\x00\xff\x99\x99\x99\xbb'\
b'\xbb\xbb\xbb\xbb\xbb\x00\x00\x00\x00\x00\x00\x00\xbb\x00\x00\x00'\
b'\xbb\x22\x22\x99\x99\x99\x99\x00\x00\x00\xff\x99\x99\xcc\xbb\xbb'\
b'\xbb\xbb\xbb\x00\x00\x77\x77\x77\x77\x77\x77\x77\x00\x00\x00\x00'\
b'\xbb\x22\x22\x99\x99\x99\x99\x00\x00\x00\xff\x99\x99\xcc\xbb\xbb'\
b'\xbb\xbb\xbb\x00\x00\x77\x77\x77\x77\x77\x77\x77\x00\x00\x00\x00'\
b'\xbb\x22\x22\x22\x22\x99\x99\x99\x99\xff\x99\x99\xcc\xbb\xbb\xbb'\
b'\xbb\xbb\x00\x77\x77\x77\x77\x77\x00\x77\x77\x77\x77\x77\x77\x77'\
b'\xbb\x22\x22\x22\x22\x99\x99\x99\x99\xff\x99\x99\xcc\xbb\xbb\xbb'\
b'\xbb\xbb\x00\x77\x77\x77\x77\x77\x00\x77\x77\x77\x77\x77\x77\x77'\
b'\xbb\x22\x99\x99\x22\x22\x22\x99\x99\x99\x99\xcc\xbb\xbb\xbb\xbb'\
b'\xbb\x00\x77\x77\x77\x77\x77\x77\x77\x77\x00\x77\x00\x77\x00\x00'\
b'\xbb\x22\x99\x99\x22\x22\x22\x99\x99\x99\x99\xcc\xbb\xbb\xbb\xbb'\
b'\xbb\x00\x77\x77\x77\x77\x77\x77\x77\x77\x00\x77\x00\x77\x00\x00'\
b'\xbb\x22\x99\xcc\x99\x99\x22\x22\x22\xbb\xbb\xcc\xbb\xbb\xbb\xbb'\
b'\x00\x77\x77\x77\x77\x77\x77\x00\x77\x77\x77\x77\x77\x77\x77\x77'\
b'\xbb\x22\x99\xcc\x99\x99\x22\x22\x22\xbb\xbb\xcc\xbb\xbb\xbb\xbb'\
b'\x00\x77\x77\x77\x77\x77\x77\x00\x77\x77\x77\x77\x77\x77\x77\x77'\
b'\xbb\x22\x99\xcc\xcc\xcc\x99\x99\x22\xbb\x22\xbb\xbb\xbb\xbb\xbb'\
b'\x00\x77\x77\x77\x77\x77\x77\x77\x77\x00\x77\x00\x00\x77\x77\x00'\
b'\xbb\x22\x99\xcc\xcc\xcc\x99\x99\x22\xbb\x22\xbb\xbb\xbb\xbb\xbb'\
b'\x00\x77\x77\x77\x77\x77\x77\x77\x77\x00\x77\x00\x00\x77\x77\x00'\
b'\xbb\x22\x22\x22\x22\xcc\x99\x99\x22\xbb\x22\xbb\xbb\xbb\xbb\x00'\
b'\x77\x77\x77\x77\x77\x77\x00\x77\x77\x77\x77\x77\x77\x00\x00\x00'\
b'\xbb\x22\x22\x22\x22\xcc\x99\x99\x22\xbb\x22\xbb\xbb\xbb\xbb\x00'\
b'\x77\x77\x77\x77\x77\x77\x00\x77\x77\x77\x77\x77\x77\x00\x00\x00'\
b'\xbb\x22\x22\x22\x99\x22\x99\x99\x22\xbb\x22\xbb\xbb\xbb\xbb\x00'\
b'\x77\x77\x00\x77\x00\x77\x77\x77\x77\x77\x00\x22\x22\x00\x00\x00'\
b'\xbb\x22\x22\x22\x99\x22\x99\x99\x22\xbb\x22\xbb\xbb\xbb\xbb\x00'\
b'\x77\x77\x00\x77\x00\x77\x77\x77\x77\x77\x00\x22\x22\x00\x00\x00'\
b'\xbb\x22\x22\x22\x22\x22\x22\x22\x22\xbb\x22\x22\xbb\x00\xbb\x00'\
b'\x77\x77\x77\x77\x00\x00\x00\x00\x00\x00\x00\x22\xbb\x00\x00\x00'\
b'\xbb\x22\x22\x22\x22\x22\x22\x22\x22\xbb\x22\x22\xbb\x00\xbb\x00'\
b'\x77\x77\x77\x77\x00\x00\x00\x00\x00\x00\x00\x22\xbb\x00\x00\x00'\
b'\xbb\x22\x22\x22\x99\x22\x22\x22\x22\xbb\x22\x22\xbb\xbb\xbb\xbb'\
b'\x00\x77\x77\x00\xbb\xbb\xbb\xbb\xbb\x22\x22\x22\x22\x00\x00\x00'\
b'\xbb\x22\x22\x22\x99\x22\x22\x22\x22\xbb\x22\x22\xbb\xbb\xbb\xbb'\
b'\x00\x77\x77\x00\xbb\xbb\xbb\xbb\xbb\x22\x22\x22\x22\x00\x00\x00'\
b'\xbb\x22\x22\x22\x22\x22\x22\x22\x22\xbb\x22\x22\xbb\x00\xbb\xbb'\
b'\xbb\x00\x00\xbb\xbb\xbb\xbb\xbb\x22\x22\x22\x22\xbb\x00\x00\x00'\
b'\xbb\x22\x22\x22\x22\x22\x22\x22\x22\xbb\x22\x22\xbb\x00\xbb\xbb'\
b'\xbb\x00\x00\xbb\xbb\xbb\xbb\xbb\x22\x22\x22\x22\xbb\x00\x00\x00'\
b'\xbb\x22\x22\x22\x99\x22\x22\x22\x22\xbb\x22\x22\x22\xbb\x00\x00'\
b'\xbb\xbb\xbb\xbb\xbb\xbb\x22\x22\x22\x22\x22\xbb\x00\x00\x00\x00'\
b'\xbb\x22\x22\x22\x99\x22\x22\x22\x22\xbb\x22\x22\x22\xbb\x00\x00'\
b'\xbb\xbb\xbb\xbb\xbb\xbb\x22\x22\x22\x22\x22\xbb\x00\x00\x00\x00'\
b'\xbb\x22\x22\x22\x22\x22\x22\x22\x22\xbb\x22\x22\x22\x22\xbb\xbb'\
b'\xbb\xbb\xbb\xbb\x22\x22\x22\x22\x22\x22\xbb\x00\x00\x00\x00\x00'\
b'\xbb\x22\x22\x22\x22\x22\x22\x22\x22\xbb\x22\x22\x22\x22\xbb\xbb'\
b'\xbb\xbb\xbb\xbb\x22\x22\x22\x22\x22\x22\xbb\x00\x00\x00\x00\x00'\
b'\xbb\x22\x22\x22\x99\x22\x22\x22\x22\xbb\x22\x22\x22\x22\x22\x22'\
b'\x22\x22\x22\x22\x22\x22\x22\x22\xbb\xbb\x00\x00\x00\x00\x00\x00'\
b'\xbb\x22\x22\x22\x99\x22\x22\x22\x22\xbb\x22\x22\x22\x22\x22\x22'\
b'\x22\x22\x22\x22\x22\x22\x22\x22\xbb\xbb\x00\x00\x00\x00\x00\x00'\
b'\xbb\x22\x22\x22\x22\x22\x22\x22\x22\xbb\x22\x22\x22\x22\x22\x22'\
b'\x22\x22\x22\x22\x22\x22\xbb\xbb\x00\x00\x00\x00\x00\x00\x00\x00'\
b'\xbb\x22\x22\x22\x22\x22\x22\x22\x22\xbb\x22\x22\x22\x22\x22\x22'\
b'\x22\x22\x22\x22\x22\x22\xbb\xbb\x00\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\xbb\x22\x22\x22\x22\x22\x22\x22\xbb\x22\x22\x22\x22\x22\x22'\
b'\x22\x22\x22\x22\xbb\xbb\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\xbb\x22\x22\x22\x22\x22\x22\x22\xbb\x22\x22\x22\x22\x22\x22'\
b'\x22\x22\x22\x22\xbb\xbb\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\xbb\x22\x22\x22\x22\x22\x22\xbb\x22\x22\x22\x22\x22\x22'\
b'\x22\x22\xbb\xbb\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\xbb\x22\x22\x22\x22\x22\x22\xbb\x22\x22\x22\x22\x22\x22'\
b'\x22\x22\xbb\xbb\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x00\xbb\xbb\x22\x22\x22\x22\xbb\x22\x22\x22\x22\x22\xbb'\
b'\xbb\xbb\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x00\xbb\xbb\x22\x22\x22\x22\xbb\x22\x22\x22\x22\x22\xbb'\
b'\xbb\xbb\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\xbb\xbb\x22\x22\xbb\x22\x22\xbb\xbb\xbb\x00'\
b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\xbb\xbb\x22\x22\xbb\x22\x22\xbb\xbb\xbb\x00'\
b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x00\x00\xbb\xbb\xbb\xbb\xbb\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x00\x00\xbb\xbb\xbb\xbb\xbb\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\
b'\x99\x99\x99\x99\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\
b'\x99\x99\x99\x99\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x99\x99\x99'\
b'\x99\x99\x99\x99\x99\x99\x99\x00\x00\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x99\x99\x99'\
b'\x99\x99\x99\x99\x99\x99\x99\x00\x00\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x99\x99\x99\x99\x00\x00'\
b'\x00\xff\xff\xff\xff\x99\x99\x99\x99\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x99\x99\x99\x99\x00\x00'\
b'\x00\xff\xff\xff\xff\x99\x99\x99\x99\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x00\x00\x00\x99\x99\x99\x00\x00\x00\xff\xff'\
b'\xff\x99\x99\x99\x99\x99\x99\x99\x99\x99\x99\x00\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x00\x00\x00\x99\x99\x99\x00\x00\x00\xff\xff'\
b'\xff\x99\x99\x99\x99\x99\x99\x99\x99\x99\x99\x00\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x00\x99\x99\x99\x00\x00\x00\xff\xff\x99\x99'\
b'\x99\x99\x00\x00\x00\xff\xff\xff\xff\x99\x99\xbb\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x00\x99\x99\x99\x00\x00\x00\xff\xff\x99\x99'\
b'\x99\x99\x00\x00\x00\xff\xff\xff\xff\x99\x99\xbb\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x99\x99\x99\x00\x00\x00\xff\xff\x99\x99\x99\x00'\
b'\x00\x00\xff\xff\xff\x99\x99\x99\x99\x99\x99\xbb\xbb\x00\x00\x00'\
b'\x00\x00\x00\x00\x99\x99\x99\x00\x00\x00\xff\xff\x99\x99\x99\x00'\
b'\x00\x00\xff\xff\xff\x99\x99\x99\x99\x99\x99\xbb\xbb\x00\x00\x00'\
b'\x00\x00\x00\x99\x99\x00\x00\x00\xff\xff\x99\x99\x99\x00\x00\x00'\
b'\xff\xff\x99\x99\x99\x99\xbb\x00\x00\x00\x00\xbb\xbb\x00\x00\x00'\
b'\x00\x00\x00\x99\x99\x00\x00\x00\xff\xff\x99\x99\x99\x00\x00\x00'\
b'\xff\xff\x99\x99\x99\x99\xbb\x00\x00\x00\x00\xbb\xbb\x00\x00\x00'\
b'\x00\x00\x99\x99\x00\x00\x00\xff\x99\x99\x99\x00\x00\x00\xff\xff'\
b'\x99\x99\x99\xbb\xbb\x00\x00\xbb\xbb\xbb\xbb\x00\xbb\x00\x00\x00'\
b'\x00\x00\x99\x99\x00\x00\x00\xff\x99\x99\x99\x00\x00\x00\xff\xff'\
b'\x99\x99\x99\xbb\xbb\x00\x00\xbb\xbb\xbb\xbb\x00\xbb\x00\x00\x00'\
b'\x00\x99\x99\x00\x00\x00\xff\x99\x99\x00\x00\x00\xff\xff\x99\x99'\
b'\x99\xbb\xbb\xbb\xbb\xbb\xbb\xbb\xbb\xbb\xbb\xbb\xbb\x00\x00\x00'\
b'\x00\x99\x99\x00\x00\x00\xff\x99\x99\x00\x00\x00\xff\xff\x99\x99'\
b'\x99\xbb\xbb\xbb\xbb\xbb\xbb\xbb\xbb\xbb\xbb\xbb\xbb\x00\x00\x00'\
b'\x00\x99\x99\x99\x99\xff\x99\x99\x00\x00\x00\xff\x99\x99\x99\xbb'\
b'\xbb\xbb\xbb\xbb\xbb\xbb\xbb\xbb\xbb\xbb\xbb\xbb\xbb\x00\x00\x00'\
b'\x00\x99\x99\x99\x99\xff\x99\x99\x00\x00\x00\xff\x99\x99\x99\xbb'\
b'\xbb\xbb\xbb\xbb\xbb\xbb\xbb\xbb\xbb\xbb\xbb\xbb\xbb\x00\x00\x00'\
b'\xbb\x22\x22\x99\x99\x99\x99\x00\x00\x00\xff\x99\x99\xcc\xbb\xbb'\
b'\xbb\xbb\xbb\xbb\xbb\xbb\xbb\xbb\xbb\xbb\xbb\xbb\x00\x00\x00\x00'\
b'\xbb\x22\x22\x99\x99\x99\x99\x00\x00\x00\xff\x99\x99\xcc\xbb\xbb'\
b'\xbb\xbb\xbb\xbb\xbb\xbb\xbb\xbb\xbb\xbb\xbb\xbb\x00\x00\x00\x00'\
b'\xbb\x22\x22\x22\x22\x99\x99\x99\x99\xff\x99\x99\xcc\xbb\xbb\xbb'\
b'\xbb\xbb\xbb\xbb\xbb\xbb\xbb\xbb\xbb\xbb\xbb\x00\xbb\x00\x00\x00'\
b'\xbb\x22\x22\x22\x22\x99\x99\x99\x99\xff\x99\x99\xcc\xbb\xbb\xbb'\
b'\xbb\xbb\xbb\xbb\xbb\xbb\xbb\xbb\xbb\xbb\xbb\x00\xbb\x00\x00\x00'\
b'\xbb\x22\x99\x99\x22\x22\x22\x99\x99\x99\x99\xcc\xbb\xbb\xbb\xbb'\
b'\xbb\xbb\xbb\xbb\xbb\xbb\xbb\xbb\xbb\xbb\xbb\x00\x00\x00\x00\x00'\
b'\xbb\x22\x99\x99\x22\x22\x22\x99\x99\x99\x99\xcc\xbb\xbb\xbb\xbb'\
b'\xbb\xbb\xbb\xbb\xbb\xbb\xbb\xbb\xbb\xbb\xbb\x00\x00\x00\x00\x00'\
b'\xbb\x22\x99\xcc\x99\x99\x22\x22\x22\xbb\xbb\xcc\xbb\xbb\xbb\xbb'\
b'\xbb\x00\x00\xbb\xbb\xbb\xbb\xbb\xbb\x00\x00\x00\xbb\x00\x00\x00'\
b'\xbb\x22\x99\xcc\x99\x99\x22\x22\x22\xbb\xbb\xcc\xbb\xbb\xbb\xbb'\
b'\xbb\x00\x00\xbb\xbb\xbb\xbb\xbb\xbb\x00\x00\x00\xbb\x00\x00\x00'\
b'\xbb\x22\x99\xcc\xcc\xcc\x99\x99\x22\xbb\x22\xbb\xbb\xbb\xbb\xbb'\
b'\x00\x77\x77\x00\x00\x00\x00\x00\x00\x00\x77\x77\x00\x77\x77\x00'\
b'\xbb\x22\x99\xcc\xcc\xcc\x99\x99\x22\xbb\x22\xbb\xbb\xbb\xbb\xbb'\
b'\x00\x77\x77\x00\x00\x00\x00\x00\x00\x00\x77\x77\x00\x77\x77\x00'\
b'\xbb\x22\x22\x22\x22\xcc\x99\x99\x22\xbb\x22\xbb\xbb\xbb\xbb\x00'\
b'\x77\x77\x77\x77\x77\x00\x77\x77\x00\x77\x77\x00\x77\x77\x00\x77'\
b'\xbb\x22\x22\x22\x22\xcc\x99\x99\x22\xbb\x22\xbb\xbb\xbb\xbb\x00'\
b'\x77\x77\x77\x77\x77\x00\x77\x77\x00\x77\x77\x00\x77\x77\x00\x77'\
b'\xbb\x22\x22\x22\x99\x22\x99\x99\x22\xbb\x22\xbb\xbb\xbb\xbb\x00'\
b'\x77\x77\x77\x77\x00\x77\x77\x00\x77\x77\x00\x77\x77\x00\x77\x77'\
b'\xbb\x22\x22\x22\x99\x22\x99\x99\x22\xbb\x22\xbb\xbb\xbb\xbb\x00'\
b'\x77\x77\x77\x77\x00\x77\x77\x00\x77\x77\x00\x77\x77\x00\x77\x77'\
b'\xbb\x22\x22\x22\x22\x22\x22\x22\x22\xbb\x22\x22\xbb\x00\xbb\x00'\
b'\x77\x77\x77\x77\x77\x77\x00\x77\x77\x00\x77\x77\x00\x77\x77\x00'\
b'\xbb\x22\x22\x22\x22\x22\x22\x22\x22\xbb\x22\x22\xbb\x00\xbb\x00'\
b'\x77\x77\x77\x77\x77\x77\x00\x77\x77\x00\x77\x77\x00\x77\x77\x00'\
b'\xbb\x22\x22\x22\x99\x22\x22\x22\x22\xbb\x22\x22\xbb\xbb\xbb\xbb'\
b'\x00\x77\x77\x77\x77\x77\x77\x77\x77\x77\x77\x00\x77\x77\x77\x00'\
b'\xbb\x22\x22\x22\x99\x22\x22\x22\x22\xbb\x22\x22\xbb\xbb\xbb\xbb'\
b'\x00\x77\x77\x77\x77\x77\x77\x77\x77\x77\x77\x00\x77\x77\x77\x00'\
b'\xbb\x22\x22\x22\x22\x22\x22\x22\x22\xbb\x22\x22\xbb\x00\xbb\xbb'\
b'\xbb\x00\x77\x77\x77\x77\x77\x00\x77\x77\x77\x77\x77\x77\x00\x00'\
b'\xbb\x22\x22\x22\x22\x22\x22\x22\x22\xbb\x22\x22\xbb\x00\xbb\xbb'\
b'\xbb\x00\x77\x77\x77\x77\x77\x00\x77\x77\x77\x77\x77\x77\x00\x00'\
b'\xbb\x22\x22\x22\x99\x22\x22\x22\x22\xbb\x22\x22\x22\xbb\x00\x00'\
b'\xbb\xbb\x00\x77\x77\x77\x77\x77\x77\x00\x77\x77\x77\x77\x00\x00'\
b'\xbb\x22\x22\x22\x99\x22\x22\x22\x22\xbb\x22\x22\x22\xbb\x00\x00'\
b'\xbb\xbb\x00\x77\x77\x77\x77\x77\x77\x00\x77\x77\x77\x77\x00\x00'\
b'\xbb\x22\x22\x22\x22\x22\x22\x22\x22\xbb\x22\x22\x22\x22\xbb\xbb'\
b'\xbb\xbb\xbb\x00\x77\x77\x77\x77\x77\x77\x77\x77\x77\x00\x00\x00'\
b'\xbb\x22\x22\x22\x22\x22\x22\x22\x22\xbb\x22\x22\x22\x22\xbb\xbb'\
b'\xbb\xbb\xbb\x00\x77\x77\x77\x77\x77\x77\x77\x77\x77\x00\x00\x00'\
b'\xbb\x22\x22\x22\x99\x22\x22\x22\x22\xbb\x22\x22\x22\x22\x22\x22'\
b'\x22\x22\x22\x22\x00\x77\x77\x77\x77\x77\x77\x77\x00\x00\x00\x00'\
b'\xbb\x22\x22\x22\x99\x22\x22\x22\x22\xbb\x22\x22\x22\x22\x22\x22'\
b'\x22\x22\x22\x22\x00\x77\x77\x77\x77\x77\x77\x77\x00\x00\x00\x00'\
b'\xbb\x22\x22\x22\x22\x22\x22\x22\x22\xbb\x22\x22\x22\x22\x22\x22'\
b'\x22\x22\x22\x22\x22\x00\x77\x77\x77\x77\x77\x00\x00\x00\x00\x00'\
b'\xbb\x22\x22\x22\x22\x22\x22\x22\x22\xbb\x22\x22\x22\x22\x22\x22'\
b'\x22\x22\x22\x22\x22\x00\x77\x77\x77\x77\x77\x00\x00\x00\x00\x00'\
b'\x00\xbb\x22\x22\x22\x22\x22\x22\x22\xbb\x22\x22\x22\x22\x22\x22'\
b'\x22\x22\x22\x22\xbb\xbb\x00\x00\x77\x77\x00\x00\x00\x00\x00\x00'\
b'\x00\xbb\x22\x22\x22\x22\x22\x22\x22\xbb\x22\x22\x22\x22\x22\x22'\
b'\x22\x22\x22\x22\xbb\xbb\x00\x00\x77\x77\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\xbb\x22\x22\x22\x22\x22\x22\xbb\x22\x22\x22\x22\x22\x22'\
b'\x22\x22\xbb\xbb\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\xbb\x22\x22\x22\x22\x22\x22\xbb\x22\x22\x22\x22\x22\x22'\
b'\x22\x22\xbb\xbb\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x00\xbb\xbb\x22\x22\x22\x22\xbb\x22\x22\x22\x22\x22\xbb'\
b'\xbb\xbb\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x00\xbb\xbb\x22\x22\x22\x22\xbb\x22\x22\x22\x22\x22\xbb'\
b'\xbb\xbb\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\xbb\xbb\x22\x22\xbb\x22\x22\xbb\xbb\xbb\x00'\
b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\xbb\xbb\x22\x22\xbb\x22\x22\xbb\xbb\xbb\x00'\
b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x00\x00\xbb\xbb\xbb\xbb\xbb\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x00\x00\xbb\xbb\xbb\xbb\xbb\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x77\x77\x00\x00\x00\x00'\
b'\x99\x99\x99\x99\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x77\x77\x00\x00\x00\x00'\
b'\x99\x99\x99\x99\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x00\x00\x00\x77\x77\x77\x77\x00\x99\x99\x99'\
b'\x99\x99\x99\x99\x99\x99\x99\x00\x00\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x00\x00\x00\x77\x77\x77\x77\x00\x99\x99\x99'\
b'\x99\x99\x99\x99\x99\x99\x99\x00\x00\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x00\x00\x77\x77\x00\x99\x99\x99\x99\x00\x00'\
b'\x00\xff\xff\xff\xff\x99\x99\x99\x99\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x00\x00\x77\x77\x00\x99\x99\x99\x99\x00\x00'\
b'\x00\xff\xff\xff\xff\x99\x99\x99\x99\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x00\x77\x77\x99\x99\x99\x00\x00\x00\xff\xff'\
b'\xff\x99\x99\x99\x99\x99\x99\x99\x99\x99\x99\x00\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x00\x77\x77\x99\x99\x99\x00\x00\x00\xff\xff'\
b'\xff\x99\x99\x99\x99\x99\x99\x99\x99\x99\x99\x00\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x77\x99\x99\x99\x00\x00\x00\xff\xff\x99\x99'\
b'\x99\x99\x00\x00\x00\xff\xff\xff\xff\x99\x99\xbb\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x77\x99\x99\x99\x00\x00\x00\xff\xff\x99\x99'\
b'\x99\x99\x00\x00\x00\xff\xff\xff\xff\x99\x99\xbb\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x99\x99\x99\x00\x00\x00\xff\xff\x99\x99\x99\x00'\
b'\x00\x00\xff\xff\xff\x99\x99\x99\x99\x99\x99\xbb\xbb\x00\x00\x00'\
b'\x00\x00\x00\x00\x99\x99\x99\x00\x00\x00\xff\xff\x99\x99\x99\x00'\
b'\x00\x00\xff\xff\xff\x99\x99\x99\x99\x99\x99\xbb\xbb\x00\x00\x00'\
b'\x00\x00\x00\x99\x99\x00\x00\x00\xff\xff\x99\x99\x99\x00\x00\x00'\
b'\xff\xff\x99\x99\x99\x99\xbb\x00\x00\x00\x00\xbb\xbb\x00\x00\x00'\
b'\x00\x00\x00\x99\x99\x00\x00\x00\xff\xff\x99\x99\x99\x00\x00\x00'\
b'\xff\xff\x99\x99\x99\x99\xbb\x00\x00\x00\x00\xbb\xbb\x00\x00\x00'\
b'\x00\x00\x99\x99\x00\x00\x00\xff\x99\x99\x99\x00\x00\x00\xff\xff'\
b'\x99\x99\x99\xbb\xbb\x00\x00\xbb\xbb\xbb\xbb\x00\xbb\x00\x00\x00'\
b'\x00\x00\x99\x99\x00\x00\x00\xff\x99\x99\x99\x00\x00\x00\xff\xff'\
b'\x99\x99\x99\xbb\xbb\x00\x00\xbb\xbb\xbb\xbb\x00\xbb\x00\x00\x00'\
b'\x00\x99\x99\x00\x00\x00\xff\x99\x99\x00\x00\x00\xff\xff\x99\x99'\
b'\x99\xbb\xbb\xbb\xbb\xbb\xbb\xbb\xbb\xbb\xbb\xbb\xbb\x00\x00\x00'\
b'\x00\x99\x99\x00\x00\x00\xff\x99\x99\x00\x00\x00\xff\xff\x99\x99'\
b'\x99\xbb\xbb\xbb\xbb\xbb\xbb\xbb\xbb\xbb\xbb\xbb\xbb\x00\x00\x00'\
b'\x00\x99\x99\x99\x99\xff\x99\x99\x00\x00\x00\xff\x99\x99\x99\xbb'\
b'\xbb\xbb\xbb\xbb\xbb\x00\x00\x00\x00\x00\x00\x00\xbb\x00\x00\x00'\
b'\x00\x99\x99\x99\x99\xff\x99\x99\x00\x00\x00\xff\x99\x99\x99\xbb'\
b'\xbb\xbb\xbb\xbb\xbb\x00\x00\x00\x00\x00\x00\x00\xbb\x00\x00\x00'\
b'\xbb\x22\x22\x99\x99\x99\x99\x00\x00\x00\xff\x99\x99\xcc\xbb\xbb'\
b'\xbb\xbb\xbb\x00\x00\x77\x77\x77\x77\x77\x77\x77\x00\x00\x00\x00'\
b'\xbb\x22\x22\x99\x99\x99\x99\x00\x00\x00\xff\x99\x99\xcc\xbb\xbb'\
b'\xbb\xbb\xbb\x00\x00\x77\x77\x77\x77\x77\x77\x77\x00\x00\x00\x00'\
b'\xbb\x22\x22\x22\x22\x99\x99\x99\x99\xff\x99\x99\xcc\xbb\xbb\xbb'\
b'\xbb\xbb\x00\x77\x77\x77\x77\x77\x00\x77\x77\x77\x77\x77\x77\x77'\
b'\xbb\x22\x22\x22\x22\x99\x99\x99\x99\xff\x99\x99\xcc\xbb\xbb\xbb'\
b'\xbb\xbb\x00\x77\x77\x77\x77\x77\x00\x77\x77\x77\x77\x77\x77\x77'\
b'\xbb\x22\x99\x99\x22\x22\x22\x99\x99\x99\x99\xcc\xbb\xbb\xbb\xbb'\
b'\xbb\x00\x77\x77\x77\x77\x77\x77\x77\x77\x00\x77\x00\x77\x00\x00'\
b'\xbb\x22\x99\x99\x22\x22\x22\x99\x99\x99\x99\xcc\xbb\xbb\xbb\xbb'\
b'\xbb\x00\x77\x77\x77\x77\x77\x77\x77\x77\x00\x77\x00\x77\x00\x00'\
b'\xbb\x22\x99\xcc\x99\x99\x22\x22\x22\xbb\xbb\xcc\xbb\xbb\xbb\xbb'\
b'\x00\x77\x77\x77\x77\x77\x77\x00\x77\x77\x77\x77\x77\x77\x77\x77'\
b'\xbb\x22\x99\xcc\x99\x99\x22\x22\x22\xbb\xbb\xcc\xbb\xbb\xbb\xbb'\
b'\x00\x77\x77\x77\x77\x77\x77\x00\x77\x77\x77\x77\x77\x77\x77\x77'\
b'\xbb\x22\x99\xcc\xcc\xcc\x99\x99\x22\xbb\x22\xbb\xbb\xbb\xbb\xbb'\
b'\x00\x77\x77\x77\x77\x77\x77\x77\x77\x00\x77\x00\x00\x77\x77\x00'\
b'\xbb\x22\x99\xcc\xcc\xcc\x99\x99\x22\xbb\x22\xbb\xbb\xbb\xbb\xbb'\
b'\x00\x77\x77\x77\x77\x77\x77\x77\x77\x00\x77\x00\x00\x77\x77\x00'\
b'\xbb\x22\x22\x22\x22\xcc\x99\x99\x22\xbb\x22\xbb\xbb\xbb\xbb\x00'\
b'\x77\x77\x77\x77\x77\x77\x00\x77\x77\x77\x77\x77\x77\x00\x00\x00'\
b'\xbb\x22\x22\x22\x22\xcc\x99\x99\x22\xbb\x22\xbb\xbb\xbb\xbb\x00'\
b'\x77\x77\x77\x77\x77\x77\x00\x77\x77\x77\x77\x77\x77\x00\x00\x00'\
b'\xbb\x22\x22\x22\x99\x22\x99\x99\x22\xbb\x22\xbb\xbb\xbb\xbb\x00'\
b'\x77\x77\x00\x77\x00\x77\x77\x77\x00\x77\x00\x22\x22\x00\x00\x00'\
b'\xbb\x22\x22\x22\x99\x22\x99\x99\x22\xbb\x22\xbb\xbb\xbb\xbb\x00'\
b'\x77\x77\x00\x77\x00\x77\x77\x77\x00\x77\x00\x22\x22\x00\x00\x00'\
b'\xbb\x22\x22\x22\x22\x22\x22\x22\x22\xbb\x22\x22\xbb\x00\xbb\x00'\
b'\x77\x77\x77\x77\x00\x00\x00\x00\x00\x00\x00\x22\xbb\x00\x00\x00'\
b'\xbb\x22\x22\x22\x22\x22\x22\x22\x22\xbb\x22\x22\xbb\x00\xbb\x00'\
b'\x77\x77\x77\x77\x00\x00\x00\x00\x00\x00\x00\x22\xbb\x00\x00\x00'\
b'\xbb\x22\x22\x22\x99\x22\x22\x22\x22\xbb\x22\x22\xbb\xbb\xbb\xbb'\
b'\x00\x77\x77\x00\xbb\xbb\xbb\xbb\xbb\x22\x22\x22\x22\x00\x00\x00'\
b'\xbb\x22\x22\x22\x99\x22\x22\x22\x22\xbb\x22\x22\xbb\xbb\xbb\xbb'\
b'\x00\x77\x77\x00\xbb\xbb\xbb\xbb\xbb\x22\x22\x22\x22\x00\x00\x00'\
b'\xbb\x22\x22\x22\x22\x22\x22\x22\x22\xbb\x22\x22\xbb\x00\xbb\xbb'\
b'\xbb\x00\x00\xbb\xbb\xbb\xbb\xbb\x22\x22\x22\x22\xbb\x00\x00\x00'\
b'\xbb\x22\x22\x22\x22\x22\x22\x22\x22\xbb\x22\x22\xbb\x00\xbb\xbb'\
b'\xbb\x00\x00\xbb\xbb\xbb\xbb\xbb\x22\x22\x22\x22\xbb\x00\x00\x00'\
b'\xbb\x22\x22\x22\x99\x22\x22\x22\x22\xbb\x22\x22\x22\xbb\x00\x00'\
b'\xbb\xbb\xbb\xbb\xbb\xbb\x22\x22\x22\x22\x22\xbb\x00\x00\x00\x00'\
b'\xbb\x22\x22\x22\x99\x22\x22\x22\x22\xbb\x22\x22\x22\xbb\x00\x00'\
b'\xbb\xbb\xbb\xbb\xbb\xbb\x22\x22\x22\x22\x22\xbb\x00\x00\x00\x00'\
b'\xbb\x22\x22\x22\x22\x22\x22\x22\x22\xbb\x22\x22\x22\x22\xbb\xbb'\
b'\xbb\xbb\xbb\xbb\x22\x22\x22\x22\x22\x22\xbb\x00\x00\x00\x00\x00'\
b'\xbb\x22\x22\x22\x22\x22\x22\x22\x22\xbb\x22\x22\x22\x22\xbb\xbb'\
b'\xbb\xbb\xbb\xbb\x22\x22\x22\x22\x22\x22\xbb\x00\x00\x00\x00\x00'\
b'\xbb\x22\x22\x22\x99\x22\x22\x22\x22\xbb\x22\x22\x22\x22\x22\x22'\
b'\x22\x22\x22\x22\x22\x22\x22\x22\xbb\xbb\x00\x00\x00\x00\x00\x00'\
b'\xbb\x22\x22\x22\x99\x22\x22\x22\x22\xbb\x22\x22\x22\x22\x22\x22'\
b'\x22\x22\x22\x22\x22\x22\x22\x22\xbb\xbb\x00\x00\x00\x00\x00\x00'\
b'\xbb\x22\x22\x22\x22\x22\x22\x22\x22\xbb\x22\x22\x22\x22\x22\x22'\
b'\x22\x22\x22\x22\x22\x22\xbb\xbb\x00\x00\x00\x00\x00\x00\x00\x00'\
b'\xbb\x22\x22\x22\x22\x22\x22\x22\x22\xbb\x22\x22\x22\x22\x22\x22'\
b'\x22\x22\x22\x22\x22\x22\xbb\xbb\x00\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\xbb\x22\x22\x22\x22\x22\x22\x22\xbb\x22\x22\x22\x22\x22\x22'\
b'\x22\x22\x22\x22\xbb\xbb\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\xbb\x22\x22\x22\x22\x22\x22\x22\xbb\x22\x22\x22\x22\x22\x22'\
b'\x22\x22\x22\x22\xbb\xbb\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\xbb\x22\x22\x22\x22\x22\x22\xbb\x22\x22\x22\x22\x22\x22'\
b'\x22\x22\xbb\xbb\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\xbb\x22\x22\x22\x22\x22\x22\xbb\x22\x22\x22\x22\x22\x22'\
b'\x22\x22\xbb\xbb\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x00\xbb\xbb\x22\x22\x22\x22\xbb\x22\x22\x22\x22\x22\xbb'\
b'\xbb\xbb\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x00\xbb\xbb\x22\x22\x22\x22\xbb\x22\x22\x22\x22\x22\xbb'\
b'\xbb\xbb\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\xbb\xbb\x22\x22\xbb\x22\x22\xbb\xbb\xbb\x00'\
b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\xbb\xbb\x22\x22\xbb\x22\x22\xbb\xbb\xbb\x00'\
b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x00\x00\xbb\xbb\xbb\xbb\xbb\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x00\x00\xbb\xbb\xbb\xbb\xbb\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x55\x55'\
b'\x55\x55\x55\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x55\x55'\
b'\x55\x55\x55\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x55\x55\x44\x44'\
b'\x44\x44\x44\x55\x55\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x55\x55\x44\x44'\
b'\x44\x44\x44\x55\x55\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x55\x55\x44\x44\x44\x44'\
b'\x44\x44\x44\x22\x44\x55\x55\x00\x00\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x55\x55\x44\x44\x44\x44'\
b'\x44\x44\x44\x22\x44\x55\x55\x00\x00\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x00\x00\x00\x55\x55\x44\x44\x44\x44\x44\x22'\
b'\x44\x44\x44\x44\x44\x44\x44\x55\x00\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x00\x00\x00\x55\x55\x44\x44\x44\x44\x44\x22'\
b'\x44\x44\x44\x44\x44\x44\x44\x55\x00\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x00\x55\x55\x44\x44\x44\x44\x22\x44\x44\x44'\
b'\x44\x44\x44\x44\x22\x44\x44\x44\x55\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x00\x55\x55\x44\x44\x44\x44\x22\x44\x44\x44'\
b'\x44\x44\x44\x44\x22\x44\x44\x44\x55\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x55\x55\x44\x44\x44\x44\x44\x22\x44\x44\x44\x44'\
b'\x44\x44\x22\x44\x44\x44\x44\x44\x44\x55\x55\x00\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x55\x55\x44\x44\x44\x44\x44\x22\x44\x44\x44\x44'\
b'\x44\x44\x22\x44\x44\x44\x44\x44\x44\x55\x55\x00\x00\x00\x00\x00'\
b'\x00\x00\x55\x55\x44\x44\x44\x44\x44\x44\x22\x22\x44\x44\x44\x22'\
b'\x44\x33\x44\x22\x33\x44\x44\x44\x44\x44\x44\x55\x00\x00\x00\x00'\
b'\x00\x00\x55\x55\x44\x44\x44\x44\x44\x44\x22\x22\x44\x44\x44\x22'\
b'\x44\x33\x44\x22\x33\x44\x44\x44\x44\x44\x44\x55\x00\x00\x00\x00'\
b'\x00\x55\x44\x44\x44\x44\x44\x44\x44\x44\x33\x44\x33\x44\x33\x22'\
b'\x44\x44\x44\x44\x22\x44\x44\x44\x44\x44\x44\x44\x55\x00\x00\x00'\
b'\x00\x55\x44\x44\x44\x44\x44\x44\x44\x44\x33\x44\x33\x44\x33\x22'\
b'\x44\x44\x44\x44\x22\x44\x44\x44\x44\x44\x44\x44\x55\x00\x00\x00'\
b'\x22\x55\x44\x22\x44\x44\x22\x44\x44\x44\x44\x44\x44\x22\x44\x33'\
b'\x44\x22\x44\x44\x44\x22\x44\x44\x44\x44\x44\x44\x44\x55\x00\x00'\
b'\x22\x55\x44\x22\x44\x44\x22\x44\x44\x44\x44\x44\x44\x22\x44\x33'\
b'\x44\x22\x44\x44\x44\x22\x44\x44\x44\x44\x44\x44\x44\x55\x00\x00'\
b'\x22\x22\x55\x44\x44\x44\x44\x44\x44\x22\x44\x44\x44\x44\x44\x22'\
b'\x44\x22\x44\x44\x44\x22\x44\x44\x44\x44\x44\x44\x44\x44\x55\x00'\
b'\x22\x22\x55\x44\x44\x44\x44\x44\x44\x22\x44\x44\x44\x44\x44\x22'\
b'\x44\x22\x44\x44\x44\x22\x44\x44\x44\x44\x44\x44\x44\x44\x55\x00'\
b'\x22\x22\x22\x55\x55\x44\x44\x44\x22\x44\x22\x44\x44\x44\x44\x22'\
b'\x22\x44\x44\x44\x44\x22\x22\x44\x44\x44\x44\x44\x44\x44\x55\x55'\
b'\x22\x22\x22\x55\x55\x44\x44\x44\x22\x44\x22\x44\x44\x44\x44\x22'\
b'\x22\x44\x44\x44\x44\x22\x22\x44\x44\x44\x44\x44\x44\x44\x55\x55'\
b'\x22\x22\x22\x22\x22\x55\x22\x44\x44\x44\x44\x44\x44\x44\x33\x44'\
b'\x22\x22\x44\x33\x44\x44\x44\x44\x44\x22\x44\x44\x55\x55\x22\x22'\
b'\x22\x22\x22\x22\x22\x55\x22\x44\x44\x44\x44\x44\x44\x44\x33\x44'\
b'\x22\x22\x44\x33\x44\x44\x44\x44\x44\x22\x44\x44\x55\x55\x22\x22'\
b'\x00\x22\x22\x22\x22\x22\x22\x55\x55\x44\x44\x44\x44\x44\x44\x44'\
b'\x44\x22\x44\x44\x44\x44\x44\x44\x44\x44\x44\x55\x22\x22\x22\x22'\
b'\x00\x22\x22\x22\x22\x22\x22\x55\x55\x44\x44\x44\x44\x44\x44\x44'\
b'\x44\x22\x44\x44\x44\x44\x44\x44\x44\x44\x44\x55\x22\x22\x22\x22'\
b'\x00\x00\x22\x22\x22\x22\x22\x22\x22\x55\x55\x44\x44\x44\x44\x44'\
b'\x44\x44\x44\x44\x44\x44\x44\x44\x55\x55\x55\x22\x22\x22\x22\x22'\
b'\x00\x00\x22\x22\x22\x22\x22\x22\x22\x55\x55\x44\x44\x44\x44\x44'\
b'\x44\x44\x44\x44\x44\x44\x44\x44\x55\x55\x55\x22\x22\x22\x22\x22'\
b'\x00\x00\x00\x22\x22\x22\x22\x22\x22\x22\x22\x55\x55\x44\x22\x44'\
b'\x44\x44\x44\x44\x44\x22\x55\x55\x22\x22\x22\x22\x22\x22\x22\x22'\
b'\x00\x00\x00\x22\x22\x22\x22\x22\x22\x22\x22\x55\x55\x44\x22\x44'\
b'\x44\x44\x44\x44\x44\x22\x55\x55\x22\x22\x22\x22\x22\x22\x22\x22'\
b'\x00\x00\x00\x00\x00\x22\x22\x22\x22\x22\x22\x22\x22\x55\x44\x44'\
b'\x44\x44\x44\x55\x55\x55\x22\x22\x22\x22\x22\x22\x22\x22\x00\x00'\
b'\x00\x00\x00\x00\x00\x22\x22\x22\x22\x22\x22\x22\x22\x55\x44\x44'\
b'\x44\x44\x44\x55\x55\x55\x22\x22\x22\x22\x22\x22\x22\x22\x00\x00'\
b'\x00\x00\x00\x00\x00\x00\x00\x22\x22\x22\x22\x22\x22\x22\x55\x55'\
b'\x55\x55\x55\x22\x22\x22\x22\x22\x22\x22\x22\x22\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x00\x00\x22\x22\x22\x22\x22\x22\x22\x55\x55'\
b'\x55\x55\x55\x22\x22\x22\x22\x22\x22\x22\x22\x22\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x22\x22\x22\x22\x22\x22\x22'\
b'\x22\x22\x22\x22\x22\x22\x22\x22\x22\x22\x22\x00\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x22\x22\x22\x22\x22\x22\x22'\
b'\x22\x22\x22\x22\x22\x22\x22\x22\x22\x22\x22\x00\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x22\x22\x22\x22\x22'\
b'\x22\x22\x22\x22\x22\x22\x22\x22\x00\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x22\x22\x22\x22\x22'\
b'\x22\x22\x22\x22\x22\x22\x22\x22\x00\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x22\x22\x22\x22'\
b'\x22\x22\x22\x22\x22\x22\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x22\x22\x22\x22'\
b'\x22\x22\x22\x22\x22\x22\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x22\x22'\
b'\x22\x22\x22\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x22\x22'\
b'\x22\x22\x22\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'
BITMAP = memoryview(_bitmap)

Plik binarny nie jest wyświetlany.

Po

Szerokość:  |  Wysokość:  |  Rozmiar: 10 KiB

Wyświetl plik

@ -0,0 +1,177 @@
'''
toasters.py - Flying Toasters(ish) an ESP-32 and ST7789 240x320 display.
Uses spritesheet from CircuitPython_Flying_Toasters pendant project
https://learn.adafruit.com/circuitpython-sprite-animation-pendant-mario-clouds-flying-toasters
Convert spritesheet bmp to tft.bitmap() method compatible python module using:
python3 ./sprites2bitmap.py toasters.bmp 64 64 4 > toast_bitmaps.py
'''
import gc
import time
import random
from machine import Pin, SPI
import st7789
import toast_bitmaps
TOASTER_FRAMES = [0, 1, 2, 3]
TOAST_FRAMES = [4]
def collide(a_col, a_row, a_width, a_height, b_col, b_row, b_width, b_height):
'''return true if two rectangles overlap'''
return (a_col + a_width >= b_col and a_col <= b_col + b_width
and a_row + a_height >= b_row and a_row <= b_row + b_height)
def random_start(tft, sprites, bitmaps, num):
'''
Return a random location along the top or right of the screen, if that location would overlaps
with another sprite return (0,0). This allows the other sprites to keep moving giving the next
random_start a better chance to avoid a collision.
'''
# 50/50 chance to try along the top/right half or along the right/top half of the screen
if random.getrandbits(1):
row = 1
col = random.randint(bitmaps.WIDTH//2, tft.width()-bitmaps.WIDTH)
else:
col = tft.width() - bitmaps.WIDTH
row = random.randint(1, tft.height() // 2)
if any(collide(
col, row, bitmaps.WIDTH, bitmaps.HEIGHT,
sprite.col, sprite.row, sprite.width, sprite.height)
for sprite in sprites if num != sprite.num):
col = 0
row = 0
return (col, row)
def main():
class Toast():
'''
Toast class to keep track of toaster and toast sprites
'''
def __init__(self, sprites, bitmaps, frames):
'''create new sprite in random location that does not overlap other sprites'''
self.num = len(sprites)
self.bitmaps = bitmaps
self.frames = frames
self.steps = len(frames)
self.col, self.row = random_start(tft, sprites, bitmaps, self.num)
self.width = bitmaps.WIDTH
self.height = bitmaps.HEIGHT
self.last_col = self.col
self.last_row = self.row
self.step = random.randint(0, self.steps)
self.dir_col = -random.randint(2, 5)
self.dir_row = 2
self.prev_dir_col = self.dir_col
self.prev_dir_row = self.dir_row
self.iceberg = 0
def clear(self):
'''clear above and behind sprite'''
tft.fill_rect(
self.col, self.row-1, self.width, self.dir_row+1,
st7789.BLACK)
tft.fill_rect(
self.col+self.width+self.dir_col, self.row,
-self.dir_col, self.height, st7789.BLACK)
def erase(self):
'''erase last postion of sprite'''
tft.fill_rect(
self.last_col, self.last_row, self.width, self.height, st7789.BLACK)
def move(self, sprites):
'''step frame and move sprite'''
if self.steps:
self.step = (self.step + 1) % self.steps
self.last_col = self.col
self.last_row = self.row
new_col = self.col + self.dir_col
new_row = self.row + self.dir_row
# if new location collides with another sprite, change direction for 32 frames
for sprite in sprites:
if (
self.num != sprite.num
and collide(
new_col, new_row, self.width, self.height,
sprite.col, sprite.row, sprite.width, sprite.height,
)
and (self.col > sprite.col)):
self.iceberg = 32
self.dir_col = -1
self.dir_row = 3
new_col = self.col + self.dir_col
new_row = self.row + self.dir_row
self.col = new_col
self.row = new_row
# if new location touches edge of screen, erase then set new start location
if self.col <= 0 or self.row > tft.height() - self.height:
self.erase()
self.dir_col = -random.randint(2, 5)
self.dir_row = 2
self.col, self.row = random_start(tft, sprites, self.bitmaps, self.num)
# Track post collision direction change
if self.iceberg:
self.iceberg -= 1
if self.iceberg == 1:
self.dir_col = self.prev_dir_col
self.dir_row = self.prev_dir_row
def draw(self):
'''if the location is not 0,0 draw current frame of sprite at it's location'''
if self.col and self.row:
tft.bitmap(self.bitmaps, self.col, self.row, self.frames[self.step])
# configure spi interface
spi = SPI(1, baudrate=31250000, sck=Pin(18), mosi=Pin(19))
# configure display
tft = st7789.ST7789(
spi,
240,
320,
reset=Pin(4, Pin.OUT),
cs=Pin(13, Pin.OUT),
dc=Pin(12, Pin.OUT),
backlight=Pin(15, Pin.OUT),
rotation=1,
buffer_size=64*62*2)
# init and clear screen
tft.init()
tft.fill(st7789.BLACK)
# create toast spites and set animation frames
sprites = []
sprites.append(Toast(sprites, toast_bitmaps, TOAST_FRAMES))
sprites.append(Toast(sprites, toast_bitmaps, TOASTER_FRAMES))
sprites.append(Toast(sprites, toast_bitmaps, TOASTER_FRAMES))
# move and draw sprites
while True:
for sprite in sprites:
sprite.clear()
sprite.move(sprites)
sprite.draw()
gc.collect()
time.sleep(0.01)
main()

Wyświetl plik

@ -19,8 +19,7 @@ help:
@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
update:
# Update documentation on my webserver using rsync over ssh
# Update documentation on my webserver using rsync over ssh
# /usr/bin/rsync --progress --delete -e 'ssh -i ~/.ssh/id_rsa' -avz build/html/ penfold.owt.com:/htdocs/st7789py/
# update docs directory of this repo using rsync
/usr/bin/rsync --progress --delete -avz build/html/ ../docs/

Wyświetl plik

@ -1,4 +1,5 @@
# additional sphinx plug-ins, install using pip3
sphinx
sphinx-prompt
sphinxcontrib.napoleon
sphinxcontrib.napoleon

Wyświetl plik

@ -1,39 +1,109 @@
****************
Example Programs
================
****************
320x240 Example Programs
========================
These examples run on a ESP32 board with a 320x240 display. They are were tested using a SparkFun
ESP32 Thing and a Waveshare 2 inch LCD ST7789 Module. You may need to modify the pin use for your
device.
320x240 lines.py
----------------
.. literalinclude:: ../../examples/esp32_320x240/lines.py
:linenos:
:language: python
320x240 hello.py
-----------------
.. literalinclude:: ../../examples/esp32_320x240/hello.py
:linenos:
:language: python
320x240 feathers.py
-------------------
.. literalinclude:: ../../examples/esp32_320x240/feathers.py
:linenos:
:language: python
320x240 fonts.py
----------------
.. literalinclude:: ../../examples/esp32_320x240/fonts.py
:linenos:
:language: python
320x240 scroll.py
-----------------
.. literalinclude:: ../../examples/esp32_320x240/scroll.py
:linenos:
:language: python
320x240 toasters.py
-------------------
Flying toasters sprite demo using bitmaps created from spritesheet using the sprites2bitmap.py
utility. See the maketoast shell script for the command line used to create the toast_bitmaps.py from the
toasters.bmp image.
.. literalinclude:: ../../examples/esp32_320x240/toasters/toasters.py
:linenos:
:language: python
135x240 TTGO T-Display Example Programs
=======================================
These examples run on the LilyGo TTGO-T-Display available from the usual
locations. See https://github.com/Xinyuan-LilyGO/TTGO-T-Display for more
information.
ttgo_lines.py
-------------
lines.py
--------
.. literalinclude:: ../../examples/ttgo_lines.py
.. literalinclude:: ../../examples/ttgo_tdisplay/lines.py
:linenos:
:language: python
ttgo_hello.py
-------------
hello.py
--------
.. literalinclude:: ../../examples/ttgo_hello.py
.. literalinclude:: ../../examples/ttgo_tdisplay/hello.py
:linenos:
:language: python
feathers.py
-----------
.. literalinclude:: ../../examples/ttgo_tdisplay/feathers.py
:linenos:
:language: python
ttgo_fonts.py
-------------
fonts.py
--------
.. literalinclude:: ../../examples/ttgo_fonts.py
.. literalinclude:: ../../examples/ttgo_tdisplay/fonts.py
:linenos:
:language: python
ttgo_scroll.py
--------------
scroll.py
---------
.. literalinclude:: ../../examples/ttgo_scroll.py
.. literalinclude:: ../../examples/ttgo_tdisplay/scroll.py
:linenos:
:language: python
@ -41,10 +111,11 @@ ttgo_scroll.py
toasters.py
-----------
Flying toasters sprite demo using bitmaps created from spritesheet using
ImageMagick's convert and imgtobitmap.py utility. See the maketoast script in the utils directory for details.
Flying toasters sprite demo using bitmaps created from spritesheet using the imgtobitmap.py utility.
See the maketoast script in the utils directory for details. See the 320x240 toasters example for
a more advanced example that uses the sprites2bitmap utility and indexed bitmaps.
.. literalinclude:: ../../examples/toasters/toasters.py
.. literalinclude:: ../../examples/ttgo_tdisplay/toasters/toasters.py
:linenos:
:language: python
@ -55,7 +126,7 @@ chango.py
Test for font2bitmap converter for the driver.
See the font2bitmap program in the utils directory.
.. literalinclude:: ../../examples/truetype/chango.py
.. literalinclude:: ../../examples/ttgo_tdisplay/truetype/chango.py
:linenos:
:language: python
@ -66,7 +137,7 @@ noto_fonts.py
Test for font2bitmap converter for the driver.
See the font2bitmap program in the utils directory.
.. literalinclude:: ../../examples/truetype/noto_fonts.py
.. literalinclude:: ../../examples/ttgo_tdisplay/truetype/noto_fonts.py
:linenos:
:language: python

Wyświetl plik

@ -0,0 +1,123 @@
#!/usr/bin/env python3
'''
Convert a sprite sheet image to python a module for use with indexed bitmap method.
Sprite sheet width and height should be a multiple of sprite width and height. There
should be no extra pixels between sprites. All sprites will share the same palette.
Usage:
sprites2bitmap image_file spite_width sprite_height bits_per_pixel >sprites.py
MicroPython:
import sprites
... tft config and init code ...
tft.bitmap(sprites, x, y, index)
'''
from os import setpriority
from PIL import Image
import argparse
def main():
parser = argparse.ArgumentParser(
prog='imgtobitmap',
description='Convert image file to python module for use with bitmap method.')
parser.add_argument(
'image_file',
help='Name of file containing image to convert')
parser.add_argument(
'sprite_width',
type=int,
help='width of sprites in pixels')
parser.add_argument(
'sprite_height',
type=int,
help='height of sprites in pixels')
parser.add_argument(
'bits_per_pixel',
type=int,
choices=range(1, 9),
default=1,
metavar='bits_per_pixel',
help='The number of bits to use per pixel (1..8)')
args = parser.parse_args()
bits = args.bits_per_pixel
img = Image.open(args.image_file)
img = img.convert("P", palette=Image.ADAPTIVE, colors=2**bits)
palette = img.getpalette() # Make copy of palette colors
# For all the colors in the palette
colors = []
for color in range(1 << bits):
# get rgb values and convert to 565
color565 = (
((palette[color*3] & 0xF8) << 8) |
((palette[color*3+1] & 0xFC) << 3) |
((palette[color*3+2] & 0xF8) >> 3))
# swap bytes in 565
color = ((color565 & 0xff) << 8) + ((color565 & 0xff00) >> 8)
# append byte swapped 565 color to colors
colors.append(f'{color:04x}')
image_bitstring = ''
max_colors = 1 << bits
bitmaps = 0
# Run through the image and create a string with the ascii binary
# representation of the color of each pixel.
for y in range(0, img.height, args.sprite_height):
for x in range(0, img.width, args.sprite_width):
bitmaps += 1
for yy in range(y, y + args.sprite_height):
for xx in range(x, x + args.sprite_width):
pixel = img.getpixel((xx, yy))
color = pixel
image_bitstring += ''.join(
'1' if (color & (1 << bit - 1)) else '0' for bit in range(bits, 0, -1))
bitmap_bits = len(image_bitstring)
# Create python source with image parameters
print(f'BITMAPS = {bitmaps}')
print(f'HEIGHT = {args.sprite_height}')
print(f'WIDTH = {args.sprite_width}')
print(f'COLORS = {max_colors}')
print(f'BITS = {bitmap_bits}')
print(f'BPP = {bits}')
print('PALETTE = [', sep='', end='')
for color, rgb in enumerate(colors):
if color:
print(',', sep='', end='')
print(f'0x{rgb}', sep='', end='')
print("]")
# Run though image bit string 8 bits at a time
# and create python array source for memoryview
print("_bitmap =\\", sep='')
print("b'", sep='', end='')
for i in range(0, bitmap_bits, 8):
if i and i % (16*8) == 0:
print("'\\\nb'", end='', sep='')
value = image_bitstring[i:i+8]
color = int(value, 2)
print(f'\\x{color:02x}', sep='', end='')
print("'\nBITMAP = memoryview(_bitmap)")
main()