Hello World (Blink LED) Tutorial
The first step in the hardware world is always to blink an LED. In this tutorial you will learn the basic syntax of JARU and discover one of its best features: write the code once and test it both in the Windows simulator and on your physical ESP32 board.
What you need
- JARU IDE installed on your PC — you can complete the entire tutorial with just this.
- (Optional) An ESP32 board and a USB cable for the final deployment.
Step 1: The code
In JARU we interact with hardware by importing modules. Open JARU IDE, create a new file called blink.aru and write the following code:
// Import the GPIO module to control the pins
use GPIO
println("Starting Hello World...");
// 1. Pin setup
// Configure pin 2 (where the built-in LED usually is) as output
GPIO.pinmode(2, GPIO.OUTPUT);
println("Hardware configured. Starting loop...");
// 2. Main loop
while (true)
// Turn LED on
GPIO.write(2, HIGH);
pause(500); // Wait 500 milliseconds
// Turn LED off
GPIO.write(2, LOW);
pause(500); // Wait another 500 milliseconds
end
Most ESP32 boards have a built-in LED connected to GPIO 2. If your board uses a different pin, change it in the GPIO.pinmode call.
What each part does
use GPIO imports the general-purpose input/output module. Without this line, the GPIO.* functions will not be available.
GPIO.pinmode(2, GPIO.OUTPUT) configures pin 2 as a digital output. This function must always be called before writing to a pin.
GPIO.write(2, GPIO.HIGH) / GPIO.write(2, GPIO.LOW) turn the LED on and off by writing a high or low level to the pin.
pause(500) halts execution for 500 ms, creating the blinking effect.
Step 2: Simulation on Windows
One of the great advantages of JARU is its built-in Virtual Machine. You can run this code directly on your computer without any hardware connected.
- Open the GPIO Simulator from the IDE's Build → GPIO Sim menu.
- Add pin 2 manually using the New GPIO button.
- Attach an LED device card to pin 2 from the device panel.
- Click Run to execute the program in the VM.
- Watch the output console: you will see the
printlnmessages confirming the system has started correctly. - Look at the LED card in the simulator: the indicator will turn on and off every 500 ms. You are simulating hardware directly on Windows!

- Output console
- GPIO Simulator
Starting Hello World...
Hardware configured. Starting loop...
Pin 2 will appear in the table with direction Output and type Digital. The LED card will show the indicator alternating between on and off every half second.
Step 3: Deploying to the ESP32
Once you have verified that the logic works in the simulator, moving it to real hardware is a single click away. You do not need to change a single line of code.
- Connect your ESP32 to the PC's USB port.
- In JARU IDE, select your board's COM port from the toolbar dropdown.
- Click the Upload Program button.
- Wait for the flashing process to finish — the console will show the progress.
- The physical LED on your ESP32 will start blinking exactly as it did in the simulator.
This is the core philosophy of JARU: develop and debug on the Windows VM, then deploy to hardware with full confidence once the logic is verified.
Extra challenge
Change the pause(500) values to pause(100) and run the code first in the Windows simulator. Notice how much faster the pin 2 indicator blinks on screen. Now flash it to the ESP32 and check the result in the real world.
Feeling adventurous? Try making the LED blink three times quickly and then pause for a long time — like the Morse code for the letter S (· · ·).
Summary
In this tutorial you learned how to import the GPIO module, configure a pin as output with GPIO.pinmode, write digital values with GPIO.write, use pause to control timing, and test the same code on the Windows VM and a real ESP32 without any modifications.
The next tutorial introduces reading digital inputs with buttons and interrupts.