wifi-tally_Oostendam/documentation/build/hardware/index.html

195 lines
11 KiB
HTML

<!DOCTYPE html>
<html class="writer-html5" lang="en" >
<head>
<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>Hardware Setup &mdash; Oostendam Tallies documentation</title>
<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/drawio.css" type="text/css" />
<!--[if lt IE 9]>
<script src="../_static/js/html5shiv.min.js"></script>
<![endif]-->
<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/_sphinx_javascript_frameworks_compat.js"></script>
<script src="../_static/doctools.js"></script>
<script src="../_static/sphinx_highlight.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="Server" href="../server/index.html" />
<link rel="prev" title="Tallies Overview" href="../overview.html" />
</head>
<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" >
<a href="../index.html" class="icon icon-home"> Oostendam Tallies
</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" />
<input type="hidden" name="check_keywords" value="yes" />
<input type="hidden" name="area" value="default" />
</form>
</div>
</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="../overview.html">Tallies Overview</a></li>
<li class="toctree-l1 current"><a class="current reference internal" href="#">Hardware Setup</a><ul>
<li class="toctree-l2"><a class="reference internal" href="#build-a-tally">Build a Tally</a></li>
<li class="toctree-l2"><a class="reference internal" href="#build-the-firmware">Build the firmware</a></li>
<li class="toctree-l2"><a class="reference internal" href="#flash-the-firmware">Flash the firmware</a></li>
<li class="toctree-l2"><a class="reference internal" href="#flash-the-application">Flash the Application</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="../server/index.html">Server</a></li>
</ul>
</div>
</div>
</nav>
<section data-toggle="wy-nav-shift" class="wy-nav-content-wrap"><nav class="wy-nav-top" aria-label="Mobile navigation menu" >
<i data-toggle="wy-nav-top" class="fa fa-bars"></i>
<a href="../index.html">Oostendam Tallies</a>
</nav>
<div class="wy-nav-content">
<div class="rst-content">
<div role="navigation" aria-label="Page navigation">
<ul class="wy-breadcrumbs">
<li><a href="../index.html" class="icon icon-home"></a></li>
<li class="breadcrumb-item active">Hardware Setup</li>
<li class="wy-breadcrumbs-aside">
<a href="../_sources/hardware/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">
<section id="hardware-setup">
<h1>Hardware Setup<a class="headerlink" href="#hardware-setup" title="Permalink to this heading"></a></h1>
<p>This page describes the hardware setup for the tallies.
How to build the tallies and how to build and flash new firmware to the tallies.</p>
<section id="build-a-tally">
<h2>Build a Tally<a class="headerlink" href="#build-a-tally" title="Permalink to this heading"></a></h2>
<p>For the tallies a classic <code class="docutils literal notranslate"><span class="pre">RGB</span></code> ledstrip is used instead of the more modern <code class="docutils literal notranslate"><span class="pre">WS2812B</span></code> standard. This ledstrip is connected as follows:</p>
<img alt="../_images/tally-schematics-simple.png" src="../_images/tally-schematics-simple.png" />
</section>
<section id="build-the-firmware">
<h2>Build the firmware<a class="headerlink" href="#build-the-firmware" title="Permalink to this heading"></a></h2>
<p>In order to build the firmware a <code class="docutils literal notranslate"><span class="pre">Toolchain</span></code> for cross compilation is required.
This toolchain is provided in the repository in <code class="docutils literal notranslate"><span class="pre">nodemcu-firmware/</span></code>.
To build the code for the tallies, navigate to <code class="docutils literal notranslate"><span class="pre">wifi-tally/tally/</span></code> and run <code class="docutils literal notranslate"><span class="pre">make</span></code>.</p>
<div class="highlight-console notranslate"><div class="highlight"><pre><span></span><span class="gp">$ </span>make
<span class="gp"># </span><span class="k">if</span> it compiles it is syntactically valid
<span class="go">../../nodemcu-firmware/luac.cross -o /dev/null src/init.lua</span>
<span class="go">&quot;busted&quot;</span>
<span class="go">●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●</span>
<span class="go">91 successes / 0 failures / 0 errors / 0 pending : 0.23373 seconds</span>
</pre></div>
</div>
<p>The resulting files are in the <code class="docutils literal notranslate"><span class="pre">out/</span></code> folder.</p>
</section>
<section id="flash-the-firmware">
<h2>Flash the firmware<a class="headerlink" href="#flash-the-firmware" title="Permalink to this heading"></a></h2>
<p>To flash the firmware, first put the device in flash mode.
You can do this by pressing and hodling the <code class="docutils literal notranslate"><span class="pre">FLASH</span></code> button and presing the <code class="docutils literal notranslate"><span class="pre">RST</span></code> button.
After that you can release the <code class="docutils literal notranslate"><span class="pre">FLASH</span></code> button.
Next, navigate to <code class="docutils literal notranslate"><span class="pre">../wifi-tally/firmware</span></code> and run <code class="docutils literal notranslate"><span class="pre">install_firmware.sh</span></code>.</p>
<div class="highlight-console notranslate"><div class="highlight"><pre><span></span><span class="gp">$ </span>./install_firmware.sh
<span class="go">esptool.py v4.4</span>
<span class="go">Serial port /dev/ttyUSB0</span>
<span class="go">Connecting....</span>
<span class="go">Detecting chip type... Unsupported detection protocol, switching and trying again...</span>
<span class="go">Connecting....</span>
<span class="go">Detecting chip type... ESP8266</span>
<span class="go">Chip is ESP8266EX</span>
<span class="go">Features: WiFi</span>
<span class="go">Crystal is 26MHz</span>
<span class="go">MAC: 50:02:91:fd:ca:0a</span>
<span class="go">Uploading stub...</span>
<span class="go">Running stub...</span>
<span class="go">Stub running...</span>
<span class="go">Configuring flash size...</span>
<span class="go">Flash will be erased from 0x00000000 to 0x00070fff...</span>
<span class="go">Flash params set to 0x0020</span>
<span class="go">Compressed 462848 bytes to 301339...</span>
<span class="go">Wrote 462848 bytes (301339 compressed) at 0x00000000 in 26.7 seconds (effective 138.9 kbit/s)...</span>
<span class="go">Hash of data verified.</span>
<span class="go">Leaving...</span>
</pre></div>
</div>
<div class="admonition note">
<p class="admonition-title">Note</p>
<p>If you receive an error about permissions, run <code class="docutils literal notranslate"><span class="pre">sudo</span> <span class="pre">-E</span> <span class="pre">./install_firmware.sh</span></code> to mitigate permissions for the USB device. Also look in the <code class="docutils literal notranslate"><span class="pre">troubleshooting</span></code> section if you keep having issues.</p>
</div>
</section>
<section id="flash-the-application">
<h2>Flash the Application<a class="headerlink" href="#flash-the-application" title="Permalink to this heading"></a></h2>
<p>Navigate to <code class="docutils literal notranslate"><span class="pre">wifi-tally/tally</span></code> and run <code class="docutils literal notranslate"><span class="pre">install_application.sh</span></code>.</p>
<div class="admonition note">
<p class="admonition-title">Note</p>
<p>Make sure to edit the <code class="docutils literal notranslate"><span class="pre">out/tally-settings.ini</span></code> for the correct wifi SSID and password.</p>
</div>
<div class="highlight-console notranslate"><div class="highlight"><pre><span></span><span class="gp">$ </span>./install_application.sh
<span class="go">opening port /dev/ttyUSB0 with 115200 baud</span>
<span class="go">Preparing esp for transfer.</span>
<span class="go">Transferring out/my-app.lc as out/my-app.lc</span>
<span class="go">Transferring out/my-led.lc as out/my-led.lc</span>
<span class="go">Transferring out/my-log-buffer.lc as out/my-log-buffer.lc</span>
<span class="go">Transferring out/my-log.lc as out/my-log.lc</span>
<span class="go">Transferring out/my-settings.lc as out/my-settings.lc</span>
<span class="go">Transferring out/my-tally.lc as out/my-tally.lc</span>
<span class="go">Transferring out/my-wifi.lc as out/my-wifi.lc</span>
<span class="go">Transferring out/tally-settings.ini as out/tally-settings.ini</span>
<span class="go">All done!</span>
</pre></div>
</div>
<p>The tally is ready!</p>
</section>
</section>
</div>
</div>
<footer><div class="rst-footer-buttons" role="navigation" aria-label="Footer">
<a href="../overview.html" class="btn btn-neutral float-left" title="Tallies Overview" accesskey="p" rel="prev"><span class="fa fa-arrow-circle-left" aria-hidden="true"></span> Previous</a>
<a href="../server/index.html" class="btn btn-neutral float-right" title="Server" accesskey="n" rel="next">Next <span class="fa fa-arrow-circle-right" aria-hidden="true"></span></a>
</div>
<hr/>
<div role="contentinfo">
<p>&#169; Copyright 2023, Eljakim.</p>
</div>
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>.
</footer>
</div>
</div>
</section>
</div>
<script>
jQuery(function () {
SphinxRtdTheme.Navigation.enable(true);
});
</script>
</body>
</html>