<h1>Hardware Setup<aclass="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>
<sectionid="build-a-tally">
<h2>Build a Tally<aclass="headerlink"href="#build-a-tally"title="Permalink to this heading"></a></h2>
<p>For the tallies a classic <codeclass="docutils literal notranslate"><spanclass="pre">RGB</span></code> ledstrip is used instead of the more modern <codeclass="docutils literal notranslate"><spanclass="pre">WS2812B</span></code> standard. This ledstrip is connected as follows:</p>
<p>In order to build the firmware a <codeclass="docutils literal notranslate"><spanclass="pre">Toolchain</span></code> for cross compilation is required.
This toolchain is provided in the repository in <codeclass="docutils literal notranslate"><spanclass="pre">nodemcu-firmware/</span></code>.
To build the code for the tallies, navigate to <codeclass="docutils literal notranslate"><spanclass="pre">wifi-tally/tally/</span></code> and run <codeclass="docutils literal notranslate"><spanclass="pre">make</span></code>.</p>
<p>To flash the firmware, first put the device in flash mode.
You can do this by pressing and hodling the <codeclass="docutils literal notranslate"><spanclass="pre">FLASH</span></code> button and presing the <codeclass="docutils literal notranslate"><spanclass="pre">RST</span></code> button.
After that you can release the <codeclass="docutils literal notranslate"><spanclass="pre">FLASH</span></code> button.
Next, navigate to <codeclass="docutils literal notranslate"><spanclass="pre">../wifi-tally/firmware</span></code> and run <codeclass="docutils literal notranslate"><spanclass="pre">install_firmware.sh</span></code>.</p>
<spanclass="go">Flash will be erased from 0x00000000 to 0x00070fff...</span>
<spanclass="go">Flash params set to 0x0020</span>
<spanclass="go">Compressed 462848 bytes to 301339...</span>
<spanclass="go">Wrote 462848 bytes (301339 compressed) at 0x00000000 in 26.7 seconds (effective 138.9 kbit/s)...</span>
<spanclass="go">Hash of data verified.</span>
<spanclass="go">Leaving...</span>
</pre></div>
</div>
<divclass="admonition note">
<pclass="admonition-title">Note</p>
<p>If you receive an error about permissions, run <codeclass="docutils literal notranslate"><spanclass="pre">sudo</span><spanclass="pre">-E</span><spanclass="pre">./install_firmware.sh</span></code> to mitigate permissions for the USB device. Also look in the <codeclass="docutils literal notranslate"><spanclass="pre">troubleshooting</span></code> section if you keep having issues.</p>
</div>
</section>
<sectionid="flash-the-application">
<h2>Flash the Application<aclass="headerlink"href="#flash-the-application"title="Permalink to this heading"></a></h2>
<p>Navigate to <codeclass="docutils literal notranslate"><spanclass="pre">wifi-tally/tally</span></code> and run <codeclass="docutils literal notranslate"><spanclass="pre">install_application.sh</span></code>.</p>
<divclass="admonition note">
<pclass="admonition-title">Note</p>
<p>Make sure to edit the <codeclass="docutils literal notranslate"><spanclass="pre">out/tally-settings.ini</span></code> for the correct wifi SSID and password.</p>