The content below is taken from the original (Test Raspberry Pi Code on Your Primary Computer with VirtualBox and a Bit of Tweaking), to continue reading please visit the site. Remember to respect the Author & Copyright.
The Raspberry Pi is great because it’s a low cost way to test all sorts of crazy electronics ideas, but sometimes you might want to test before you test. Virtual machines are a great way to do so, and Grant Winney has a guide for setting one up using VirtualBox.
The idea here is that you don’t always want to sit around an actual Raspberry Pi testing code. A virtual machine means you can work off your primary computer, then transfer that code to the Pi later on, knowing it’ll work. In this guide, Winney uses a Debian build to get around limitations with Raspbians, installs Python, then sets up the Raspberry Pi GPIO for testing. It’s a clever way to code from your primary computer when you don’t want to set up the Pi. Head over to Winney’s site for the full guide.
How to Create a Raspberry Pi Virtual Machine in VirtualBox | Grant Winney