Ever had a brilliant idea for an Arduino project while sitting comfortably on your couch, only to realise that your Arduino board, breadboard and jumper wires are buried somewhere in a drawer? Perhaps you simply want to test your code without repeatedly plugging and unplugging USB cables—or conducting an archaeological expedition to find one.
Well, here's some good news: you can run a fully virtual Arduino right on your Mac's desktop, completely offline, by pairing the Arduino IDE with PICSimLab.
Even better, PICSimLab offers native Apple Silicon (arm64) support, making it suitable for M1, M2, M3 and M4 Macs.
In this tutorial, we'll walk through setting up your virtual Arduino, running your first sketch and troubleshooting some common issues.
No hardware. No tangled wires. No accidentally short-circuited components. What's not to love?
1. Download PICSimLab (and Convince macOS to Let You Use It)
First, head over to the PICSimLab download page and download the macOS Apple Silicon (arm64) .dmg file.
Depending on your macOS version and the application's signing status, Gatekeeper may greet you with the rather dramatic warning:
"Not Opened — Apple could not verify..."
Apparently, even virtual electronics need security clearance.
If you have downloaded the application from its official source and are satisfied that it is safe, follow these steps:
- Click Done on the warning pop-up. Resist the temptation to click Move to Bin.
- Open System Settings > Privacy & Security, scroll down to the Security section and click Open Anyway next to the PICSimLab message.
- Once the disk image mounts, drag PICSimLab into your Applications folder.
- Launch PICSimLab from Applications.
If macOS presents the same warning for the application itself, repeat the process through Privacy & Security.
Congratulations! You've successfully negotiated with your operating system. Now we can get to the electronics.
2. Export Your Sketch from the Arduino IDE
PICSimLab does not open .ino sketch files directly. Instead, it loads compiled .hex firmware files—the same machine code that would ordinarily be uploaded to a physical Arduino Uno.
Open the Arduino IDE and paste in the following test sketch. It blinks the built-in LED ten times and prints status updates to the serial terminal.
void setup() { pinMode(LED_BUILTIN, OUTPUT); Serial.begin(9600); for (int i = 1; i <= 10; i++) { Serial.print("Blink: "); Serial.println(i); digitalWrite(LED_BUILTIN, HIGH); Serial.println("LED is ON"); delay(500); digitalWrite(LED_BUILTIN, LOW); Serial.println("LED is OFF"); delay(500); } Serial.println("Blinking complete."); } void loop() { }
Nothing particularly groundbreaking here, but blinking an LED is to embedded systems what Hello, World! is to programming. It's practically a rite of passage.
Compiling the sketch
Now, let's turn that code into a .hex file:
- Select your target board by navigating to Tools > Board > Arduino AVR Boards > Arduino Uno.
- Press Option + Command + S, or navigate to Sketch > Export Compiled Binary.
- Press Command + K, or select Sketch > Show Sketch Folder, to open your project folder in Finder.
- Navigate to
build/arduino.avr.unoand locate the file ending in.ino.hex.
Don't worry about selecting a serial port. There is no physical Arduino connected to your Mac, which is, after all, the entire point of this tutorial.
3. Fire Up the Virtual Arduino and Serial Terminal
Now for the fun part.
Open PICSimLab and select Board > Arduino Uno from the menu bar.
You should now have a virtual Arduino sitting on your desktop. Unlike its physical counterpart, this one cannot mysteriously disappear beneath a pile of papers.
Since our sketch uses Serial.println() to print messages, we need to connect a virtual serial terminal to see what the Arduino is saying.
Connecting the virtual terminal
- Navigate to Modules > Spare parts to open PICSimLab's virtual workspace.
- Select Add > Others > IO Virtual Term and place the terminal onto the canvas.
- Connect the terminal's RX pin to Pin 1 (TX) on the virtual Arduino Uno.
- Ensure that the terminal's baud rate is set to 9600, matching the value specified in our sketch.
- Return to the main PICSimLab window and select File > Load Hex.
- Locate and open your compiled
.ino.hexfile.
Watch the virtual Arduino's built-in LED on Pin 13. It should begin blinking while the terminal displays the following messages:
Blink: 1 LED is ON LED is OFF Blink: 2 LED is ON LED is OFF ... Blink: 10 LED is ON LED is OFF Blinking complete.
After ten blinks, the LED will remain off and the messages will stop.
And there you have it: a functioning Arduino project without a single physical component in sight. Your USB ports can finally enjoy some well-deserved rest.
4. A Quick Tip: Spend More Time Coding and Less Time Clicking
One of the greatest advantages of working with a virtual Arduino is how quickly you can test changes to your code.
Whenever you modify your sketch:
- Save your changes in the Arduino IDE.
- Press Option + Command + S to export the updated binary.
- Switch back to PICSimLab.
- Select File > Reload Last.
PICSimLab will reload your compiled firmware, allowing you to test your updated code without reconnecting cables or uploading it to a physical board.
The only thing you'll be debugging is your code—not whether that suspicious-looking USB cable actually supports data transfer.
5. Common Errors and How to Fix Them
Of course, this wouldn't be a technology tutorial without a few things potentially going wrong. Even virtual hardware has its moments.
Missing FQBN (Fully Qualified Board Name)
Error: Compilation error: Missing FQBN (Fully Qualified Board Name)
The Arduino IDE does not know which board you are compiling your sketch for.
The fix: Navigate to Tools > Board > Arduino AVR Boards > Arduino Uno and select the board before exporting your compiled binary again.
You may first need to install the Arduino AVR Boards package through the Boards Manager if it is not already installed.
Too Many Files in the Build Folder
When you open the build folder, you may encounter several files, including:
.ino.hex.with_bootloader.hex.elf.eep
Which one should you choose?
The fix: Load the standard .ino.hex file into PICSimLab. This contains the compiled application firmware without the additional bootloader.
Not every file with an unfamiliar extension needs to become a science experiment.
Board Mismatch or Unpredictable Behaviour
If your simulated Arduino behaves strangely, you may have compiled your sketch for the wrong board.
The fix: Ensure that the board selected in PICSimLab matches the board selected in the Arduino IDE.
In our case, both should be configured for the Arduino Uno.
An Arduino Mega and an Arduino Uno may belong to the same family, but that doesn't make them identical twins.
Nothing Appears in the Virtual Terminal
If your terminal remains suspiciously quiet or displays a collection of unintelligible characters, check the following:
- Pin connection: The terminal's RX pin must be connected to Pin 1 (TX) on the Arduino Uno. Connecting RX to RX is essentially asking two people to listen to each other without either of them speaking.
- Baud rate: Ensure the virtual terminal is configured for 9600 baud, matching
Serial.begin(9600). - Timing: Our sketch runs entirely within
setup()and completes in approximately ten seconds. If you connected the terminal after loading the firmware, you may have missed the entire performance.
The fix: After verifying the connections and baud rate, press the Reset button on the virtual Arduino to restart the sketch.
Sluggish Simulation or High CPU Usage
If the simulation is running slowly or your Mac suddenly decides to impersonate a small aircraft, check the clock configuration.
The fix: Ensure that the Clock (MHz) setting in PICSimLab is configured to 16.0 MHz, the standard clock frequency of the Arduino Uno.
If the problem persists, close unnecessary simulations or resource-intensive applications.
Final Thoughts: Who Says You Need Hardware?
Virtual Arduino development is an excellent way to learn embedded systems programming, experiment with electronic circuits, test code and prototype ideas without immediately investing in physical components.
For students, educators and hobbyists, the combination of the Arduino IDE and PICSimLab provides an accessible environment for exploring embedded systems. It is particularly useful when hardware is unavailable or when you simply want to experiment from the comfort of your couch.
Of course, simulation is not a complete replacement for physical hardware. Real-world electronics introduce challenges such as electrical noise, power limitations, faulty connections and component tolerances that a simulator may not fully reproduce.
Nevertheless, simulation is an excellent place to start.
So, the next time inspiration strikes and your Arduino is nowhere to be found, don't let that stop you. Open your Mac, launch PICSimLab and start building.
After all, the absence of hardware shouldn't be a barrier to ingenuity.
Happy coding and may your LEDs blink exactly when you tell them to.

Discussion · 0