{
  "workbookTitle": "Girls Day - Automatic Plant Watering",
  "goalTitle": "Learning goal",
  "instructionTitle": "Task",
  "hintTitle": "Hint",
  "safetyTitle": "⚠️ Important safety rule",
  "section0Title": "0. Motivation",
  "section1Title": "1. Components & Setup",
  "section1ChecklistIntro": "Checklist for components:",
  "section1Subtitle1": "Wiring it together",
  "section1WiringHint": "Check that you have all parts:",
  "section1RelayInfo": "Why a relay? The Arduino can only switch small currents directly, but the pump needs more current. The Arduino controls the relay, and the relay switches the pump on/off.",
  "componentArduino": "Arduino Board",
  "componentMoistureSensor": "Moisture Sensor",
  "componentPump": "Water Pump",
  "componentRelay": "Relay Module",
  "componentPowerSupply": "Power Supply",
  "componentWires": "Wires",
  "componentHoses": "Hoses & Water Container",
  "componentConnectionCable": "Connection Cables",
  "componentUsbCable": "USB Cable",
  "wiringSlideshowTitle": "Wiring slideshow",
  "wiringSlideSource": "Plant workshop",
  "wiringSlideDescription": "Wiring step",
  "LLabel": "Wiring",
  "RLabel": "What does this wiring do??",
  "wiringSlideText1": "In the next steps you will need jumper wires. Take a few jumper wires now and set them aside.",
  "wiringSlideText2": "Take an Arduino Nano, a relay, and the moisture sensor. We will connect these components next.",
  "wiringSlideTextL3": "Sensor + __ Arduino D2 \nSensor - __ Arduino GND \nSensor S __ Arduino A0",
  "wiringSlideTextR3": "Pin D2 supplies power to the sensor when we want to take measurements. It is not permanently powered so that the sensor lasts longer. GND is the negative pole (ground) of the circuit. Without the connection to GND, the circuit is not closed and the sensor cannot provide stable readings. The Arduino reads the analog measurement value via A0. Based on this value, your program will later decide whether the pump should run or not.",
  "wiringSlideTextL4": "Relay DC+ __ Arduino 5V \nRelay DC- __ Arduino GND \nRelay IN __ Arduino D8",
  "wiringSlideTextR4": "The relay is powered by 5V and GND from the Arduino. Pin D8 is used to control the relay. The relay acts as a switch between the Arduino and the pump, so the Arduino can safely turn the pump on and off even though the pump needs more current than the Arduino can provide. Important: Do not connect the pump directly to the Arduino; switch it through the relay.",
  "wiringSlideText5": "This is what your setup should look like so far. Compare your wiring with the picture and check all connections before continuing.",
  "wiringSlideText6": "Cut three pieces of wire and keep them ready. You will need them in the next steps. Jumper wires are no longer used from this point on.",
  "wiringSlideText7": "Take the relay, the pump, and the adapter. We will connect the adapter to the power supply later. It is the same relay as before, but we are now working with the terminals on the other side.",
  "wiringSlideTextL8": "Pump + __ Relay NO (Normally Open) \nPump - __ Adapter - \nAdapter + __ Relay COM (Common)",
  "wiringSlideTextR8": "Here you connect the relay, pump, and adapter using the prepared wires. The relay will later switch power to the pump. The positive pole from the adapter goes through COM and NO to the pump; the negative pole from the adapter connects directly to the pump. Important: Do not use jumper wires for this connection; use the cut wires instead.",
  "wiringSlideText9": "Connect the adapter to the power supply now. Make sure plus and minus are connected correctly.",
  "wiringSlideText10": "Cut two pieces of 50 cm each from the large PVC hose roll. You will need both hose pieces for the pump.",
  "wiringSlideText11": "Connect both hose pieces to the pump. One hose goes to the pump input and the other to the pump output.",
  "wiringSlideHelp": "Note",
  "wiringSlideCurrentStatus": "Current status",
  "wiringSlideDescription1": "Jumper cables and preparation",
  "wiringSlideDescription2": "Parts overview",
  "wiringSlideDescription3": "Sensor wiring overview",
  "wiringSlideDescription4": "Sensor wiring explanation",
  "wiringSlideDescription5": "Relay wiring overview",
  "wiringSlideDescription6": "Check and verify",
  "wiringSlideDescription7": "Prepare wires",
  "wiringSlideDescription8": "Relay, pump and adapter",
  "wiringSlideDescription9": "Pump wiring",
  "wiringSlideDescription10": "Adapter to power supply",
  "wiringSlideDescription11": "Hose connection to pump",
  "slideshowBack": "← Back",
  "slideshowNext": "Next →",
  "section2Title": "2. Try the Sensor",
  "section2Subtitle1": "Task Description",
  "section2Subtitle2": "Assemble the Code",
  "ReorderHintTitle": "Guidance",
  "section2ReorderHintBody": "The sensor should be switched on, then we wait briefly until values are delivered. After that, the measurement value is read and output on the Serial Monitor. Then the sensor is switched off again. Can you figure out from this description what the code should look like?",
  "section3ReorderHintBody": "Just like in the last task, we need to read the sensor and output the measurement value on the Serial Monitor. Now we also want to add a conditional branch to decide whether the soil is dry or moist and display that on the Serial Monitor. What should the code look like for that?",
  "section4ReorderHintBody": "We want to turn the pump on first, wait for 2 seconds, and then turn it off again to test the pump. What should the code look like for that?",
  "section5ReorderHintBody": "We now want to implement the complete sequence. Even though this looks like a lot of code at first, we are really just combining everything from the previous tasks. Feel free to go back to the previous tasks and think about where the code pieces fit together. In task 3 we distinguished between two cases. In which of those two cases do we want to turn the pump on and off, and in which case do we want to do nothing?",
  "section2Subtitle3": "Upload Code",
  "section2Subtitle4": "Take Measurements",
  "section2Subtitle5": "Self-Check",
  "section2GoalText": "You understand how to read values from an analog sensor with Arduino and display them on the Serial Monitor.",
  "section2InstructionText": "Put the code blocks in the correct order so the sensor is read and the measurement value is printed.\n\nThen upload the code to the Arduino and test it with **dry** and **wet** soil.",
  "section2HintText": "Use `analogRead(SENSOR_PIN)` to read analog values. To protect the sensor, power it briefly via `SENSOR_POWER_PIN` and then switch it off again. Use `Serial.print()` and `Serial.println()` to output the value.\n\n**Tip:** Hover over the code blocks to see explanations for each line.",
  "sensorReadCodeEditorTodo": "Complete the code for reading the sensor:",
  "section2DownloadSteps": "#### Step by step: Upload sensor code to Arduino\n\n1. Click **Download sensor code (.ino)** and save the file `sensor-auslesen.ino`.\n2. Open the file in the Arduino IDE.\n3. Connect the Arduino Nano to your computer via USB.\n4. Select **Tools > Board > Arduino Nano** and the correct port.\n5. Click **Upload** and wait for **Upload complete**.\n6. Open the **Serial Monitor** (Tools > Serial Monitor, 9600 baud) – you should see numbers updating continuously.",
  "section2DownloadButton": "Download sensor code (.ino)",
  "section2MeasurementTitle": "Measurements",
  "section2MeasurementText": "Now perform both measurements:\n\n1. Place the sensor in dry soil → read and note the value on the Serial Monitor.\n2. Place the sensor in wet soil → read and note the value.\n3. Compare: Which value is higher? Why?",
  "sensorExploreDone1": "In dry soil I saw and noted a low value.",
  "sensorExploreDone2": "In wet soil I saw and noted a high value.",
  "sensorExploreDone3": "I can explain why the values differ.",
  "section2AdvancedHint": "Advanced mode migration TODO: gap-fill code editor with TODO markers.",
  "section1SafetyText": "Never switch on power without a supervisor! The power supply may only be activated together with a supervising adult.",
  "pumpCodeEditorTodo": "Write the code for pump control:",
  "moistureCodeEditorTodo": "Complete the code for moisture measurement:",
  "combinedCodeEditorTodo": "Complete the full system:",
  "moistureDone1": "I can explain SENSOR_POWER_PIN usage.",
  "moistureDone2": "I can read `analogRead(SENSOR_PIN)` into a variable.",
  "moistureDone3": "I can explain the threshold condition for dry soil.",
  "section3Title": "3. Conditional Watering",
  "section3Subtitle1": "Task Description",
  "section3Subtitle2": "Assemble the Code",
  "section3Subtitle3": "Self-Check",
  "section3Subtitle4": "Upload Code",
  "section3DownloadSteps": "#### Step by step: Upload moisture code to Arduino\n\n1. Click **Download moisture code (.ino)** and save the file `feuchtigkeit-messen.ino`.\n2. Open the file in the Arduino IDE.\n3. Connect the Arduino Nano to your computer via USB.\n4. Select **Tools > Board > Arduino Nano**.\n5. Select the correct port under **Tools > Port**.\n6. Click **Upload** and wait for **Upload complete**.\n7. Open the **Serial Monitor** and test the sensor with dry and wet soil.",
  "section3DownloadButton": "Download moisture code (.ino)",
  "section3GoalText": "You can use a threshold to decide whether the soil is dry and needs watering.",
  "section3InstructionText": "Extend your sensor code with an **if-else** branch: the program should decide based on the reading whether the soil is dry or moist, and print the result on the Serial Monitor.\n\nUse your measurements from the previous section to choose a sensible threshold.",
  "section3HintText": "Check with `if (messwert < feuchtigkeitsGrenze)` whether the soil is dry. Set a threshold, e.g. `int feuchtigkeitsGrenze = 400;`.\n\n**Tip:** Hover over the code blocks to see explanations for each line.",
  "section3AdvancedHint": "Advanced mode migration TODO: full code editor with validation feedback.",
  "section4Title": "4. Control the Pump",
  "section4Subtitle1": "Task Description",
  "section4Subtitle2": "Assemble the Code",
  "section4Subtitle3": "Self-Check",
  "section4GoalText": "You can switch digital outputs with HIGH/LOW and control the relay so the pump turns on and off safely.",
  "section4InstructionText": "Write a program that turns the pump on for exactly 2 seconds.\n\nAfter that, the pump should turn off again.",
  "section4HintText": "In this circuit, the relay is turned on with `digitalWrite(PUMP_PIN, HIGH)` and turned off with `LOW`.\n\n**Tip:** Hover over the code blocks to see explanations for each line.",
  "section4AdvancedHint": "Advanced mode migration TODO: full combined-system editor.",
  "pumpDone1": "I can explain why the relay is turned on with HIGH and turned off with LOW.",
  "pumpDone2": "I can create the 2-second watering cycle.",
  "pumpDone3": "I tested ON -> delay -> OFF order.",
  "section5Title": "5. Values & Pump",
  "section5Subtitle1": "Task Description",
  "section5Subtitle2": "Assemble the Code",
  "section5Subtitle3": "Self-Check",
  "section5Subtitle4": "Upload Code",
  "section5GoalText": "You can combine all steps into one complete watering program: measure, decide, and water precisely.",
  "section5InstructionText": "Now implement the complete sequence. The program should:\n\n1. Briefly power the sensor via `SENSOR_POWER_PIN` and read the value with `analogRead(SENSOR_PIN)`\n2. Print the reading on the Serial Monitor (`Analoger Wert: ...`)\n3. Check whether `messwert < feuchtigkeitsGrenze`\n4. If yes: turn the pump on, water for 2 seconds, then turn it off again\n5. Then wait 10 seconds\n\n**Important:** The entire program runs in an endless loop.",
  "section5HintText": "Think back to your results from the previous tasks. Now you need to put everything together in the right order. Consider when the sensor must be read and in which cases the pump should be activated or deactivated.\n\n**Tip:** Hover over the code blocks to see explanations for each line.",
  "combinedDone1": "I can combine sensor read and pump control in one algorithm.",
  "combinedDone2": "I can explain when the pump should stay off.",
  "combinedDone3": "I can explain why delay(10000) is used between cycles.",
  "section6Title": "6. Test & Finish",
  "section6DownloadTitle": "Upload code",
  "section6SafetyWarningText": "⚠️ STOP BEFORE UPLOADING\n\n**Never switch on power without a supervisor!** Before uploading, testing, or starting the pump, a supervisor must be present.",
  "section6DownloadSteps": "#### Step by step: Upload .ino to Arduino Nano\n\n1. Click the button **Download Arduino code (.ino)** and save the file `plantworkshop.ino`.\n2. Open the file in the Arduino IDE (double-click or **File > Open**).\n3. Connect the Arduino Nano to the computer via USB.\n4. In the Arduino IDE, select **Tools > Board > Arduino Nano**.\n5. Select **Tools > Port** and choose the correct COM/USB port for your Nano.\n6. Click **Upload** (arrow icon) and wait for **Upload complete** to appear.\n7. Then open the Serial Monitor (**Tools > Serial Monitor**) to see the readings and test your setup.",
  "section6DownloadButton": "Download Arduino code (.ino)",
  "section6TestChecklistTitle": "Test Checklist",
  "section6TestChecklistIntro": "Check off what you have verified:",
  "testChecklistSensorDry": "Hold sensor in dry soil - does it show low values?",
  "testChecklistSensorWet": "Place a wet finger on the sensor - does it show high values?",
  "testChecklistPumpDry": "Does the pump pump water when the soil is dry?",
  "testChecklistPumpStopsShortly": "Does the pump stop again after a short time?",
  "testChecklistMoistNoPump": "Does nothing happen when the soil is moist enough?",
  "section6TroubleshootingTitle": "Common Errors",
  "section6TroubleshootingText": "**Problem: Pump does not run**\n- Are relay, power supply, and pump connected correctly?\n- Is the power supply plugged in?\n- Does the relay click when it should switch?\n\n**Problem: Values do not change**\n- Are the sensor cables correct? (Do not swap analog and digital pins)\n\n**Problem: Pump runs constantly / does not run at all**\n- Is the threshold set correctly?\n- Does the code actually check the condition?",
  "section6BonusTitle": "Bonus Tasks (for the fast ones)",
  "section6BonusText": "If you are done and still have time:\n- Make an LED blink while pumping\n- Use multiple LEDs in different colors for different moisture levels\n- If you have your own ideas, feel free to try them out!",
  "section6CongratulationsTitle": "Congratulations!",
  "section6Congratulations": "🌟 You have built and programmed an automatic watering system!",
  "section0IntroMarkdown": "## 🌱 Welcome to the Arduino plant workshop!\nToday we will learn how to build an automatic watering system with Arduino. Using this microcontroller, we will read a moisture sensor and control a pump so that our plants get water at exactly the right time.\n\n**What you will learn:**\n- How to read sensors (measure moisture in the soil)\n- How to control electrical devices (switch pump on/off)\n- How to combine both parts (automatic watering)\n\n> **Note:** We are using Arduino, a platform that makes it easy to control hardware with code. No worries if you have never programmed before — we start from the very beginning! You can choose between a beginner mode with drag-and-drop code blocks and an advanced mode where you fill in code gaps yourself.",
  "section0SafetyMarkdown": "### Safety notes\n- **Water and electricity:** Make sure no electrical parts (except the sensor) come into contact with water.\n- **Power supply:** Use only the provided power supplies and voltage levels.\n- **If you have problems or are unsure:** Always ask for help.",
  "section1PowerWarningMarkdown": "> **⚠️ IMPORTANT SAFETY RULE:** Never switch on power without a supervisor! The power supply may only be activated together with a supervising adult.",

  "section4WiringPhaseBTitle": "Connect pump & hoses",
  "section4WiringPhaseBHint": "Before continuing to code, connect the pump and hoses now. Follow the steps in the slideshow.",

  "section4DownloadTitle": "Upload code",
  "section4DownloadSteps": "#### Step by step: Upload pump test to Arduino\n\n1. Click **Download pump test code (.ino)** and save the file `pumpe-test.ino`.\n2. Open the file in the Arduino IDE.\n3. Connect the Arduino Nano to your computer via USB.\n4. Select **Tools > Board > Arduino Nano**.\n5. Select the correct port under **Tools > Port**.\n6. Click **Upload** and wait for **Upload complete**.\n7. Watch your pump – it should run for 2 seconds and then stop.",
  "section4DownloadButton": "Download pump test code (.ino)",

  "reorderHintPumpHigh": "Set PUMP_PIN to HIGH (pump on).",
  "reorderHintPumpLow": "Set PUMP_PIN to LOW (pump off).",
  "reorderHintDelay2000": "Wait 2000 ms.",
  "reorderHintDelay10": "Wait 10 ms.",
  "reorderHintDelay10000": "Wait 10000 ms.",
  "reorderHintSensorPowerHigh": "Set SENSOR_POWER_PIN to HIGH (sensor on).",
  "reorderHintSensorPowerLow": "Set SENSOR_POWER_PIN to LOW (sensor off).",
  "reorderHintAnalogRead": "Read the analog value from SENSOR_PIN and store it as messwert.",
  "reorderHintMesswertCheck": "Check: Is messwert less than feuchtigkeitsGrenze?",
  "reorderHintSerialPrint": "Print text to Serial Monitor without line break.",
  "reorderHintSerialPrintln": "Print text or value to Serial Monitor with line break.",
  "reorderHintFeuchtigkeitsGrenze": "Create an integer variable for the moisture threshold.",
  "reorderHintIfBlock": "Start an if-block.",
  "reorderHintElseBlock": "End the if-block and start the else branch.",
  "reorderHintCloseBrace": "Close the block.",

  "advHintSensorPower": "Power the sensor on/off via SENSOR_POWER_PIN",
  "advHintDelay": "delay after switching on is missing",
  "advHintAnalogRead": "analogRead() is missing",
  "advHintSerial": "Serial output is missing",
  "advHintThreshold": "Set feuchtigkeitsGrenze as a variable",
  "advHintIf": "if-else condition is missing",
  "advHintCondition": "if condition with messwert < feuchtigkeitsGrenze is missing",
  "advHintPumpOn": "Turn pump on (HIGH)",
  "advHintPumpOff": "Turn pump off (LOW)",
  "advHintPumpDelay": "Wait 2 seconds (delay(2000))",
  "advHintPumpControl": "Pump control (HIGH/LOW) incomplete",
  "advHintLoopDelay": "Wait delay(10000) is missing",
  "advSuccessSensorRead": "✅ Very good! Sensor on/off, measurement and Serial output are present.",
  "advSuccessMoisture": "✅ Very good! You have all important parts: threshold, sensor read, if-else and Serial output.",
  "advSuccessPump": "✅ Perfect! The pump is controlled correctly.",
  "advSuccessCombined": "🎉 Excellent! The system is complete: threshold, sensor, condition, pump and wait time."
}