Warning, /education/gcompris/src/activities/analog_electricity/TutorialDataset.qml is written in an unsupported language. File is not indexed.
0001 /* GCompris - Dataset.qml 0002 * 0003 * SPDX-FileCopyrightText: 2020 Aiswarya Kaitheri Kandoth <aiswaryakk29@gmail.com> 0004 * 0005 * Authors: 0006 * Bruno Coudoin <bruno.coudoin@gcompris.net> (Gtk+ version) 0007 * Rudra Nil Basu <rudra.nil.basu.1996@gmail.com> (DigitalElectricity) 0008 * Aiswarya Kaitheri Kandoth <aiswaryakk29@gmail.com> (AnalogElectricity) 0009 * 0010 * SPDX-License-Identifier: GPL-3.0-or-later 0011 */ 0012 import QtQuick 2.12 0013 0014 QtObject { 0015 property var battery: { 0016 'imageName': 'battery.svg', 0017 'componentSource': 'Battery.qml', 0018 'width': 0.06, 0019 'height': 0.15, 0020 'toolTipText': qsTr("Battery"), 0021 'type': "v" 0022 } 0023 0024 property var bulb: { 0025 'imageName': 'bulb.svg', 0026 'componentSource': 'Bulb.qml', 0027 'width': 0.15, 0028 'height': 0.15, 0029 'toolTipText': qsTr("Bulb"), 0030 'type': "r" 0031 } 0032 0033 property var switch1: { 0034 'imageName': 'switch_off.svg', 0035 'componentSource': 'Switch1.qml', 0036 'width': 0.15, 0037 'height': 0.06, 0038 'toolTipText': qsTr("Switch"), 0039 'type': "r" 0040 } 0041 0042 property var switch2: { 0043 'imageName': 'switch2_off.svg', 0044 'componentSource': 'Switch2.qml', 0045 'width': 0.15, 0046 'height': 0.09, 0047 'toolTipText': qsTr("3 points switch"), 0048 'type': "r" 0049 } 0050 0051 property var connection: { 0052 'imageName': 'connection_icon.svg', 0053 'componentSource': 'Connection.qml', 0054 'width': 0.15, 0055 'height': 0.06, 0056 'toolTipText': qsTr("Simple connector") 0057 } 0058 0059 property var rheostat: { 0060 'imageName': 'rheostat_icon.svg', 0061 'componentSource': 'Rheostat.qml', 0062 'width': 0.09, 0063 'height': 0.15, 0064 'toolTipText': qsTr("Rheostat"), 0065 'type': "r" 0066 } 0067 0068 property var resistor: { 0069 'imageName': 'resistor.svg', 0070 'componentSource': 'Resistor.qml', 0071 'width': 0.15, 0072 'height': 0.06, 0073 'toolTipText': qsTr("Resistor"), 0074 'type': "r" 0075 } 0076 0077 property var redLed: { 0078 'imageName': 'red_led_off.svg', 0079 'componentSource': 'RedLed.qml', 0080 'width': 0.15, 0081 'height': 0.09, 0082 'toolTipText': qsTr("Red LED"), 0083 'type': "d" 0084 } 0085 0086 // List of all components 0087 property var componentList: [battery, bulb, switch1, switch2, connection, rheostat, resistor, redLed] 0088 0089 // tutorial levels 0090 property var tutorialLevels: [ 0091 // level 1 0092 { 0093 inputComponentList: [], 0094 playAreaComponentList: [bulb, battery], 0095 determiningComponentsIndex: [0], 0096 answerKey: ["bulbGlows"], 0097 wires: [ [0, 1, 1, 0] ], // from component_index, from terminalNumber, to component_index, to terminalNumber 0098 playAreaComponentPositionX: [0.3, 0.6], 0099 playAreaComponentPositionY: [0.1, 0.3], 0100 introMessage: [ 0101 qsTr("A bulb glows when current travels through it. If there is a gap in the path, the current cannot travel and the electrical devices will not work."), 0102 qsTr("The travelling path is called a circuit. Electrical devices can work only in a closed circuit. Wires can be used to connect devices and create the circuit."), 0103 qsTr("For a detailed description of battery and bulb, click on those and then click on the info button."), 0104 qsTr("Turn on the bulb using the provided battery. To connect two terminals, click on a terminal, then on a second terminal.") 0105 ] 0106 }, 0107 // level 2 0108 { 0109 inputComponentList: [], 0110 playAreaComponentList: [battery, battery], 0111 determiningComponentsIndex: [0, 1], 0112 answerKey: [], 0113 wires: [], 0114 playAreaComponentPositionX: [0.3, 0.5], 0115 playAreaComponentPositionY: [0.3, 0.3], 0116 introMessage: [ 0117 qsTr("When connecting two terminals which are not supposed to be connected, it creates a short circuit (also called short) in the electrical circuit."), 0118 qsTr("If both terminals of some batteries are directly connected together or they are shorted, then those batteries create a voltage source loop and they cannot act as a voltage source for the circuit."), 0119 qsTr("For example, if two terminals of one battery are directly connected together, it creates a voltage source loop.") + ("<br/><br/>") + qsTr("Or, if two batteries are forming a closed circuit together, it creates a voltage source loop."), 0120 qsTr("Create a voltage source loop with the provided batteries. Then click on the warning box to make it disappear and click on the OK button.") 0121 ] 0122 }, 0123 // level 3 0124 { 0125 inputComponentList: [], 0126 playAreaComponentList: [bulb, battery, battery], 0127 determiningComponentsIndex: [0, 1, 2], 0128 answerKey: ["bulbBroken", "batteryIn", "batteryIn"], 0129 wires: [], 0130 playAreaComponentPositionX: [0.6, 0.3, 0.3], 0131 playAreaComponentPositionY: [0.3, 0.55, 0.1], 0132 introMessage: [ 0133 qsTr("Too much current in an electrical circuit can damage the connected devices."), 0134 qsTr("To repair a broken bulb in this activity, click on it after disconnecting it from the circuit. Don't forget to disable the delete button after removing the connected wires."), 0135 qsTr("Break the bulb by connecting it with the two batteries.") 0136 ] 0137 }, 0138 // level 4 0139 { 0140 inputComponentList: [battery], 0141 playAreaComponentList: [switch1, bulb], 0142 determiningComponentsIndex: [0, 1], 0143 answerKey: ["switch1In", "bulbGlows"], 0144 wires: [], 0145 playAreaComponentPositionX: [0.7, 0.4], 0146 playAreaComponentPositionY: [0.3, 0.35], 0147 introMessage: [ 0148 qsTr("A switch can connect or disconnect the current travelling path or a circuit."), 0149 qsTr("You can click on the switch to open and close it."), 0150 qsTr("Create a circuit using the provided components so that the bulb glows only when the switch is on.") 0151 ] 0152 }, 0153 // level 5 0154 { 0155 inputComponentList: [connection], 0156 playAreaComponentList: [switch1, bulb, bulb, battery], 0157 determiningComponentsIndex: [0, 1, 2], 0158 answerKey: ["switch1In", "bulbGlows", "bulbGlows"], 0159 wires: [], 0160 playAreaComponentPositionX: [0.4, 0.7, 0.4, 0.2], 0161 playAreaComponentPositionY: [0.55, 0.3, 0.05, 0.3], 0162 introMessage: [ 0163 qsTr("A simple connector can be used to connect several wires in an electrical circuit."), 0164 qsTr("Create a circuit so that one bulb should be always lit and the other should be lit only when the switch is on.") 0165 ] 0166 }, 0167 // level 6 0168 { 0169 inputComponentList: [battery, switch1, connection], 0170 playAreaComponentList: [bulb], 0171 determiningComponentsIndex: [0], 0172 answerKey: ["bulbGlows"], 0173 wires: [], 0174 playAreaComponentPositionX: [0.4], 0175 playAreaComponentPositionY: [0.1], 0176 introMessage: [ 0177 qsTr("Electric current intensity or simply current is a flow of electric charge. One can imagine like a flow of electrons."), 0178 qsTr("The conventional symbol for current is I. The unit of current is ampere under the International System of Units, which is denoted as A."), 0179 qsTr("Voltage or electric potential difference is what makes a current in a circuit. It is like a \"push\" or \"pull\" for electric charge."), 0180 qsTr("The conventional symbol for voltage is V. The unit of measure of voltage is volt under the International System of Units, which is denoted as V."), 0181 qsTr("Light the bulb and observe the displayed values.") 0182 ] 0183 }, 0184 // level 7 0185 { 0186 inputComponentList: [connection], 0187 playAreaComponentList: [bulb, resistor, battery], 0188 determiningComponentsIndex: [0, 1], 0189 answerKey: ["bulbGlowsLess", "resistorIn"], 0190 wires: [], 0191 playAreaComponentPositionX: [0.3, 0.6, 0.4], 0192 playAreaComponentPositionY: [0.4, 0.3, 0.05], 0193 introMessage: [ 0194 qsTr("A resistor restricts the flow of current in an electrical circuit. The restriction of current is called resistance."), 0195 qsTr("The conventional symbol for resistance is R. The unit of measure of resistance is ohm under the International System of Units, which is denoted as Ω."), 0196 qsTr("Light the bulb so that the bulb glows with 5V using the provided components.") 0197 ] 0198 }, 0199 // level 8 0200 { 0201 inputComponentList: [], 0202 playAreaComponentList: [rheostat, bulb, battery], 0203 determiningComponentsIndex: [0, 1], 0204 answerKey: ["rheostatIn", "bulbIn"], 0205 wires: [], 0206 playAreaComponentPositionX: [0.3, 0.6, 0.4], 0207 playAreaComponentPositionY: [0.4, 0.3, 0.05], 0208 introMessage: [ 0209 qsTr("A rheostat is used to vary resistance in an electrical circuit."), 0210 qsTr("You can change the rheostat value by dragging its slider."), 0211 qsTr("Connect the bulb to the appropriate terminals of the rheostat so that the light intensity of the bulb can be changed while dragging the slider.") 0212 ] 0213 }, 0214 // level 9 0215 { 0216 inputComponentList: [connection], 0217 playAreaComponentList: [rheostat, bulb, battery], 0218 determiningComponentsIndex: [0, 1], 0219 answerKey: ["rheostatConst", "bulbGlowsLess"], 0220 wires: [], 0221 playAreaComponentPositionX: [0.3, 0.6, 0.4], 0222 playAreaComponentPositionY: [0.4, 0.3, 0.05], 0223 introMessage: [ 0224 qsTr("A rheostat can act as a simple resistor if the terminals of the extremities are connected in a circuit."), 0225 qsTr("Connect the bulb to the appropriate terminals of the rheostat so that the slider cannot change the light intensity of the bulb.") 0226 ] 0227 }, 0228 // level 10 0229 { 0230 inputComponentList: [connection], 0231 playAreaComponentList: [rheostat, bulb, battery], 0232 determiningComponentsIndex: [0, 1], 0233 answerKey: ["rheostatIn", "bulbGlows"], 0234 wires: [], 0235 playAreaComponentPositionX: [0.3, 0.6, 0.4], 0236 playAreaComponentPositionY: [0.4, 0.3, 0.05], 0237 introMessage: [ 0238 qsTr("Connect the bulb to the appropriate terminals of the rheostat and set the slider so that the voltage drop in the bulb should be 10V. Note that the bulb intensity should vary while dragging the slider.") 0239 ] 0240 }, 0241 // level 11 0242 { 0243 inputComponentList: [connection], 0244 playAreaComponentList: [redLed, battery], 0245 determiningComponentsIndex: [0], 0246 answerKey: ["redLedBroken"], 0247 wires: [], 0248 playAreaComponentPositionX: [0.6, 0.3], 0249 playAreaComponentPositionY: [0.2, 0.25], 0250 introMessage: [ 0251 qsTr(" A red LED converts electrical energy into red light energy under particular conditions."), 0252 qsTr("The first condition is current flow in it should be in the direction of the arrow. That means the positive terminal of the battery connected to the terminal at the tail of the arrow shown, and the negative terminal to the head side. This condition is called forward bias."), 0253 qsTr("Electrical energy more than a certain limit can break an LED. In this activity, you can click on the broken red LED after disconnecting from the circuit to repair it."), 0254 qsTr("Connect the provided red LED to the battery in forward bias. Don't worry about the broken LED for now.") 0255 ] 0256 }, 0257 // level 12 0258 { 0259 inputComponentList: [connection], 0260 playAreaComponentList: [redLed, resistor, battery], 0261 determiningComponentsIndex: [0, 1], 0262 answerKey: ["redLedGlows", "resistorIn"], 0263 wires: [], 0264 playAreaComponentPositionX: [0.4, 0.4, 0.25], 0265 playAreaComponentPositionY: [0.05, 0.4, 0.15], 0266 introMessage: [ 0267 qsTr("The battery is providing too much energy to the LED."), 0268 qsTr("One can limit the electrical energy by restricting the current flow in a circuit. That means using a resistor."), 0269 qsTr("Light the red LED using the provided components.") 0270 ] 0271 }, 0272 // level 13 0273 { 0274 inputComponentList: [connection], 0275 playAreaComponentList: [bulb, bulb, battery], 0276 determiningComponentsIndex: [0, 1], 0277 answerKey: ["bulbGlows", "bulbGlows"], 0278 wires: [], 0279 playAreaComponentPositionX: [0.2, 0.6, 0.45], 0280 playAreaComponentPositionY: [0.15, 0.15, 0.4], 0281 introMessage: [ 0282 qsTr("Create a circuit so that the voltage drop in both bulbs are equal to the voltage source (battery).") 0283 ] 0284 } 0285 ] 0286 }