<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:media="http://search.yahoo.com/mrss/"><channel><title><![CDATA[bigl.es]]></title><description><![CDATA[Author, Maker, Hacker, Tinkologist]]></description><link>https://bigl.es/</link><image><url>http://bigl.es/favicon.png</url><title>bigl.es</title><link>https://bigl.es/</link></image><generator>Ghost 1.21</generator><lastBuildDate>Sat, 04 Apr 2026 14:15:50 GMT</lastBuildDate><atom:link href="https://bigl.es/rss/" rel="self" type="application/rss+xml"/><ttl>60</ttl><item><title><![CDATA[Tuesday Tooling: The Commodore Repair Toolkit]]></title><description><![CDATA[The Commodore Repair Toolkit stands ready to help you save another Commodore computer from silicon heaven!]]></description><link>https://bigl.es/c64-toolkit/</link><guid isPermaLink="false">69a69b5a82398378a4d7487d</guid><category><![CDATA[tuesdaytooling]]></category><category><![CDATA[commodore]]></category><category><![CDATA[retro]]></category><category><![CDATA[retrocomputing]]></category><dc:creator><![CDATA[Les Pounder]]></dc:creator><pubDate>Tue, 03 Mar 2026 09:54:19 GMT</pubDate><media:content url="https://bigl.es/content/images/2026/03/machines.gif" medium="image"/><content:encoded><![CDATA[<div class="kg-card-markdown"><img src="https://bigl.es/content/images/2026/03/machines.gif" alt="Tuesday Tooling: The Commodore Repair Toolkit"><p>Tuesday Tooling is back with a veritable cornucopia of Commodore fixing tools all in one package! All for $/£/€ 0!</p>
<p><img src="https://bigl.es/content/images/2026/03/comp1.JPG" alt="Tuesday Tooling: The Commodore Repair Toolkit"><br>
<em>My OG Commodore 64 and two Commodore 64 Ultimates. I'll find a pic of my C16 and VIC20 and replace this after work</em></p>
<p>I love my Commodores, yes plural. I've got a VIC 20, Commodore 16, a real Commodore 64 and the new <a href="https://www.tomshardware.com/video-games/retro-gaming/commodore-64-ultimate-review">Commodore 64 Ultimate</a>. Apart from my VIC 20, all of the machines work, but with this new tool I should be able to diagnose and repair my VIC 20. one day!</p>
<iframe width="406" height="228" src="https://www.youtube.com/embed/RtHxzH9Cu3A" title="Fixing C64s Faster: C64 Analyzer Cartridge V2 &amp; The Commodore Repair Toolbox" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" referrerpolicy="strict-origin-when-cross-origin" allowfullscreen></iframe>
<p>I spotted this tool thanks to More Fun Fixing It / More Fun Making It. I've subscribed to this channel for a long time and I love his content.</p>
<h2 id="sowhatisit">So What Is It?</h2>
<p>The <a href="https://github.com/HovKlan-DH/Commodore-Repair-Toolbox">Commodore Repair Toolbox</a> (CRT), from HovKlan-DH (Dennis) is a Windows application for retro electronics repairers who specialise in Commodore machines. CRT specialises in the many Commodore 8-bit machines such as</p>
<ul>
<li>Commodore VIC-20
<ul>
<li>250403 (CR)</li>
</ul>
</li>
<li>Commodore 64
<ul>
<li>250407 (long board)
<ul>
<li>Covers all components</li>
<li>Oscilloscope baseline measurements for PAL and NTSC</li>
</ul>
</li>
<li>250425 (long board)
<ul>
<li>Covers all components</li>
<li>Oscilloscope baseline measurements for PAL and NTSC</li>
</ul>
</li>
<li>250466 (long board)
<ul>
<li>Covers all components</li>
<li>Oscilloscope baseline measurements for PAL and NTSC</li>
</ul>
</li>
<li>250469 (short board)
<ul>
<li>Covers all components</li>
<li>Oscilloscope baseline measurements for PAL and NTSC</li>
</ul>
</li>
</ul>
</li>
<li>Commodore 128 and 128D
<ul>
<li>310378 (C128 and C128D, plastic cabinet)
<ul>
<li>Covers all components</li>
<li>Oscilloscope baseline measurements for PAL and NTSC</li>
</ul>
</li>
<li>250477 (C128DCR, metal cabinet)
<ul>
<li>Covers all components</li>
</ul>
</li>
</ul>
</li>
</ul>
<p><img src="https://bigl.es/content/images/2026/03/zoom.gif" alt="Tuesday Tooling: The Commodore Repair Toolkit"><br>
CRT isn't just a collection of screenshots! There are schematics for the aforementioned computers and their board revisions. Some of the schematics have been reworked and modernised from the original source material. This is great news as some of the older schematics were a bit &quot;fuzzy&quot; after being scanned, printed, scanned over the last 40+ years!</p>
<p><img src="https://bigl.es/content/images/2026/03/6510.jpg" alt="Tuesday Tooling: The Commodore Repair Toolkit"><br>
Need to know about a chip? Click on it! Yes, you can click on a chip and learn the pinout, but that's not all! At the bottom of the window are example oscilloscope waveforms that you can use to diagnose your own Commodore!<br>
<img src="https://bigl.es/content/images/2026/03/pin7.jpg" alt="Tuesday Tooling: The Commodore Repair Toolkit"><br>
Above is the waveform for pin 7 of the 6510 CPU inside the Commodore 64. It shows an example of a working CPU that we can use for diagnosing issues.<br>
<img src="https://bigl.es/content/images/2026/03/7805.jpg" alt="Tuesday Tooling: The Commodore Repair Toolkit"><br>
There is even a pinout for the humble 7805 5V voltage regulator, damn useful!</p>
<p><img src="https://bigl.es/content/images/2026/03/components.gif" alt="Tuesday Tooling: The Commodore Repair Toolkit"><br>
Need a quick overview of the components and their values? Click on the Overview tab and you get a handy table with all of the details.</p>
<p><img src="https://bigl.es/content/images/2026/03/resources.jpg" alt="Tuesday Tooling: The Commodore Repair Toolkit"><br>
Need some extra resources? Click on the Resources tab and dig into the wealth of Commodore resources from Zimmers, Ray Carlsen and Sven Petersen!</p>
<h2 id="sohowdoiinstallit">So How Do I Install It?</h2>
<p><img src="https://bigl.es/content/images/2026/03/file.jpg" alt="Tuesday Tooling: The Commodore Repair Toolkit"><br>
You don't need to! Just <a href="https://github.com/HovKlan-DH/Commodore-Repair-Toolbox/releases">download the latest release</a>, extract the contents and click on the executable. Windows may warn you that the app is from an unknown source, but it should be good. I ran a virus check before extracting, I do this with every file that I get from the Internet.</p>
<h2 id="soitonlyrunsonwindows">So it only runs on Windows?</h2>
<p><img src="https://bigl.es/content/images/2026/03/ubuntu1.png" alt="Tuesday Tooling: The Commodore Repair Toolkit"><br>
Nope! It also runs on my Ubuntu 24.04.3 laptop. I just needed to install <a href="https://www.winehq.org/">Wine</a>, the compatibility layer for Linux that enables Linux to run some Windows applications. I then installed wine-mono-7.4.0-x86.msi and then downloaded, extracted and ran CRT on Ubuntu. All went well!</p>
<p>To get win-mono I ran this command from a terminal.</p>
<pre><code>wget &quot;https://dl.winehq.org/wine/wine-mono/7.4.0/wine-mono-7.4.0-x86.msi&quot;
</code></pre>
<p>Then to install I ran.</p>
<pre><code>wine start wine-mono-7.4.0-x86.msi
</code></pre>
<p>To run Commodore Repair Toolkit I ran this command in the same directory as the extracted files.</p>
<pre><code>wine Commodore-Repair-Toolbox.exe
</code></pre>
<h1 id="happyhackingrepairing">Happy Hacking / Repairing!</h1>
</div>]]></content:encoded></item><item><title><![CDATA[OpenClaw AI fuels the Raspberry Pi rollercoaster share price — The 'Mac Mini Effect' comes for the maker's SBC]]></title><description><![CDATA[The Raspberry Pi share price has enjoyed a recent surge, with many taking advantage of the OpenClaw AI upsurge that sees the popular single board computer be the next target for AI enthusiasts.]]></description><link>https://bigl.es/pi-stocks/</link><guid isPermaLink="false">6996d7d782398378a4d74868</guid><category><![CDATA[Raspberry Pi]]></category><category><![CDATA[AI]]></category><category><![CDATA[artificial intelligence]]></category><category><![CDATA[raspberry pi 5]]></category><dc:creator><![CDATA[Les Pounder]]></dc:creator><pubDate>Thu, 19 Feb 2026 14:00:45 GMT</pubDate><media:content url="https://bigl.es/content/images/2026/02/hero.jpg" medium="image"/><content:encoded><![CDATA[<div class="kg-card-markdown"><img src="https://bigl.es/content/images/2026/02/hero.jpg" alt="OpenClaw AI fuels the Raspberry Pi rollercoaster share price — The 'Mac Mini Effect' comes for the maker's SBC"><p>The Raspberry Pi share price has risen sharply in recent days and it seems that AI is behind this while also fueling many to make large share purchases.</p>
<p>The Raspberry Pi stock price has seen a surge this week, and it seems that the &quot;Apple Mac Mini&quot; effect, where everyone hoarded Apple's tiny PCs to run their own local AI service has finally reached the beloved single board computer.</p>
<blockquote class="twitter-tweet"><p lang="en" dir="ltr">Fun Trade Idea: Long <a href="https://twitter.com/search?q=%24RPI&amp;src=ctag&amp;ref_src=twsrc%5Etfw">$RPI</a> (Raspberry Pi) <br><br>Reason: 🦞 Openclaw / Picoclaw / Nanobot + Hoarding.<br><br>Everyone has been openly hoarding Apple Mac Minis and were long Apple. <br><br>But <a href="https://twitter.com/search?q=%24APPL&amp;src=ctag&amp;ref_src=twsrc%5Etfw">$APPL</a> is already a $3.7T+ company. Product mass-buying won&#39;t make a dent.<br><br>Raspberry Pi, however, is a… <a href="https://t.co/yRKh37HQ5n">https://t.co/yRKh37HQ5n</a> <a href="https://t.co/IH8wXsCctW">pic.twitter.com/IH8wXsCctW</a></p>&mdash; Serenity (@aleabitoreddit) <a href="https://twitter.com/aleabitoreddit/status/2023415224372756782?ref_src=twsrc%5Etfw">February 16, 2026</a></blockquote> <script async src="https://platform.twitter.com/widgets.js" charset="utf-8"></script>
<p>The catalyst for this situation seems to be a &quot;Fun Trade Idea&quot; post from X user &quot;aleabitoreddit&quot; . This post has kickstarted the interest in running Openclaw / Picoclaw on a Raspberry Pi, resulting in enthusiasts buying and building their own rigs using Raspberry Pi hardware. All of this has seemingly pushed Raspberry Pi's share price to hit 545.5p on Wednesday 18 February, with it ultimately closing the day at 410p. <a href="https://www.tomshardware.com/raspberry-pi/raspberry-pi-5-price-increases-drastically-as-ai-shortage-bites-16gb-version-now-usd205-second-price-increase-in-three-months-over-70-percent-more-expensive-than-original-msrp">Despite Raspberry Pi's recent price increases</a>, they are still cheaper than a Mac Mini, but not as powerful.</p>
<h2 id="therollercoasterraspberrypishareprice">The Rollercoaster Raspberry Pi Share Price</h2>
<p><img src="https://bigl.es/content/images/2026/02/pi-stock.jpg" alt="OpenClaw AI fuels the Raspberry Pi rollercoaster share price — The 'Mac Mini Effect' comes for the maker's SBC"><br>
<em>Source:London Stock Exchange</em></p>
<p>It seems that Raspberry Pi's stock price has been on a bit of a rollercoaster lately. At the time of writing (Feb 19) the price hit 408.76, but just two weeks ago (Feb 4) the price was 257.20. That's a 45.5% increase in price. So what's happened between these dates to drive up the price of Raspberry Pi stock? Has there been a new release? No. New software? No. So what was it? The answer could be Artificial Intelligence, AI. But lets take a look at the value of Raspberry Pi shares.</p>
<h3 id="monthlyvalue">Monthly Value</h3>
<p><img src="https://bigl.es/content/images/2026/02/value-monthly.jpg" alt="OpenClaw AI fuels the Raspberry Pi rollercoaster share price — The 'Mac Mini Effect' comes for the maker's SBC"><br>
<em>Source:London Stock Exchange</em><br>
With a monthly value of £56.14 million, February 2026 is the best month for Raspberry Pi since September 2025, where it hit £49.14 million. The next best month was March 2025, £47.18 million.</p>
<h3 id="dailyvalue">Daily Value</h3>
<p><img src="https://bigl.es/content/images/2026/02/value-daily.jpg" alt="OpenClaw AI fuels the Raspberry Pi rollercoaster share price — The 'Mac Mini Effect' comes for the maker's SBC"><br>
<em>Source:London Stock Exchange</em></p>
<p>The daily value sees the rollercoaster riding upwards. February 18 2026 saw the value rise to £22.56 million. February 17 was £17.96 million, and Febraury 16 &quot;just&quot; £3.65 million.<br>
Now, let this sink in. The daily value for Raspberry Pi on Febraury 18 2026 was £22.56 million, just under half the monthly value for September 2025.</p>
<p>In recent days there has been a large number of trades, and that includes Raspberry Pi co-founder and CEO Eben Upton. This isn't unusual nor is it illegal. As a senior position in Raspberry Pi LTD, Upton has to follow strict rules and all of the transactions are reported, and publicly available via the <a href="https://www.londonstockexchange.com/stock/RPI/raspberry-pi-holdings-plc/company-page">London Stock Exchange website.</a></p>
<p>Lets take a look at the details.</p>
<table>
<thead>
<tr>
<th>Purchase Date</th>
<th>Purchased By</th>
<th>Share Price</th>
<th>Volume</th>
<th>Total</th>
<th>Source</th>
</tr>
</thead>
<tbody>
<tr>
<td>16/2/2026</td>
<td>Eben Upton</td>
<td>£2.82327</td>
<td>4,684</td>
<td>£13,224.197</td>
<td><a href="https://www.londonstockexchange.com/news-article/RPI/pdmr-share-purchase/17463509">https://www.londonstockexchange.com/news-article/RPI/pdmr-share-purchase/17463509</a></td>
</tr>
<tr>
<td>11/2/2026</td>
<td>Eben Upton</td>
<td>£2.6212</td>
<td>7,589</td>
<td>£19,892.44</td>
<td><a href="https://www.londonstockexchange.com/news-article/RPI/pdmr-share-purchase/17457298">https://www.londonstockexchange.com/news-article/RPI/pdmr-share-purchase/17457298</a></td>
</tr>
<tr>
<td>9/2/2026</td>
<td>Eben Upton</td>
<td>£2.66</td>
<td>7,468</td>
<td></td>
<td></td>
</tr>
<tr>
<td></td>
<td></td>
<td>£2.62</td>
<td>7,604</td>
<td></td>
<td></td>
</tr>
<tr>
<td></td>
<td></td>
<td>Total</td>
<td>15,072</td>
<td>£39,787.22</td>
<td><a href="https://www.londonstockexchange.com/news-article/RPI/pdmr-purchase-of-shares/17452945">https://www.londonstockexchange.com/news-article/RPI/pdmr-purchase-of-shares/17452945</a></td>
</tr>
<tr>
<td>4/2/2026</td>
<td>Eben Upton</td>
<td>£2.62</td>
<td>7,600</td>
<td></td>
<td></td>
</tr>
<tr>
<td></td>
<td></td>
<td>£2.58</td>
<td>7,714</td>
<td></td>
<td></td>
</tr>
<tr>
<td></td>
<td></td>
<td>Total</td>
<td>15,314</td>
<td>£39,814.12</td>
<td><a href="https://www.londonstockexchange.com/news-article/RPI/pdmr-purchase-of-shares/17446574">https://www.londonstockexchange.com/news-article/RPI/pdmr-purchase-of-shares/17446574</a></td>
</tr>
<tr>
<td>30/1/2026</td>
<td>Eben Upton</td>
<td>£2.71</td>
<td>7,341</td>
<td>£19,894.11</td>
<td><a href="https://www.londonstockexchange.com/news-article/RPI/purchase-of-shares/17439185">https://www.londonstockexchange.com/news-article/RPI/purchase-of-shares/17439185</a></td>
</tr>
</tbody>
</table>
<p>For all of the purchases, a PDMR (Person Discharging Managerial Responsibilities) was filed for the purchase of shares. This is a normal, regulatory practice and is necessary for an individual who has a senior position in a publicly listed company. A PDMR is used to ensure that no insider trading takes place, and all trades are reported to the company and the regulator. Hence we see the transaction are all linked to Upton, because he legally has to report his purchases. Other purchases, by the public or less senior individuals at Raspberry Pi, do not have to be reported as strictly. The sales are all logged, but not accessible via a PDMR.</p>
<p>Since January 30 (the date of the PDMR, but the purchase was on January 29), Upton has purchased 80,386 shares in total, and paid £132,612.087 for all of those shares. That is a lot of money and the PDMR means that the public can see these purchases, and when the CEO of a company makes a purchase the market is sure to catch wind of it and want in on the action. Looking through the trades for February 19, in the <a href="https://www.londonstockexchange.com/stock/RPI/raspberry-pi-holdings-plc/trade-recap">first three hours of trading</a> there have been 606,899 shares purchased, at an aggregated value of £2,485,147.34p. This imposing figure towers over Upton's purchases. But the question still remains, &quot;Why has the Raspberry Pi share price risen so sharply?&quot;</p>
<h2 id="theclawsofaigrabapieceofthepi">The claws of AI grab a piece of the Pi</h2>
<p>There is no escaping AI, it seems to be everywhere and there are even specific <a href="https://www.tomshardware.com/raspberry-pi/raspberry-pi-ai-hat-plus-2-review">AI add-on boards for the Raspberry Pi</a> made by Haileo which use its custom NPU (Neural Processing Unit) to off-load work from the Raspberry Pi 5's quad-core Arm CPU. And this is where things get interesting. As most of us are already aware, the price of RAM, CPUs, SSDs (storage in general) and GPUs has sky-rocketed in the last six months. Date centres and manufacturers are stockpiling hardware like the entire world did with toilet paper during the Covid pandemic. They are doing that for a possible future where more AI processing power is required, and AI customers are now a priority as they buy in bulk! This ultimately means that lower spec hardware, like the Raspberry Pi becomes the next target for AI enthusiasts.</p>
<p>The <a href="https://www.tomshardware.com/reviews/raspberry-pi-5">Raspberry Pi 5</a> — which comes with 1,2,4,8 or 16GB RAM configurations — has a Broadcom BCM2712 System on Chip (SoC) that is powered by an Arm Cortex A76, quad-core, 64-bit CPU running at 2.4GHz that can be easily overclocked to 3GHz. That is plenty of power for a small server and despite the horrendous price increases (again thanks to AI) they are a cost-effective alternative to Apple hardware.<br>
Could older Raspberry Pi hardware be used? Upton has spoken to <a href="https://www.bloomberg.com/news/articles/2026-02-19/raspberry-pi-ceo-upton-embraces-meme-stock-label-after-94-rally?srnd=homepage-americas">Bloomberg</a> regarding the raised share price and also commented that he understands that interested parties are testing older models of Raspberry Pi to see where the performance drops off.</p>
<h2 id="whatisopenclaw">What is OpenClaw?</h2>
<p>Formerly known as Clawdbot and Moltbot, OpenClaw is an autonomous, local AI agent and personal assistant that can be used with WhatsApp, Telegram, Discord, Slack and other service. It is proactive, and can look into your inbox, summarise your messages and even interact with smart home devices. Released in November 2025, OpenClaw has seen rapid growth in January 2026, with many enthusiasts purchasing Apple Mac Minis to run more powerful OpenClaw instances. Now it seems that their lust for AI-powered perfection is driving the rollercoaster share price of Raspberry Pi.</p>
<h2 id="therisingpriceofraspberrypi">The Rising Price of Raspberry Pi</h2>
<table>
<thead>
<tr>
<th>Model</th>
<th>February 2026 Price</th>
<th>December 2025 Price</th>
<th>Original Price</th>
</tr>
</thead>
<tbody>
<tr>
<td>Raspberry Pi 5 1GB</td>
<td>No change</td>
<td>No change</td>
<td>$45</td>
</tr>
<tr>
<td>Raspberry Pi 5 2GB</td>
<td>$65</td>
<td>$55</td>
<td>$50</td>
</tr>
<tr>
<td>Raspberry Pi 5 4GB</td>
<td>$85</td>
<td>$70</td>
<td>$60</td>
</tr>
<tr>
<td>Raspberry Pi 5 8GB</td>
<td>$125</td>
<td>$95</td>
<td>$80</td>
</tr>
<tr>
<td>Raspberry Pi 5 16GB</td>
<td>$205</td>
<td>$145</td>
<td>$120</td>
</tr>
<tr>
<td>Raspberry Pi 4 4GB</td>
<td>$75 (based on table in blog post)</td>
<td>$60</td>
<td>$55</td>
</tr>
<tr>
<td>Raspberry Pi 4 8GB</td>
<td>$115 (based on table in blog post)</td>
<td>$85</td>
<td>$75</td>
</tr>
<tr>
<td>Raspberry Pi 500 (8GB)</td>
<td>$119</td>
<td>$99</td>
<td>$90</td>
</tr>
<tr>
<td>Raspberry Pi 500+ 16GB (MicroCenter)</td>
<td>$259</td>
<td>$180</td>
<td>$180</td>
</tr>
<tr>
<td>Raspberry Pi 400</td>
<td>No change</td>
<td>No change</td>
<td>$59</td>
</tr>
</tbody>
</table>
<p>The Raspberry Pi is not immune to the <a href="https://www.tomshardware.com/raspberry-pi/raspberry-pi-5-price-increases-drastically-as-ai-shortage-bites-16gb-version-now-usd205-second-price-increase-in-three-months-over-70-percent-more-expensive-than-original-msrp">rising price of RAM</a>, in the last few months, the price has risen twice, with the price of the Raspberry Pi 5 16GB rising from $120 to $205! Raspberry Pi has also issued a number of PCN (Product Change Notifications) for the Raspberry Pi 5 and the older flagship Raspberry Pi 4.</p>
<p><a href="https://pip-assets.raspberrypi.com/categories/1129-pcn/documents/RP-009750-PC-1-PCN%2046_%20Pi%205%20Alternative%20sources%20of%20RAM.pdf">PCN 46: Pi 5 Alternative sources of RAM</a> PDF<br>
<a href="https://pip-assets.raspberrypi.com/categories/560-pcn/documents/RP-008919-PC-3-PCN%2030_%20Pi%204%20Alternative%20sources%20of%20RAM.pdf">PCN 30: Pi 4 Alternative sources of RAM</a> PDF</p>
<p>The popularity of the Raspberry Pi for AI projects could see the prices further rise as demand increases. Could we see demand exceed supply? Maybe. The Covid pandemic saw demand soar as the world closed down. This drove up the price and made Raspberry Pi a hot commodity, the same could happen again because of AI.</p>
<p><em>Main image sourced from pexels.com</em><br>
<em>Please note that this post should not be used to determine financial decisions, I am a keen tech journalist who wanted to examine the situation and have no specialism in finance. Don't risk your money based on my writing.</em></p>
</div>]]></content:encoded></item><item><title><![CDATA[Classic Computer, Modern Twist: Web Browser Hosts Java-Powered Commodore VIC-20 Emulator]]></title><description><![CDATA[Play 'The wonder computer of the 1980s' in your browser!]]></description><link>https://bigl.es/vic20-in-browser/</link><guid isPermaLink="false">6983081a82398378a4d7484f</guid><category><![CDATA[news]]></category><category><![CDATA[commodore]]></category><category><![CDATA[vic 20]]></category><dc:creator><![CDATA[Les Pounder]]></dc:creator><pubDate>Wed, 04 Feb 2026 09:45:28 GMT</pubDate><media:content url="https://bigl.es/content/images/2026/02/donkeyk.gif" medium="image"/><content:encoded><![CDATA[<div class="kg-card-markdown"><img src="https://bigl.es/content/images/2026/02/donkeyk.gif" alt="Classic Computer, Modern Twist: Web Browser Hosts Java-Powered Commodore VIC-20 Emulator"><p>Captain Kirk called the Commodore VIC 20 <a href="https://youtu.be/UK9VU1aJvTI">&quot;The wonder computer of the 1980s&quot;</a> and it makes me wonder if he hacked the Kobayashi Maru simulator with one of these? If you want to relive the home computer boom of the early 1980s, this browser based emulator is just for you.</p>
<p>Lane Ewing's <a href="https://vic20.games/">browser based JVic VIC20 emulator</a> is sheer fun! As you can probably guess from the name, JVic is a Commodore VIC 20 emulator written in Java and designed with mobile devices in mind.</p>
<p><img src="https://bigl.es/content/images/2026/02/games.gif" alt="Classic Computer, Modern Twist: Web Browser Hosts Java-Powered Commodore VIC-20 Emulator"><br>
The user interface is a series of pages which you can move through by swiping, or for desktop users there are buttons to navigate. Each page has different games and demos can be selected by pressing the thumbnail. Dig Dug, Donkey Kong, Elite, Gorf, Manic Miner, Pac-Man, the gang are all here, ready to be played.</p>
<p>Is your favourte missing from the list? No problem, you can drag and drop any VIC 20 .d64, .prg, .crt, .tap or .zip file and JVic will run it!</p>
<h2 id="tweakyourvic">Tweak your VIC!</h2>
<p><img src="https://bigl.es/content/images/2026/02/URL.gif" alt="Classic Computer, Modern Twist: Web Browser Hosts Java-Powered Commodore VIC-20 Emulator"><br>
You can pass URL parameters to tweak the config of the virtual VIC 20. In the GIF above, I have used the URL <a href="https://vic20.games/#/basic?RAM=32K">https://vic20.games/#/basic?RAM=32K</a> to run the BASIC interpreter and boost my VIC 20 to a whopping 32KB of RAM. Other tweaks are for the TV region, PAL or NTSC and the type of file being loaded, CART, DISK, PRG or TAPE.</p>
<h2 id="runningjvic">Running JVic</h2>
<p><img src="https://bigl.es/content/images/2026/02/pwa.gif" alt="Classic Computer, Modern Twist: Web Browser Hosts Java-Powered Commodore VIC-20 Emulator"><br>
There are many ways to use JVic. You can install the web app as JVic uses the Progressive Web App (PWA) spec. In my Chrome browser I get the icon in the address bar. You can also install JVic to your Android phone using this method, in fact, this is how Ewing prefers to install on to their Android device.</p>
<p>You can also install the <a href="https://github.com/lanceewing/jvic/releases/latest">Java version</a> to your computer. The .jar file is executable and because its Java, it can run on Windows, Mac and Linux. If you have an Android device, then there is a signed APK file that you can install. Note that there is no JVic app in the Google Play Store so beware of fakes!<br>
Lastly, you can install JVic on to your own web server and run the emulator for your visitors.</p>
<h2 id="wouldyouliketolearnmore">Would you like to learn more?</h2>
<p>Ewing has a helpful <a href="https://github.com/lanceewing/jvic?tab=readme-ov-file">Github repository</a> that details the project and all of the features mentioned, but in greater detail.</p>
</div>]]></content:encoded></item><item><title><![CDATA[Raspberry Pi Pico Powered PicoIDE Destroys Crowdfunding Goal — Easily Emulate Old IDE / ATAPI Disk Drives Using Micro SD]]></title><description><![CDATA[PicoIDE aims to be the one-stop-shop for all your vintage disk drive needs]]></description><link>https://bigl.es/pi-news-picoide-destroys-crowdfunding-goal/</link><guid isPermaLink="false">697e18e482398378a4d74843</guid><category><![CDATA[pi news]]></category><category><![CDATA[raspberry pi pico]]></category><category><![CDATA[rp2350]]></category><category><![CDATA[crowdfunding]]></category><dc:creator><![CDATA[Les Pounder]]></dc:creator><pubDate>Sat, 31 Jan 2026 15:48:06 GMT</pubDate><media:content url="https://bigl.es/content/images/2026/01/picoide-beige-stack-blackpcb_jpg_gallery-lg.jpg" medium="image"/><content:encoded><![CDATA[<div class="kg-card-markdown"><img src="https://bigl.es/content/images/2026/01/picoide-beige-stack-blackpcb_jpg_gallery-lg.jpg" alt="Raspberry Pi Pico Powered PicoIDE Destroys Crowdfunding Goal — Easily Emulate Old IDE / ATAPI Disk Drives Using Micro SD"><p>The crowdfunding <a href="https://www.crowdsupply.com/polpotronics/picoide">campaign for PicoIDE</a>, an &quot;open source IDE/ATAPI drive emulator for vintage computers&quot; is live and at the time of writing it is 225% funded, raising nearly $80,000, well over its $35,000 target!</p>
<p>Created by the Ian Scott, who also created <a href="https://picog.us/">PicoGUS</a> (an emulated Gravis UltraSound / Sound Blaster 2, AdLib sound card) the two devices share something in common, and the &quot;Pico&quot; should give the game away. At the heart of the projects is the Raspberry Pi Pico. In the case of PicoIDE it is the RP2350 used in the Raspberry Pi Pico 2 and Pico 2W.<br>
PicoIDE has been created to address the biggest issue with aging retro computing hardware. <strong>They break!</strong><br>
The IDE / ATAPI hard drives and CD ROM drives of the 1980s and 1990s are prone to issues, and some just die as soon as power is applied. Old CD ROM drives commonly die as the laser diode gives out. Hard drives may spin, but errors may soon appear. So clone those drives ASAP!</p>
<iframe width="813" height="457" src="https://www.youtube.com/embed/QmApt9ooVes" title="PicoIDE - An open source IDE/ATAPI drive emulator for vintage computers" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" referrerpolicy="strict-origin-when-cross-origin" allowfullscreen></iframe>
<p>So how do we preserve and use old PC hardware? We can use SD card / Compact Flash card adapters to create hard drives. We can use Gotek drives to emulate floppy and CD ROM drives. I've used both and they both work well, but with PicoIDE we get it all in one package, and best of all it comes in an injection molded 3.5 inch case that would look great in an old PC case. The on board Raspberry Pi RP2350 System on Chip (SoC) proves that the RP2350 and the older RP2040 SoC are still extremely versatile to the maker and retro computing communities.</p>
<h2 id="therearetwoversionsofpicoide">There are two versions of PicoIDE:</h2>
<p><img src="https://bigl.es/content/images/2026/01/picoide-pcb-enclosure-angle-01_jpg_gallery-lg.jpg" alt="Raspberry Pi Pico Powered PicoIDE Destroys Crowdfunding Goal — Easily Emulate Old IDE / ATAPI Disk Drives Using Micro SD"><br>
<em>Image Credit: Polpotronics / Ian Scott</em><br>
PicoIDE Base $69: Full IDE/ATAPI emulation in an injection molded 3.5-inch enclosure with microSD storage, CD audio output, and configuration via host utility or config file.</p>
<p><img src="https://bigl.es/content/images/2026/01/picoide-hero-01_jpg_gallery-lg.jpg" alt="Raspberry Pi Pico Powered PicoIDE Destroys Crowdfunding Goal — Easily Emulate Old IDE / ATAPI Disk Drives Using Micro SD"><br>
PicoIDE Deluxe (Beige or Black) $110: Everything in Base, plus a front panel with OLED display, navigation buttons, and ESP32-powered Wi-Fi for wireless image management.</p>
<p>Looking at the front of the Deluxe versions case, we can see a bright OLED display, and next to it are the controls to select our disk image. Just to the right is a micro SD card slot that enables us to insert cards with disk images. This is much easier than some SD and Compact Flash card solutions that require us to either open the case or reach around the back of the PC to access the card. A 3.5mm headphone jack provides an audio output.</p>
<p>PicoIDE supports disk images in</p>
<ul>
<li>Hard disk
<ul>
<li>.img, .hda, .vhd</li>
</ul>
</li>
<li>CD ROM
<ul>
<li>.bin/.cue, .iso</li>
</ul>
</li>
</ul>
<p><img src="https://bigl.es/content/images/2026/01/picoide-pcb-front-back-01_jpg_gallery-lg.jpg" alt="Raspberry Pi Pico Powered PicoIDE Destroys Crowdfunding Goal — Easily Emulate Old IDE / ATAPI Disk Drives Using Micro SD"><br>
<em>Image Credit: Polpotronics / Ian Scott</em></p>
<p>The Deluxe version also comes with an on board ESP32-C3 that enables remote management of disk images via a web interface. There is also a QWIIC (Maker Port, StemmaQT) I2C interface for use with compatible components such as sensors or additional screens.</p>
<h2 id="picoideisanopensourceproject">PicoIDE is an open source project</h2>
<p>According to the <a href="https://www.crowdsupply.com/polpotronics/picoide">crowdsupply page</a>, the project is open source and released using licences to &quot;protect your freedom to use, modify and build upon the project.&quot; The hardware, covering the PCB and the enclosure, is released under a CERN-OHL-S-v2 licence. Firmware for the RP2350 us under the GPLv2. <a href="https://picoide.com/docs/">Comprehensive documentation</a> covers both consumers and developers who want to use or improve PicoIDE. There is also a <a href="https://github.com/polpo/picoide">Github repository</a> where you can learn more.</p>
<h2 id="crowdfunding">Crowdfunding</h2>
<p><img src="https://bigl.es/content/images/2026/01/picoide-beige-black-sidexside_jpg_gallery-lg.jpg" alt="Raspberry Pi Pico Powered PicoIDE Destroys Crowdfunding Goal — Easily Emulate Old IDE / ATAPI Disk Drives Using Micro SD"><br>
<em>Image Credit: Polpotronics / Ian Scott</em></p>
<p>As this is a crowdfunded project, I have to give a general warning. Supporting a crowdfunded project is not purchasing a retail product. You are backing a project because you want it to succeed. There may be delays and logistics issues so only support the project if you are willing to take the risk!</p>
<p>PicoIDE ships from the United States, so remember to take any taxes, fees, duties etc into consideration.</p>
<p>PicoIDE starts from <a href="https://www.crowdsupply.com/polpotronics/picoide">$69 over on CrowdSupply.</a></p>
<p><em>Main Image Credit: Polpotronics / Ian Scott</em></p>
</div>]]></content:encoded></item><item><title><![CDATA[Raspberry Pi Fuels PiStorm and Lazarustorm External Performance Boost for Amiga 500]]></title><description><![CDATA[Lazarustorm makes easy work of adding a PiStorm CPU upgrade to your Amiga 500.]]></description><link>https://bigl.es/pi-news-lazarustorm-raspberrypi-amiga500/</link><guid isPermaLink="false">697cece482398378a4d7483d</guid><category><![CDATA[pi news]]></category><category><![CDATA[Raspberry Pi]]></category><dc:creator><![CDATA[Les Pounder]]></dc:creator><pubDate>Fri, 30 Jan 2026 18:55:03 GMT</pubDate><media:content url="https://bigl.es/content/images/2026/01/laz1.jpg" medium="image"/><content:encoded><![CDATA[<div class="kg-card-markdown"><img src="https://bigl.es/content/images/2026/01/laz1.jpg" alt="Raspberry Pi Fuels PiStorm and Lazarustorm External Performance Boost for Amiga 500"><p>The venerable Commodore Amiga 500 has an incredibly popular scene these days. Many users refuse to give up on the slab of plastic!</p>
<p>One of those who refuses to give up on the Amiga is <a href="https://github.com/arananet/LAZARUSTORM">Arananet, who has created the Lazarustorm</a> PCB that breaks out PiStorm (an accelrator to really turbo-charge your A500) to inteface with the Zorro II slot on the left side of the A500. No fiddly hacks inside the case, just connect Lazarustorm to the slot, and your A500 gets a much need boost.</p>
<p><img src="https://bigl.es/content/images/2026/01/laz-pcb1.png" alt="Raspberry Pi Fuels PiStorm and Lazarustorm External Performance Boost for Amiga 500"><br>
Image Credit: <a href="https://github.com/arananet">Arananet</a></p>
<p>Lazarustorm brings a completely reversible mod, all of the soldering — bar one solder joint on the A500 — is on the Lararustorm PCB. You will need a <a href="https://www.amigakit.com/pistorm-c-182_43_192.html">PiStorm</a> and a Raspberry Pi 3A. PiStorm provides an interface between the Raspberry Pi and your Amiga. The Pi is there to emulate a Motorola 68000 CPU at a much higher clock speed! As an added bonus, the micro SD card can be used to create virtual hard disks for your huge collection of games and utilities.</p>
<p>Upgrading the CPU on an Amiga 500 was damn near impossible, but fast forward to the 21st century and the ability to mimic a more powerful CPU was made possible with PiStorm and a Raspberry Pi 3A+. Yes, this combination could super-charge your Amiga 500 to ludicrous speeds, but you had to get your hands dirty and desolder the Motorola CPU. With Lazarustorm, we don't have to do too much soldering, thats because the Zorro II slot, hidden on the left side of the Amiga 500 and 500+, directly connect to the CPU. In its heyday, the Zorro II slot provided access for add-ons such as an Intel 286 PC &quot;sidecar&quot; board, RAM expansion and even SCSI hard drives. I had a GVP unit that brought all three of these features and provided a faster CPU, but that cost a fortune back in the 1990s! PiStorm is much cheaper and also <strong>much</strong> faster!</p>
<p>Amiga and retro computing enthusiast <a href="https://www.youtube.com/@TMEretro">TME Retro</a> has a great video showcasing the full install process.</p>
<iframe width="631" height="359" src="https://www.youtube.com/embed/-ICquEE3N9c" title="Lazarustorm: Your EXTERNAL PiStorm Add On" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" referrerpolicy="strict-origin-when-cross-origin" allowfullscreen></iframe>
<p>The Commodore Amiga 500 has a special place in my heart and my computing history. I got the famous Batman pack which coincided with the release of Tim Burton's Batman and the video game. My parents bought it for me from Alan Heywoods in Blackpool, along with a ten-pack of games. It was my first computer with a mouse, heck, I learnt how to use a mouse with my Amiga 500 and Amiganoid (an Arkanoid / Breakout clone). For its time, the Amiga 500 was a beast, made up of custom chips and a Motorola 68000 CPU that ran between 7.09 MHz (PAL) and 7.16 MHz (NTSC).</p>
<p>Head over to <a href="https://github.com/arananet/LAZARUSTORM">Arananet's GitHub repository</a> to get all the details and Gerber files to make your own Lazarustorm boards!</p>
<p>Main image is a still taken from TME Retro's YouTube video.</p>
</div>]]></content:encoded></item><item><title><![CDATA[Join me live(-ish) as I tinker with an ESP32!]]></title><description><![CDATA[I "kneaded" a day tinkering so I grabbed a Baguette S3]]></description><link>https://bigl.es/im-tinkering-with-an-esp32/</link><guid isPermaLink="false">68c535aa82398378a4d747cf</guid><category><![CDATA[ESP32]]></category><dc:creator><![CDATA[Les Pounder]]></dc:creator><pubDate>Sat, 13 Sep 2025 10:21:32 GMT</pubDate><media:content url="https://bigl.es/content/images/2025/09/banana-1.jpg" medium="image"/><content:encoded><![CDATA[<div class="kg-card-markdown"><img src="https://bigl.es/content/images/2025/09/banana-1.jpg" alt="Join me live(-ish) as I tinker with an ESP32!"><p><img src="https://bigl.es/content/images/2025/09/banana.jpg" alt="Join me live(-ish) as I tinker with an ESP32!"><br>
It has been a while, hasn't it? Sorry about that. Life has been challenging the past few years, but lets not dwell on that. Instead lets hack around with something. I'll be hacking around all day on September 13 2025.</p>
<h2 id="youdontkneadthisbutyouwillwantit">You don't &quot;knead&quot; this, but you will want it!</h2>
<p>The ESP32 has been around for a while. I've got a drawer full of various ESP devices, but when I saw the Baguette S3 from The Pi Hut, I had to get one.</p>
<blockquote class="mastodon-embed" data-embed-url="https://mastodon.social/@recantha/115178903449309221/embed" style="background: #FCF8FF; border-radius: 8px; border: 1px solid #C9C4DA; margin: 0; max-width: 540px; min-width: 270px; overflow: hidden; padding: 0;"> <a href="https://mastodon.social/@recantha/115178903449309221" target="_blank" style="align-items: center; color: #1C1A25; display: flex; flex-direction: column; font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Oxygen, Ubuntu, Cantarell, 'Fira Sans', 'Droid Sans', 'Helvetica Neue', Roboto, sans-serif; font-size: 14px; justify-content: center; letter-spacing: 0.25px; line-height: 20px; padding: 24px; text-decoration: none;"> <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="32" height="32" viewbox="0 0 79 75"><path d="M63 45.3v-20c0-4.1-1-7.3-3.2-9.7-2.1-2.4-5-3.7-8.5-3.7-4.1 0-7.2 1.6-9.3 4.7l-2 3.3-2-3.3c-2-3.1-5.1-4.7-9.2-4.7-3.5 0-6.4 1.3-8.6 3.7-2.1 2.4-3.1 5.6-3.1 9.7v20h8V25.9c0-4.1 1.7-6.2 5.2-6.2 3.8 0 5.8 2.5 5.8 7.4V37.7H44V27.1c0-4.9 1.9-7.4 5.8-7.4 3.5 0 5.2 2.1 5.2 6.2V45.3h8ZM74.7 16.6c.6 6 .1 15.7.1 17.3 0 .5-.1 4.8-.1 5.3-.7 11.5-8 16-15.6 17.5-.1 0-.2 0-.3 0-4.9 1-10 1.2-14.9 1.4-1.2 0-2.4 0-3.6 0-4.8 0-9.7-.6-14.4-1.7-.1 0-.1 0-.1 0s-.1 0-.1 0 0 .1 0 .1 0 0 0 0c.1 1.6.4 3.1 1 4.5.6 1.7 2.9 5.7 11.4 5.7 5 0 9.9-.6 14.8-1.7 0 0 0 0 0 0 .1 0 .1 0 .1 0 0 .1 0 .1 0 .1.1 0 .1 0 .1.1v5.6s0 .1-.1.1c0 0 0 0 0 .1-1.6 1.1-3.7 1.7-5.6 2.3-.8.3-1.6.5-2.4.7-7.5 1.7-15.4 1.3-22.7-1.2-6.8-2.4-13.8-8.2-15.5-15.2-.9-3.8-1.6-7.6-1.9-11.5-.6-5.8-.6-11.7-.8-17.5C3.9 24.5 4 20 4.9 16 6.7 7.9 14.1 2.2 22.3 1c1.4-.2 4.1-1 16.5-1h.1C51.4 0 56.7.8 58.1 1c8.4 1.2 15.5 7.5 16.6 15.6Z" fill="currentColor"/></svg> <div style="color: #787588; margin-top: 16px;">Post by @recantha@mastodon.social</div> <div style="font-weight: 500;">View on Mastodon</div> </a> </blockquote> <script data-allowed-prefixes="https://mastodon.social/" async src="https://mastodon.social/embed.js"></script>
<p>Full disclosure, I paid for this piece of kit out of my own money.</p>
<p><img src="https://bigl.es/content/images/2025/09/esp32.jpg" alt="Join me live(-ish) as I tinker with an ESP32!"><br>
The <a href="https://thepihut.com/products/baguette-s3-esp32-s3-prototyping-board">Baguette S3</a> <em>&quot;is a compact ESP32-S3 development board designed for prototyping ESP-based projects on a breadboard&quot;  (The Pi Hut listing text).</em> and for £11.50 it is a little more expensive than the generic ESP32 that I typically buy from Aliexpress. But In this case I am paying for the convenience of the form factor.<br>
You see, the Baguette S3 is designed for use with a half-size breadboard, unlike some ESP32 boards which dominate a breadboard and make it difficult to prototype with.<br>
<img src="https://bigl.es/content/images/2025/09/close1.jpg" alt="Join me live(-ish) as I tinker with an ESP32!"><br>
<img src="https://bigl.es/content/images/2025/09/close2.jpg" alt="Join me live(-ish) as I tinker with an ESP32!"></p>
<p>The Baguette S3 provides us with a plethora of GPIO options.</p>
<ul>
<li>23 GPIO pins (in order!)</li>
<li>I2C, Serial</li>
<li>Qwiic / Stemma QT</li>
<li>Micro SD card</li>
<li>RGB LED &quot;NeoPixel&quot;</li>
<li>USB C</li>
</ul>
<p>The ESP32 S3 at the heart of the board is an ESP32-S3-MINI-1-N8 with 8MB of flash, 384KB ROM and 512KB of SRAM. Wi-Fi and Bluetooth (5 and LE) works via the onboard antenna.</p>
<p>Software support for the Baguette S3 is currently officially listed as Arduino and ESPHome, but the ESP32 S3 is supported by MicroPython CircuitPython, and The Pi Hut are still working on guides to support this.</p>
<p>But, I am impatient and wanted to tinker with CircuitPython on my new toy. So join me as I do just that.</p>
<h3 id="hereistheprocessillbefollowing">Here is the process I'll be following</h3>
<ul>
<li>Set up the software</li>
<li>Solder the GPIO</li>
<li>Build a project</li>
</ul>
<p>So join me as I embark on the first step, flashing CircuitPython on to the Baguette S3.</p>
<h2 id="1207pmbstcircuitpythonsetup">12:07PM BST CircuitPython Setup!</h2>
<p><img src="https://bigl.es/content/images/2025/09/da872eb59c0e12ff.jpg" alt="Join me live(-ish) as I tinker with an ESP32!"><br>
This is the goal for this section!</p>
<p>Adafruit's CircuitPython is a personal favourite of mine. Ever since I was introduced to it by Kattni Rembor at PyCon in 2018, I have loved it. So I wanted to use it with Baguette S3 and because it uses an ESP32 S3, I can.</p>
<p>So lets do just that!</p>
<p>I'm going to connect my Baguette S3 to a laptop running Ubuntu 24.04 using a USB A to C cable.</p>
<p>I downloaded the version of <a href="https://circuitpython.org/board/espressif_esp32s3_devkitc_1_n8/">CircuitPython for the ESP32 S3</a>, specifically the .bin file as I wanted to flash it to the Baguette S3 using esptool. I chose CircuitPython 9 as that is the current stable release. There is also a version 10, but that is still in Beta.</p>
<p>Then I opened a terminal and created a <a href="https://bigl.es/tooling-tuesday-late-edition-virtualenv/">Python virtual environment</a> to contain esptool away from the system Python install.</p>
<pre><code>virtualenv esptool
</code></pre>
<p>Then I changed directory to esptool</p>
<pre><code>cd esptool
</code></pre>
<p>Lastly I activated the virtual environment.</p>
<pre><code>source bin/activate
</code></pre>
<p>Now I am working in a Python virtual environment, and I won't destroy my precious system.<br>
I install esptool, a tool to flash and manage ESP devices, such as the ESP32.</p>
<pre><code>pip install esptool
</code></pre>
<p>After installation, I checked that it worked.</p>
<pre><code>esptool -h
</code></pre>
<p>Now it is time to use esptool to erase the flash storage on the Baguette S3. Warning, make sure that you do not have any other ESP devices attached to the computer otherwise you risk wiping those too!</p>
<p>In the terminal I tell esptool to erase the flash.</p>
<pre><code>esptool erase_flash
</code></pre>
<p>After a short while, the Baguette S3's flash will be wiped and ready for new software, in this case it is CircuitPython.</p>
<p>To get CircuitPython onto the Baguette S3, we need to press and hold the RESET and BOOT buttons. Then release the RESET button, and hold the BOOT button for five seconds. This will force the Baguette S3 into BOOTLOADER mode.</p>
<p>With that done, let's go back to the terminal and use esptool to write CircuitPython to the Baguette S3. I invoke the command to write the CircuitPython.bin file to the start (0) of the flash storage. I copied the .bin image into the same directory as my virtual environment, but you can just pass the absoute path <code>/home/les/Downloads/circuitpython.bin</code> if you wish.</p>
<pre><code>esptool --baud 460800 write_flash 0 adafruit-circuitpython-espressif_esp32s3_devkitc_1_n8-en_GB-9.2.9.bin
</code></pre>
<p><img src="https://bigl.es/content/images/2025/09/Screenshot-from-2025-09-13-12-01-40.png" alt="Join me live(-ish) as I tinker with an ESP32!"><br>
The process will take a few moments, leave it to do its work. When done you'll have CircuitPython on the Baguette S3. <a href="https://bigl.es/tooling-tuesday-tio/">I used tio to access the REPL</a> via a USB serial interface.</p>
<p><img src="https://bigl.es/content/images/2025/09/Screenshot-from-2025-09-13-12-01-57.png" alt="Join me live(-ish) as I tinker with an ESP32!"><br>
I can list the GPIO pins too, so with that excellent segue, I shall solder the GPIO pins and then we can do some testing.</p>
<h2 id="1232pmbstsolderingtime">12:32PM BST Soldering Time!</h2>
<p><img src="https://bigl.es/content/images/2025/09/sold1.jpg" alt="Join me live(-ish) as I tinker with an ESP32!"></p>
<p>I own a lot of soldering irons, but I reached for the nearest and it just happened to be the <a href="https://www.tomshardware.com/maker-stem/ifixit-fixhub-portable-soldering-station-review">iFixit Smart Soldering Station</a> that I recently resurrected from the dead.<br>
<em>It turns out the older firmware and leaving a battery for months will make the unit &quot;die&quot; but you can resurrect it by flashing the latest firmware onto the soldering station and the smart soldering iron.</em></p>
<p>I placed the Baguette S3 onto the header pins, and used a half-size breadboard to steady it all. Five minutes and a little isopropyl alcohol later, the board was soldered and ready for tinkering.<br>
<img src="https://bigl.es/content/images/2025/09/sold2.jpg" alt="Join me live(-ish) as I tinker with an ESP32!"></p>
<p>The Baguette S3's design means that it uses all of the rows in a half-size breadboard, and I can keep the board out of the way.</p>
<p><img src="https://bigl.es/content/images/2025/09/sold3.jpg" alt="Join me live(-ish) as I tinker with an ESP32!"><br>
Compare this to an ESP32 devkit, and you have to choose which side of GPIO pins that you want to use. Or, use two half-size breadboards and make some unholy creature!<br>
Lunch, then time to make some LEDs blink.</p>
<h2 id="129pmbsthelloworldofelectronicshowtoblinkanled">1:29PM BST Hello World of Electronics — How to Blink an LED</h2>
<p><img src="https://bigl.es/content/images/2025/09/blinky-ezgif.com-video-to-gif-converter.gif" alt="Join me live(-ish) as I tinker with an ESP32!"></p>
<p>In the world of programming, Hello World is often the first project that we undertake. Why? It is quick and easy to write, and provides a basic test of input and output.</p>
<p>The input is our code, the output is what we told the computer to do with our code. In the world of electronics, Hello World is usually an LED, blinking on and off in a loop. So I did just that, but I used some <a href="https://shop.pimoroni.com/products/led-noodles?variant=42123756044371">LED noodles from Pimoroni</a> instead because they are gorgeous!</p>
<p><img src="https://bigl.es/content/images/2025/09/leds.jpg" alt="Join me live(-ish) as I tinker with an ESP32!"><br>
I connected the cathode end of the noodles to GND, and the anode end to GPIO pins 15,16 and 17 on the Baguette S3 via a half-size breadboard.</p>
<p><img src="https://bigl.es/content/images/2025/09/thonny.jpg" alt="Join me live(-ish) as I tinker with an ESP32!"></p>
<p>I then installed <a href="https://thonny.org/">Thonny</a> and set it up to connect to a CircuitPython device (Tools &gt;&gt; Options &gt;&gt; Interpreter and then set the interpreter to CircuitPython and select the Baguette S3 from the PORT dropdown).</p>
<p>Then I wrote a simple script to control the three GPIO pins to which my LED noodles are connected.</p>
<p>I started by importing three modules<br>
<strong>time</strong>: to control the delay<br>
<strong>board</strong>: to use the GPIO pins<br>
<strong>digitalio</strong>: to control the GPIO pins</p>
<pre><code>import time
import board
import digitalio
</code></pre>
<p>Then I setup each GPIO pin to be an output (so current flows from the GPIO pin). There is probably a better way to do this, but this is simple enough to get the job done.</p>
<pre><code>led1 = digitalio.DigitalInOut(board.IO15)
led1.direction = digitalio.Direction.OUTPUT
led2 = digitalio.DigitalInOut(board.IO16)
led2.direction = digitalio.Direction.OUTPUT
led3 = digitalio.DigitalInOut(board.IO17)
led3.direction = digitalio.Direction.OUTPUT
</code></pre>
<p>I then created a variable called <code>delay</code> and stored 0.2 inside of it. This refers to a 0.2 second delay to control the how long the LED is on and off for.</p>
<pre><code>delay = 0.2
</code></pre>
<p>Using a while True loop (to run the code indefinitely) I then turned on each LED, one after the other. As one would turn on, the others would go off, creating an animated effect. Controlling how long an LED is on/off for, I used a <code>time.sleep()</code> and passed the delay variable to set the 0.2 second delay.</p>
<pre><code>while True:
    led1.value = True
    led2.value = False
    led3.value = False
    time.sleep(delay)
    led1.value = False
    led2.value = True
    led3.value = False
    time.sleep(delay)
    led1.value = False
    led2.value = False
    led3.value = True
    time.sleep(delay)
