<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom">
<channel>
<title>PyRasp blog</title>
<link>https://pyrasp.com/blog</link>
<atom:link href="https://pyrasp.com/blog/feed.xml" rel="self" type="application/rss+xml" />
<description>How PyRasp works under the hood: simulating a Raspberry Pi’s circuits, GPIO and Python in the browser.</description>
<language>en</language>
<item><title>Why I built a Raspberry Pi simulator</title><link>https://pyrasp.com/blog/why-i-built-pyrasp</link><guid isPermaLink="true">https://pyrasp.com/blog/why-i-built-pyrasp</guid><pubDate>Sat, 17 Oct 2026 00:00:00 GMT</pubDate><description>I wanted to go deeper into Raspberry Pi hardware without the time or money it takes, so I built a simulator that solves the actual circuit.</description><content:encoded><![CDATA[<p>I'm a backend engineer. I've wanted to go deeper into Raspberry Pi hardware for a long time, but between work and personal life I never had the time, or the budget, to keep buying parts, wiring them up and working out why they didn't behave.</p>
<p>So I built the thing I wanted: a simulator that gets the electrical side right enough that what I learn in it carries over to a real Pi.</p>
<h2 id="what-right-enough-means">What &quot;right enough&quot; means</h2>
<p>A lot of simulators treat a pin as on or off. PyRasp solves the circuit instead. Every step runs nodal analysis on a netlist of resistors, sources and diodes, so an LED's brightness comes from the current through it, and a GPIO pin sags when you load it, because it's a source behind about 40 Ω.</p>
<p>That also means you can get things wrong the way you would on a bench. Pull more than 16 mA from a pin and you get a warning; pull more than 50 mA for half a second and the pin is damaged for the rest of the run.</p>
<h2 id="real-python-real-libraries">Real Python, real libraries</h2>
<p>Your <code>main.py</code> runs in CPython in the browser, with the real gpiozero library. RPi.GPIO, smbus2, spidev and the rest talk to simulated I2C, SPI, UART and 1-Wire buses, so a sensor driver reads registers the way it would on hardware.</p>
<h2 id="what-s-next">What's next</h2>
<p>It's a DC solver today: no capacitors or inductors yet. The next big piece is a transient solver, checked against ngspice, so RC timing and the spike a relay coil makes when it switches off can be simulated too.</p>
<p>You can <a href="https://pyrasp.com/try">try it without an account</a>. If you've built these circuits on a real Pi and something behaves differently in PyRasp, I'd like to hear about it.</p>]]></content:encoded></item>
</channel>
</rss>
