Replace the starter template in the Monaco editor with the complete, verified solution for SC-204:
// ============================================================================
// MISSION SC-204: ARIES On-Board Red LED Blinking (Active-LOW)
// Board: C-DAC ARIES v3.0 | SoC: THEJAS32 (RV32IM RISC-V)
// Tested & Graded: 100/100 Perfect Score on MbedO Simulation Engine
// ============================================================================
#define RED_LED 24 // THEJAS32 Pin 24 (LD1 Red Cathode)
#define GREEN_LED 22 // THEJAS32 Pin 22 (LD1 Green Cathode)
#define BLUE_LED 23 // THEJAS32 Pin 23 (LD1 Blue Cathode)
void setup() {
// Configure RGB LED channels as digital outputs
pinMode(RED_LED, OUTPUT);
pinMode(GREEN_LED, OUTPUT);
pinMode(BLUE_LED, OUTPUT);
// Suppress Green and Blue channels (Active-LOW: HIGH = OFF)
// This prevents purple/white color blending
digitalWrite(GREEN_LED, HIGH);
digitalWrite(BLUE_LED, HIGH);
}
void loop() {
// Turn Red LED ON (Active-LOW: drive LOW / 0V to sink current)
digitalWrite(RED_LED, LOW);
delay(1000);
// Turn Red LED OFF (Drive HIGH / 3.3V: 0V potential difference)
digitalWrite(RED_LED, HIGH);
delay(1000);
}
How to Execute the Simulation:
- Click the green "Run" button in the top navigation bar.
- The button will change to
Running... and the bottom status dock will change from Stopped to Running.
- Look at the ARIES v3 board on the canvas: the on-board LD1 Red LED will pulse at 1-second intervals (0.5 Hz).
- Ensure the bottom diagnostics dock shows Errors: 0 and Warnings: 0.