</code></pre>
<p>I saved the code to the Baguette S3 as blinky.py and then clicked on Run (green arrow) to start the code. The LED noodles came to life and I had a mini light show / cyberpunk rave running!</p>
<h3 id="completecodelisting">Complete Code Listing</h3>
<pre><code>import time
import board
import digitalio

led1 = digitalio.DigitalInOut(board.IO15)
led1.direction = digitalio.Direction.OUTPUT
led2 = digitalio.DigitalInOut(board.IO16)
led2.direction = digitalio.Direction.OUTPUT
led3 = digitalio.DigitalInOut(board.IO17)
led3.direction = digitalio.Direction.OUTPUT
delay = 0.2

while True:
    led1.value = True
    led2.value = False
    led3.value = False
    time.sleep(delay)
    led1.value = False
    led2.value = True
    led3.value = False
    time.sleep(delay)
    led1.value = False
    led2.value = False
    led3.value = True
    time.sleep(delay)
</code></pre>
<p>Next step, get the Baguette online!</p>
<h2 id="329pmbstgettingthebaguettes3online">3:29PM BST Getting the Baguette S3 online</h2>
<p><img src="https://bigl.es/content/images/2025/09/wifi5.JPG" alt="Join me live(-ish) as I tinker with an ESP32!"><br>
I never expected to try and get a &quot;bageutte&quot; online...</p>
<p>At the most basic level, getting the Baguette S3 online is a piece of cake. We just need to create a file called <em>settings.toml</em> and save it to the root of the CircuitPython filesystem<br>
<img src="https://bigl.es/content/images/2025/09/wifi1.jpg" alt="Join me live(-ish) as I tinker with an ESP32!"><br>
Saving that file and restarting the Baguette S3 saw the device automatically connect to my network. To say that I was shocked is an understatement! That was so easy.<br>
<img src="https://bigl.es/content/images/2025/09/wifi2.jpg" alt="Join me live(-ish) as I tinker with an ESP32!"></p>
<p>What I have really done is connect the Baguette S3 to my router via Wi-Fi, now I need to write some code to make it do something and for that I need a little help in the form of the official <a href="https://circuitpython.org/libraries">CircuitPython libraries</a> (pre-written code / modules) so that I could get the Baguette S3 to do something with an Internet connection. Because I am using CircuitPython 9, I downloaded the library pack &lt;<a href="https://github.com/adafruit/Adafruit_CircuitPython_Bundle/releases/download/20250912/adafruit-circuitpython-bundle-9.x-mpy-20250912.zip">direct ZIP download</a>&gt; for that release and then extracted the contents to a directory on my computer.</p>
<p>I then copied from extracted libraries the following files</p>
<p><em>adafruitconnectionmanager.mpy</em><br>
and<br>
<em>adafruitrequests.mpy</em></p>
<p>to the /lib/ directory on my CIRCUITPY drive. Here you can see what that looks like on my Windows PC, but it will be the same no matter your OS.<br>
<img src="https://bigl.es/content/images/2025/09/wifi4.JPG" alt="Join me live(-ish) as I tinker with an ESP32!"></p>
<p>These files enable the Baguette S3 to go make a connection, and then request web data.</p>
<h3 id="sowhatamigoingtodowithit">So what am I going to do with it?</h3>
<p>I'm going to do what I normally do to test a new boards networking capabilities. Look up who is currently on the International Space Station. Handily this data is freely available and it comes in a JSON format, so it is easy to work with.</p>
<p>Open Thonny and lets start coding on the Baguette S3.<br>
<em>Quick nod to Ladyada Limor Fried's <a href="https://learn.adafruit.com/networking-in-circuitpython/networking-with-the-wifi-module">excellent script</a> for checking connectivity. I have based my code on that script</em></p>
<p>We start by importing modules to use the underlying CircuitPython OS, make network connections, use the Wi-Fi hardware and to make HTTP (web) requests in Python.</p>
<pre><code>import os
import adafruit_connection_manager
import wifi
import adafruit_requests
</code></pre>
<p>The next step is to read the Wi-FI AP and password details from the settings.toml file that we created earlier.</p>
<pre><code>ssid = os.getenv(&quot;CIRCUITPY_WIFI_SSID&quot;)
password = os.getenv(&quot;CIRCUITPY_WIFI_PASSWORD&quot;)
</code></pre>
<p>Then we create objects to handle the Wi-Fi and to setup an HTTPS session.</p>
<pre><code>pool = adafruit_connection_manager.get_radio_socketpool(wifi.radio)
https = adafruit_requests.Session(pool, ssl_context = adafruit_connection_manager.get_radio_ssl_context(wifi.radio))
</code></pre>
<p>Using the Wi-Fi object we connect the code to the Internet.</p>
<pre><code>wifi.radio.connect(ssid, password)
</code></pre>
<p>We set the URL (the link on the Internet) where the ISS astronaut data is stored. Using the URL we request the information and store it in an object called <code>response</code> and then format the data into a JSON format.</p>
<pre><code>url = &quot;http://api.open-notify.org/astros.json&quot;
response = https.get(url)
data = response.json()
</code></pre>
<p>We then print the number of people who are onboard the ISS, and start the process of naming them.</p>
<pre><code>print(&quot;Number of people in space:&quot;, data[&quot;number&quot;])
print(&quot;Names of astronauts currently on the ISS:&quot;)
</code></pre>
<p>Using a for loop we iterate over the names of the people onboard the ISS craft.</p>
<pre><code>for person in data[&quot;people&quot;]:
    if person[&quot;craft&quot;] == &quot;ISS&quot;:
        print(&quot;-&quot;, person[&quot;name&quot;])
