Home / Learn Embedded C / How This Course Works (and the Live Sandbox)

How This Course Works (and the Live Sandbox)

How to use the Try it boxes, the virtual board, and the progress tracker.

In shortHow to use the Try it boxes, the virtual board, and the progress tracker.

What's actually going on

What happens when you press RunYour edited C codeSent to a Web Worker(safe, separate…JSCPP interpretercompiles and runs itHardware calls become[GPIO]/[UART]/[ADC]/…Sandbox renders thevirtual board +…
What happens when you press Run

The basic idea

Every lesson mixes short theory with a "Try it" box: real C you can edit and run instantly, right in the page.

Why this comes up

Reading about GPIO or interrupts only gets you so far. Running real code, breaking it on purpose, and fixing it is how the patterns actually stick.

The mechanics

Each Try it box sends your code to a sandboxed C interpreter running in a Web Worker. Console output (printf) is shown as-is. Calls that represent hardware (GPIO_WRITE, DELAY_MS, UART_WRITE, ADC_READ, PWM_WRITE, TIMER_TICK) are simulated and shown in a "virtual board" panel above the console output.

Where it is used

  • Self-paced learning
  • Bootcamp-style courses
  • Interview practice

Try it

Try breaking something on purposeC: edit and run

Change the 5 to a 10, or the += to -=, and press Run again to see how the output changes.

The safety net for infinite loops

Real microcontroller code almost always has a main loop that runs forever: while(1) { ... }. That is completely normal and expected. This sandbox lets your code run for about 3 seconds, then automatically stops it so your browser tab never hangs. Seeing "Stopped after 3 seconds" is not a bug — it is exactly what should happen for a correct superloop.

Tracking your progress

Tip:If an example will not compile, read the error message first — JSCPP reports real C syntax/type errors, same as a real compiler would, just in simpler wording.

A few advanced constructs are reference-only

This course's interpreter is small and educational, not a full compiler. A handful of advanced constructs (structs, unions, function pointers, and a couple of others) are real, correct C that this particular sandbox cannot execute. Where that happens, the lesson clearly labels the listing "reference only — not runnable in this sandbox" and still gives you a runnable example that demonstrates the same idea a different way.

Try it: a timer tick marker in the virtual board

Using TIMER_TICK to mark time passing in a loopC: edit and run

TIMER_TICK is another simulated call this sandbox understands — it shows up as a timer event in the virtual board, just like GPIO_WRITE shows an LED.

Quick check

1. What does it mean if a "Try it" box says "Stopped after 3 seconds"?