<?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:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Iestyn Lloyd on Medium]]></title>
        <description><![CDATA[Stories by Iestyn Lloyd on Medium]]></description>
        <link>https://medium.com/@iestynlloyd?source=rss-77d84f660b81------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*bYcutF-H_Om00_wf70r5Fg.jpeg</url>
            <title>Stories by Iestyn Lloyd on Medium</title>
            <link>https://medium.com/@iestynlloyd?source=rss-77d84f660b81------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Fri, 05 Jun 2026 04:59:53 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@iestynlloyd/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com" rel="hub"/>
        <item>
            <title><![CDATA[Using ChatGPT to control LEDs]]></title>
            <link>https://medium.com/@iestynlloyd/using-chatgpt-to-control-leds-65a3fa8c2dc1?source=rss-77d84f660b81------2</link>
            <guid isPermaLink="false">https://medium.com/p/65a3fa8c2dc1</guid>
            <category><![CDATA[chatgpt]]></category>
            <category><![CDATA[ai]]></category>
            <category><![CDATA[python]]></category>
            <dc:creator><![CDATA[Iestyn Lloyd]]></dc:creator>
            <pubDate>Tue, 07 Mar 2023 08:58:40 GMT</pubDate>
            <atom:updated>2023-03-07T08:58:40.222Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*xsEXi1R1CvhkMU8N9QanTw.png" /></figure><p>Following up on <a href="https://medium.com/@iestynlloyd/voice-whisper-stt-api-chatgpt-turbo-api-google-tts-api-demo-8869ea278196">yesterday’s noodling about getting voice &gt; voice using ChatGPT working</a>, I thought I’d try hooking it up to a real life object. In this case a <a href="https://shop.pimoroni.com/products/cosmic-unicorn">Cosmic Unicorn from Pimoroni</a>.</p><p>Take a look:</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2FpI_NCQAw21o%3Ffeature%3Doembed&amp;display_name=YouTube&amp;url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DpI_NCQAw21o&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2FpI_NCQAw21o%2Fhqdefault.jpg&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=youtube" width="854" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/3519b741c42b36704d156502bf7071f6/href">https://medium.com/media/3519b741c42b36704d156502bf7071f6/href</a></iframe><p>This is super easy using Python. It’s unreal!</p><p>I’m using a system message for ChatGPT to set the behaviour for the assistant:</p><pre>{&quot;role&quot;: &quot;system&quot;, &quot;content&quot;: &quot;&quot;&quot;<br>Convert this text to a programmatic command, and add a short confirmation message:<br>Example: Make the LEDs red<br>Output: {&#39;target&#39;:&#39;LEDs&#39;,&#39;result&#39;:{&#39;r&#39;:255,&#39;g&#39;:0,&#39;b&#39;:0},&#39;message&#39;:&#39;OK, I made the LEDs red&#39;}<br>&quot;&quot;&quot;<br>}</pre><p>Should be pretty easy to adapt this for more controls..</p><p>Let me know if you’d like me to share the code!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=65a3fa8c2dc1" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Voice > Whisper STT API > ChatGPT Turbo API > Google TTS API demo]]></title>
            <link>https://medium.com/@iestynlloyd/voice-whisper-stt-api-chatgpt-turbo-api-google-tts-api-demo-8869ea278196?source=rss-77d84f660b81------2</link>
            <guid isPermaLink="false">https://medium.com/p/8869ea278196</guid>
            <category><![CDATA[chatgpt]]></category>
            <category><![CDATA[python]]></category>
            <category><![CDATA[programming]]></category>
            <dc:creator><![CDATA[Iestyn Lloyd]]></dc:creator>
            <pubDate>Mon, 06 Mar 2023 21:08:11 GMT</pubDate>
            <atom:updated>2023-03-07T09:06:25.427Z</atom:updated>
            <content:encoded><![CDATA[<p>Since OpenAI released their <a href="https://openai.com/blog/introducing-chatgpt-and-whisper-apis">ChatGPT Turbo &amp; Whisper API’s</a> a few days ago, there’s a whole bunch of voice &gt; Whisper &gt; ChatGPT &gt; TTS demos, so I had to do one too.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*rBYXw4uOTGXOwrUkanYt3Q.png" /></figure><p>Though to make this slightly different, this uses Wake Word and Voice Activity Detection using <a href="https://picovoice.ai/">PicoVoice</a>, so it’s kinda like an Alexa.. ish..?</p><p>The flow is: App starts &gt; wait for the wake word (<em>Helios — </em>you can train your own wake words) &gt; start recording the mic, and use <a href="https://picovoice.ai/platform/cobra/">Cobra VAD</a> to detect when the user stops speaking, or wait a max of 6 seconds &gt; save audio to file &gt; send to <a href="https://platform.openai.com/docs/guides/speech-to-text">Whisper API</a> &gt; get text back &gt; send to <a href="https://platform.openai.com/docs/guides/chat">ChatGPT API</a> &gt; get the response back &gt; send it to <a href="https://cloud.google.com/text-to-speech">Google Cloud Text To Speech API</a> (<em>en-GB-Wavenet-B</em>) &gt; get the MP3 back &gt; play it via <a href="https://formulae.brew.sh/formula/mpg321">mpg321</a>.</p><p>Only a few hours playing about with the APIs, and really fun!</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2F-RIxV9S3d5w%3Ffeature%3Doembed&amp;display_name=YouTube&amp;url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3D-RIxV9S3d5w&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=youtube" width="640" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/ab452d5b177aed8ffb011d1088a4fb65/href">https://medium.com/media/ab452d5b177aed8ffb011d1088a4fb65/href</a></iframe><p>Edit: I’ve now <a href="https://medium.com/@iestynlloyd/using-chatgpt-to-control-leds-65a3fa8c2dc1">hooked this up to a physical device</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=8869ea278196" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Overpass QL — Drawing land borders and coastline]]></title>
            <link>https://medium.com/@iestynlloyd/overpass-ql-drawing-land-borders-and-coastline-47192d4de6cf?source=rss-77d84f660b81------2</link>
            <guid isPermaLink="false">https://medium.com/p/47192d4de6cf</guid>
            <category><![CDATA[gis]]></category>
            <category><![CDATA[overpass-turbo]]></category>
            <category><![CDATA[osm]]></category>
            <dc:creator><![CDATA[Iestyn Lloyd]]></dc:creator>
            <pubDate>Wed, 22 Feb 2023 22:37:53 GMT</pubDate>
            <atom:updated>2023-02-22T22:38:11.257Z</atom:updated>
            <content:encoded><![CDATA[<h3>Overpass QL — Drawing land borders and coastlines</h3><p>This is mainly for Google, as I couldn’t find anything that actually did this in OSM. I’d have thought there would be an option to draw the borders of a state/country etc including the coastline and land borders, but apparently not.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/710/1*aeUlm2YK0cW3AvDDfAw8Pg.png" /><figcaption>The circles are actually lines when you zoom in..</figcaption></figure><p>Here’s the code for Overpass Turbo:</p><pre>rel[&quot;ISO3166-2&quot;=&quot;GB-SCT&quot;][&quot;type&quot;=&quot;boundary&quot;][&quot;boundary&quot;=&quot;administrative&quot;][&quot;admin_level&quot;=&quot;4&quot;];<br>(<br>  way(r)[&quot;maritime&quot; != &quot;yes&quot;];<br>  area[&quot;ISO3166-2&quot;=&quot;GB-SCT&quot;][admin_level=4];<br>  way(area)[&quot;natural&quot;=&quot;coastline&quot;];<br>);</pre><pre>out geom;</pre><p>You can see it here: <a href="https://overpass-turbo.eu/s/1rGa">https://overpass-turbo.eu/s/1rGa</a></p><p>I think this will work with any of the <a href="https://en.wikipedia.org/wiki/ISO_3166-2">ISO 3166–2 codes</a>, eg: GB-SCT, GB-ENG, IT-78, etc — as long as OSM supports them.</p><p>Let me know if you found it useful!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=47192d4de6cf" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[A list of 3D printing model resources]]></title>
            <link>https://medium.com/@iestynlloyd/a-list-of-3d-printing-model-resources-1ce8d18037d0?source=rss-77d84f660b81------2</link>
            <guid isPermaLink="false">https://medium.com/p/1ce8d18037d0</guid>
            <category><![CDATA[creativity]]></category>
            <dc:creator><![CDATA[Iestyn Lloyd]]></dc:creator>
            <pubDate>Sat, 11 Feb 2023 21:30:57 GMT</pubDate>
            <atom:updated>2023-02-11T21:30:57.278Z</atom:updated>
            <content:encoded><![CDATA[<p>Thought I’d make a list of resources for models for 3D printing. Some are paid, some are free.</p><p>Let me know if I’m missing any!</p><p>https://www.toymakr3d.com</p><p>https://fab365.net</p><p>https://www.gambody.com/</p><p>https://www.patreon.com/mysterymakers</p><p>https://hex3dpatreon.com/</p><p>https://www.patreon.com/mrbaddeley</p><p>https://nikkoindustriesmembership.com/</p><p>https://www.myminifactory.com/</p><p>https://cults3d.com/en</p><p>https://sanix3d.com/</p><p>https://www.printables.com/</p><p>https://www.thingiverse.com/</p><p>https://www.do3d.com</p><p>https://www.patreon.com/FlexiFactory</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=1ce8d18037d0" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Flappy Birds clone with ChatGPT and Python]]></title>
            <link>https://medium.com/@iestynlloyd/flappy-birds-clone-with-chatgpt-and-python-7d1391f37016?source=rss-77d84f660b81------2</link>
            <guid isPermaLink="false">https://medium.com/p/7d1391f37016</guid>
            <category><![CDATA[chatgpt]]></category>
            <category><![CDATA[python]]></category>
            <category><![CDATA[pygame]]></category>
            <dc:creator><![CDATA[Iestyn Lloyd]]></dc:creator>
            <pubDate>Sun, 04 Dec 2022 10:48:27 GMT</pubDate>
            <atom:updated>2022-12-04T12:08:14.465Z</atom:updated>
            <content:encoded><![CDATA[<p>Inspired by Andy Touch’s tweet, I thought I’d see if ChatGPT could create a Flappy Bird clone.</p><p>Let’s go!</p><h3>Andy Touch on Twitter: &quot;Id like to see your prove that theory! I disagree but willing to change my mind if you can convince the AI to make a Flappy Bird clone. / Twitter&quot;</h3><p>Id like to see your prove that theory! I disagree but willing to change my mind if you can convince the AI to make a Flappy Bird clone.</p><p><em>“in python, make a flappy birds clone”</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*1FThRig3m2ILwhIg888jog.jpeg" /></figure><p>It generated the following Python:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/474/1*k00ww-1FKKHz_0PJ6Jck7w.jpeg" /></figure><p>Ok but did it run? It did! Repeatedly hit the spacebar to move up, gravity pulls you down.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/320/1*fD5Y-JFKaen8rfvmqfOTqw.gif" /></figure><p>There’s no obstacles though. Let’s add some:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*SOq2BZsm-xbV8Li5nawa3w.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/812/1*s0rvp-kesp8L7SCXu7Ag9g.jpeg" /></figure><p>Does it work? Yup!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/229/1*PrWJGLDFdU-jPPZbipTKTw.gif" /></figure><p>I want more obstacles though, so let’s just ask ChatGPT for that:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*zlVEe-uZ7Ya2ZsTHODtJ3g.jpeg" /></figure><p>Here it is in action:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/224/1*jWEkESkN9OdLwJtwr7cpnA.gif" /></figure><p>Let’s add some colour:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*e6-WxzdvQuQs851ln6iQ2A.jpeg" /></figure><p>It works:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/226/1*Q_1p9a8bRZ35SXY6R6d8iw.gif" /></figure><p>Finally, lets add collision detection and a game over screen:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*pHifM2-nbjpbpoSb4H2d0w.jpeg" /></figure><p>The final result:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/220/1*hY92TQO9Xyc15YESoPdPlg.gif" /></figure><p>I’m impressed! This only took a few minutes in total, and I can’t wait to see what future generations of ChatGPT is capable of.</p><p>While ChatGPT can work with many languages, I’m particularly excited about Python, due to the amount of free packages available (<a href="https://pypi.org/">over 400k on PyPl</a>). I have another blog post on <a href="https://medium.com/@iestynlloyd/chatgpt-and-programming-incredible-terrifying-i-love-it-96342e424ba0">ChatGPT here</a> where I have some experiments with face recognition.</p><p>If you’re interested in the source code for this Flappy Birds “clone”, it can be <a href="https://github.com/yezzer/ChatGPT-Flappy-Birds-Clone/blob/main/flappy.py">found here</a>.</p><p>Original thread here: <a href="https://twitter.com/yezzer/status/1599336356357894144">https://twitter.com/yezzer/status/1599336356357894144</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=7d1391f37016" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[ChatGPT and programming: Incredible. Terrifying. I love it.]]></title>
            <link>https://medium.com/@iestynlloyd/chatgpt-and-programming-incredible-terrifying-i-love-it-96342e424ba0?source=rss-77d84f660b81------2</link>
            <guid isPermaLink="false">https://medium.com/p/96342e424ba0</guid>
            <category><![CDATA[python]]></category>
            <category><![CDATA[ai]]></category>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[openai]]></category>
            <category><![CDATA[chatgpt]]></category>
            <dc:creator><![CDATA[Iestyn Lloyd]]></dc:creator>
            <pubDate>Sat, 03 Dec 2022 18:14:45 GMT</pubDate>
            <atom:updated>2022-12-03T18:14:45.363Z</atom:updated>
            <content:encoded><![CDATA[<h3>I feel like a farm worker in the early 1900s that has seen a tractor for the first time.</h3><p>The future is here. I’ve seen it. I’ve used it. It has blown my mind.</p><p><a href="https://chat.openai.com/chat">ChatGPT</a> has been released in free research preview and it is <em>incredible</em>.</p><p>While ChatGPT can do many different things, it’s the programming side that I’m particularly interested in.</p><p>You can ask it — in plain english — to generate code for you by describing what you want the code to do. Recently I’ve been using MicroPython and Python a lot, so focussed on that.</p><p>Here’s some examples:</p><p><strong>Prompt</strong>: <br><em>“in python, open an image then draw a red alpha’d filed rectangle around any human faces. Show the rectangle properties aligned under the rectangle. Make the text red and bold”</em></p><p><strong>Execution: (on AI faces)</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*i9gjhHvdMclqmsdC" /></figure><p><strong>Prompt: <br></strong><em>“in python, open a video, then draw a red alpha’d filed rectangle around any human faces in each frame. Show the rectangle properties aligned under the rectangle. Make the text red and bold.”</em></p><p><strong>Execution:</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/600/1*gQ-H5aus5ChEajjG3Sjyew.gif" /></figure><p>More in that series here: <a href="https://twitter.com/yezzer/status/1599031876416520192">https://twitter.com/yezzer/status/1599031876416520192</a></p><p><strong>Prompt:<br></strong><em>“in python, write a web service that will return a live feed of my webcam”</em></p><p><strong>Execution:</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/936/0*1dUgcjBpeAn2MsRa" /><figcaption>a shocked me</figcaption></figure><p><strong>Prompt: </strong>“in python, open an image, and place a dog loaded from <a href="https://t.co/nAeNzDbtsf">https://dog.ceo/api/breeds/image/random/</a> on top of the faces” <br>+ “each face should show a different dog” <br>+ “the dogs should be RGB not greyscale”<br>+ asking it to fix some errors (it fixes it’s own code too!)</p><p><strong>Execution:</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*hqq0IsTj_B-RLkkY" /><figcaption>I’m not quite sure how it understood how to use the API..</figcaption></figure><p><strong>Prompt:<br>“</strong>write me python to open an image and draw a grid on top. the grid spacing should be 12 pixels”</p><p><strong>Execution:</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/500/0*9HZB1RYI2TXF-32W.jpg" /></figure><p><strong>Followup prompt: <br></strong>“As I move the mouse over a grid square it should highlight the square in red”</p><p><strong>Execution:</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/595/1*3VAr9ZxxgpJ8DtjglSqIHw.gif" /></figure><p>This is usable <em>right now. </em>While it can’t — yet — write larger programs, it’s absolutely a quick way to write parts that can be taken and expanded on, and it’s a super easy way to test concepts.</p><p>Exciting times.</p><p>More ChatGPT posts by me on <a href="https://twitter.com/search?q=from%3Ayezzer%20chatgpt&amp;src=typed_query">Twitter</a> and <a href="https://fosstodon.org/@yezzer/tagged/ChatGPT">Mastodon</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=96342e424ba0" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Galactic Unicorns and Custom Pimoroni Pico Firmware]]></title>
            <link>https://medium.com/@iestynlloyd/galactic-unicorns-and-custom-pimoroni-pico-firmware-38dd7c5913b8?source=rss-77d84f660b81------2</link>
            <guid isPermaLink="false">https://medium.com/p/38dd7c5913b8</guid>
            <category><![CDATA[firmware]]></category>
            <category><![CDATA[micropython]]></category>
            <category><![CDATA[raspberry-pi-pico]]></category>
            <category><![CDATA[pimoroni]]></category>
            <dc:creator><![CDATA[Iestyn Lloyd]]></dc:creator>
            <pubDate>Wed, 09 Nov 2022 14:20:30 GMT</pubDate>
            <atom:updated>2023-03-03T12:08:20.081Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*AX-vbbOWSFUlIDkt2wgZEw.jpeg" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*FfxraqZulQqw2ED8-d3WJw.jpeg" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/960/1*L5311P1G3lrRh5FOyAPLJA.gif" /><figcaption>The glorious Galactic Unicorn</figcaption></figure><p>Edit 03.03.2023: Pimoroni has <a href="https://github.com/pimoroni/pimoroni-pico/releases/tag/v1.19.15">updated the firmware to include numpy.</a> There’s still useful info below on custom firmware :)</p><p>I bought an excellent <a href="https://shop.pimoroni.com/products/galactic-unicorn?variant=40057440960595">Galactic Unicorn from Pimoroni</a>, with the aim of connecting a <a href="https://shop.pimoroni.com/products/vl53l5cx-time-of-flight-tof-sensor-breakout?variant=39972903059539">Time-of-Flight sensor (VL53L5CX)</a> to use as input for the board, connecting it over the QW/ST using I2C.</p><p>Sounds simple right? No.</p><p>There are <a href="https://learn.pimoroni.com/article/micropython-and-vl53l5cx">some examples</a> for the VL53L5CX working with the <a href="https://shop.pimoroni.com/products/raspberry-pi-pico?variant=32402092294227">Raspberry Pi Pico</a>, so I assumed this would work OK with the Galactic Unicorn, which uses a <a href="https://shop.pimoroni.com/products/raspberry-pi-pico-w?variant=40059369619539">Pico W</a> (A Pico with WiFi, great for IoT!).</p><p>Was I right? <em>Also no</em>.</p><p>The example I needed for the VL53L5CX used <a href="https://docs.circuitpython.org/en/latest/shared-bindings/ulab/index.html">ulab numpy</a>, a module created to speed up mathematical operations on arrays, and it <a href="https://twitter.com/yezzer/status/1588882323675967491">turns out this isn’t included in the Galactic Unicorn firmware</a>. It’s quite a large module, so <a href="https://github.com/pimoroni/pimoroni-pico/issues/551">has been removed to save space</a> in a number of the Pimoroni uf2’s.</p><p>With some advice from Jimmo on the Micropython Discord, and some pointers from Gadgetoid on Discord and Mastodon, I was able to remove a bunch of modules from the Galactic Unicorn firmware, and add in ulab numpy.</p><p><strong>How to make custom Pimoroni firmware with ulab numpy</strong></p><p>If you want to make your own custom firmware, turns out it’s pretty easy. It requires a bit of github knowledge. I’ll outline the steps:</p><ol><li>Go to <a href="https://github.com/pimoroni/pimoroni-pico">https://github.com/pimoroni/pimoroni-pico</a> and fork it.</li><li>In your new repo, create a branch</li><li>Go to micropython/modules/micropython-picow_galactic_unicorn.cmake</li><li>Under #Sensors &amp; Breakouts, comment out everything you don’t need. This saves some space, it might not be necessary, but as I didn’t need support for anything except the VL53L5CX, I removed them all</li><li>After #include(micropython-common) add:</li></ol><pre>function(enable_ulab)<br>    include(ulab/code/micropython)</pre><pre>target_compile_definitions(usermod_ulab INTERFACE<br>        # Support for complex ndarrays<br>        ULAB_SUPPORTS_COMPLEX=0</pre><pre># Determines, whether scipy is defined in ulab. The sub-modules and functions<br>        # of scipy have to be defined separately<br>        ULAB_HAS_SCIPY=0</pre><pre># The maximum number of dimensions the firmware should be able to support<br>        # Possible values lie between 1, and 4, inclusive<br>        ULAB_MAX_DIMS=2</pre><pre># By setting this constant to 1, iteration over array dimensions will be implemented<br>        # as a function (ndarray_rewind_array), instead of writing out the loops in macros<br>        # This reduces firmware size at the expense of speed<br>        ULAB_HAS_FUNCTION_ITERATOR=1</pre><pre># If NDARRAY_IS_ITERABLE is 1, the ndarray object defines its own iterator function<br>        # This option saves approx. 250 bytes of flash space<br>        NDARRAY_IS_ITERABLE=1</pre><pre># Slicing can be switched off by setting this variable to 0<br>        NDARRAY_IS_SLICEABLE=1</pre><pre># The default threshold for pretty printing. These variables can be overwritten<br>        # at run-time via the set_printoptions() function<br>        ULAB_HAS_PRINTOPTIONS=1<br>        NDARRAY_PRINT_THRESHOLD=10<br>        NDARRAY_PRINT_EDGEITEMS=3</pre><pre># determines, whether the dtype is an object, or simply a character<br>        # the object implementation is numpythonic, but requires more space<br>        ULAB_HAS_DTYPE_OBJECT=0</pre><pre># the ndarray binary operators<br>        NDARRAY_HAS_BINARY_OPS=0</pre><pre># Firmware size can be reduced at the expense of speed by using function<br>        # pointers in iterations. For each operator, the function pointer saves around<br>        # 2 kB in the two-dimensional case, and around 4 kB in the four-dimensional case.</pre><pre>NDARRAY_BINARY_USES_FUN_POINTER=1</pre><pre>NDARRAY_HAS_BINARY_OP_ADD=1<br>        NDARRAY_HAS_BINARY_OP_EQUAL=1<br>        NDARRAY_HAS_BINARY_OP_LESS=1<br>        NDARRAY_HAS_BINARY_OP_LESS_EQUAL=1<br>        NDARRAY_HAS_BINARY_OP_MORE=1<br>        NDARRAY_HAS_BINARY_OP_MORE_EQUAL=1<br>        NDARRAY_HAS_BINARY_OP_MULTIPLY=1<br>        NDARRAY_HAS_BINARY_OP_NOT_EQUAL=1<br>        NDARRAY_HAS_BINARY_OP_POWER=1<br>        NDARRAY_HAS_BINARY_OP_SUBTRACT=1<br>        NDARRAY_HAS_BINARY_OP_TRUE_DIVIDE=1<br>    )<br>endfunction()<br>enable_ulab()</pre><ul><li>Now create a release, and commit &amp; push your changes.</li><li>Github Actions will now compile everything. You need to wait a short while, and you’ll find your UF2 in Actions &gt; Micropython (second one down) &gt; select your latest Workflow Run at the top, then scroll down, and you’ll see your firmware with ulab included! Eg: <em>pimoroni-picow_galactic_unicorn-[blah]-micropython.uf2</em></li></ul><p>You can in theory do the same for the other boards, take a look in /micropython/modules, and view all the various cmake files.</p><p>Hope that quick overview is helpful to someone!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=38dd7c5913b8" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[iPhone 13 Pro Max – Notes]]></title>
            <link>https://medium.com/@iestynlloyd/iphone-13-pro-max-notes-6182273ba6e6?source=rss-77d84f660b81------2</link>
            <guid isPermaLink="false">https://medium.com/p/6182273ba6e6</guid>
            <category><![CDATA[iphone-13]]></category>
            <category><![CDATA[iphone13promax]]></category>
            <category><![CDATA[macro]]></category>
            <dc:creator><![CDATA[Iestyn Lloyd]]></dc:creator>
            <pubDate>Sat, 25 Sep 2021 08:01:43 GMT</pubDate>
            <atom:updated>2021-09-25T17:16:56.982Z</atom:updated>
            <content:encoded><![CDATA[<p><strong>iPhone 13 Pro Max – Notes</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*r7nrwYo01_2QHk0euaDrOA@2x.jpeg" /><figcaption>Sample macro shot</figcaption></figure><p>Upgrading from the XS Max, I didn’t think the 13 Pro Max would be much bigger – the specs show the dimensions are almost the same – but the flat sides make a big difference. It feels noticeably chunkier, and is definitely not as comfortable to hold.</p><p>People seem to be gushing over the 120hz screen, but I honestly don’t notice much difference. Perhaps as iOS is so smooth and responsive anyway, I don’t really see the difference? Or maybe my eyes are broken.</p><p>The LiDAR scanner is incredible. Using Polycam to build real-time meshes is quite a sight to behold. I recognise this is pretty niche, but it’s my niche. If it’s of interest to you, you’ll probably love it.</p><p>One of the main reasons I wanted the upgrade is for a better camera, and I’m very happy with the quality of the images, but the camera App is becoming a bit of a disorganised mess. Apple can do much better here. I had to google how to use various functions, and that’s a bit disappointing.</p><p>Apple’s silicon cover is a bit slippery on such an unwieldy phone. I’ll keep it, but will probably get something with a bit more grip in a few months.</p><p>The increase in weight – almost quarter of a kilo now – does make me worry that if I’m in bed using my phone and accidentally drop it on my face, it’ll break my nose.</p><p>Overall, it’s an impressive bit of kit. I do like it, but the UX of the camera App and the sheer size is a bit annoying.</p><p>See my Instagram for some <a href="https://www.instagram.com/p/CUQKJK8M3V1/">sample macros</a>.</p><p><strong>Update</strong></p><p>With a magsafe popgrip the Max becomes a lot more usable. Bit steep at £30.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/642/1*hcVdZ-6toZMTASrOXTHrxQ@2x.jpeg" /></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=6182273ba6e6" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Ray-Ban Stories — notes]]></title>
            <link>https://medium.com/virtual-library/ray-ban-stories-notes-5b15e8facbce?source=rss-77d84f660b81------2</link>
            <guid isPermaLink="false">https://medium.com/p/5b15e8facbce</guid>
            <category><![CDATA[ray-ban]]></category>
            <category><![CDATA[facebook-glasses]]></category>
            <category><![CDATA[facebook]]></category>
            <category><![CDATA[ray-ban-stories]]></category>
            <category><![CDATA[wearables]]></category>
            <dc:creator><![CDATA[Iestyn Lloyd]]></dc:creator>
            <pubDate>Mon, 13 Sep 2021 18:00:17 GMT</pubDate>
            <atom:updated>2021-09-17T17:32:32.461Z</atom:updated>
            <content:encoded><![CDATA[<h3><strong>Ray-Ban Stories — notes</strong></h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*hNDwYex0fUbG6SOj2bnyOQ.jpeg" /></figure><p><em>Aka Facebook privacy nightmare shades.</em></p><p>Most of my day, I have an Oculus Quest 2 on my head, so obviously I have surrendered my soul to Facebook already. Most reviews seem to cover privacy concerns, so I’m going to ignore that. Go read those if you’re interested in that — and you should be.</p><p>I have several pairs of Ray-Bans, but no Wayfarers, so went for those, in blue, which make the cameras slightly more noticeable. This wasn’t intentional, I thought I bought black ones. Oh well. They fit well, slightly heavier than normal Ray-bans but I didn’t notice it after a few minutes.</p><p>Speakers are better than I thought they’d be, great for phone calls, videos, and podcasts, but not really music. Also anyone around you can hear it pretty clearly.</p><p>The mics work really well for phone calls and speech-to-text, as well as audio for video. Vaguely similar to AirPods Pro with Transparency on, except not as good but more convenient.</p><p>Touchpad controls for volume on the right arm seem a bit hit and miss.</p><p>The shutter button is in exactly the place I hold shades while putting them on and taking them off so I accidentally hit record every time.</p><p>Facebook assistant works well — I was going to disable it, but it’s so convenient to use. Dammit.</p><p>When you want to get photos and videos off the device, the app needs to connect to your shades via a Wi-fi network. Doesn’t automatically transfer media to your phone. It is pretty seamless as-is though. Once the media is transferred, it stays in the View app where you can edit it and share to other apps as required. It doesn’t automatically upload to Facebook.</p><p>The shades are a super easy way to capture media (and consume audio) without context switching to another device. I really <em>really</em> like it. The sacrifice in quality is worth it for the convenience.</p><p>In time, over future iterations, smart glasses like these will get packed with more and more tech, and as I didn’t get Google Glass, Snap Spectacles, or Bose Frames, I thought I’d jump on board here to see what these devices are like, and I’m pretty impressed so far.</p><p><strong>Improvements</strong></p><p>The single LED for recording isn’t enough IMO. A larger area is needed to make it more obvious. A light bar along the top of the shades maybe? Holding up a slab of glass and metal to take photos is quite an obvious postural thing to do, and noticeable by people around you. There needs to be some kind of equivalent here.</p><p>The speakers could be bone conductive instead, so not everyone can hear what you’re listening to.</p><p>Reposition the shutter button so it’s not exactly where you hold shades when putting them on.</p><p>Touchpad controls need to work reliably.</p><p><strong>Sample montage from the View App</strong></p><p><a href="https://www.instagram.com/p/CTxZ_5QqgXn/?utm_source=ig_web_copy_link">https://www.instagram.com/p/CTxZ_5QqgXn/</a></p><p><strong>Update — a few days later</strong></p><p>When I stop wearing them, I find myself missing them. Mainly for the convenience of the mic and speakers when using my phone.</p><p><strong>Update 2</strong></p><p>I was recorded by my own Ray-Ban Stories, and this was my reaction</p><p><a href="https://twitter.com/yezzer/status/1438917690115117059">https://twitter.com/yezzer/status/1438917690115117059</a></p><p>Iestyn is CTO at <a href="http://www.futurevisual.com">Future Visual</a>, an award-winning VR &amp; AR studio based in Brighton, UK that works with enterprise clients across the globe.</p><p>Future Visual develops <a href="https://www.futurevisual.com/our-work/">ground-breaking immersive experiences</a> that enable users to access situations and scenarios that are either physically impossible or prohibitively expensive to recreate in the real world.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=5b15e8facbce" width="1" height="1" alt=""><hr><p><a href="https://medium.com/virtual-library/ray-ban-stories-notes-5b15e8facbce">Ray-Ban Stories — notes</a> was originally published in <a href="https://medium.com/virtual-library">Virtual Library</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Saving 6D.ai’s mesh at runtime as an OBJ in Unity]]></title>
            <link>https://medium.com/@iestynlloyd/saving-6d-ais-mesh-at-runtime-as-an-obj-in-unity-a62d71618a87?source=rss-77d84f660b81------2</link>
            <guid isPermaLink="false">https://medium.com/p/a62d71618a87</guid>
            <category><![CDATA[unity]]></category>
            <category><![CDATA[ar]]></category>
            <dc:creator><![CDATA[Iestyn Lloyd]]></dc:creator>
            <pubDate>Sat, 24 Nov 2018 16:09:49 GMT</pubDate>
            <atom:updated>2022-10-25T06:03:39.979Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*pi_HexuZcwAGXfNP.png" /></figure><p><em>[Moving from my other account]</em></p><p>For anyone who’s wondering how to save the meshes generated by 6d.ai, it’s pretty straightforward. I’ve seen a few people asking and no definitive answer, so thought I’d write it up in case anyone searching for this found it useful.</p><p>The steps are basically:</p><ol><li><strong>Combine the chunks into one mesh. </strong><br>I used Unity’s built-in <a href="https://docs.unity3d.com/ScriptReference/Mesh.CombineMeshes.html">Combine Meshes</a>. You can see <a href="http://unitygirldev.blogspot.com/2014/11/unity-tutorial-easy-mesh-combining-for.html">a sample of the code here</a>, which I adapted.</li><li><strong>Save the mesh locally.<br></strong>I used <a href="https://github.com/octo-code/obj-unity3d">obj-unity3d</a> to save the mesh as an obj to <a href="https://docs.unity3d.com/ScriptReference/Application-persistentDataPath.html">Application.persistentDataPath</a>.</li><li><strong>Access the mesh. </strong><br>Currently 6d.ai is iOS only, so plug your iOS device in, open XCode, and do the following:<br>Window&gt;Devices and Simulators&gt;Select your App&gt; Press the cog&gt;Download container &gt; Save &gt; Navigate to the container &gt;Right click &gt;Show package contents&gt;App Data&gt;Documents. Your file will be there!<br>You could also upload the local OBJ to a cloud storage solution for easier access. I did this using <a href="https://firebase.google.com/">Firebase</a>, but that’s a post for another time.</li></ol><p>A hacky code sample that might help you out:</p><pre>//Get a reference to the SDMesh<br> SDMesh sdMesh = FindObjectOfType&lt;SDMesh&gt;();<br> <br> //combine the meshes<br> MeshFilter[] meshFilters = sdMesh.GetComponentsInChildren&lt;MeshFilter&gt;();<br> CombineInstance[] combine = new CombineInstance[meshFilters.Length];<br> int i = 0;<br> while (i &lt; meshFilters.Length)<br> {<br> Debug.Log(&quot;combining..&quot;+meshFilters[i].gameObject.transform.name);<br> combine[i].mesh = meshFilters[i].sharedMesh;<br> combine[i].transform = meshFilters[i].transform.localToWorldMatrix;<br> i++;<br> }<br> Mesh combinedMesh = new Mesh();<br> combinedMesh.CombineMeshes(combine);<br> <br> //save the mesh<br> OBJData data = combinedMesh.EncodeOBJ();<br> string filepath = Application.persistentDataPath + &quot;/Obj_&quot; + UnityEngine.Random.Range(0, 10000) + &quot;.obj&quot;;<br> var lStream = new FileStream(filepath, FileMode.Create);<br> OBJLoader.ExportOBJ(data, lStream);<br> lStream.Close();</pre><p><em>Originally published at </em><a href="https://medium.com/@yezzer/saving-6d-ais-mesh-at-runtime-as-an-obj-in-unity-e95661d0474c"><em>https://medium.com</em></a><em> on November 24, 2018.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=a62d71618a87" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>