</code></pre>
<p>Finally we close the response object, ending the connection.</p>
<pre><code>response.close()
</code></pre>
<p>Save the code to the Baguette S3 as wifi-test.py and click on Run &gt;&gt; Run Current Script, or press the green play button. The Baguette S3 will connect to your Wi-Fi (using the settings.toml file) and then get the data.</p>
<p>Your Baguette S3 is now online and can communicate with devices / services via a network connection.</p>
<h3 id="completecodelisting">Complete Code Listing</h3>
<pre><code>import os
import adafruit_connection_manager
import wifi
import adafruit_requests

ssid = os.getenv(&quot;CIRCUITPY_WIFI_SSID&quot;)
password = os.getenv(&quot;CIRCUITPY_WIFI_PASSWORD&quot;)

pool = adafruit_connection_manager.get_radio_socketpool(wifi.radio)
https = adafruit_requests.Session(pool, ssl_context = adafruit_connection_manager.get_radio_ssl_context(wifi.radio))

wifi.radio.connect(ssid, password)

url = &quot;http://api.open-notify.org/astros.json&quot;
response = https.get(url)
data = response.json()

print(&quot;Number of people in space:&quot;, data[&quot;number&quot;])
print(&quot;Names of astronauts currently on the ISS:&quot;)

for person in data[&quot;people&quot;]:
    if person[&quot;craft&quot;] == &quot;ISS&quot;:
        print(&quot;-&quot;, person[&quot;name&quot;])

