tag:blogger.com,1999:blog-69461258785592072472024-03-14T01:55:46.973-07:00davy wybiral(exploratory programming and more)Davy Wybiralhttp://www.blogger.com/profile/04401873536119552162noreply@blogger.comBlogger67125tag:blogger.com,1999:blog-6946125878559207247.post-77949614071998375702020-08-31T15:01:00.008-07:002020-08-31T15:03:33.074-07:00A Lesson in LoRa Module P2P Standards (or the Lack Thereof)<p>I got a handful of LoRa modules from Reyax a while back, the <a href="http://reyax.com/products/rylr896/">RYLR896</a> model based on Semtech SX1276 chips. Instead of using an SPI interface they operate over UART using a small set of AT commands. This made them easier to work with since I didn't have to dig too deeply into a bunch of SPI registers and Semtech specs and they communicate between one another really well. My Espruino JS module for them is available <a href="https://www.espruino.com/RYLR">here</a>, which I've used in a few of my YouTube videos. And more recently I've written a MicroPython module for them <a href="https://github.com/wybiral/micropython-rylr">here</a>.</p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh9ECf-Ey2CL8er6gusGynMeS9-5knxoDRr7P0rAvr-hoqXHvTmhkv-BX0tiFTRpda02Vj-GDUcKcDfLJioqLZ-KX_KLZziRpR4zF4Dco4n1Zo7fP4gbWAdk_Y72PB-bBGX4eraTIgnTloK/s2048/IMG_20200831_162357.jpg" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="2009" data-original-width="2048" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh9ECf-Ey2CL8er6gusGynMeS9-5knxoDRr7P0rAvr-hoqXHvTmhkv-BX0tiFTRpda02Vj-GDUcKcDfLJioqLZ-KX_KLZziRpR4zF4Dco4n1Zo7fP4gbWAdk_Y72PB-bBGX4eraTIgnTloK/s640/IMG_20200831_162357.jpg" width="640" /></a> </div><div class="separator" style="clear: both; text-align: center;">(A pair of Reyax RYLR896 modules)<br /></div><p>But, always being on the lookout for different boards and platforms I eventually ended up with a few <a href="https://www.makerfabs.com/maduino-lora-radio-433m-868m-915m.html">Maduino LoRa</a> boards. These are cool because they have an Arduino-compatible ATmega328 and the same Semtech LoRa chip (via an RFM95) both integrated on one board. They weren't compatible with Espruino or MicroPython though, and they used the SPI interface instead of AT commands so I knew I would need to look elsewhere for code to control them. Luckily, the popular Arduino <a href="https://www.airspayce.com/mikem/arduino/RadioHead/">RadioHead</a> library has support for RFM95s and the API is surprisingly easy to use. Only, one problem...</p><p></p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg0Pi33y8cca_fcsIwq5KzNkfEnY9E5r7v5_hOM4r5IdCNuHgWTYVQlDNYWjUQDG01YJ4ODt2W_CDRn4Sefj6ot28UJR7ngPIZUbh3VOKIkecrKn6GOEokmlp590pGiCSAmGXvOEerHK-DC/s2048/IMG_20200831_162216.jpg" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="1773" data-original-width="2048" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg0Pi33y8cca_fcsIwq5KzNkfEnY9E5r7v5_hOM4r5IdCNuHgWTYVQlDNYWjUQDG01YJ4ODt2W_CDRn4Sefj6ot28UJR7ngPIZUbh3VOKIkecrKn6GOEokmlp590pGiCSAmGXvOEerHK-DC/s640/IMG_20200831_162216.jpg" width="640" /></a> </div><div class="separator" style="clear: both; text-align: center;">(A pair of Makerfabs Maduino LoRa boards)<br /></div><p></p><p>Even when I set all of the LoRa parameters to be the same the boards didn't seem capable of communicating! So I took a peak at the signals using a Software Defined Radio device and they looked really similar. Except that the first portion of the message was different. So I went digging through the RadioHead source code to see if any data was being prepended to the packets or to see if any packet validation was rejecting them. Sure enough, I found the method "validateRxBuf":</p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgr6pVAUor6fe6agn3T85mMuDQSnbEOLNoKOhFEnhOZqzXBH4XG5OaWctxNqawDFpC8ARXGDAt9Ke5d5wq0kP8UIBXrMo96c4UmeLOTQ6aWF1LxDHUBp5PVpN0ZELB4zI8_u2-VXGIINym_/s1150/Screenshot+%25286%2529.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="605" data-original-width="1150" height="337" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgr6pVAUor6fe6agn3T85mMuDQSnbEOLNoKOhFEnhOZqzXBH4XG5OaWctxNqawDFpC8ARXGDAt9Ke5d5wq0kP8UIBXrMo96c4UmeLOTQ6aWF1LxDHUBp5PVpN0ZELB4zI8_u2-VXGIINym_/w640-h337/Screenshot+%25286%2529.png" width="640" /></a> </div><div class="separator" style="clear: both; text-align: center;">(RadioHead RH_RF95.cpp source code) <br /></div><p>The RadioHead library prepends four bytes to each packet (to, from, id, and flags) and it filters packets based on the "to" address. Somehow I'd overlooked the fact that the API also provides basic addressing (as does the Reyax AT commands). Probably because it's obscured by three layers of inheritance: RH_RF95 inherits RHSPIDriver which inherits RHGenericDriver which is where those methods are found.</p><p>So I enabled the "promiscuous" mode to stop the packet filtering and low and behold... I was receiving packets from the Reyax module using the Maduino LoRa board! But something still wasn't right. Every packet started with a garbage byte for some reason. After some trial and error experimenting (since I didn't have the source code to the Reyax AT controller) I realized that this garbage byte was the length of the packet.</p><p>For some reason the Reyax modules prepend the length of the message in front of the message itself. So while the RadioHead library sends [4 byte header] + [message] the Reyax modules send [4 byte header] + [1 byte message length] + [message]. This is a pretty easy problem to solve though, but it has to be done on the Maduino LoRa side because there is no way to change how the Reyax modules handled things behind the AT command API.</p><p>The devices allow for two forms of addressing. You can send messages directly to certain addresses where all devices that don't match the address will filter it out (unless they're in promiscuous mode). Or you can send messages to a "broadcast" address that all devices will accept. To use them properly in a project I wanted to disable promiscuous mode and that's where I hit another snag. For some reason broadcasting wouldn't work. So I dug through the documentation for the Reyax AT commands and the RadioHead source code and realized that they use different "broadcast" addresses.</p><p>Reyax modules use 0x00.</p><p>RadioHead library uses 0xff.</p><p>But again, this was a trivial fix (either by patching RadioHead to use 0x00 or by explicitly sending to 0x00 in the user code) and now everything was finally working. Until...<br /></p><p>Still wanting to try new devices I got my hands on another Makerfabs board, this time their <a href="https://www.makerfabs.com/esp32-lora-gateway.html">MakePython LoRa gateway</a>. This one is even cooler because the main board is an ESP32 and the LoRa module attachment has two RFM95 modems! And it comes with MicroPython preinstalled, which is what I wanted to program them with since I'll be writing something a bit more on the complex side that integrates the ESP WiFi with the LoRa module.</p><p></p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjTQmlGOnSugp6rS_Sojyg05Wedx2Uag3i0qkZe_irp_c-N12pb41VFcA6mtvG0fGBQm0yNky0Zq1xBnNgC-2LaaFM5v19TGDN1vhyZalq4wXT_AbkHyKMpPpa9lLRAcSPskxSudaGXF_pI/s2048/IMG_20200831_162512.jpg" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="1660" data-original-width="2048" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjTQmlGOnSugp6rS_Sojyg05Wedx2Uag3i0qkZe_irp_c-N12pb41VFcA6mtvG0fGBQm0yNky0Zq1xBnNgC-2LaaFM5v19TGDN1vhyZalq4wXT_AbkHyKMpPpa9lLRAcSPskxSudaGXF_pI/s640/IMG_20200831_162512.jpg" width="640" /></a> </div><div class="separator" style="clear: both; text-align: center;">(Makerfabs MakerPython ESP32 + LoRa gateway)<br /></div><p></p><p>Not wanting to write something from scratch to deal with the RFM95 over SPI I looked for some example code. Makerfabs had a couple of example projects that used <a href="https://github.com/Wei1234c/SX127x_driver_for_MicroPython_on_ESP8266">this</a> MicroPython library. Now that I knew what to look for I dug into that code to see which header structure their implementation was using... And it turns out they weren't using one at all! It doesn't prepend or validate packets based on any headers and instead just sends the raw packet as-is.</p><p>So now I have to write some helper functions to deal with the headers in the user code (I also ended up rewriting that MicroPython library to fit my projects better <a href="https://github.com/wybiral/micropython-lora">here</a> so I could also fork that and use the Reyax structure) but otherwise everything still works.</p><p>At the end of all this, what I learned is that there is no one standard protocol for p2p LoRa radio communication and it seems like every library takes their own liberties to enforce different packet structures. So if you ever find yourself in this situation hopefully you'll be able to fix it right away instead of having to do all of this sleuthing.</p><p>Now I have all three different models of devices communicating with one another, so if you'll excuse me I have an Internet of Things to build!<br /></p>Davy Wybiralhttp://www.blogger.com/profile/04401873536119552162noreply@blogger.comtag:blogger.com,1999:blog-6946125878559207247.post-17202897936986243712020-08-13T20:06:00.004-07:002020-08-13T20:06:32.394-07:00DIY Solar Powered LoRa Repeater (with Arduino)<p>In today's video I be built a solar powered LoRa signal repeater to extend the range of my LoRa network. This can easily be used as the basis for a LoRa mesh network with a bit of extra code and additional repeaters.<br /><br />Even if you're not into LoRa networks all of the solar power hardware in this video can be used for any off-the-grid electronics projects or IoT nodes!</p><p> </p>
<div style="text-align: center;"><iframe allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" allowfullscreen="" frameborder="0" height="315" src="https://www.youtube.com/embed/UwtI78h1kak" width="560"></iframe></div>Davy Wybiralhttp://www.blogger.com/profile/04401873536119552162noreply@blogger.comtag:blogger.com,1999:blog-6946125878559207247.post-18221160127239504332020-07-06T13:13:00.001-07:002020-07-06T13:13:14.069-07:00CircuitPython Game Development (PewPew M4)<div><span class="style-scope yt-formatted-string" dir="auto">Check out this open source CircuitPython game development platform based on the ARM M4 microcontroller. If you're looking to do some homebrew game development on a handheld platform, this is a great option.<br /></span></div><div><span class="style-scope yt-formatted-string" dir="auto"><br /></span></div><div><span class="style-scope yt-formatted-string" dir="auto">In this video I give an overview of the hardware itself and show how the CircuitPython programming environment works on it along with some basic programming examples.<br /></span></div><div><span class="style-scope yt-formatted-string" dir="auto"><br /></span></div><div class="separator" style="clear: both; text-align: center;"><iframe allowfullscreen="" class="BLOG_video_class" height="266" src="https://www.youtube.com/embed/CayvPiewaNo" width="320" youtube-src-id="CayvPiewaNo"></iframe></div><div class="separator" style="clear: both; text-align: center;"><br /></div><div class="separator" style="clear: both; text-align: left;">For more information check out the <a href="https://hackaday.io/project/165032-pewpew-m4">Hackaday page</a> and the <a href="https://www.makerfabs.com/circuitpython-pewpew-m4.html">Makerfabs product info</a> page.<br /></div>Davy Wybiralhttp://www.blogger.com/profile/04401873536119552162noreply@blogger.comtag:blogger.com,1999:blog-6946125878559207247.post-3587170497742472002020-05-16T08:55:00.001-07:002020-05-16T08:55:39.586-07:00Raspberry Pi 4 Complete GuideI've been a fan of Raspberry Pi since the original <a href="https://www.raspberrypi.org/products/raspberry-pi-1-model-b-plus/">Pi 1</a> so it's always exciting for me to see how these boards evolve with each new model. The newest <a href="https://www.raspberrypi.org/products/raspberry-pi-4-model-b/">Raspberry Pi 4</a> is no exception and it certainly raises the bar for Single Board Computers.<br />
<br />
While the older models were mostly only useful as educational boards or for DIY/maker projects, the Pi 4 finally packs a real punch in terms of performance. With a 64-bit quad core ARM processor and up to 4GB of ram, I expect these boards to end up in all kinds of applications, ranging from home media centers to actual home desktop use.<br />
<br />
Whether you're just getting into Pi's or you're looking to upgrade from one of the older models, this guide is for you.<br />
<br />
<h4>
</h4>
<h4>
</h4>
<h4>
Part 1: Hardware</h4>
This video goes over the hardware of the Raspberry Pi itself as well as all of the additional peripheral hardware that you'll need to get started. Most of the parts (including the 4GB Pi 4) came from <a href="https://www.canakit.com/raspberry-pi-4-starter-max-kit.html">this CanaKit</a>. <br />
<br />
<iframe allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" allowfullscreen="" frameborder="0" height="315" src="https://www.youtube.com/embed/vRlBJL_x_hQ" width="560"></iframe>
<br />
<h4>
</h4>
<h4>
</h4>
<h4>
Part 2: Operating Systems </h4>
This video shows you how to install different operating systems on the Raspberry Pi 4 and goes over some of the most popular ones to help you pick which one fits best. The operating systems discussed are <a href="https://www.raspberrypi.org/downloads/raspbian/">Raspbian</a>, <a href="https://openelec.tv/">OpenELEC</a>, <a href="https://www.lakka.tv/">Lakka</a>, <a href="https://ubuntu.com/download/raspberry-pi">Ubuntu</a>, <a href="https://ubuntu-mate.org/ports/raspberry-pi/">Ubuntu Mate</a>, <a href="https://xubuntu.org/">Xubuntu</a>, <a href="https://lubuntu.net/">Lubuntu</a>, <a href="https://manjaro.org/download/">Manjaro</a>, <a href="https://www.kali.org/">Kali Linux</a>, and <a href="https://retropie.org.uk/">RetroPie</a>. But the techniques shown here should allow you to install any operating system that supports the new Pi 4 ARM architecture.<br />
<br />
<iframe allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" allowfullscreen="" frameborder="0" height="315" src="https://www.youtube.com/embed/hMRrSPYaGwo" width="560"></iframe>Davy Wybiralhttp://www.blogger.com/profile/04401873536119552162noreply@blogger.comtag:blogger.com,1999:blog-6946125878559207247.post-50905131911495375262020-01-22T14:15:00.000-08:002020-05-16T08:56:05.151-07:00ESP32-Cam Quickstart with Arduino Code<span class="style-scope yt-formatted-string" dir="auto">Learn how to add a camera to your Arduino projects the easy way using one of these cheap ESP32-Cam modules. Great for pet cams, home surveillance, time lapses, and computer vision applications.</span><br />
<br />
<div style="text-align: center;">
<span class="style-scope yt-formatted-string" dir="auto"> </span><iframe allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" allowfullscreen="" frameborder="0" height="315" src="https://www.youtube.com/embed/Sb08leLWOgA" width="560"></iframe>
</div>
Davy Wybiralhttp://www.blogger.com/profile/04401873536119552162noreply@blogger.comtag:blogger.com,1999:blog-6946125878559207247.post-57198572073979082612020-01-02T18:09:00.003-08:002020-01-02T18:09:44.193-08:00Intro to Arduino with LoRaIf you've ever wanted to get started using LoRa wireless communication
in your Arduino projects this video is for you. It covers some popular
LoRa module options, a brief introduction to the Arduino code needed to
control them, and an explanation of the different ways to configure your
LoRa modem to maximize range or data transfer rate along with
visualizations of the LoRa packet transmissions.<br />
<br />
It's time to get
wireless...<br />
<br />
<div style="text-align: center;">
<br /></div>
<div style="text-align: center;">
<iframe allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" allowfullscreen="" frameborder="0" height="315" src="https://www.youtube.com/embed/YhilJivurVQ" width="560"></iframe></div>
Davy Wybiralhttp://www.blogger.com/profile/04401873536119552162noreply@blogger.comtag:blogger.com,1999:blog-6946125878559207247.post-55764723948833655132019-12-05T12:13:00.000-08:002019-12-05T12:13:08.239-08:00Interactive (Touch) Musical Christmas TreeIn this video I should how to build a capacitive touch Christmas tree that allows you to play music just by touching the ornaments. All it takes is a little bit of Python code, a Raspberry Pi, and a Bare Conductive Pi Cap.<br />
<br />
Get ready to rock around the Christmas tree! <br />
<br /><br />
<div style="text-align: center;">
<br /></div>
<div style="text-align: center;">
<iframe allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" allowfullscreen="" frameborder="0" height="315" src="https://www.youtube.com/embed/Hi1HbB1ojYY" width="560"></iframe></div>
Davy Wybiralhttp://www.blogger.com/profile/04401873536119552162noreply@blogger.comtag:blogger.com,1999:blog-6946125878559207247.post-36676737018922085502019-11-22T16:49:00.000-08:002019-11-25T19:17:18.605-08:00ESPlay Micro: Open Source ESP32 Game ConsoleToday we'll take a look at the ESPlay Micro, an open source game console built around the ESP32 WROVER SoC. Aside from being a lightweight game console for retro emulation these boards also make for a great development platform to learn low level systems programming. The hardware and software are both open source and pretty straightforward.<br />
<br />
PS: these would make for an awesome Christmas present for anyone into gaming or making.<br />
<div style="text-align: center;">
<br /></div>
<div style="text-align: center;">
<iframe allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" allowfullscreen="" frameborder="0" height="315" src="https://www.youtube.com/embed/NfbxcjU85Ac" width="560"></iframe></div>
<br />
Makerfabs: <a href="https://www.makerfabs.com/esplay-micro.html">https://www.makerfabs.com/esplay-micro.html</a> <br />
Source code: <a href="https://github.com/pebri86/esplay-retro-emulation">https://github.com/pebri86/esplay-retro-emulation</a><br />
Hardware: <a href="https://github.com/pebri86/esplay_micro_hardware">https://github.com/pebri86/esplay_micro_hardware</a><br />
Hackaday: <a href="https://hackaday.io/project/166707-esplay-micro">https://hackaday.io/project/166707-esplay-micro</a><br />
Instructables: <a href="https://www.instructables.com/id/ESPlay-Micro-Retro-Game-Console-MicroPython/">https://www.instructables.com/id/ESPlay-Micro-Retro-Game-Console-MicroPython/</a>Davy Wybiralhttp://www.blogger.com/profile/04401873536119552162noreply@blogger.comtag:blogger.com,1999:blog-6946125878559207247.post-35583606023034291012019-11-09T19:55:00.002-08:002019-11-09T19:55:33.178-08:00Testing 4 Raspberry Pi Gaming PlatformsI've been looking to update my home media center recently and decided to survey the landscape of Raspberry Pi gaming/media platforms. This video compares the four best ones I've been able to find which are: RetroPie, Recalbox, Lakka, and Steamlink.<br />
<div style="text-align: center;">
<br /></div>
<div style="text-align: center;">
<iframe allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" allowfullscreen="" frameborder="0" height="315" src="https://www.youtube.com/embed/wp63Z4_WhDA" width="560"></iframe></div>
Davy Wybiralhttp://www.blogger.com/profile/04401873536119552162noreply@blogger.comtag:blogger.com,1999:blog-6946125878559207247.post-68491111719429231182019-05-31T14:46:00.001-07:002019-05-31T16:08:03.497-07:00Always Secure Your localhost ServersRecently I was <a href="https://twitter.com/davywtf/status/1133222386575265792">surprised to learn</a> that web browsers allow any site you visit to make requests to resources on localhost (and that they will happily allow unreported <a href="https://developer.mozilla.org/en-US/docs/Web/Security/Mixed_content">mixed-content</a>). If you'd like to test this out, run an HTTP server on port 8080 (for instance with <span style="background-color: black;"><span style="color: lime;"><span style="font-family: "courier new" , "courier" , monospace;">python -m http.server 8080</span></span></span>) and then visit <a href="https://wybiral.github.io/localtoast/">this page.</a><br />
<br />
You should see "Found: HTTP (8080)" listed and that's because the Javascript on that page made an HTTP GET request to your local server to determine that it was running. Chances are it detected other services as well (for instance if you run Tor or Keybase locally). <br />
<br />
There are two implications from this that follow:<br />
<ol>
<li>Website owners could potentially use this to collect information about what popular services are running on your local network.</li>
<li>Malicious actors could use this to exploit vulnerabilities in those services.</li>
</ol>
Requests made this way are limited in certain ways since they're considered <a href="https://developer.mozilla.org/en-US/docs/Web/API/Response/type">opaque</a>, meaning that the web page isn't able to read the response body or headers. But even with these restrictions a request can do all kinds of nasty things unless the local server is properly secured.<br />
<br />
For instance, at one point Redis was vulnerable to these types of attacks because its protocol is text-over-TCP (just like HTTP) so any web page you visit could craft an HTTP POST request that mimics normal Redis commands. There's an excellent write-up on this vulnerability <a href="http://benmmurphy.github.io/blog/2015/06/04/redis-eval-lua-sandbox-escape/">here</a> (which has since been fixed).<br />
<br />
Similarly, if you run the popular gaming platform Steam on Linux, at the time of writing this the main application opens a TCP listener on port 57343. I have no idea what that port is for but I do know that visiting this web page while Steam is open will cause the entire UI to freeze, as well as most games, until the tab is closed: [<span style="color: #e06666;">WARNING: don't blame me if it crashes your game</span>] <a href="https://wybiral.github.io/steam-block/">https://wybiral.github.io/steam-block/</a><br />
<br />
This works because the favicon on that page is actually an HTTP GET request to the TCP server which never closes, thus blocking their listener. It may even be possible to attack the server in other ways with specifically crafted requests (I was able to crash the application using a large enough payload).<br />
<br />
These types of vulnerabilities are widespread mostly because application developers assume that the server will only be locally-accessible and not available to every website the user visits. Hopefully this is enough proof to justify why better security measures need to be taken with local servers even if you don't intend to forward the ports you're using to the outside world.<br />
<br />
So, as developers what can we do to prevent this kind of attack?<br />
<br />
For HTTP and WebSocket servers you can add authentication, <a href="https://en.wikipedia.org/wiki/Cross-site_request_forgery">CSRF</a> protection, and restrict access based on the page origin (which browsers should include in the request headers).<br />
<br />
For TCP servers it could be harder depending on your application. You can detect HTTP-like request headers and block the connection (this seems to be what Redis is doing now). Or require some sort of handshake/authentication that the browser won't perform and reject connections based on that.<br />
<br />
As far as preventing fingerprinting and service discovery this way... I'm not entirely sure what the best way to prevent this would be other than ungracefully failing the requests (which a lot of HTTP frameworks probably don't make easy). If anyone has any ideas here feel free to drop me a tweet <a href="https://twitter.com/davywtf">@davywtf</a>.<br />
<ul></ul>
Davy Wybiralhttp://www.blogger.com/profile/04401873536119552162noreply@blogger.comtag:blogger.com,1999:blog-6946125878559207247.post-35893898438142911302019-03-30T06:37:00.000-07:002019-03-30T06:37:03.710-07:00Arduino-friendly 240x320 LCD Display Tutorial (ILI9341)<div style="text-align: left;">
Have you ever needed to add a UI to any of your embedded projects? For instance, maybe you want to display a sensor reading graph or build your own handheld gaming system. In this video I'll take a look at some cheap 240x320 color LCD display devices that you can add to almost any microcontroller or Single Board Computer project.</div>
<div style="text-align: center;">
<br /></div>
<div style="text-align: center;">
<iframe allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" allowfullscreen="" frameborder="0" height="315" src="https://www.youtube.com/embed/EFAfcsYOriM" width="560"></iframe></div>
Davy Wybiralhttp://www.blogger.com/profile/04401873536119552162noreply@blogger.comtag:blogger.com,1999:blog-6946125878559207247.post-34593029023078736182019-02-01T08:27:00.001-08:002019-02-01T08:27:53.765-08:00Nordic nRF52840-Dongle (2.4GHz RF Development Board)Recently I've gotten into low-power RF technology and have become quite the fan of the <a href="https://www.nordicsemi.com/Products/Low-power-short-range-wireless/nRF52840">nRF52</a> SoC for that reason. Of all the BLE-capable chips I've used so far these ones reign supreme in terms of functionality and ultra-low power consumption.<br />
<br />
One of the more interesting boards I've seen powered by them is the <a href="https://www.nordicsemi.com/Software-and-Tools/Development-Kits/nRF52840-Dongle/GetStarted">nRF52840 dongle</a>, directly from Nordic Semiconductor. It's tiny, well constructed, and supports a very nice set of specs:<br />
<ul>
<li>64 MHz <a href="https://developer.arm.com/products/processors/cortex-m/cortex-m4">Cortex-M4F</a></li>
<li>1 MB Flash</li>
<li>256 KB RAM</li>
<li>2.4 GHz Transceiver (supports Bluetooth 5 with long range)</li>
</ul>
<div>
<br />
In this video I introduce the Nordic <a href="https://www.nordicsemi.com/Software-and-Tools/Software/nRF5-SDK">nRF SDK</a> for programming these dongles:</div>
<div>
<div style="text-align: center;">
<br /></div>
</div>
<div>
<div style="text-align: center;">
<br /></div>
</div>
<div style="text-align: center;">
<iframe allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" allowfullscreen="" frameborder="0" height="315" src="https://www.youtube.com/embed/kyPKIRQIacI" width="560"></iframe></div>
Davy Wybiralhttp://www.blogger.com/profile/04401873536119552162noreply@blogger.comtag:blogger.com,1999:blog-6946125878559207247.post-54183145345971767502019-01-13T08:57:00.002-08:002019-01-13T10:34:35.495-08:00Exploring Sub-GHz Radio With RTL-SDR and GQRXToday I took a look at some hardware for working with sub-GHz radio transmissions, especially FM. All of which came in a previous <a href="https://hackerboxes.com/">HackerBoxes</a> box. My favorite item was definitely the RTL-SDR dongle! I could play around with this thing for hours surfing the radio waves and listening to weird broadcasts. There's even a Python library named <a href="https://pypi.org/project/pyrtlsdr/">pyrtlsdr</a> for working with these devices so you can scan/record radio transmissions programmatically: <a href="https://github.com/roger-/pyrtlsdr">https://github.com/roger-/pyrtlsdr</a><br />
<br />
Next I'm going to solder together the FM transceivers included in the box and play around with writing Arduino firmware for them. Those things should work similar to the LoRa modules I've been using but they trade in the long range for increased bandwidth. Should be good for streaming data locally and still have much better range than most home WiFi or Bluetooth.<br />
<br />
Here's a video overview of the hardware included in <a href="https://hackerboxes.com/collections/past-hackerboxes/products/hackerbox-0034-subghz-radio">HackerBox 0034</a> as well as a demo of the RTL-SDR dongle using <a href="https://github.com/csete/gqrx">GQRX</a> to visually and audibly explore the radio waves.<br />
<br />
<div style="text-align: center;">
<iframe allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" allowfullscreen="" frameborder="0" height="315" src="https://www.youtube.com/embed/_52FcSpxbas" width="560"></iframe>
</div>
<br />
<br />
The audio in my videos has also improved a bit since being sent this Purple Panda lapel microphone. If you do any audio recording with your laptop or phone this little mic is cheap and it definitely improves the quality over a builtin mic. [Not a sponsor, they did send this for free but it's also only $20. I really needed a mic.]<br />
<br />
<div style="text-align: center;">
<iframe allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" allowfullscreen="" frameborder="0" height="315" src="https://www.youtube.com/embed/xFiS4MqdjF0" width="560"></iframe></div>
Davy Wybiralhttp://www.blogger.com/profile/04401873536119552162noreply@blogger.comtag:blogger.com,1999:blog-6946125878559207247.post-55407307696790652102018-12-16T09:40:00.000-08:002018-12-16T09:40:19.201-08:00Nordic Thingy:52 Dev Kit (First impression)Today I'm playing around with a Nordic Thingy:52 Bluetooth 5 development kit from Nordic Semiconductor.<br />
<div style="text-align: center;">
<br /></div>
<div style="text-align: center;">
<iframe allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" allowfullscreen="" frameborder="0" height="315" src="https://www.youtube.com/embed/DBMgBBJWjoo" width="560"></iframe></div>
Davy Wybiralhttp://www.blogger.com/profile/04401873536119552162noreply@blogger.comtag:blogger.com,1999:blog-6946125878559207247.post-74750824163040346472018-12-10T13:50:00.000-08:002018-12-10T13:50:13.304-08:00Build your own IoT Device Hub | Bluetooth | LoRaWAN | TutorialIn this video I show how easy it is to build an Internet of Things device hub using only a <a href="https://www.espruino.com/Pixl.js">Pixl.js</a> and a little bit of Javascript code. To demonstrate I control a few devices using Bluetooth Low Energy and LoRa (<b>Lo</b>ng <b>Ra</b>nge radio).<br />
<div style="text-align: center;">
<br /></div>
<div style="text-align: center;">
<iframe allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" allowfullscreen="" frameborder="0" height="315" src="https://www.youtube.com/embed/d5Zjljj-xpM" width="560"></iframe></div>
Davy Wybiralhttp://www.blogger.com/profile/04401873536119552162noreply@blogger.comtag:blogger.com,1999:blog-6946125878559207247.post-12186886620813703032018-12-01T13:07:00.000-08:002018-12-01T13:07:31.245-08:00Getting Started with GPS Modules | Tracking Device | TutorialToday I took a GPS module and a microcontroller for a walk in the park and wrote a few lines of code to show my GPS coordinates in real-time.
<br />
<div style="text-align: center;">
<br /></div>
<div style="text-align: center;">
<iframe allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" allowfullscreen="" frameborder="0" height="315" src="https://www.youtube.com/embed/9284ObR7Lo8" width="560"></iframe></div>
Davy Wybiralhttp://www.blogger.com/profile/04401873536119552162noreply@blogger.comtag:blogger.com,1999:blog-6946125878559207247.post-2994991847054710222018-11-24T09:39:00.004-08:002018-11-24T09:41:48.865-08:00Concurrency on the Internet of Things (Arduino, MicroPython, Espruino)In this presentation I talk about what concurrency actually is, why it matters for Internet of Things applications, and which platforms are best at handling it.<br />
<br />
<div style="text-align: center;">
<iframe allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" allowfullscreen="" frameborder="0" height="315" src="https://www.youtube.com/embed/RCxKfVim-Xg" width="560"></iframe></div>
Davy Wybiralhttp://www.blogger.com/profile/04401873536119552162noreply@blogger.comtag:blogger.com,1999:blog-6946125878559207247.post-89911550387652185012018-10-19T19:09:00.002-07:002018-12-01T13:08:09.649-08:00Experimenting with Electric PaintJust recently I got my hands on some electrically conductive paint and decided to put it to the test. It functions well for creating resistive elements like custom potentiometers, and also seems to work really well for capacitive touch elements. At the end of the video I painted a small patch of it on the side of my monitor to add a touch button that can be programmed using a small Python script (included in the video description).<br />
<br />
Anyway, here it is:<br />
<br />
<div style="text-align: center;">
<iframe allow="autoplay; encrypted-media" allowfullscreen="" frameborder="0" height="315" src="https://www.youtube.com/embed/ljHkFGn_chg" width="560"></iframe></div>
Davy Wybiralhttp://www.blogger.com/profile/04401873536119552162noreply@blogger.comtag:blogger.com,1999:blog-6946125878559207247.post-4289081358965124542018-10-12T08:29:00.000-07:002018-10-17T20:15:34.223-07:00LoRa IoT Network Programming | RYLR896Hey everyone, so I just got some LoRa modules from REYAX to experiment with long range network applications and these things are so cool! So far I've made a long range security alarm, a button to water plants on the other side of my property, and some bridge code to interact with IP and BLE networks.<br />
<br />
Just thought I'd do a quick video update on this stuff:<br />
<div style="text-align: center;">
<br /></div>
<div style="text-align: center;">
<iframe allow="autoplay; encrypted-media" allowfullscreen="" frameborder="0" height="315" src="https://www.youtube.com/embed/IStuUv9eAmE" width="560"></iframe><br />
<br />
<div style="text-align: left;">
The module I wrote is part of the Espruino collection now: <a href="https://www.espruino.com/RYLR">https://www.espruino.com/RYLR</a><br />
<br />
I got these LoRa devices from REYAX: <a href="https://reyax.com/products/rylr896/">https://reyax.com/products/rylr896/</a><br />
<br />
They seem to only sell them on e-bay right now: <a href="https://www.ebay.com/itm/REYAX-RYLR896-Lora-module-SX1276-UART-Interface-868MHz-915MHz-Antenna-AT-command/181562403752?hash=item2a45f66ba8:g:h0QAAOSw9~5ZVKTx" target="_blank">RYLR896</a></div>
<div style="text-align: left;">
</div>
</div>
Davy Wybiralhttp://www.blogger.com/profile/04401873536119552162noreply@blogger.comtag:blogger.com,1999:blog-6946125878559207247.post-19173835350550970832018-10-07T11:38:00.002-07:002018-10-07T11:38:56.705-07:00DIY Pumpkin Bluetooth StereoIt's October and Halloween is my favorite holiday so to celebrate I built this Jack-o-lantern Bluetooth stereo out of a real pumpkin. It sounds great and should be really easy to scare people with (nobody expects the Jack-o-lantern to talk to them).<br />
<br />
Check it out:<br />
<br />
<div style="text-align: center;">
<iframe allow="autoplay; encrypted-media" allowfullscreen="" frameborder="0" height="315" src="https://www.youtube.com/embed/i7MiFi4NWJI" width="560"></iframe></div>
Davy Wybiralhttp://www.blogger.com/profile/04401873536119552162noreply@blogger.comtag:blogger.com,1999:blog-6946125878559207247.post-13405170942120095612018-09-28T08:20:00.005-07:002018-09-28T08:20:52.111-07:00Building a Programmable Laser TurretUsing only a couple of servos, a laser module, some hot glue, and a microcontroller of your choice, you can easily build your own laser turret to annoy your cat.<br />
<div style="text-align: center;">
<br /></div>
<div style="text-align: center;">
<iframe allow="autoplay; encrypted-media" allowfullscreen="" frameborder="0" height="315" src="https://www.youtube.com/embed/Wnu5vog2dqU" width="560"></iframe></div>
Davy Wybiralhttp://www.blogger.com/profile/04401873536119552162noreply@blogger.comtag:blogger.com,1999:blog-6946125878559207247.post-34488016583225221312018-09-21T14:46:00.000-07:002018-09-21T14:46:01.459-07:00Running a Python Web Server on a Microcontroller <div style="text-align: left;">
I built my own RGB smart light that can be controlled with an HTTP API using only a little bit of Python code and a <a href="https://pycom.io/product/wipy-3-0/" target="_blank">WiPy 3.0</a>.</div>
<div style="text-align: center;">
<br /></div>
<div style="text-align: center;">
<iframe allow="autoplay; encrypted-media" allowfullscreen="" frameborder="0" height="315" src="https://www.youtube.com/embed/idiCndlPa-k" width="560"></iframe></div>
Davy Wybiralhttp://www.blogger.com/profile/04401873536119552162noreply@blogger.comtag:blogger.com,1999:blog-6946125878559207247.post-15939851782596324302018-09-19T08:11:00.003-07:002018-09-19T08:11:52.824-07:00Internet of Things Development Board: FireBeetle ESP32<div>
</div>
This is an IoT development board for the ESP32 that can be programmed using the <a href="https://github.com/espressif/arduino-esp32" target="_blank">Arduino IDE</a>, <a href="https://github.com/micropython/micropython/tree/master/ports/esp32" target="_blank">MicroPython</a>, or JavaScript using <a href="http://www.espruino.com/ESP32" target="_blank">Espruino</a>.<br />
<div style="text-align: center;">
<br /></div>
<div style="text-align: center;">
<iframe allow="autoplay; encrypted-media" allowfullscreen="" frameborder="0" height="315" src="https://www.youtube.com/embed/p3kkSOx70LA" width="560"></iframe></div>
Davy Wybiralhttp://www.blogger.com/profile/04401873536119552162noreply@blogger.comtag:blogger.com,1999:blog-6946125878559207247.post-67744755888591194902018-09-13T05:44:00.002-07:002018-09-13T05:44:35.760-07:00Learn to Solder KitsThese Learn to Solder kits from Rocket Dept. are a great way to teach your youngsters about soldering and basic electronics. One of them controls three LEDs with push buttons, one is a large RGB LED connected to three potentiometers so you can customize the color, one is a bug that vibrates to walk around, and the other is a firefly in a jar.<br />
<br />
<div style="text-align: center;">
<iframe allow="autoplay; encrypted-media" allowfullscreen="" frameborder="0" height="315" src="https://www.youtube.com/embed/mOiS6gmuTsY" width="560"></iframe></div>
<div style="text-align: center;">
<br /></div>
Davy Wybiralhttp://www.blogger.com/profile/04401873536119552162noreply@blogger.comtag:blogger.com,1999:blog-6946125878559207247.post-37218468015219136742018-09-05T17:16:00.003-07:002018-09-05T17:16:55.089-07:00Puck.js: Javascript+Bluetooth===Awesome<span style="background-color: white; color: #111111; font-family: "roboto" , "arial" , sans-serif; font-size: 14px; white-space: pre-wrap;">Introducing Puck.js. The adorable Bluetooth-enabled microcontroller that you can program with Javascript.</span>
<br />
<div style="text-align: center;">
<span style="background-color: white; color: #111111; font-family: "roboto" , "arial" , sans-serif; font-size: 14px; white-space: pre-wrap;"><br /></span></div>
<div style="text-align: center;">
<br /></div>
<div style="text-align: center;">
<iframe allow="autoplay; encrypted-media" allowfullscreen="" frameborder="0" height="315" src="https://www.youtube.com/embed/XXXjMwBhaXA" width="560"></iframe></div>
Davy Wybiralhttp://www.blogger.com/profile/04401873536119552162noreply@blogger.com