{
  "id": "MmsOiQBwua9iEdH1qtrBe0O2n1IbA1Wgo77eonnn",
  "createdBy": "15sg55y5KVFu",
  "dateCreated": 1689064431903,
  "name": "Arduino Programming with BlockDuino (with AVR8js-Sim)",
  "meta": {
    "logo": "https://raw.githubusercontent.com/edrys-labs/lab-avr8js-simulation/main/media/blockduino.png",
    "description": "Embark on an exciting journey into the world of Arduino and physical computing with our introductory course designed for 5th grade students and above. Discover how to bring your ideas to life as you learn to program and control electronic components. This interactive course is divided into three engaging rooms, each offering hands-on activities with real-time feedback. Start with basic programming concepts, advance through controlling inputs and outputs, and culminate in creating dynamic light displays. Join us to unleash your creativity and technological skills!",
    "selfAssign": true,
    "defaultNumberOfRooms": "1"
  },
  "members": {
    "teacher": [],
    "student": []
  },
  "modules": [
    {
      "url": "https://edrys-labs.github.io/module-markdown-it/index.html",
      "config": "# Introduction to Arduino Programming and Physical Computing\nArduino programming provides an accessible gateway into the world of electronics and programming. At its core, Arduino is a microcontroller-based platform that allows users to interact with various electronic components through easy-to-use software and hardware. It's ideal for hobbyists, artists, and students to prototype and build interactive projects.\nPhysical computing means building interactive physical systems through the use of software and hardware that can sense and respond to the analog world. In Arduino projects, this often involves reading inputs (like pressing a button or sensing light) and controlling outputs (like activating a motor or turning on an LED).\n\nIn this initial room, students will explore the foundational concepts of Arduino programming, focusing on serial communication. Serial communication allows Arduino to communicate with your computer or other devices.",
      "showInCustom": "Lobby",
      "width": "full",
      "height": "tall"
    },
    {
      "url": "https://edrys-labs.github.io/module-blockly-duino-v2/index.html",
      "config": {
        "code": "<xml xmlns=\"https://developers.google.com/blockly/xml\">\n  <variables>\n    <variable type=\"String\" id=\"z~jQ?h:|,if+2K?];93i\">str</variable>\n  </variables>\n  <comment id=\"2;ETfl^h5@~%tt1RMhnn\" x=\"36\" y=\"136\" h=\"38\" w=\"409\">The main program starts here ...</comment>\n  <block type=\"board_serial_init\" id=\"1DYrv8.`Wj|r^k#[:_K(\" x=\"38\" y=\"88\">\n    <field name=\"SPEED\">9600</field>\n  </block>\n  <block type=\"vars_set_string\" id=\"{vo=Pn6Y;.eehBOmQD6@\" x=\"38\" y=\"188\">\n    <field name=\"VAR_SET_STRING\" id=\"z~jQ?h:|,if+2K?];93i\" variabletype=\"String\">str</field>\n    <value name=\"VALUE\">\n      <block type=\"board_serial_readStringUntil\" id=\"6*a,kO~H!:oH`9:cIU@i\">\n        <value name=\"CONTENT\">\n          <block type=\"text\" id=\"M#)2(Ugi#(Zf(K@99$xc\">\n            <field name=\"TEXT\">;</field>\n          </block>\n        </value>\n      </block>\n    </value>\n    <next>\n      <block type=\"controls_if\" id=\"#Q_JZAnKPZpZVU4EEQZ0\">\n        <value name=\"IF0\">\n          <block type=\"logic_compare\" id=\"}S/0WE6!r~|@72Xg|cpc\">\n            <field name=\"OP\">NEQ</field>\n            <value name=\"A\">\n              <block type=\"vars_get_string\" id=\"0v1[TLKKw@Bg/v/kTFi(\">\n                <field name=\"VAR_GET_STRING\" id=\"z~jQ?h:|,if+2K?];93i\" variabletype=\"String\">str</field>\n              </block>\n            </value>\n            <value name=\"B\">\n              <block type=\"text\" id=\"~-7j.]BVs(D5(MGV2WX6\">\n                <field name=\"TEXT\"></field>\n              </block>\n            </value>\n          </block>\n        </value>\n        <statement name=\"DO0\">\n          <block type=\"controls_if\" id=\"GbUj60@MB_#APosbvVsz\">\n            <mutation else=\"1\"></mutation>\n            <value name=\"IF0\">\n              <block type=\"logic_compare\" id=\"A%htWyAF0N@[];/gk[@h\">\n                <field name=\"OP\">EQ</field>\n                <value name=\"A\">\n                  <block type=\"vars_get_string\" id=\"Jw?/lsfjb|m30(?O4Qe:\">\n                    <field name=\"VAR_GET_STRING\" id=\"z~jQ?h:|,if+2K?];93i\" variabletype=\"String\">str</field>\n                  </block>\n                </value>\n                <value name=\"B\">\n                  <block type=\"text\" id=\"Us@e6PBG00.yMpja8V8X\">\n                    <field name=\"TEXT\">send</field>\n                  </block>\n                </value>\n              </block>\n            </value>\n            <statement name=\"DO0\">\n              <block type=\"board_serial_print\" id=\":/6z-!n)lsXjVix)n/Xc\">\n                <value name=\"CONTENT\">\n                  <block type=\"text\" id=\"{0j6QgyP,)S{!m^!b)Kn\">\n                    <field name=\"TEXT\">identified</field>\n                  </block>\n                </value>\n              </block>\n            </statement>\n            <statement name=\"ELSE\">\n              <block type=\"board_serial_print\" id=\"cpc=D9mbMnjMbRW^o8-4\">\n                <value name=\"CONTENT\">\n                  <block type=\"text\" id=\"Tl6@1)7jxty-q,f3mQZ;\">\n                    <field name=\"TEXT\">unknown</field>\n                  </block>\n                </value>\n              </block>\n            </statement>\n          </block>\n        </statement>\n      </block>\n    </next>\n  </block>\n</xml>",
        "runCommand": "execute",
        "board": "arduino_mega"
      },
      "studentConfig": "",
      "teacherConfig": "",
      "stationConfig": "",
      "showInCustom": "Room 1",
      "width": "full",
      "height": "huge"
    },
    {
      "url": "https://edrys-labs.github.io/module-markdown-it/index.html",
      "showInCustom": "Room 1",
      "width": "full",
      "height": "medium",
      "config": "# Introduction to Arduino Programming: Understanding Serial Communication\n\nArduino is an open-source electronics platform based on easy-to-use\nhardware and software. It's intended for anyone making interactive\nprojects. One of the fundamental aspects of Arduino programming involves\nunderstanding how to communicate with the Arduino board via serial\ncommunication, which is crucial for projects requiring data exchange\nbetween the Arduino and a computer or other devices.\n\n## Featured Code Explanation:\n\nThe code snippet provided is a simple example of using Arduino's serial\ncommunication to receive input from the user through the serial monitor\nand respond accordingly:\n\n**Breaking down the code:**\n\n\n1. **Setup Function:**\n\n    - `void setup() { ... }`\n         is a function that runs once when you start your program.\n         It is used to set up configurations or initialize settings.\n    - `Serial.begin(9600);`\n         initializes serial communication at a baud rate of 9600 bits per second.\n         This line sets up the Arduino to send and receive data at this rate, which is standard for many simple communication tasks.\n\n2. **Loop Function:**\n\n     - `void loop() { ... }`\n         is a function that continuously executes as long as the Arduino is powered on.\n         It allows the program to dynamically react to new data or conditions.\n     - `while (Serial.available() > 0) { ... }`\n         checks if there is any incoming data from the serial port.\n         `Serial.available()` returns the number of bytes (characters) available for reading from the serial buffer.\n         If it’s greater than 0, it means that data is present.\n\n3. **Reading and Responding to Data:**\n\n     - `String str = Serial.readString();`\n         reads the incoming data from the serial buffer and stores it as a string in the variable `str`.\n         This function will read the serial buffer until it's empty.\n     - The `if` statement checks if the string equals \"send\".\n         If it does, `Serial.println(\"identified\");` is executed, sending the word \"identified\" back to the serial monitor.\n      - If the string does not equal \"send\", the `else` clause executes, and `Serial.println(\"unknown\");` is sent back.\n\n## What is Serial Used For?\n\nIn Arduino projects, the serial communication is commonly used for:\n\n- **Debugging**: By sending data from the Arduino to a computer,\n  developers can monitor what is happening inside the program and\n  troubleshoot issues, similar to using `print` statements in other\n  programming languages. \n\n- **Communication**: Arduino can communicate with other devices including\n  sensors, computers, or even other Arduino boards, which is essential for\n  projects like weather stations, where data must be sent from sensors to a\n  processing display. .\n\n- **Control**: Users can send commands from a computer to the Arduino to\n   control devices connected to it, such as motors, LEDs, or relays.\n   "
    },
    {
      "url": "https://edrys-labs.github.io/module-avr8js/index.html",
      "config": {
        "modules": "<span id='simulation-time'></span>",
        "execute": "execute"
      },
      "studentConfig": "",
      "teacherConfig": "",
      "stationConfig": "",
      "showInCustom": "Room 1",
      "width": "full",
      "height": "medium"
    }
  ]
}