response.close()
</code></pre>
<h2 id="422pmbsttinkeringwithi2candanoledscreen">4:22PM BST Tinkering with I2C and an OLED screen</h2>
<p><img src="https://bigl.es/content/images/2025/09/oled2.jpg" alt="Join me live(-ish) as I tinker with an ESP32!"></p>
<p>Final update for today! I wanted to test how easy it would be to connect and use an OLED screen with the Baguette S3. It turns out it was easy, but I did trip up along the way. I based my experiment on Adafruit's <a href="https://learn.adafruit.com/adafruit-oled-featherwing/python-circuitpython-wiring">awesome guide</a> to using OLED screens with CircuitPython and tweaked it to meet my needs. The goal of this project is to show some text, inside of a box on a tiny 128x64 OLED screen that I picked up from Aliexpress many years ago.</p>
<p><img src="https://bigl.es/content/images/2025/09/oled3.jpg" alt="Join me live(-ish) as I tinker with an ESP32!"><br>
The connections between the screen and the Baguette S3 are clearly marked. Just connect</p>
<ul>
<li>VCC to 3V</li>
<li>GND to GND</li>
<li>SDA to SDA</li>
<li>SCL to SCL</li>
</ul>
<p>Now on to the software, and we're going to need the following libraries copied from the previously downloaded libraries archive.<br>
<img src="https://bigl.es/content/images/2025/09/i2c2.jpg" alt="Join me live(-ish) as I tinker with an ESP32!"></p>
<ul>
<li>adafruit_bus_device (this is a folder, copy the folder and its contents to the Baguette S3</li>
<li>adafruit_display_text (another folder, copy just like the previous)</li>
<li>adafruit_displayio_ssd1306.mpy</li>
</ul>
<p>The Baguette S3's lib folder should look something like this now.<br>
<img src="https://bigl.es/content/images/2025/09/i2c3.JPG" alt="Join me live(-ish) as I tinker with an ESP32!"></p>
<p>Open Thonny and on the Baguette S3 create a new file. We'll start the code by importing modules to work with the GPIO, use I2C, make working with OLED screens easiers, show fonts, draw graphics and to use the I2C bus.</p>
<pre><code>import board
import busio
import displayio
import terminalio
from adafruit_display_text import label
from i2cdisplaybus import I2CDisplayBus
import adafruit_displayio_ssd1306
</code></pre>
<p>We then release any previous connections to a display.</p>
<pre><code>displayio.release_displays()
</code></pre>
<p>Setup an I2C object and point the object to the GPIO pins used for the connection. This is where I tripped up. Sometimes you can just tell the code to use <code>board.i2c()</code> and it does all the work. But this time I had to specifically tell the code which pins I was using. IO48 is SCL and IO47 is SDA.</p>
<pre><code>i2c = busio.I2C(board.IO48, board.IO47)
</code></pre>
<p>We then create an object to tell the code where our OLED screen is on the I2C bus. Then we create an object to setup the resolution (128x64) of the screen.</p>
<pre><code>display_bus = I2CDisplayBus(i2c, device_address=0x3C)
display = adafruit_displayio_ssd1306.SSD1306(display_bus, width=128, height=32)
</code></pre>
<p>Next up we create an object called <code>splash</code> and set it up ready for use.</p>
<pre><code>splash = displayio.Group()
display.root_group = splash
</code></pre>
<p>Then we setup the screen with a bitmap, and set the color palette to white, so that we can draw on the black background.</p>
<pre><code>color_bitmap = displayio.Bitmap(128, 32, 1)
color_palette = displayio.Palette(1)
color_palette[0] = 0xFFFFFF
</code></pre>
<p>Using the previous setup we create and use a sprite.</p>
<pre><code>bg_sprite = displayio.TileGrid(color_bitmap, pixel_shader=color_palette, x=0, y=0)
splash.append(bg_sprite)
</code></pre>
<p>We repeat the process, but this time for a black centre rectangle that is slightly smaller.</p>
<pre><code>inner_bitmap = displayio.Bitmap(118, 24, 1)
inner_palette = displayio.Palette(1)
inner_palette[0] = 0x000000  # Black
inner_sprite = displayio.TileGrid(inner_bitmap, pixel_shader=inner_palette, x=5, y=4)
splash.append(inner_sprite)
</code></pre>
<p>Then we create an object called test and store a string, in my case &quot;biglesp&quot;</p>
<pre><code>text = &quot;biglesp&quot;
</code></pre>
<p>Then we update the text area, the centre of the screen to show the text dead centre.</p>
<pre><code>text_area = label.Label(terminalio.FONT, text=text, color=0xFFFF00, x=42, y=15)
splash.append(text_area)
</code></pre>
<p>Finally we use a while True loop to keep the screen active.</p>
<pre><code>while True:
    pass
</code></pre>
<p><img src="https://bigl.es/content/images/2025/09/oled1.jpg" alt="Join me live(-ish) as I tinker with an ESP32!"><br>
Save the code to the Baguette S3 as oled-test.py and click on Run &gt;&gt; Run Current Script, or press on the green play button to start. Look to the screen and you will see your text clearly printed upon it.</p>
<h3 id="completecodelisting">Complete Code Listing</h3>
<pre><code>import board
import busio
import displayio
import terminalio
from adafruit_display_text import label
from i2cdisplaybus import I2CDisplayBus
import adafruit_displayio_ssd1306

displayio.release_displays()
i2c = busio.I2C(board.IO48, board.IO47)
display_bus = I2CDisplayBus(i2c, device_address=0x3C)
display = adafruit_displayio_ssd1306.SSD1306(display_bus, width=128, height=32)

splash = displayio.Group()
display.root_group = splash

color_bitmap = displayio.Bitmap(128, 32, 1)
color_palette = displayio.Palette(1)
color_palette[0] = 0xFFFFFF

bg_sprite = displayio.TileGrid(color_bitmap, pixel_shader=color_palette, x=0, y=0)
splash.append(bg_sprite)

inner_bitmap = displayio.Bitmap(118, 24, 1)
inner_palette = displayio.Palette(1)
inner_palette[0] = 0x000000
inner_sprite = displayio.TileGrid(inner_bitmap, pixel_shader=inner_palette, x=5, y=4)
splash.append(inner_sprite)

text = &quot;biglesp&quot;
text_area = label.Label(terminalio.FONT, text=text, color=0xFFFF00, x=42, y=15)
splash.append(text_area)

while True:
    pass
</code></pre>
<h2 id="thatisallfortoday">That is all for today!</h2>
<p>I've had fun tinkering with the Baguette S3 today. The form factor is pleasing, and very convenient for use with a breadboard. I can see The Pi Hut shifting a few of these boards, especially those of us who want to tinker with an ESP32 and a breadboard.</p>
<h2 id="1792025940ambstqwiictest">17/9/2025 9:40am BST: QWIIC Test ;)</h2>
<p><img src="https://bigl.es/content/images/2025/09/touch-hero.jpg" alt="Join me live(-ish) as I tinker with an ESP32!"><br>
If you've followed my early work over at Tom's Hardware, then you may know that I am a big fan of StemmaQT, QWIIC, Maker Port connections. Essentially breaking out the I2C connection into a simple connector. They make rapid prototyping really easy and with companies such as Adafruit, Pimoroni, Sparkfun, Cytron making add-on boards packed with sensors and other delights, they lower the barrier to getting started with electronics.</p>
<p>I wanted to test Baguette S3's QWIIC port and so I dug into my stock on boards and pulled out the mighty MPR121 capacitive touch sensor board.</p>
<p>Connecting to the Baguette was simple, just plug in the cable and the green light on the MPR121 lights up!</p>
<p>I used <a href="https://learn.adafruit.com/adafruit-mpr121-12-key-capacitive-touch-sensor-breakout-tutorial/python-circuitpython">Adafruit's excellent MPR121 example</a> for CircuitPython.</p>
<p>The only change that I needed to make was to change the default</p>
<pre><code>i2c = busio.I2C(board.SCL, board.SDA)
</code></pre>
<p>to</p>
<pre><code>i2c = busio.I2C(board.IO48, board.IO47)
</code></pre>
<p><img src="https://bigl.es/content/images/2025/09/lib.jpg" alt="Join me live(-ish) as I tinker with an ESP32!"><br>
and to copy the <code>adafruit_mpr121.mpy</code> file to the /lib/ directory on my CIRCUITPY drive (the Baguette S3).<br>
<img src="https://bigl.es/content/images/2025/09/qwiic-test.jpg" alt="Join me live(-ish) as I tinker with an ESP32!"><br>
Save the code and click run, then touch the inputs. All working.<br>
Another successful test.</p>
<p><strong>Happy Hacking</strong></p>
</div>]]></content:encoded></item><item><title><![CDATA[Tuesday Tooling: I'm a Massive Faker, With Python]]></title><description><![CDATA[<div class="kg-card-markdown"><p>Need to make a lot of fake user data quickly? You need Faker.</p>
<h2 id="sowhatisit">So What Is It?</h2>
<p><a href="https://github.com/joke2k/faker">Faker, by Daniele Faraglia</a>, is a Python module that generates fake data. Not for nefarious means, rather it is there to help you generate data to test your databases etc.</p>
<h2 id="thanks">Thanks</h2>
<p>Hat tip</p></div>]]></description><link>https://bigl.es/tuesday-tooling-im-a-massive-faker-with-python/</link><guid isPermaLink="false">6549e5bc82398378a4d7467b</guid><category><![CDATA[tuesdaytooling]]></category><category><![CDATA[python]]></category><dc:creator><![CDATA[Les Pounder]]></dc:creator><pubDate>Tue, 07 Nov 2023 09:40:26 GMT</pubDate><media:content url="https://bigl.es/content/images/2023/11/_6f796466-2329-4d08-8bf3-a2ae348eaa9e.jpeg" medium="image"/><content:encoded><![CDATA[<div class="kg-card-markdown"><img src="https://bigl.es/content/images/2023/11/_6f796466-2329-4d08-8bf3-a2ae348eaa9e.jpeg" alt="Tuesday Tooling: I'm a Massive Faker, With Python"><p>Need to make a lot of fake user data quickly? You need Faker.</p>
<h2 id="sowhatisit">So What Is It?</h2>
<p><a href="https://github.com/joke2k/faker">Faker, by Daniele Faraglia</a>, is a Python module that generates fake data. Not for nefarious means, rather it is there to help you generate data to test your databases etc.</p>
<h2 id="thanks">Thanks</h2>
<p>Hat tip to <a href="https://twitter.com/driscollis/status/1721573325712101422">Mike Driscoll</a> for alerting me to this very handy module. Mike is a prolific Python educator who uses Twitter / X as a quick and digestible means to learn new Python techniques and modules.</p>
<h2 id="sohowdoiinstallit">So How Do I Install It?</h2>
<p>Via pip!<br>
On my Ubuntu laptop I chose to install it inside a virtualenv so first I had to create the venv.</p>
<pre><code>python3 -m venv faker
</code></pre>
<p>Then change directory to the venv.</p>
<pre><code>cd faker
</code></pre>
<p>Then I activated the venv, essentially enabling the me to use the Faker module without it touching the Python install on my laptop.</p>
<pre><code>source bin/activate
</code></pre>
<p>Now my Terminal session tells me that I have activated the venv, I can see the (faker) text at the start of the prompt.<br>
<img src="https://bigl.es/content/images/2023/11/faker-1.png" alt="Tuesday Tooling: I'm a Massive Faker, With Python"><br>
Now I use pip to install.</p>
<pre><code>pip install faker
</code></pre>
<h2 id="sohowdoiuseit">So How Do I Use It?</h2>
<p>We'll start with the basics. Generating a fake user. For this we need their name. We import the Faker module.</p>
<pre><code>from faker import Faker
</code></pre>
<p>Then we create an object called <code>fake</code> and use it as a means to work with the Faker() module.</p>
<pre><code>fake = Faker()
</code></pre>
<p>Then I can generate a fake name.</p>
<pre><code>print(fake.name())
</code></pre>
<p>I use a for loop to generate a few names to illustrate how it can be automated.<br>
<img src="https://bigl.es/content/images/2023/11/faker-test-output.png" alt="Tuesday Tooling: I'm a Massive Faker, With Python"></p>
<h2 id="sowhatelsecanitdo">So What Else Can It Do?</h2>
<p>Faker is not just about names. We can generate...</p>
<ul>
<li>Fake addresses</li>
<li>Fake registration (license) plates</li>
<li>Fake barcodes</li>
<li>Fake ISBN book numbers</li>
<li>Fake email addresses</li>
</ul>
<p>And much more. Take a look at the <a href="https://faker.readthedocs.io/en/master/providers.html">Standard Providers</a> section of the documentation to learn more.</p>
<p>These are not &quot;fake&quot; as in counterfeit. Instead they are fake, pseudo-random creations to test databases, not for illegal activities.</p>
<h2 id="keepingitlocal">Keeping It Local</h2>
<p><img src="https://bigl.es/content/images/2023/11/Screenshot-from-2023-11-07-09-11-01.png" alt="Tuesday Tooling: I'm a Massive Faker, With Python"><br>
Data can be generated using many different languages, so if you need to generate names using different languages, Faker can do just that.</p>
<p>When creating the 'fake' object we can set the locales as arguments.</p>
<pre><code>from faker import Faker
fake = Faker(['it_IT', 'en_US', 'ja_JP'])
for _ in range(10):
    print(fake.name())
</code></pre>
<h2 id="quickdemogeneratingacsvtoimportintoadatabase">Quick Demo: Generating a CSV to Import Into a Database</h2>
<p>Our scenario is that our boss wants 100 names, addresses and countries to add to a test database. We could sit there and generate them all manually, heck, we have done that in the past. But with Faker we can do it all in a few lines of Python, and then export the data to a CSV.</p>
<p>We start by importing the csv and faker modules, then we create the 'fake' object.</p>
<pre><code>import csv
from faker import Faker
fake = Faker()
</code></pre>
<p>We then open (or create if it does not exist) a new file called fakedb.csv. This file is writable ('w').</p>
<pre><code>with open('fakedb.csv', 'w', newline='') as file:
</code></pre>
<p>We then create an object called 'writer' and use that as a means to write data to the CSV file.</p>
<pre><code>    writer = csv.writer(file)
</code></pre>
<p>Then we create the column headings for the CSV file. We need the name, address and country. Note that there are commas between the words. CSV needs commas. These names (fields) are written to the CSV file, only once as they are the headings.</p>
<pre><code>    field = [&quot;Name&quot;, &quot;Address&quot;, &quot;Country&quot;]
    writer.writerow(field)
</code></pre>
<p>Using a for loop which iterates 100 times we generate the fake name, address and country for our fake users.</p>
<pre><code>    for i in range(100):
        writer.writerow([fake.name(), fake.address(), fake.country()])
</code></pre>
<h2 id="completecodelisting">Complete Code Listing</h2>
<pre><code>import csv
from faker import Faker
fake = Faker()

with open('fakedb.csv', 'w', newline='') as file:
    writer = csv.writer(file)
    field = [&quot;Name&quot;, &quot;Address&quot;, &quot;Country&quot;]
    writer.writerow(field)
    for i in range(100):
        writer.writerow([fake.name(), fake.address(), fake.country()])
</code></pre>
<p>I ran the code and it went through cleanly. No errors. Then I imported the data into LibreOffice Calc and here we go.<br>
<img src="https://bigl.es/content/images/2023/11/Screenshot-from-2023-11-07-09-25-48.png" alt="Tuesday Tooling: I'm a Massive Faker, With Python"><br>
<img src="https://bigl.es/content/images/2023/11/Screenshot-from-2023-11-07-09-26-10.png" alt="Tuesday Tooling: I'm a Massive Faker, With Python"></p>
<p>I now have 100 Fake user details for our database test. Using the Standard Providers I could add fake bank details, credit cards, even fake passport data. This is an exceptionally powerful tool for database admins, or interns looking to take a few hours off ;)</p>
<h2 id="happyhacking">Happy Hacking</h2>
<iframe id="kofiframe" src="https://ko-fi.com/biglesp/?hidefeed=true&widget=true&embed=true&preview=true" style="border:none;width:100%;padding:4px;background:#f9f9f9;" height="712" title="biglesp"></iframe></div>]]></content:encoded></item><item><title><![CDATA[Tuesday Tooling: Debugging Python With Icecream]]></title><description><![CDATA[This is a "sweet treat" of a Python module]]></description><link>https://bigl.es/tooling-tuesday-icecream-python-debugging/</link><guid isPermaLink="false">6524526682398378a4d7466b</guid><category><![CDATA[tuesdaytooling]]></category><category><![CDATA[python]]></category><dc:creator><![CDATA[Les Pounder]]></dc:creator><pubDate>Mon, 09 Oct 2023 20:16:51 GMT</pubDate><media:content url="https://bigl.es/content/images/2023/10/_a7bef962-0659-49a5-ba08-013630be7c41.jpeg" medium="image"/><content:encoded><![CDATA[<div class="kg-card-markdown"><img src="https://bigl.es/content/images/2023/10/_a7bef962-0659-49a5-ba08-013630be7c41.jpeg" alt="Tuesday Tooling: Debugging Python With Icecream"><p>No seriously, we're using ice cream.</p>
<p>Its been a while. How have you all been? In my world the last year has been &quot;interesting&quot; and not in a good way. I'm happy to say that all is getting better, and don't worry it is not health / family or work related.</p>
<h2 id="sowhatarewetalkingabouttoday">So What Are We Talking About Today?</h2>
<p>Debugging Python is all about print statements right?</p>
<pre><code>print(&quot;This is the start&quot;)
for i in range(10):
    print(i)
    print(&quot;This should be the value of i&quot;)
</code></pre>
<p>Not really, but if it helps you solve a problem, then fair play. The right tool for the job is what you are comfortable with.<br>
Earlier today I learnt about Icecream. Not the sweet and delicious treat, but a tool to debug Python code.</p>
<h2 id="icecreaminfo">Icecream Info</h2>
<p><img src="https://bigl.es/content/images/2023/10/logo.svg" alt="Tuesday Tooling: Debugging Python With Icecream"><br>
<a href="https://github.com/gruns/icecream">Icecream is the work of Ansgar Grunseid</a> and it has the following features.</p>
<ul>
<li>It prints both expressions/variable names and their values.</li>
<li>It's 60% faster to type.</li>
<li>Data structures are pretty printed.</li>
<li>Output is syntax highlighted.</li>
<li>It optionally includes program context: filename, line number, and parent function.</li>
</ul>
<p>I already love ice cream, but it seems I now also love icecream too!</p>
<h3 id="howdoiinstallicecream">How Do I Install Icecream?</h3>
<p>Via pip!</p>
<pre><code>pip3 install icecream
</code></pre>
<h3 id="howdoiuseicecream">How Do I Use Icecream?</h3>
<p>Open your favourite Pytohn editor and import the icecream module, specifically the <code>ic</code> function.</p>
<pre><code>from icecream import ic
</code></pre>
<p>We'll write a simple function that will take two arguments and add them together. Note that we use ic to write the output to the Python shell.</p>
<pre><code>def function(a,b):
    ic(a + b)
</code></pre>
<p>Lastly we call the function and pass two values (a + b).</p>
<pre><code>function(10,20)
</code></pre>
<p>All of the code looks like this</p>
<pre><code>from icecream import ic
def function(a,b):
    ic(a + b)

function(10,20)
</code></pre>
<p>When we run the code we get this output</p>
<pre><code>ic| a + b: 30
</code></pre>
<h2 id="howcanidosomethingcoolwithit">How Can I Do Something Cool With It?</h2>
<p>Here is our scenario. We have a <a href="http://api.open-notify.org/astros.json">NASA JSON API</a> that shows us who is onboard the ISS and a connected spacecraft. The problem is that when we print this out we get this.</p>
<pre><code>{'people': [{'craft': 'Tiangong', 'name': 'Jing Haiping'}, {'craft': 'Tiangong', 'name': 'Gui Haichow'}, {'craft': 'Tiangong', 'name': 'Zhu Yangzhu'}, {'craft': 'ISS', 'name': 'Jasmin Moghbeli'}, {'craft': 'ISS', 'name': 'Andreas Mogensen'}, {'craft': 'ISS', 'name': 'Satoshi Furukawa'}, {'craft': 'ISS', 'name': 'Konstantin Borisov'}, {'craft': 'ISS', 'name': 'Oleg Kononenko'}, {'craft': 'ISS', 'name': 'Nikolai Chub'}, {'craft': 'ISS', 'name': &quot;Loral O'Hara&quot;}], 'number': 10, 'message': 'success'}
</code></pre>
<p>Sure we can read it, but for large datasets it can take a bit of work, so lets get some icecream and use it to make this much easier to read.</p>
<p>We start by importing icecream and requests. Requests is used to grab the data from NASA's API.</p>
<pre><code>from icecream import ic
import requests
</code></pre>
<p>Next up we create a variable, url, to store the URL for NASA's API. We don't really have to do this but it makes it very easy to read.</p>
<pre><code>url = &quot;http://api.open-notify.org/astros.json&quot;
</code></pre>
<p>We use the url with requests to download the dataset, storing it in an object called &quot;r&quot;.</p>
<pre><code>r = requests.get(url)
</code></pre>
<p>Lastly I use ic to return the contents of the &quot;r&quot; object and I specify that the data is in JSON format.</p>
<pre><code>ic(r.json())
</code></pre>
<p>I save and run the code and I am presented with this wonderful block of data.<br>
<img src="https://bigl.es/content/images/2023/10/icecream.png" alt="Tuesday Tooling: Debugging Python With Icecream"></p>
<h3 id="completecodelisting">Complete Code Listing</h3>
<pre><code>from icecream import ic
import requests
url = &quot;http://api.open-notify.org/astros.json&quot;
r = requests.get(url)
ic(r.json())
</code></pre>
<h2 id="happyhacking">Happy Hacking!</h2>
</div>]]></content:encoded></item><item><title><![CDATA[Tuesday Tooling: Wokwi Circuit Simulator]]></title><description><![CDATA[Make circuits without the hardware. On the bus, train, sofa, whereever the inspiration hits you!]]></description><link>https://bigl.es/tuesday-tooling-wokwi-circuit-simulator/</link><guid isPermaLink="false">62cc78cd82398378a4d745ef</guid><category><![CDATA[tuesdaytooling]]></category><category><![CDATA[arduino]]></category><category><![CDATA[circuitpython]]></category><dc:creator><![CDATA[Les Pounder]]></dc:creator><pubDate>Mon, 11 Jul 2022 21:33:02 GMT</pubDate><media:content url="https://bigl.es/content/images/2022/07/hero.jpg" medium="image"/><content:encoded><![CDATA[<div class="kg-card-markdown"><img src="https://bigl.es/content/images/2022/07/hero.jpg" alt="Tuesday Tooling: Wokwi Circuit Simulator"><p>Simulate a microcontroller, a circuit, a project, from the comfort of your sofa.</p>
<h1 id="sowhatisit">So What is it?</h1>
<p><a href="https://wokwi.com/">Wokwi</a> is a project to simulate IoT projects in the browser. Hat tip to <a href="https://twitter.com/heeedt">Heeedt</a> for telling me about this.</p>
<script src="https://storage.ko-fi.com/cdn/scripts/overlay-widget.js"></script>
<script>
  kofiWidgetOverlay.draw('biglesp', {
    'type': 'floating-chat',
    'floating-chat.donateButton.text': 'Support me',
    'floating-chat.donateButton.background-color': '#00b9fe',
    'floating-chat.donateButton.text-color': '#fff'
  });
</script>
<h1 id="sowhatboardsdoesitsimulate">So What Boards Does it Simulate?</h1>
<p><img src="https://bigl.es/content/images/2022/07/Screenshot-from-2022-07-11-22-14-03.png" alt="Tuesday Tooling: Wokwi Circuit Simulator"><br>
Here's the long list, including a few surprises.</p>
<ul>
<li>Arduino Uno (C++)</li>
<li>Arduino Mega (C++)</li>
<li>ESP32 (including ESP32-S2 and ESP32-C3) (C++)</li>
<li>Arduino Nano (C++)</li>
<li>Raspberry Pi Pico (C++)</li>
<li>MicroPython on ESP32</li>
<li>ATtiny85 (one of my favourites, oh and SURPRISE!)</li>
<li>TinyPICO</li>
<li>Raspberry Pi Pico (SDK)</li>
<li>CircuitPython on Raspberry Pi Pico (SURPRISE!)</li>
<li>Franzininho Wi-Fi (ESP32-S2)</li>
</ul>
<h1 id="sohowdoesitwork">So How Does it Work?</h1>
<p><img src="https://bigl.es/content/images/2022/07/Pico.png" alt="Tuesday Tooling: Wokwi Circuit Simulator"><br>
It really is easy. You click on the board, and it opens a new simulator. For my test I opened a Raspberry Pi Pico, and I was presented with the Arduino / C++ language on the left of the screen, on the right was a virtual Raspberry Pi Pico.</p>
<p><img src="https://bigl.es/content/images/2022/07/wokwi-tabs.png" alt="Tuesday Tooling: Wokwi Circuit Simulator"><br>
The left screen has three tabs. The &quot;sketch&quot; where we write our code. &quot;Diagram.json&quot; which is a text file containing the components in our circuit. Finally we have a library manager, which shows any installed libraries for the project.</p>
<p>I wrote a little code to print a message to the serial console, and to flash an LED connected to GPIO 16.</p>
<pre><code>void setup() {
  // put your setup code here, to run once:
  Serial1.begin(115200);
  pinMode(16, OUTPUT);

}

void loop() {
  // put your main code here, to run repeatedly:
  delay(1); // this speeds up the simulation
  digitalWrite(16, HIGH);
  Serial1.println(&quot;Biglesp woz ere&quot;);
  delay(500);
  digitalWrite(16, LOW);
  delay(500);
}
</code></pre>
<p><img src="https://bigl.es/content/images/2022/07/Screenshot-from-2022-07-11-21-07-32.png" alt="Tuesday Tooling: Wokwi Circuit Simulator"><br>
I then wired up a circuit, an LED with a 330 Ohm resistor. Wiring up is similar to Fritzing, if a little clunky. You click on a GPIO pin, component etc and then draw it to where you want to go. Clicking as you move to the destination adds a bend.<br>
Components are contained in a list found under the + symbol.<br>
<img src="https://bigl.es/content/images/2022/07/Screenshot-from-2022-07-11-21-11-28.png" alt="Tuesday Tooling: Wokwi Circuit Simulator"><br>
Choose your component and then place it in the circuit. We can choose the colour of the component too.<br>
<img src="https://bigl.es/content/images/2022/07/Screenshot-from-2022-07-11-21-11-57.png" alt="Tuesday Tooling: Wokwi Circuit Simulator"></p>
<p>All of the wiring and components are saved as a JSON file, which is rather handy to refer to.</p>
<pre><code>{
  &quot;version&quot;: 1,
  &quot;author&quot;: &quot;Anonymous maker&quot;,
  &quot;editor&quot;: &quot;wokwi&quot;,
  &quot;parts&quot;: [
    { &quot;type&quot;: &quot;wokwi-pi-pico&quot;, &quot;id&quot;: &quot;pico&quot;, &quot;top&quot;: -79.82, &quot;left&quot;: -132.71, &quot;attrs&quot;: {} },
    {
      &quot;type&quot;: &quot;wokwi-led&quot;,
      &quot;id&quot;: &quot;led1&quot;,
      &quot;top&quot;: -14.63,
      &quot;left&quot;: 68.62,
      &quot;attrs&quot;: { &quot;color&quot;: &quot;red&quot; }
    },
    {
      &quot;type&quot;: &quot;wokwi-resistor&quot;,
      &quot;id&quot;: &quot;r1&quot;,
      &quot;top&quot;: 68.21,
      &quot;left&quot;: 5.77,
      &quot;attrs&quot;: { &quot;value&quot;: &quot;330&quot; }
    }
  ],
  &quot;connections&quot;: [
    [ &quot;pico:GP0&quot;, &quot;$serialMonitor:RX&quot;, &quot;&quot;, [] ],
    [ &quot;pico:GP1&quot;, &quot;$serialMonitor:TX&quot;, &quot;&quot;, [] ],
    [ &quot;r1:2&quot;, &quot;led1:C&quot;, &quot;green&quot;, [ &quot;v0&quot; ] ],
    [ &quot;r1:1&quot;, &quot;pico:GND.5&quot;, &quot;green&quot;, [ &quot;v0&quot; ] ],
    [ &quot;pico:GP16&quot;, &quot;led1:A&quot;, &quot;green&quot;, [ &quot;v2&quot;, &quot;h156.16&quot; ] ]
  ]
}
</code></pre>
<p>Projects can be saved, and downloaded as zip archives. The code can then be used on real devices.<br>
<img src="https://bigl.es/content/images/2022/07/Screenshot-from-2022-07-11-21-19-49.png" alt="Tuesday Tooling: Wokwi Circuit Simulator"></p>
<h1 id="circuitpythononaraspberrypipico">CircuitPython on a Raspberry Pi Pico</h1>
<p><img src="https://bigl.es/content/images/2022/07/Screenshot-from-2022-07-11-21-43-43.png" alt="Tuesday Tooling: Wokwi Circuit Simulator"><br>
Hidden in the main screen is an option to run CircuitPython (my favourite way to hack) on a Raspberry Pi Pico.</p>
<p>I downloaded the example NeoPixel code from <a href="https://learn.adafruit.com/circuitpython-essentials/circuitpython-neopixel">Adafruit's excellent resources</a>.<br>
I tweaked the code to use GPIO 16 and connected a virtual NeoPixel ring with 16 pixels.<br>
<img src="https://bigl.es/content/images/2022/07/Screenshot-from-2022-07-11-21-42-10.png" alt="Tuesday Tooling: Wokwi Circuit Simulator"><br>
In order to use the NeoPixel I need to install two libraies. Wokwi doesn't provide these, sadly. So I visited circuitpython.org and downloaded the Python library package, then I uploaded neopixel.py and adafruit_pixelbuf.py to Wokwi. With all that done, I pressed start and the simulator kicked in and I saw blinkies!</p>
<h1 id="finalthoughts">Final Thoughts?</h1>
<p>I like Wokwi. It has enough functionality to be useful when on the move and we can download our code for use with real devices.</p>
<h1 id="happyhacking">Happy Hacking</h1>
</div>]]></content:encoded></item><item><title><![CDATA[Tuesday Tooling: Build Simple Web Apps with PyWebIO]]></title><description><![CDATA[Create simple and elegant HTML web apps using Python, and yes you can use this with the Raspberry Pi!]]></description><link>https://bigl.es/tuesday-tooling-create-interactive-web-apps/</link><guid isPermaLink="false">62a7910282398378a4d745e1</guid><category><![CDATA[tuesdaytooling]]></category><category><![CDATA[python]]></category><category><![CDATA[html]]></category><category><![CDATA[Raspberry Pi]]></category><dc:creator><![CDATA[Les Pounder]]></dc:creator><pubDate>Mon, 13 Jun 2022 21:05:31 GMT</pubDate><media:content url="https://bigl.es/content/images/2022/06/py-to-html.jpg" medium="image"/><content:encoded><![CDATA[<div class="kg-card-markdown"><img src="https://bigl.es/content/images/2022/06/py-to-html.jpg" alt="Tuesday Tooling: Build Simple Web Apps with PyWebIO"><p>I'm back from a hiatus and I've got a cracking Python project for you all!</p>
<h2 id="sowhatisit">So What Is It?</h2>
<blockquote>
<p><a href="https://github.com/pywebio/PyWebIO">PyWebIO</a> provides a series of imperative functions to obtain user input and output on the browser, turning the browser into a &quot;rich text terminal&quot;, and can be used to build simple web applications or browser-based GUI applications without the need to have knowledge of HTML and JS. PyWebIO can also be easily integrated into existing Web services. PyWebIO is very suitable for quickly building applications that do not require complex UI.</p>
</blockquote>
<p><a href="https://github.com/pywebio/PyWebIO">Source: PyWebIO Github</a></p>
<script src="https://storage.ko-fi.com/cdn/scripts/overlay-widget.js"></script>
<script>
  kofiWidgetOverlay.draw('biglesp', {
    'type': 'floating-chat',
    'floating-chat.donateButton.text': 'Support me',
    'floating-chat.donateButton.background-color': '#00b9fe',
    'floating-chat.donateButton.text-color': '#fff'
  });
</script>
<h2 id="sowhyshouldiusethis">So Why Should I Use This?</h2>
<p>The humble web browser is everywhere and that means users can access your content anywhere. No custom tkinter interface, and no messy frameworks. Just generate some HTML and you have a basic user interface. The problem is that mixing HTML and Python can prove tricky for some. You can use <a href="https://bigl.es/tag/anvil/">Anvil</a> to generate HTML user interfaces (<a href="https://anvil.works/">I love Anvil</a>, but it can be a little tricky to get going. Anvil is immensely powerful and well worth learning. Flask is also tricky and I've never truly got the hang of it.<br>
PyWebIO is much simpler and starts a server directly on our machine.</p>
<blockquote class="twitter-tweet"><p lang="en" dir="ltr">A quick demo where I use PyWebIO on <a href="https://twitter.com/Raspberry_Pi?ref_src=twsrc%5Etfw">@Raspberry_Pi</a> to create a Web interface to scroll messages across <a href="https://twitter.com/pimoroni?ref_src=twsrc%5Etfw">@pimoroni</a> Scroll pHAT HD. I&#39;ll put the code up for people to play with. <a href="https://twitter.com/hashtag/tuesdaytooling?src=hash&amp;ref_src=twsrc%5Etfw">#tuesdaytooling</a> <a href="https://t.co/hS4L5bOklB">https://t.co/hS4L5bOklB</a> <a href="https://t.co/wM40yDYRO8">pic.twitter.com/wM40yDYRO8</a></p>&mdash; biglesp (@biglesp) <a href="https://twitter.com/biglesp/status/1536632561283260417?ref_src=twsrc%5Etfw">June 14, 2022</a></blockquote> <script async src="https://platform.twitter.com/widgets.js" charset="utf-8"></script>
<p>I can see PyWebIO being a very useful alternative for educators and makers who want to get accessible data from their Python projects.<br>
I'm thinking of Raspberry Pi projects such as...</p>
<ul>
<li>Custom user interfaces for robots</li>
<li>Weather station</li>
<li>Citizen science data collection</li>
<li>Raspberry Pi camera controller</li>
</ul>
<p>PyWebIO is Python, which means we can mix this code with our existing code to add a web app to our projects.</p>
<h2 id="sohowdoiinstallpywebio">So How Do I Install PyWebIO?</h2>
<p>PyWebIO is available via pip<br>
<strong>Linux / Mac</strong></p>
<pre><code>pip3 install pywebio
</code></pre>
<p><strong>Windows</strong></p>
<pre><code>pip install pywebio
</code></pre>
<h2 id="sohowdoiuseit">So How Do I Use It?</h2>
<p><img src="https://bigl.es/content/images/2022/06/popup.gif" alt="Tuesday Tooling: Build Simple Web Apps with PyWebIO"></p>
<ol>
<li><strong>Open your favourite text editor</strong> and we'll start with a quick &quot;Hello World&quot;</li>
<li><strong>Start a server for the browser session.</strong></li>
</ol>
<pre><code>from pywebio import start_server
</code></pre>
<ol start="3">
<li><strong>Import the input and output classes.</strong> We'll need these to capture user input and display it in the browser.</li>
</ol>
<pre><code>from pywebio.input import *
from pywebio.output import *
</code></pre>
<ol start="4">
<li><strong>Import the session for our web app.</strong></li>
</ol>
<pre><code>from pywebio.session import *
</code></pre>
<ol start="5">
<li><strong>Import a persistent input to keep the user input.</strong> We can refresh the page and reuse the input field.</li>
</ol>
<pre><code>from pywebio.pin import *
</code></pre>
<ol start="6">
<li><strong>Create a function called main().</strong></li>
</ol>
<pre><code>def main():
</code></pre>
<ol start="7">
<li><strong>Inside the function create a variable called <em>name</em> and use <em>input</em> to capture the user's name.</strong></li>
</ol>
<pre><code>    name = input(&quot;What is your name?&quot;)
</code></pre>
<ol start="8">
<li><strong>Create a new variable, <em>greetings</em> which will store a personalised message to the user.</strong></li>
</ol>
<pre><code>    greetings = 'Greetings',name,'!'
</code></pre>
<ol start="9">
<li><strong>Create a popup message to greet the user.</strong> Popup is a command in PyWebIO to generate those annoying website popups.  But ours is actually nice!</li>
</ol>
<pre><code>    popup('Greetings', greetings)
</code></pre>
<ol start="10">
<li><strong>Create a notification that will visually alert the user.</strong> We can use emojiis in the alert, which is nice.</li>
</ol>
<pre><code>    toast('New message 🔔')
</code></pre>
<ol start="11">
<li><strong>Come out of the function to finally start the server and tell it to run our function and start on port 8080.</strong></li>
</ol>
<pre><code>start_server(main, port=8080, debug=True)
</code></pre>
<ol start="12">
<li><strong>Save the code as <em>webform.py</em> and then run it from the terminal / IDE.</strong></li>
</ol>
<pre><code>python webform.py
</code></pre>
<ol start="13">
<li>Open a browser to 127.0.0.1:8080 and the form will appear!</li>
</ol>
<h3 id="completedemocodelisting">Complete Demo Code Listing</h3>
<pre><code>from pywebio import start_server
from pywebio.input import *
from pywebio.output import *    
from pywebio.session import *
from pywebio.pin import *

def main():
    name = input(&quot;What is your name?&quot;)
    greetings = 'Greetings',name,'!'
    popup('Greetings', greetings)
    toast('New message 🔔')

start_server(main, port=8080, debug=True)
</code></pre>
<h2 id="takingitfurther">Taking It Further</h2>
<p><img src="https://bigl.es/content/images/2022/06/Greggs.gif" alt="Tuesday Tooling: Build Simple Web Apps with PyWebIO"><br>
We're not limited to just simple tasks like this, we have access to <a href="https://pywebio-demos.pywebio.online/doc_demo?app=demo-basic-input">inputs such as</a></p>
<ul>
<li>Drop down menus</li>
<li>Password fields</li>
<li>Checkbox</li>
<li>Single choice</li>
<li>Multi-line text input</li>
<li>File uploads</li>
</ul>
<p><a href="https://pywebio-demos.pywebio.online/doc_demo?app=demo-basic-output">For Outputs</a></p>
<ul>
<li>Text</li>
<li>Tables</li>
<li>Images</li>
<li>Markdown</li>
<li>Write to files</li>
</ul>
<p><a href="https://pywebio.readthedocs.io/en/latest/">Take a look at the PyWebIO docs for more information.</a></p>
<h2 id="happyhacking">Happy Hacking!</h2>
</div>]]></content:encoded></item><item><title><![CDATA[Friday Fun: Micro Weather Station]]></title><description><![CDATA[Friday Fun is back and this time we go micro!]]></description><link>https://bigl.es/friday-fun-micro-weather-station/</link><guid isPermaLink="false">625eea7f82398378a4d745c5</guid><category><![CDATA[ESP32]]></category><category><![CDATA[micropython]]></category><category><![CDATA[esp8266]]></category><category><![CDATA[wemos d1]]></category><category><![CDATA[fridayfun]]></category><dc:creator><![CDATA[Les Pounder]]></dc:creator><pubDate>Fri, 22 Apr 2022 11:15:47 GMT</pubDate><media:content url="https://bigl.es/content/images/2022/04/esp32c3-1.jpg" medium="image"/><content:encoded><![CDATA[<div class="kg-card-markdown"><img src="https://bigl.es/content/images/2022/04/esp32c3-1.jpg" alt="Friday Fun: Micro Weather Station"><p>Back again with some more Friday Fun!</p>
<p>The weather! A source of conversation that as an Englishman I am well versed in.<br>
Weather projects are popular citizen science projects. We can build them with an Arduino, ATtiny85, Raspberry Pi and even an ESP8266. But this blog post, (the first Friday Fun since 2020!) we'll test out the new ESP32 C3 powered by a RISC-V processor to create an all-in-one weather station that displays the weather as an icon via the onboard 5x5 WS2812 RGB LED matrix. This board <a href="https://github.com/01Space">comes from 01space</a>, a company that I have only recently come across. But if this board is anything to go by, we are in good hands.<br>
<img src="https://github.com/lesp/Wemos-Weatherstation/raw/master/Final%20Wiring.jpg" alt="Friday Fun: Micro Weather Station"><br>
This project was <a href="https://bigl.es/friday-fun-micropython-weatherstation/">inspired by an older MicroPython weather station project</a>. for that project I used a Wemos D1 Mini (an ESP8266) along with Pimoroni's Unicorn HAT 8x8 NeoPixel LED matrix and a capacitive touch sensor to show the weather inside a plastic cloud desk toy (#Pounderland).</p>
<h2 id="thanks">Thanks</h2>
<p>Before we get too far into the project, I want to say thanks to Andy Piper who has done some remarkable work documenting this rather fun little board. <a href="https://github.com/andypiper/fivebyfive">Go and read Andy's great work then come back for the hack!</a></p>
<h2 id="forthisprojectyouwillneed">For this project you will need</h2>
<ul>
<li>ESP32-CH34G-RGB</li>
<li>Soft drink / coffee as this is a long post.</li>
</ul>
<h2 id="quickvideotoshowtheboardinaction">Quick Video to show the board in action</h2>
<iframe width="640" height="360" src="https://www.youtube.com/embed/Sv0gOKzBezk" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>
<p>I collated all of the video from a <a href="https://twitter.com/biglesp/status/1514943096617852930">Twitter thread that I used to document my progress</a> and put them into one handy YouTube video.</p>
<h2 id="downloadthecode">Download the code</h2>
<blockquote class="twitter-tweet"><p lang="ro" dir="ltr">Disco Mode ACTIVATE! <a href="https://t.co/7Zgwd8IicH">pic.twitter.com/7Zgwd8IicH</a></p>&mdash; biglesp (@biglesp) <a href="https://twitter.com/biglesp/status/1514943096617852930?ref_src=twsrc%5Etfw">April 15, 2022</a></blockquote> <script async src="https://platform.twitter.com/widgets.js" charset="utf-8"></script>
<p><a href="https://github.com/lesp/ESP32C3-WeatherStation">I've put all of the code in a GitHub repo,</a> ready for use. So if you are in a rush, use that instead. I've also included a special version with added &quot;disco&quot; mode.</p>
<h2 id="esp32c3fh4rgbspecifications">ESP32-C3FH4-RGB Specifications</h2>
<p><img src="https://bigl.es/content/images/2022/04/hero.jpg" alt="Friday Fun: Micro Weather Station"></p>
<table>
<thead>
<tr>
<th>Purchase Link</th>
<th><a href="https://www.banggood.com/ESP32-C3-Development-Board-RISC-V-WiFi-Bluetooth-IoT-Development-Board-Compatible-with-Python-p-1914005.html">Banggood</a></th>
</tr>
</thead>
<tbody>
<tr>
<td>SoC</td>
<td>ESP32-C3FH4 2.4 GHz Wi-Fi Bluetooth 5 (LE)</td>
</tr>
<tr>
<td>RAM</td>
<td>400KB SRAM</td>
</tr>
<tr>
<td>Storage</td>
<td>4MB Flash</td>
</tr>
<tr>
<td>GPIO</td>
<td>11 x General purpose pins</td>
</tr>
<tr>
<td></td>
<td>Stemma QT / Qwiic compatible connector</td>
</tr>
<tr>
<td></td>
<td>5 x 5 WS2812 / NeoPixel RGB LEDs</td>
</tr>
<tr>
<td>Dimensions</td>
<td>21 x 18mm</td>
</tr>
</tbody>
</table>
<p><img src="https://bigl.es/content/images/2022/04/back.jpg" alt="Friday Fun: Micro Weather Station"></p>
<script src="https://storage.ko-fi.com/cdn/scripts/overlay-widget.js"></script>
<script>
  kofiWidgetOverlay.draw('biglesp', {
    'type': 'floating-chat',
    'floating-chat.donateButton.text': 'Support me',
    'floating-chat.donateButton.background-color': '#00b9fe',
    'floating-chat.donateButton.text-color': '#fff'
  });
</script>
<h3 id="isitanygood">Is it any good?</h3>
<p><img src="https://bigl.es/content/images/2022/04/comp.jpg" alt="Friday Fun: Micro Weather Station"></p>
<p>For £10 this is a great little board. MicroPython support is awesome and we can be up and running rather quickly. If you've been on the fence about the ESP32, then grab one of these and have some fun.<br>
<img src="https://bigl.es/content/images/2022/04/stemmaqt.jpg" alt="Friday Fun: Micro Weather Station"></p>
<p>I tested the Stemma QT / Qwiic connector, in reality a four pin I2C connector, with an AHT20 temperature sensor and an MPR121 capacitive touch sensor. Both worked with only minimal software tweaking. <a href="https://github.com/andypiper/fivebyfive/blob/main/micropython/aht20-test.py">I followed Andy's guidance on using SoftI2C</a> and specified the GPIO pins for the connector. Then I tried to use upip to install the modules for the AHT20 and MPR121 but they failed to install, weird. No issue, as I downloaded the files from their respective GitHub repos and manually copied them to the board.</p>
<p>The one thing that this board is missing is a pinout showing the various options for the GPIO pins. There is a schematic on the 01Space Github page but I'd love to learn more about the pins.</p>
<h3 id="5x5neopixelmatrix">5x5 NeoPixel Matrix</h3>
<p><img src="https://raw.githubusercontent.com/andypiper/fivebyfive/main/images/np-numbering.jpeg" alt="Friday Fun: Micro Weather Station"><br>
<em>Image Credit: Andy Piper <a href="https://github.com/andypiper/fivebyfive">https://github.com/andypiper/fivebyfive</a></em><br>
Andy once again saves the day, and has kindly annotated the order in which the Neopixels are laid out. At the top left is 0, bottom right is 24. We move across the pixels from left to right, then move down to the next line to repeat the process.<br>
Thanks Andy!</p>
<h2 id="settingupyouresp32c3">Setting up your ESP32 C3</h2>
<h3 id="flashingmicropythontotheboard">Flashing MicroPython to the board</h3>
<p>My chosen language for the ESP32 C3 is MicroPython. I've long been a fan of this microcontroller centric version of Python 3 and it enables me to get a project done without much fuss.</p>
<p>The ESP32 C3 doesn't come with MicroPython preinstalled, so we need to download the latest version and flash it to our board.</p>
<ol>
<li><strong><a href="https://micropython.org/download/esp32c3-usb/">Download the latest firmware to your computer.</a></strong> The latest stable release is always behind the nightly builds. I used the <a href="https://micropython.org/resources/firmware/esp32c3-usb-20220414-unstable-v1.18-338-g988827b85.bin">latest nightly build (April 14 2022)</a> and had no issues.</li>
<li><strong>Install esptool.py to your machine using the pip package manager.</strong>  Developed as a means to flash firmware to Espressif chips, esptool.py is a command line application that is easy to use, but can be daunting for new users.</li>
</ol>
<pre><code>Linux
sudo pip3 install esptool
Windows
pip install esptool
</code></pre>
<ol start="3">
<li><strong>Connect the ESP32 C3 to the computer using a USB lead. Press and hold button B and then quickly press Reset to go into bootloader mode.</strong> This will enable esptool to communicate with the ESP32.</li>
<li><strong>In a terminal use</strong> <em>dmesg</em> <strong>to discover the USB port for the board. Make a note of the port as we need it for the next step</strong> On Linux this is typically /dev/ttyXXXX. The XXXX can be ACM0 or USB0. Windows users will need to look in the Device Manager to discover the COM port, os you can use this <a href="https://www.tomshardware.com/how-to/detect-com-port-windows-serial-port-notifier">Serial Port Notifier</a> to automatically alert you to the port.<br>
<img src="https://bigl.es/content/images/2022/04/dmesg.png" alt="Friday Fun: Micro Weather Station"></li>
<li><strong>Use the esptool command to clear the flash storage. Double check that you have the correct device before pressing ENTER. Replace the</strong> <em>--port</em> <strong>argument with the port of your board. In my case it was</strong> <em>/dev/ttyACM0</em> <strong>.</strong> Windows users, make sure to change this to the COM port.</li>
</ol>
<pre><code>esptool.py --chip esp32c3 --port /dev/ttyACM0 erase_flash
</code></pre>
<ol start="6">
<li><strong>Use the esptool to flash the new firmware. Make sure to use the correct file path and name for the firmware that you downloaded in step 1.</strong></li>
</ol>
<pre><code>esptool.py --chip esp32c3 --port /dev/ttyACM0 --baud 460800 write_flash -z 0x0 esp32c3-usb-20220415-unstable-v1.18-355-g9ab66b50c.bin
</code></pre>
<ol start="7">
<li><strong>Leave esptool to do its thing until control of the terminal is returned to you.</strong></li>
<li><strong>Connect to the ESP32 C3 serial console using tio.</strong> <a href="https://bigl.es/tooling-tuesday-tio/">Tio is the simplest way to connect to serial console</a> but you can also use screen. <a href="https://www.tomshardware.com/how-to/detect-com-port-windows-serial-port-notifier">Windows users can use PuTTY</a> to make a connection.</li>
<li><strong>You should now have a MicroPython REPL (Read, Eval, Print, Loop) shell.</strong> I used a simple for loop to demonstrate that I can interactively run code.<br>
<img src="https://bigl.es/content/images/2022/04/repl.png" alt="Friday Fun: Micro Weather Station"></li>
</ol>
<h2 id="settingupwifi">Setting up Wi-Fi</h2>
<p>You'd be forgiven for thinking that it would be tricky to setup Wi-Fi on such a small board, but MicroPython makes it really easy.<br>
I'm going to create two files.</p>
<p><strong>main.py</strong><br>
This is the code that will run when the board is powered up.</p>
<p><strong>secrets.py</strong><br>
In here I will store my Wi-Fi credentials.</p>
<p>I'm going to start with <em>secrets.py</em>.</p>
<ol>
<li><strong>In your favourite text editor, create a new blank file called</strong> <em>secrets.py</em>.</li>
<li><strong>Create two variables, SSID and PW. For SSID type in the name of your Wi-Fi access point. For PW type in your Wi-Fi password. Both should be a string.</strong></li>
</ol>
<pre><code>SSID = &quot;YOUR WIFI HERE&quot;
PW = &quot;YOUR WIFI PASSWORD HERE&quot;
</code></pre>
<ol start="3">
<li><strong>Save the file to your computer.</strong></li>
</ol>
<p>Now I move on to main.py. As you can guess, this is the main file for the code that powers the project.</p>
<ol>
<li><strong>In your favourite text editor, create a new blank file called</strong> <em>main.py</em>.</li>
<li><strong>Import three modules. The first is</strong> <em>network</em>, <strong>the second is</strong> <em>secrets</em> <strong>and the third is</strong> <em>time</em>. Network contains the functions that we need to make a Wi-Fi connection. Secrets contains two variables, SSID and PW, which are used to keep Wi-Fi login details separate from the main code. The <em>time</em> module is used to add a pause in the code.</li>
</ol>
<pre><code>import network
from secrets import SSID, PW
import time
</code></pre>
<ol start="3">
<li><strong>Create and activate a station interface, a means to use the Wi-Fi chip on the ESP32 C3.</strong></li>
</ol>
<pre><code>wlan = network.WLAN(network.STA_IF)
wlan.active(True)
</code></pre>
<ol start="4">
<li><strong>Using the SSID and PW (password) from the secrets module, connect to the Wi-Fi access point.</strong></li>
</ol>
<pre><code>wlan.connect(SSID, PW)
</code></pre>
<ol start="5">
<li><strong>Add a short pause of five seconds to enable the Wi-Fi connection to be made.</strong></li>
</ol>
<pre><code>time.sleep(5)
</code></pre>
<ol start="6">
<li><strong>Check that the connection has been made.</strong> This will print True or False to the REPL.</li>
</ol>
<pre><code>print(wlan.isconnected())
</code></pre>
<ol start="7">
<li>**Print the Wi-Fi connection details to the REPL. **This will print the IP address of the ESP32 C3 to the REPL.</li>
</ol>
<pre><code>print(wlan.ifconfig())
</code></pre>
<ol>
<li><strong>Save the code to the computer as</strong> <em>main.py</em>.</li>
</ol>
<h3 id="mainpycodelisting">Main.py code listing</h3>
<pre><code>import network
from secrets import SSID, PW
import time
wlan = network.WLAN(network.STA_IF)
wlan.active(True)
wlan.connect(SSID, PW)
time.sleep(5)
print(wlan.isconnected())
print(wlan.ifconfig())
</code></pre>
<h1 id="waithowdoigetmycodeontotheesp32c3">Wait! How do I get my code onto the ESP32 C3?</h1>
<p>I've found the easiest method is to use Adafruit's <a href="https://bigl.es/tooling-tuesday-a-m-p-y/">ampy, a tool that I have dedicated an entire blog post to.</a> But I'll also do a quick run through here.</p>
<ol>
<li><strong>Install Ampy to your computer via pip.</strong></li>
</ol>
<pre><code>Linux
sudo pip3 install adafruit-ampy
Windows
pip.exe install adafruit-ampy
</code></pre>
<ol start="2">
<li><strong>In the terminal, go to the directory where the</strong> <em>main.py</em> <strong>and</strong> <em>secrets.py</em> <strong>files are located.</strong></li>
<li><strong>Using Ampy, copy main.py to the ESP32 C3.</strong> Linux users, you will need to know the port and specify it as an argument. Windows users do not have to do this.</li>
</ol>
<pre><code>ampy --port /dev/ttyACM0 put main.py
</code></pre>
<ol start="4">
<li><strong>Use the same command to copy</strong> <em>secrets.py</em> <strong>to the ESP32 C3.</strong></li>
</ol>
<pre><code>ampy --port /dev/ttyACM0 put secrets.py
</code></pre>
<ol start="5">
<li><strong>Press the Reset button on the ESP32 C3 to load the freshly copied code.</strong> In the REPL (Tio will keep this running, but PuTTY may need to reconnect) you will see <em>True</em> followed by the IP address for the ESP32 C3. If you don't see this, then there is an error and you will need to trace the issue.</li>
</ol>
<h1 id="getyourfreeopenweatherapikey">Get your free Open Weather API Key</h1>
<p>I have long been a user of Open Weather. From the back of the classroom at Picademy in 2014 I coded my first weather project. In 2019 I then made the Wemos D1 Mini version, which this ESP32 C3 project supersedes.</p>
<p>To use the great service, you need an API key and to get one all you need to do is sign up.</p>
<ol>
<li><strong>Go to Open Weather and sign in / sign up for a free account.</strong><br>
<img src="https://bigl.es/content/images/2022/04/ow1.png" alt="Friday Fun: Micro Weather Station"></li>
<li><strong>Click on your username in the top right of the window and select &quot;My API keys&quot;.</strong><br>
<img src="https://bigl.es/content/images/2022/04/ow2.png" alt="Friday Fun: Micro Weather Station"></li>
<li><strong>If you already have a key, copy the key. If not, create a new key and give it a relevant name.</strong><br>
<img src="https://bigl.es/content/images/2022/04/ow3.png" alt="Friday Fun: Micro Weather Station"></li>
<li><strong>Use the key in the project code later in this tutorial.</strong></li>
</ol>
<h1 id="sonowwemakeaweatherstation">So now we make a weather station!</h1>
<p>Yes we do! We're going to edit the <em>main.py</em> file to create code that will autostart when the ESP32 C3 is powered up.<br>
The startup process will be as follows</p>
<ul>
<li>Connect to Wi-Fi</li>
<li>Create a connection to the onboard 5x5 RGB LED matrix.</li>
<li>Create a series of lists to store the position of each RGB LED that is used to draw the icon on the matrix.</li>
<li>If connection works
<ul>
<li>Make the 5 x 5 LED matrix flash green three times.</li>
</ul>
</li>
<li>else:
<ul>
<li>Make the 5 x 5 LED matrix flash red three times.</li>
</ul>
</li>
<li>Create a loop</li>
<li>Get the weather data as a JSON object.</li>
<li>Grab the main weather headline</li>
<li>Use an if, elif, else conditional test to show the correct weather icon.</li>
<li>Sleep for 10 seconds.</li>
<li>Loop back.</li>
</ul>
<ol>
<li><strong>Import a series of modules to enable the project.</strong> <em>Network</em> for our Wi-Fi, <em>time</em> to control the project's pace, <em>urequests</em> to download the weather data. The <em>Pin class from machine</em> is used to control the GPIO pins. <em>NeoPixel</em> to control the 5x5 RGB LED matrix and <em>secrets</em> for the SSID and Wi-Fi password.</li>
</ol>
<pre><code>import network
import time
import urequests
from machine import Pin
from neopixel import NeoPixel
from secrets import SSID, PW
</code></pre>
<ol start="2">
<li><strong>Setup the NeoPixel RGB matrix and create a connection between the code and the LEDs.</strong> The NeoPixels are connected to GPIO pin 8, and there are 25 (55) pixels in total.</li>
</ol>
<pre><code>neopin = Pin(8, Pin.OUT)
pixels = 25 
np = NeoPixel(neopin, pixels)
</code></pre>
<ol start="3">
<li><strong>Create lists that will create icons to cover the possible weather types.</strong> Each list tells the code which pixels should be lit to make the icons. We'll specify the colour later. Some icons, such as rain1, rain2 lightning_cloud, lightning and fail, fail2 have two lists so that we can animate the icons. <a href="https://docs.google.com/spreadsheets/d/1qJAQDHY7EguKtdhiVJdH6Zwt9iWU8V-ufLGFfXCZs2o/edit?usp=sharing">I used a spreadsheet to work out</a> the values for each icon.</li>
</ol>
<pre><code>sun = [2,6,7,8,10,11,12,13,14,16,17,18,22]
cloudy = [7,11,12,13,15,16,17,18,19]
rain_cloud = [7,11,12,13,15,16,17,18,19]
rain1 = [0,4,5,9,10,12,14,17,22]
rain2 = [2,7,10,12,14,15,19,20,24]
lightning_cloud = [2,6,7,8,10,11,12,13,14,16,18,20,22]
lightning = [3,7,11,12,13,17,21]
snow_ice = [0,2,4,7,10,11,12,13,14,17,20,22,24]
fail = [0,4,6,8,12,16,18,20,24]
fail2 = [2,7,10,11,12,13,14,17,22]
</code></pre>
<ol start="4">
<li><strong>Setup the Wi-Fi.</strong> This is the same as in our test before.</li>
</ol>
<pre><code>wlan = network.WLAN(network.STA_IF)
wlan.active(True)
wlan.connect(SSID, PW)
time.sleep(5)
print(wlan.isconnected())
print(wlan.ifconfig())
</code></pre>
<ol start="5">
<li><strong>Create a loop that will flash the RGB LEDs green, three times for a successful Wi-Fi connection.</strong> The <em>np.fill()</em> function takes RGB colour codes, in this case R = 0, G = 16 and B = 0. This creates a low brightness green flash. Don't set it too high, these NeoPixels are really bright!</li>
</ol>
<pre><code>if wlan.isconnected() == True:
	for i in range(3):
		np.fill((0,16,0))
		np.write()
		time.sleep(0.1)
		np.fill((0,0,0))
		np.write()
		time.sleep(0.1)
</code></pre>
<ol start="6">
<li><strong>Add an else condition to indicate when the ESP32 C3 fails to connect to Wi-Fi.</strong> If the Wi-Fi fails to connect, we want to see three red flashes.</li>
</ol>
<pre><code>else:
	for i in range(3):
		np.fill((16,0,0))
		np.write()
		time.sleep(0.1)
		np.fill((0,0,0))
		np.write()
		time.sleep(0.1)
</code></pre>
<ol start="7">
<li><strong>Add a three second pause to the code.</strong></li>
</ol>
<pre><code>time.sleep(3)
</code></pre>
<ol start="8">
<li><strong>Create a loop to run the weather fetching part of the code.</strong></li>
</ol>
<pre><code>while True:
</code></pre>
<ol start="9">
<li><strong>Download the latest weather data as a JSON object from the Open Weather service using your API key and location.</strong> Make sure to replace <em>--YOUR OPEN WEATHER API KEY HERE--</em> with your real API key. I set my location to Blackpool, UK. Make sure to change it to your location. We use urequests, a version of Python's requests for micro-controllers to get the JSON data from Open Weather's API.</li>
</ol>
<pre><code>    r = urequests.get(&quot;http://api.openweathermap.org/data/2.5/weather?q=Blackpool,UK&amp;appid=--YOUR OPEN WEATHER API KEY HERE--&quot;).json()
</code></pre>
<ol start="10">
<li><strong>Strip out the main weather type from the returned data and save it to a variable called</strong> <em>weather</em> <strong>then print the contents to the REPL.</strong> The JSON object is essentially a Python dictionary and we can pull exact values from the object by knowing the keys. Here we pull the &quot;main&quot;, &quot;weather&quot; values and save them to the weather variable.</li>
</ol>
<pre><code>    weather = r[&quot;weather&quot;][0][&quot;main&quot;]
    print(weather)
</code></pre>
<ol start="11">
<li><strong>If the weather is Clear (sunny) then we use the values stores in the</strong>  <em>sun</em> <strong>list to draw a simple sun icon and set the colour to orange (almost), then we pause for 10 seconds before turning off all the LEDs.</strong></li>
</ol>
<pre><code>	if weather == &quot;Clear&quot;:
		for value in sun:
			np[value] = (255,265,0)
			np.write()
		time.sleep(10)
		np.fill((0,0,0))
		np.write()
</code></pre>
<ol start="12">
<li><strong>If the weather is &quot;Clouds&quot; then we draw a cloud to the LED matrix.</strong></li>
</ol>
<pre><code>	elif weather == &quot;Clouds&quot;:
		for value in cloudy:
			print(value)
			np[value] = (8,8,8)
			np.write()
		time.sleep(10)
		np.fill((0,0,0))
		np.write()
</code></pre>
<ol start="13">
<li><strong>If the weather is &quot;rain&quot; then we use two for loops to create an animation.</strong> The first will create an icon using the values in <em>rain 1</em>, then pause for 0.5 seconds before using the values in <em>rain2</em>. By doing this quickly and looping 10 times it create a basic animation of rain.</li>
</ol>
<pre><code>	elif weather == &quot;Rain&quot;:
		for i in range(10):
			for value in rain1:
				np[value] = (0,8,8)
				np.write()
			time.sleep(0.5)
			np.fill((0,0,0))
			np.write()
			for value in rain2:
				np[value] = (0,8,8)
				np.write()
			time.sleep(0.5)
			np.fill((0,0,0))
			np.write()
</code></pre>
<ol start="14">
<li><strong>Use another series of for loops to create a thunderstorm animtion.</strong> If the weather is a thunder / lightning then we get another animation of a thunder cloud and lightning flash.</li>
</ol>
<pre><code>	elif weather == &quot;Thunderstorm&quot;:
		for i in range(10):
			for value in lightning_cloud:
				np[value] = (8,8,8)
				np.write()
			time.sleep(0.5)
			np.fill((0,0,0))
			np.write()
			for value in lightning:
				np[value] = (8,8,0)
				np.write()
			time.sleep(0.5)
			np.fill((0,0,0))
			np.write()
</code></pre>
<ol start="15">
<li><strong>Create an icon for when the weather is &quot;Snow&quot;.</strong> This will draw a snowflake on the LED matrix.</li>
</ol>
<pre><code>	elif weather == &quot;Snow&quot;:
		for value in snow_ice:
			np[value] = (0,8,8)
			np.write()
		time.sleep(10)
		np.fill((0,0,0))
		np.write()
</code></pre>
<ol start="16">
<li><strong>Create a fail animation, triggered when the code fails to get the weather data.</strong> This animation is a rotating red cross. In reality it is a red + and x that appears to rotate.</li>
</ol>
<pre><code>	else:
		print(&quot;No Weather Data&quot;)
		for i in range(10):
			for value in fail:
				np[value] = (128,0,0)
				np.write()
			time.sleep(0.5)
			np.fill((0,0,0))
			np.write()
			for value in fail2:
				np[value] = (128,0,0)
				np.write()
			time.sleep(0.5)
			np.fill((0,0,0))
			np.write()
</code></pre>
<ol start="17">
<li><strong>Finally add a pause to the loop.</strong> The demo is set to 10 seconds, but for real life projects set this to 30 minutes / one hour.</li>
</ol>
<pre><code>	time.sleep(10)
</code></pre>
<ol start="18">
<li><strong>Save the code to your computer as</strong> <em>main.py</em></li>
<li><strong>Copy the code to the ESP32 C3 using Ampy.</strong> Remember to swap <em>/dev/ttyACM0</em> to your port!</li>
</ol>
<pre><code>ampy --port /dev/ttyACM0 put main.py
</code></pre>
<h1 id="completecodelisting">Complete Code Listing</h1>
<pre><code>import network
import time
import urequests
from machine import Pin
from neopixel import NeoPixel
from secrets import SSID, PW # secrets.py file contains Wi-Fi details
from random import randint


#NeoPixel Setup
neopin = Pin(8, Pin.OUT)
pixels = 25 
np = NeoPixel(neopin, pixels)

#Weather Icons
sun = [2,6,7,8,10,11,12,13,14,16,17,18,22]
cloudy = [7,11,12,13,15,16,17,18,19]
rain_cloud = [7,11,12,13,15,16,17,18,19]
rain1 = [0,4,5,9,10,12,14,17,22]
rain2 = [2,7,10,12,14,15,19,20,24]
lightning_cloud = [2,6,7,8,10,11,12,13,14,16,18,20,22]
lightning = [3,7,11,12,13,17,21]
snow_ice = [0,2,4,7,10,11,12,13,14,17,20,22,24]
fail = [0,4,6,8,12,16,18,20,24]
fail2 = [2,7,10,11,12,13,14,17,22]

#Wi-Fi Setup
wlan = network.WLAN(network.STA_IF)
wlan.active(True)
wlan.connect(SSID, PW)
time.sleep(5)
print(wlan.isconnected())
print(wlan.ifconfig())
if wlan.isconnected() == True:
	for i in range(3):
		np.fill((0,16,0))
		np.write()
		time.sleep(0.1)
		np.fill((0,0,0))
		np.write()
		time.sleep(0.1)
else:
	for i in range(3):
		np.fill((16,0,0))
		np.write()
		time.sleep(0.1)
		np.fill((0,0,0))
		np.write()
		time.sleep(0.1)
time.sleep(3)
		
while True:
	#Get the weather data
	r = urequests.get(&quot;http://api.openweathermap.org/data/2.5/weather?q=Blackpool,UK&amp;appid=--YOUR OPEN WEATHER API KEY HERE--&quot;).json()
	weather = r[&quot;weather&quot;][0][&quot;main&quot;]
	#Change the weather here to test the conditional tests.
	#weather = &quot;Cats and dogs&quot;
	print(weather)
	if weather == &quot;Clear&quot;:
		for value in sun:
			np[value] = (255,265,0)
			np.write()
		time.sleep(10)
		np.fill((0,0,0))
		np.write()
	elif weather == &quot;Clouds&quot;:
		for value in cloudy:
			print(value)
			np[value] = (8,8,8)
			np.write()
		time.sleep(10)
		np.fill((0,0,0))
		np.write()
	elif weather == &quot;Rain&quot;:
		for i in range(10):
			for value in rain1:
				np[value] = (0,8,8)
				np.write()
			time.sleep(0.5)
			np.fill((0,0,0))
			np.write()
			for value in rain2:
				np[value] = (0,8,8)
				np.write()
			time.sleep(0.5)
			np.fill((0,0,0))
			np.write()
	elif weather == &quot;Thunderstorm&quot;:
		for i in range(10):
			for value in lightning_cloud:
				np[value] = (8,8,8)
				np.write()
			time.sleep(0.5)
			np.fill((0,0,0))
			np.write()
			for value in lightning:
				np[value] = (8,8,0)
				np.write()
			time.sleep(0.5)
			np.fill((0,0,0))
			np.write()
	elif weather == &quot;Snow&quot;:
		for value in snow_ice:
			np[value] = (0,8,8)
			np.write()
		time.sleep(10)
		np.fill((0,0,0))
		np.write()
	else:
		print(&quot;No Weather Data&quot;)
		for i in range(10):
			for value in fail:
				np[value] = (128,0,0)
				np.write()
			time.sleep(0.5)
			np.fill((0,0,0))
			np.write()
			for value in fail2:
				np[value] = (128,0,0)
				np.write()
			time.sleep(0.5)
			np.fill((0,0,0))
			np.write()
	time.sleep(10)
    ```
    
# Happy Hacking!
</code></pre>
</div>]]></content:encoded></item><item><title><![CDATA[Tuesday Tooling: ray.so]]></title><description><![CDATA[Need to include a code snippet in a document or poster? Want it to look nice? You might want to try this.]]></description><link>https://bigl.es/tuesday-tooling-ray-so/</link><guid isPermaLink="false">61ae725e82398378a4d745ae</guid><category><![CDATA[tuesdaytooling]]></category><category><![CDATA[coding]]></category><dc:creator><![CDATA[Les Pounder]]></dc:creator><pubDate>Mon, 06 Dec 2021 21:14:28 GMT</pubDate><media:content url="https://bigl.es/content/images/2021/12/pexels-pixabay-270360.jpg" medium="image"/><content:encoded><![CDATA[<div class="kg-card-markdown"><img src="https://bigl.es/content/images/2021/12/pexels-pixabay-270360.jpg" alt="Tuesday Tooling: ray.so"><p>Need to include a code snippet in a document or poster? Want it to look nice? You might want to try this.</p>
<h2 id="sowhatisit">So What is it?</h2>
<p><a href="https://ray.so/">Ray.so</a> is an online tool that makes code snippets look really good.</p>
<p><a href="https://ko-fi.com/biglesp" alt="This is a code snippet"><img src="https://bigl.es/content/images/2021/12/Hi-Reader---2-.png" alt="Tuesday Tooling: ray.so"></a></p>
<h2 id="sohowdoiuseit">So How Do I Use it?</h2>
<p><img src="https://bigl.es/content/images/2021/12/@biglesp-woz-ere.py.png" alt="Tuesday Tooling: ray.so"><br>
Super simple, just paste your code into the editor and then tweak the settings, language, colours to meet your needs. By setting the language the tool will automatically apply syntax highlighting, useful for sharing code snippets.</p>
<h2 id="sohowdoigetmycode">So How Do I Get My Code?</h2>
<p><img src="https://bigl.es/content/images/2021/12/Screenshot_20211206_203824.png" alt="Tuesday Tooling: ray.so"><br>
Click on Export and we have four options. The first two are to save as a PNG or SVG. The PNG option works well, but the SVG options exports an SVG file which Inkscape opens as a blank file, a shame. The third option is to copy the image to the clipboard, and we can then paste it wherever we need it. The final option creates a URL that you can share with others. They get the code, in an editable format and they can tweak the image to their liking.</p>
<h2 id="whatthisisnot">What This is Not</h2>
<p>As these are basically just images, we have to be careful when using them online. Accessibility users will not be able to see the contents, so careful use of tags and alt is required. For print and posters, this tool is great.<br>
Sharing code with others using this tool is useful, but not if you want the receiver to copy the code. With the URL it is possible, but other outputs are just images.</p>
<p>For use in the classroom, in posters, advertising material etc, this is a top tool.</p>
<h2 id="happyhacking">Happy Hacking</h2>
</div>]]></content:encoded></item><item><title><![CDATA[Tuesday Tooling: sh]]></title><description><![CDATA[The return of Tuesday Tooling and we start with a little Python module for when we need to "just run that one terminal command".]]></description><link>https://bigl.es/tuesday-tooling-sh/</link><guid isPermaLink="false">61a53a2b82398378a4d7459b</guid><category><![CDATA[tuesdaytooling]]></category><category><![CDATA[python]]></category><category><![CDATA[Linux]]></category><dc:creator><![CDATA[Les Pounder]]></dc:creator><pubDate>Mon, 29 Nov 2021 21:50:27 GMT</pubDate><media:content url="https://bigl.es/content/images/2021/11/sh.jpg" medium="image"/><content:encoded><![CDATA[<div class="kg-card-markdown"><img src="https://bigl.es/content/images/2021/11/sh.jpg" alt="Tuesday Tooling: sh"><p>The return of Tuesday Tooling and we start with a little Python module for when we need to &quot;just run that one terminal command&quot;.</p>
<h2 id="sowhatisit">So What Is It?</h2>
<p>The project is called sh and <a href="https://pypi.org/project/sh/">&quot;sh is a full-fledged subprocess replacement for Python 2.6 - 3.8, PyPy and PyPy3 that allows you to call any program as if it were a function:&quot;</a>.<br>
Using sh we can call terminal commands direct from our Python code in the most simple and elegant manner!<br>
Sh was created by <a href="https://twitter.com/arwmoffat">Andrew Moffat</a> and the <a href="https://github.com/amoffat/sh">project can be found on GitHub.</a></p>
<p>I discovered this module <a href="https://twitter.com/driscollis/status/1464696708902924300">via a tweet from Mike Driscoll</a>. Many thanks to Mike for this discovery!</p>
<h2 id="sohowdoiinstallit">So How Do I Install It?</h2>
<p>Via pip for Linux and (I believe) Mac.</p>
<pre><code>pip3 install sh
</code></pre>
<p><img src="https://bigl.es/content/images/2020/06/Animated-GIF-downsized.gif" alt="Tuesday Tooling: sh"></p>
<blockquote>
<p>Hi reader!</p>
</blockquote>
<p><a href="https://ko-fi.com/biglesp">I never put my blog posts behind paywalls, pop ups or include sneaky advertisements because quite frankly that is annoying and prevents anyone from accessing the content. I will always keep my blog content free of charge. But I do ask that if you are able and willing, that you buy me a &quot;coffee&quot; as it helps me to pay for hosting this blog, and to buy stuff to hack from Poundshops / Dollar Stores / Aliexpress which are used in free projects and reviews on this blog. It is <strong>You</strong> dear reader who make this possible, and I am immensely grateful for your support.<br>
Thanks!</a></p>
<blockquote></blockquote>
<script type="text/javascript" src="https://ko-fi.com/widgets/widget_2.js"></script><script type="text/javascript">kofiwidget2.init('Support Me on Ko-fi', '#29abe0', 'M4M111TX5');kofiwidget2.draw();</script> 
<h2 id="sohowdoiuseit">So How Do I Use It?</h2>
<p>The hello world test for this module is to print the contents of a directory. Open a terminal and in a Python shell type.</p>
<pre><code>import sh
sh.ls(&quot;/home/&lt;YOUR USERNAME&gt;&quot;)
</code></pre>
<p>For my test I used my home directory, and the output was as follows.</p>
<pre><code>&gt;&gt;&gt; sh.ls(&quot;/home/les&quot;)
Desktop  Documents  Downloads  Music  Pictures  Public  snap  Templates  Videos

&gt;&gt;&gt; 
</code></pre>
<h2 id="soicanrunanyterminalcommand">So I Can Run Any Terminal Command?</h2>
<p><img src="https://bigl.es/content/images/2021/11/sh-vlc.png" alt="Tuesday Tooling: sh"><br>
Well yes you can!<br>
You can use <code>sh.echo(&quot;Hello World&quot;)</code> to print / echo to the shell.<br>
More interestingly, we can also call applications directly from Python.<br>
Here is a quick example where I use sh to open VLC and then pass a YouTube URL to VLC in the parenthesis.</p>
<pre><code>sh.vlc(&quot;https://youtu.be/3jJxKvjQrRg&quot;)
</code></pre>
<h2 id="sowhynotusesubprocess">So Why Not Use Subprocess?</h2>
<p><img src="https://bigl.es/content/images/2021/11/subprocess.png" alt="Tuesday Tooling: sh"><br>
I've used subprocess a few times, and it is immensely powerful. I like to think of sh as &quot;subprocess zero&quot; in a similar manner to <a href="https://gpiozero.readthedocs.io/en/stable/">GPIO Zero</a> is an easier way to use the GPIO on a Raspberry Pi.</p>
<p>To run the same VLC command we can use <code>subprocess.run()</code> or we can use <code>subprocess.Popen()</code>. Both have the same structure.</p>
<pre><code>subprocess.run(['vlc https://youtu.be/3jJxKvjQrRg'], shell = True)
</code></pre>
<p>Or</p>
<pre><code>subprocess.Popen(['vlc https://youtu.be/3jJxKvjQrRg'], shell = True)
</code></pre>
<p>We call the run / Popen and then pass subprocess the name of the command to run, and in our case the URL of the YouTube video. This is passed as a string. At the end of the line we use <code>shell = True</code> which ensures that the arguments are passed as a string.</p>
<p>So subprocess can do the same job as sh. But with sh it is far easier for those of us that &quot;just want to get the job done&quot; or for those new to the task.</p>
<h2 id="happyhacking">Happy Hacking!</h2>
<p><a href="https://www.pexels.com/photo/person-wearing-led-mask-doing-silence-gesture-3156660/">Cover photo by Tỷ Huỳnh from Pexels</a></p>
</div>]]></content:encoded></item><item><title><![CDATA[NeoPixel Beautification Experiment]]></title><description><![CDATA[Turn a boring make up light bar into a NeoPixel powered flashing fun fest with just a little code and some soldering.]]></description><link>https://bigl.es/neopixel-beautification-experiment/</link><guid isPermaLink="false">6138ba1682398378a4d74584</guid><category><![CDATA[Primark]]></category><category><![CDATA[circuitpython]]></category><category><![CDATA[QTPy]]></category><category><![CDATA[neopixels]]></category><category><![CDATA[neopixel]]></category><dc:creator><![CDATA[Les Pounder]]></dc:creator><pubDate>Wed, 08 Sep 2021 15:44:14 GMT</pubDate><media:content url="https://bigl.es/content/images/2021/09/banner.png" medium="image"/><content:encoded><![CDATA[<div class="kg-card-markdown"><img src="https://bigl.es/content/images/2021/09/banner.png" alt="NeoPixel Beautification Experiment"><p>Turning a Primark beauty light into a &quot;beautiful&quot; light.</p>
<p>For the first time since the pandemic started, MrsP and I went shopping in our town centre. We popped into Primark, a discount clothes and home furnishings retailer. In its beauty section I found four LED bulbs, similar to the lights used by make up artists. The size and shape, oh and the cost caught my eye. So for £4.50 I picked one up for a hack. Looking back at the hack, this would make a great sensory toy or just something to add a little fun lighting to your room. The biggest cost in the project are the NeoPixels, but these can be bought quite cheaply from Aliexpress. I used some leftover <a href="https://bigl.es/christmas-neopixel-hack-2019/">NeoPixels from my Christmas 2019 hack</a> and a spare <a href="https://bigl.es/monday-microcontroller-qtpy/">Adafruit QTPy board.</a></p>
<h2 id="sowhatsinthebox">So What's in the Box?</h2>
<p><img src="https://bigl.es/content/images/2021/09/Main.jpg" alt="NeoPixel Beautification Experiment"><br>
A single 30.5 x 6 x 6cm light bar which has four &quot;bulbs&quot;. The bulbs are really diffusers for the LEDs. Power is provided via 4 x AA batteries (6V). Pop in some batteries and press the switch, and we get a bright, harsh white light.</p>
<h2 id="teardown">Teardown</h2>
<p><img src="https://bigl.es/content/images/2021/09/Back-Panel.jpg" alt="NeoPixel Beautification Experiment"><br>
Access to innards is via the rear panel. There are no screws, rather we need to use a spudgers / pry tool to carefully work our way around the perimeter. Take care as the silver / chrome colour is easy to chip. So place a little more stress on the black plastic if you need to.<br>
<img src="https://bigl.es/content/images/2021/09/Inside.jpg" alt="NeoPixel Beautification Experiment"><br>
Inside the case and we see two wires from the batteries, Vcc (+) and GND (-). The GND wire connects via the switch, when turned off the switch breaks the circuit. Removing the circuit board requires snipping / squeezing the black plastic pegs on the back of the board. These have been &quot;heat staked&quot; on to hold the board. I used some flush cutters to remove them.<br>
<img src="https://bigl.es/content/images/2021/09/Circuit.jpg" alt="NeoPixel Beautification Experiment"><br>
The circuit board is simple. Power goes through three 4.7 Ohm resistors which is then shared with four clusters of six LEDs. Four matching the number of &quot;bulbs&quot; on the unit. Six LEDs per bulb is quite a lot but then we do get a really bright light from them all. The LEDs are crudely placed into the centre of holes, cut into thin plastic spacers. The bulbs diffuse the light from the six LEDs.<br>
<img src="https://bigl.es/content/images/2021/09/Teardown.jpg" alt="NeoPixel Beautification Experiment"><br>
I desoldered the connections to the battery and from the switch to the circuit board, leaving me with the bulbs and the case pieces. I removed the switch, as I can use the hole it leaves for USB access. The circuit board I've kept handy for a future project.</p>
<p><img src="https://bigl.es/content/images/2020/06/Animated-GIF-downsized.gif" alt="NeoPixel Beautification Experiment"></p>
<blockquote>
<p>Hi reader!</p>
</blockquote>
<p><a href="https://ko-fi.com/biglesp">I never put my blog posts behind paywalls, pop ups or include sneaky advertisements because quite frankly that is annoying and prevents anyone from accessing the content. I will always keep my blog content free of charge. But I do ask that if you are able and willing, that you buy me a &quot;coffee&quot; as it helps me to pay for hosting this blog, and to buy stuff to hack from Poundshops / Dollar Stores / Aliexpress which are used in free projects and reviews on this blog. It is <strong>You</strong> dear reader who make this possible, and I am immensely grateful for your support.<br>
Thanks!</a></p>
<blockquote></blockquote>
<script type="text/javascript" src="https://ko-fi.com/widgets/widget_2.js"></script><script type="text/javascript">kofiwidget2.init('Support Me on Ko-fi', '#29abe0', 'M4M111TX5');kofiwidget2.draw();</script> 
<h2 id="justaddneopixels">Just Add NeoPixels</h2>
<p>My first task was to find some suitable NeoPixels. My first test was with some surface mounted pixels, held on a small breakout board. These worked, but had very little impact when diffused. So I dug around and found some spare &quot;fairy light&quot; NeoPixels which fit into the bulbs...just!</p>
<blockquote class="twitter-tweet"><p lang="en" dir="ltr">Further adventures with blinky LEDs <a href="https://t.co/EhD55trGgP">pic.twitter.com/EhD55trGgP</a></p>&mdash; biglesp (@biglesp) <a href="https://twitter.com/biglesp/status/1435555968293740547?ref_src=twsrc%5Etfw">September 8, 2021</a></blockquote> <script async src="https://platform.twitter.com/widgets.js" charset="utf-8"></script>
<p>I did a test fit and everything seemed to work, if a little tight. I then soldered up the connections. As I was using <a href="https://www.adafruit.com/product/4600">Adafruit's QTPy</a>, a $7.50 SAMD21 based microcontroller, the code which I used for this project is essentially <a href="https://learn.adafruit.com/circuitpython-essentials/circuitpython-neopixel">Adafruit's CircuitPython example</a>, something that I have referred to many times. I downloaded the example project bundle, which contained the code and the neoPixel.mpy library. Placed them on the QTPy and then edited the code a little, as I just wanted a rainbow effect, so here is my version of the code.</p>
<pre><code>&quot;&quot;&quot;CircuitPython Essentials NeoPixel example&quot;&quot;&quot;
import time
import board
import neopixel

pixel_pin = board.A1
num_pixels = 8

pixels = neopixel.NeoPixel(pixel_pin, num_pixels, brightness=1, auto_write=False)


def wheel(pos):
    # Input a value 0 to 255 to get a color value.
    # The colours are a transition r - g - b - back to r.
    if pos &lt; 0 or pos &gt; 255:
        return (0, 0, 0)
    if pos &lt; 85:
        return (255 - pos * 3, pos * 3, 0)
    if pos &lt; 170:
        pos -= 85
        return (0, 255 - pos * 3, pos * 3)
    pos -= 170
    return (pos * 3, 0, 255 - pos * 3)


def color_chase(color, wait):
    for i in range(num_pixels):
        pixels[i] = color
        time.sleep(wait)
        pixels.show()
    time.sleep(0.5)


def rainbow_cycle(wait):
    for j in range(255):
        for i in range(num_pixels):
            rc_index = (i * 256 // num_pixels) + j
            pixels[i] = wheel(rc_index &amp; 255)
        pixels.show()
        time.sleep(wait)


RED = (255, 0, 0)
YELLOW = (255, 150, 0)
GREEN = (0, 255, 0)
CYAN = (0, 255, 255)
BLUE = (0, 0, 255)
PURPLE = (180, 0, 255)

while True:
    rainbow_cycle(0)  # Increase the number to slow down the rainbow
</code></pre>
<p><img src="https://bigl.es/content/images/2021/09/Circuit_bb.png" alt="NeoPixel Beautification Experiment"><br>
This is the circuit, except my NeoPixels came prewired. The 5V and GND are taken directly from the QTPy, and the data pin (DIN) is pin A1 on QTPy. That is all the wiring! Super simple. I connected the pixels to QTPy by soldering the wires to jumper wires, snipped and tinned so that I could solder them directly to the pins on QTPy.<br>
<img src="https://bigl.es/content/images/2021/09/wiring.jpg" alt="NeoPixel Beautification Experiment"><br>
A little heat-shrink makes sure that my soldering crimes are concealed, and prevent accidental shorts.<br>
<img src="https://bigl.es/content/images/2021/09/Strain.jpg" alt="NeoPixel Beautification Experiment"><br>
Using the hole left by the power switch I threaded a USB C cable into the case and then tied a knot in it, to act as strain relief should the cable get snagged.<br>
<img src="https://bigl.es/content/images/2021/09/Tunnocks.jpg" alt="NeoPixel Beautification Experiment"><br>
That was it! I tested the NeoPixels before I put the back panel on the light bar, then sat back and gazed upon a quick and easy hack.</p>
<h1 id="happyhacking">Happy Hacking!</h1>
</div>]]></content:encoded></item><item><title><![CDATA[Tuesday Tooling: cmdpxl]]></title><description><![CDATA[Create and edit pixel images, using Python via the Terminal, oh and using the keyboard WASD keys.]]></description><link>https://bigl.es/tuesday-tooling-cmdpxl/</link><guid isPermaLink="false">611abf9c82398378a4d7457a</guid><category><![CDATA[tuesdaytooling]]></category><category><![CDATA[python]]></category><dc:creator><![CDATA[Les Pounder]]></dc:creator><pubDate>Mon, 16 Aug 2021 20:09:11 GMT</pubDate><media:content url="https://bigl.es/content/images/2021/08/cmdpxl.gif" medium="image"/><content:encoded><![CDATA[<div class="kg-card-markdown"><img src="https://bigl.es/content/images/2021/08/cmdpxl.gif" alt="Tuesday Tooling: cmdpxl"><p>An image / pixel editor written in Python, in your terminal. Why do we need it? We probably don't but this was a something different that caught my eye.</p>
<h2 id="sowhatisit">So What is it?</h2>
<p><a href="https://github.com/knosmos/cmdpxl/blob/main/README.md">Created by knosmos, cmdpxl</a> is a command line pixel / image editor which uses WASD to control the cursor, enabling us to create simple pixel images.</p>
<h2 id="sohowdoiinstallit">So How Do I Install it?</h2>
<p>Via pip!</p>
<pre><code>pip install cmdpxl
</code></pre>
<h2 id="sohowdoiuseit">So How Do I Use it?</h2>
<p><img src="https://bigl.es/content/images/2021/08/Screenshot-from-2021-08-16-20-39-35.png" alt="Tuesday Tooling: cmdpxl"><br>
We run the <code>cmdpxl</code> command from the terminal and we are asked to specify the path to which we want to save the image. There is no auto-complete, so either save the file to the current directory or make sure you know the correct path. We are then asked for the image dimensions (width x height). I chose an 8 x 8 pixel image size.</p>
<blockquote>
<p>You can skip this bit by giving these values when running the command.<br>
<code>cmdpxl -f cool_icon.png -res 8,8</code><br>
We can also open files using the <code>-f</code> switch.</p>
</blockquote>
<p><img src="https://bigl.es/content/images/2021/08/Screenshot-from-2021-08-16-20-55-25.png" alt="Tuesday Tooling: cmdpxl"><br>
To draw an image we first need to pick a colour, the hue (top left) sets the main colour using the <strong>u</strong> and <strong>j</strong> keys. Setting the saturation is via the <strong>i</strong> and <strong>k</strong> keys and the &quot;val&quot;, which seems to be the brightness is set using <strong>o</strong> and <strong>l</strong>. In the top right we can see the currently chosen colour.<br>
<img src="https://bigl.es/content/images/2021/08/Screenshot-from-2021-08-16-20-58-32.png" alt="Tuesday Tooling: cmdpxl"><br>
Once we have a colour we can used <strong>wasd</strong> to navigate the canvas, and press <strong>e</strong> to put a pixel of colour on the canvas. If we make a mistake, press <strong>z</strong>, add filters with <strong>t</strong> and fill the canvas with <strong>f</strong>.<br>
<img src="https://bigl.es/content/images/2021/08/Screenshot-from-2021-08-16-20-42-33.png" alt="Tuesday Tooling: cmdpxl"><br>
Pressing <strong>esc</strong> will exit cmdpxl, but before it lets you go, it will ask you to save and exit, or exit without saving.</p>
<h2 id="why">Why?</h2>
<p>Well as the readme.md says, &quot;Good Question.&quot;<br>
There isn't a real need for a terminal based image editor, it lacks the tools found in GIMP or Photoshop. But it is fun and quirky and yes we could make an image on a remote machine via an SSH connection.</p>
<h2 id="happyhacking">Happy Hacking</h2>
<p><img src="https://bigl.es/content/images/2020/06/Animated-GIF-downsized.gif" alt="Tuesday Tooling: cmdpxl"></p>
<blockquote>
<p>Hi reader!</p>
</blockquote>
<p><a href="https://ko-fi.com/biglesp">I never put my blog posts behind paywalls, pop ups or include sneaky advertisements because quite frankly that is annoying and prevents anyone from accessing the content. I will always keep my blog content free of charge. But I do ask that if you are able and willing, that you buy me a &quot;coffee&quot; as it helps me to pay for hosting this blog, and to buy stuff to hack from Poundshops / Dollar Stores / Aliexpress which are used in free projects and reviews on this blog. It is <strong>You</strong> dear reader who make this possible, and I am immensely grateful for your support.<br>
Thanks!</a></p>
<blockquote></blockquote>
<script type="text/javascript" src="https://ko-fi.com/widgets/widget_2.js"></script><script type="text/javascript">kofiwidget2.init('Support Me on Ko-fi', '#29abe0', 'M4M111TX5');kofiwidget2.draw();</script> </div>]]></content:encoded></item></channel></rss>