var assetDefaultsMap ={"1.and.blocks.modk.it": {"category": "operators", "groupElements": [{"type": "CodeElement", "value": "("}, {"assetGlobals": {"subBlocks": {"0": "subBlock"}}, "type": "BlockHolder", "elements": [{"assetGlobals": {"params": {"0": "value"}}, "color": "orange", "type": "BooleanArgument"}], "accepts": ["BooleanBlock"]}, {"text": "and", "type": "CodeElement", "value": ") and ("}, {"assetGlobals": {"subBlocks": {"1": "subBlock"}}, "type": "BlockHolder", "elements": [{"assetGlobals": {"params": {"1": "value"}}, "color": "orange", "type": "BooleanArgument"}], "accepts": ["BooleanBlock"]}, {"type": "CodeElement", "value": ")"}], "uid": "1.and.blocks.modk.it", "color": "green", "docs": {"parameters": [{"type": "bool", "description": "Drag in an operator >, <, =, not, and, or.", "name": "condition 1"}, {"type": "bool", "description": "Drag in an operator >, <, =, not, and, or.", "name": "condition 2"}], "description": "This block is true when **condition1** and **condition 2** are true. Otherwise this block is false.", "name": "and", "hint": ""}, "extensionOf": "1.boolean.blocks.modk.it"}, "1.vex.wizard.linknotcurrent.steps.modk.it": {"elements": [{"styles": {"normal": {"top": 0, "height": 385, "padding": 20, "width": 600, "backgroundColor": "#DCDEE0", "position": "absolute", "left": 0}}, "elements": [{"styles": {"normal": {"top": 30, "height": 64, "width": 64, "background": "transparent url(images/modkit_link-64x64.png) no-repeat 0 0", "position": "absolute", "left": 50}}, "type": "Container"}, {"styles": {"normal": {"marginBottom": 20, "height": 70, "width": 350, "marginLeft": 140, "position": "relative", "marginTop": 10}}, "onLoad": "if(navigator.userAgent.toLowerCase().indexOf('windows')>-1){this.setText('#Unable to connect to Modkit Link\\n\\nModkit Link is required to program your robot. Please run the Modkit Link exe from C:/Program Files/Modkit now or click one of the links below to get help.');}", "markdown": true, "name": "Heading", "text": "#Please Update Modkit Link\n\nModkit Link is required to program your robot but is not up to date. Please update Link or continue with downloading disabled.", "type": "FrameworkText"}, {"styles": {"show": {"styleCondition": "CommunicationManager.badVersion == true", "display": "block", "visibility": "visible"}, "normal": {"_visibility": "hidden", "color": "#ffffff", "height": 56, "width": 420, "_display": "none", "position": "relative", "left": 60}}, "html": "
Update LinkWe’ll help you download and run the latest Modkit Link.
", "type": "HTMLContainer", "onClick": "function(){ /*override onNext or we'll enter a loop on current step*/this.container.container.wizard.currentStep.onNext=''; this.container.container.wizard.currentStep.setNext({'uid':'1.vex.wizard.upgradelink.modk.it'}); this.container.container.wizard.nextStep(); }"}, {"styles": {"show": {"styleCondition": "CommunicationManager.badVersion == true", "display": "block", "visibility": "visible"}, "normal": {"_visibility": "hidden", "color": "#ffffff", "height": 56, "width": 420, "_display": "none", "position": "relative", "left": 60}}, "html": "
Continue without Modkit LinkUse the editor, but downloading to the robot brain will be disabled.
", "type": "HTMLContainer", "onClick": "function(){StateManager.loadState({\"type\":\"EditorState\",\"uid\":\"default.arduino.examples.modk.it\",\"name\":\"Untitled Project\", \"hardware\":[{\"uid\":\"1.vex.iq.hardware.vex.modk.it\",\"port\":null ,\"mcu\":null, \"microcontroller\":{\"uuid\":null } } ]}); this.topLevelWidget.wizard.unload(); }"}], "type": "Container", "name": "ModkitLinkNotFound"}], "uid": "1.vex.wizard.linknotcurrent.steps.modk.it", "title": "Modkit Link", "onNext": "window.onbeforeunload = null;location.reload();", "type": "WizardStep", "nextText": "Retry"}, "trial_wizard.hardware.vex.modk.it": {"extensionOf": "wizard.modk.it", "uid": "trial_wizard.hardware.vex.modk.it", "currentStep": {"onUnload": "this.licenseValidator.cancel();", "elements": [{"styles": {"normal": {"width": "600px", "height": "355px"}}, "onLoad": "this.testInputs=function(){var part1 = $('#licensing_string_part_1').val(); $('#licensing_string_part_1').val(part1.toUpperCase()); if(part1.length>=5){ this.container.setNext({'uid':'trial.steps.hardware.vex.modk.it', 'code':part1 });}else{this.container.removeNext();} };this.container.licenseValidator=$.later(1,this,this.testInputs,[],true);", "html": "
Please enter your trial code below
", "type": "HTMLContainer"}], "type": "WizardImageStep", "nextText": "Try", "title": "Trial"}}, "1.light_sensor.lilypad.components.modk.it": {"elements": [{"assetGlobals": {"componentImage": {"src": "src", "top": "top", "left": "left"}}, "position": "relative", "type": "SimpleImage"}, {"color": "blue", "top": "34px", "right": "-22px", "type": "ComponentWire", "elements": [{"feed": "digitalOutPinsListChange", "layer": "pins", "angle": 0, "assetGlobals": {"wire": "name"}, "top": "-3px", "values": [], "mode": "OUTPUT_COMPONENT", "type": "DigitalPin", "left": "15px"}]}, {"color": "black", "top": "60px", "elements": [{"layer": "pins", "angle": 180, "name": "GND", "top": "-3px", "mode": "GROUND_COMPONENT", "type": "DigitalPin", "left": "-12px"}], "type": "ComponentWire", "left": "-13px"}, {"color": "red", "top": "60px", "right": "-22px", "type": "ComponentWire", "elements": [{"layer": "pins", "angle": 0, "name": "VCC", "top": "-3px", "mode": "VCC_COMPONENT", "type": "DigitalPin", "left": "15px"}]}], "blocks": [{"uid": "1.readLight.blocks.modk.it"}], "uid": "1.light_sensor.lilypad.components.modk.it", "library": "1.light_sensor.library.modk.it", "hideBorder": true, "defaultName": "LIGHT_SENSE", "componentImage": {"src": "images/hardware/lilypad/lilypad_light_sensor.png", "top": "1px", "left": "1px"}, "stateVars": {"top": true, "wire": false, "name": true, "left": true}, "componentArray": "int lightSenseArray", "configuration": [{"type": "text", "value": "lightSenseSetup("}, {"type": "objectVar", "value": "name"}, {"type": "text", "value": ","}, {"type": "objectVar", "value": "wire"}, {"type": "text", "value": ");"}], "type": "GenericComponent"}, "1.vex.iq.rotatorSpeed.blocks.modk.it": {"category": "input", "groupElements": [{"assetGlobals": {"localScope": "ignore", "subBlocks": {"0": "subBlock"}}, "ignore": true, "elements": [{"assetGlobals": {"params": {"0": "value"}}, "color": "blue", "readonly": true, "elements": [{"feed": "1.vex.iq.rotatorSpeed.blocks.modk.itComponentListChange", "values": [], "type": "DropdownMenu", "autoMinWidth": "true"}], "type": "NameArgument"}], "accepts": ["NoBlock"], "type": "BlockHolder"}, {"assetGlobals": {"localScope": "ignore"}, "ignore": true, "type": "CodeElement", "value": ".", "text": ""}, {"text": "speed in ", "type": "CodeElement", "value": "currentVelocity("}, {"elements": [{"values": ["%"], "type": "DropdownMenu", "autoMinWidth": "true"}], "assetGlobals": {"params": {"1": "value"}}, "value": "%", "readonly": true, "hideCodeView": true, "type": "NameArgument"}, {"type": "CodeElement", "value": ")"}], "uid": "1.vex.iq.rotatorSpeed.blocks.modk.it", "color": "purple", "docs": {"category": "input", "type": "NumberBlock", "description": "Gets the *speed* of the **Rotator** in (%).", "name": "speed", "hint": ""}, "extensionOf": "1.number.blocks.modk.it", "tokens": ["motorSpeed"], "stateVars": {"localScope": false, "params": false, "subBlocks": false}}, "1.light_sensor.library.modk.it": {"definitions": "void lightSenseSetup(int lightSenseNum,int pinNum){lightSenseNum-=LIGHTSENSE_OFFSET;\nlightSenseArray[lightSenseNum]=pinNum;\npinMode(lightSenseArray[lightSenseNum],INPUT);}\nint readLight(int lightSenseNum){\nlightSenseNum-=LIGHTSENSE_OFFSET;\n//hack for analog FIXME\nreturn map(analogRead(lightSenseArray[lightSenseNum]-14),0,1023,0,100);\n}\n", "componentArray": "lightSenseArray", "type": "ComponentLibrary", "uid": "1.light_sensor.library.modk.it"}, "1.LM4F232H5QD.tiva.microcontrollers.modk.it": {"programmer": {"mcu": "m644p"}, "compiler": {"mcu": "atmega644p", "type": "armgcc"}, "uid": "1.LM4F232H5QD.tiva.microcontrollers.modk.it", "name": "LM4F232H5QD"}, "1.vex.iq.setSliderSpeed.blocks.modk.it": {"category": "setup", "uid": "1.vex.iq.setSliderSpeed.blocks.modk.it", "color": "darkblue", "docs": {"parameters": [{"range": "-100-100 %", "type": "num", "description": "select the speed from the list, type a number, or use a variable (speed ranges from -100 to 100%)", "name": "speed"}], "type": "StatementBlock", "description": "*Set speed to* sets the speed of the **Slider** in percent (%).", "name": "set speed", "hint": "Negative **speed** will go in the opposite direction that is selected. Numbers with decimals are allowed."}, "extensionOf": "1.statement.blocks.modk.it", "statementElements": [{"elements": [{"text": "set speed to", "type": "CodeElement", "value": "setSpeed("}, {"assetGlobals": {"subBlocks": {"0": "subBlock"}}, "type": "BlockHolder", "elements": [{"onBlur": "console.log(this.value);", "elements": [{"values": ["0", "20", "40", "60", "80", "100"], "type": "DropdownMenu", "autoMinWidth": "true"}], "assetGlobals": {"params": {"0": "value"}}, "maxChars": "32", "value": "60", "color": "darkblue", "readonly": false, "rangeMin": 0, "allowChars": "0-9.", "rangeMax": 150, "type": "NumberArgument"}], "accepts": ["NumberBlock"]}, {"elements": [{"values": ["%"], "type": "DropdownMenu", "autoMinWidth": "true"}], "assetGlobals": {"params": {"1": "value"}}, "value": "%", "readonly": true, "hideCodeView": true, "type": "NameArgument"}, {"text": "", "type": "CodeElement", "value": ");"}], "type": "LineElement"}], "tokens": ["setSliderSpeed"]}, "1.leonardo.arduino.hardware.modk.it": {"description": "The Arduino Leonardo comes equipped with 14 digital I/O pins (7 are PWM-enabled) and 6 analog pins.

Unlike its predecessors, the Leonardo can connect to your computer directly via USB, meaning it can act just like a mouse or keyboard.", "microcontrollerOptions": {"1.atmega32u4.avr.microcontrollers.modk.it": {"flash_size": 32768, "device_signature": 2004359, "programmer": {"type": "avr109", "speed": 57600}, "boot_sizes": [4096], "compiler": {"f_cpu": "16000000L", "vid": "0x2341", "variant": "leonardo", "pid": "0x8036", "framework": "arduino1.0", "mcu": "atmega32u4", "type": "avrgcc"}}}, "uid": "1.leonardo.arduino.hardware.modk.it", "dropdown_text": "Arduino™ Leonardo", "extensionOf": "1.compatible.arduino.hardware.modk.it", "brand": "Arduino", "stateVars": {"programmingSpeed": true, "framework": true, "mcu": true, "maxProgramSize": true, "f_cpu": true}, "boardImage": {"src": "images/hardware/boards/Generic_Uno_R3.png"}, "images": {"small": "images/hardware/boards/Generic_Duemilanove_124x90.png", "medium": "images/hardware/boards/Generic_Uno_R3_x200.png"}, "model": "Leonardo", "pinOffsets": {"top": "5px", "left": "-8px"}, "name": "Arduino™ Leonardo"}, "1.vex.iq.motor.controllerActions.components.modk.it": {"uid": "1.vex.iq.motor.controllerActions.components.modk.it", "extensionOf": "1.vex.iq.controllerActions.components.modk.it", "controllerEvents": {"REV_DIGITAL": {"RELEASED": "stop();", "PRESSED": "setSpeed(100, SPEED_PERCENT, true);turn(VEX_ROTARY_PLUS,true);"}, "FWD_REV_ANALOG": {"CHANGED": "int speed = CONTROLLER.@joystick@.position(); if(speed==0){stop();}else if(speed<0){setSpeed(speed=0-speed,SPEED_PERCENT, true);turn(VEX_ROTARY_MINUS,true);}else{setSpeed(speed, SPEED_PERCENT, true);turn(VEX_ROTARY_PLUS,true);} "}, "REV_FWD_ANALOG": {"CHANGED": "int speed = CONTROLLER.@joystick@.position(); if(speed==0){stop();}else if(speed<0){setSpeed(speed=0-speed,SPEED_PERCENT, true);turn(VEX_ROTARY_PLUS,true);}else{setSpeed(speed, SPEED_PERCENT, true);turn(VEX_ROTARY_MINUS,true);} "}, "FWD_DIGITAL": {"RELEASED": "stop();", "PRESSED": "setSpeed(100,SPEED_PERCENT, true);turn(VEX_ROTARY_MINUS,true);"}}, "analogControllerValuesY": [{"name": "None", "value": "none"}, {"feeds": ["@name@.outDirection.labelCW", "@name@.outDirection.labelCCW"], "name": "Drive (Normal)", "value": "FWD_REV_ANALOG", "feedTemplate": "▲@1@/▼@0@"}, {"feeds": ["@name@.outDirection.labelCW", "@name@.outDirection.labelCCW"], "name": "Drive (Reversed)", "value": "REV_FWD_ANALOG", "feedTemplate": "▲@0@/▼@1@"}], "analogControllerValuesX": [{"name": "None", "value": "none"}, {"feeds": ["@name@.outDirection.labelCW", "@name@.outDirection.labelCCW"], "name": "Drive (Normal)", "value": "REV_FWD_ANALOG", "feedTemplate": "▲@1@/▼@0@"}, {"feeds": ["@name@.outDirection.labelCW", "@name@.outDirection.labelCCW"], "name": "Drive (Reversed)", "value": "FWD_REV_ANALOG", "feedTemplate": "▲@0@/▼@1@"}], "digitalControllerValues": [{"name": "None", "value": "NONE"}, {"feeds": ["@name@.outDirection.labelCW"], "name": "Go Forward", "value": "FWD_DIGITAL"}, {"feeds": ["@name@.outDirection.labelCCW"], "name": "Go Backward", "value": "REV_DIGITAL"}]}, "1.vex.iq.setVolume.blocks.modk.it": {"category": "setup", "uid": "1.vex.iq.setVolume.blocks.modk.it", "color": "darkblue", "docs": {"category": "setup", "description": "Sets the volume of the _Robot Brain_ for playing sounds.", "parameters": [{"type": "num", "description": "Type a volume or drag in a variable. Volume ranges from 0 to 100 where 0 is off and 100 is maximum volume.", "name": "volume"}], "hint": "", "type": "StatementBlock", "name": "set volume"}, "extensionOf": "1.statement.blocks.modk.it", "statementElements": [{"elements": [{"text": "set volume to", "type": "CodeElement", "value": "BRAIN.setVolume("}, {"assetGlobals": {"subBlocks": {"0": "subBlock"}}, "type": "BlockHolder", "elements": [{"assetGlobals": {"params": {"0": "value"}}, "value": "1", "color": "darkblue", "rangeMin": 0, "allowChars": "0-9", "rangeMax": 100, "type": "NumberArgument"}], "accepts": ["NumberBlock"]}, {"type": "CodeElement", "value": ");"}], "type": "LineElement"}], "tokens": ["setVolume"], "sibling": null, "stateVars": {"params": false, "subBlocks": false}}, "1.motorSpeed.blocks.modk.it": {"category": "output", "uid": "1.motorSpeed.blocks.modk.it", "color": "blue", "docs": {"parameters": [{"type": "num", "description": "determines which _Motor_ you are controlling", "name": "motor"}, {"type": "num", "description": "determines the speed of the motor", "name": "speed"}], "type": "StatementBlock", "description": "The motorSpeed command sets the speed of a motor", "name": "motorSpeed", "hint": ""}, "extensionOf": "1.statement.blocks.modk.it", "statementElements": [{"elements": [{"text": "motorSpeed", "type": "CodeElement", "value": "motorSpeed("}, {"assetGlobals": {"subBlocks": {"0": "subBlock"}}, "type": "BlockHolder", "elements": [{"elements": [{"feed": "MOTORComponentListChange", "values": [], "type": "DropdownMenu", "autoMinWidth": "true"}], "assetGlobals": {"params": {"0": "value"}}, "value": "", "color": "blue", "readonly": true, "type": "NumberArgument"}], "accepts": ["NumberBlock"]}, {"type": "CodeElement", "value": ","}, {"assetGlobals": {"subBlocks": {"1": "subBlock"}}, "type": "BlockHolder", "elements": [{"assetGlobals": {"params": {"1": "value"}}, "color": "blue", "type": "NumberArgument", "value": "100"}], "accepts": ["NumberBlock"]}, {"type": "CodeElement", "value": ");"}], "type": "LineElement"}], "tokens": ["motorSpeed"], "sibling": null, "params": ["MOTOR1", "100"]}, "1.when.blocks.modk.it": {"category": "control", "uid": "1.when.blocks.modk.it", "color": "orange", "docs": {"category": "control", "description": "Runs the blocks below *when* the selected event occurs. START is the most common event and occurs once when you start your program.", "parameters": [{"type": "event", "description": "Select from the list, or create a new event.", "name": "event"}], "hint": "Every stack of blocks requires a *when* block at the beginning. Without a *when* block the stack will never run.", "type": "HatBlock", "name": "when"}, "extensionOf": "1.hat.blocks.modk.it", "statementElements": [{"elements": [{"text": "when", "type": "CodeElement", "value": "when("}, {"assetGlobals": {"subBlocks": {"1": "subBlock"}}, "type": "BlockHolder", "elements": [{"elements": [{"feed": "EVENTListChange", "values": [], "type": "DropdownMenu", "autoMinWidth": "true"}], "assetGlobals": {"params": {"1": "value"}}, "onRemove": "Events.broadcast('notifyEventRemoval',[this.id]);", "value": "START", "color": "blue", "readonly": true, "onSetValue": "Events.broadcast('notifyEventNameChange',[this.id,value]);", "type": "NameArgument"}], "accepts": ["NoBlock"]}, {"type": "CodeElement", "value": "){"}], "type": "LineElement"}], "tokens": ["delay"], "sibling": null}, "1.broadcast.blocks.modk.it": {"category": "control", "uid": "1.broadcast.blocks.modk.it", "color": "orange", "docs": {"category": "control", "description": "Sends a message to all *when* blocks saying an **event** has happened.", "parameters": [{"type": "event", "description": "Select from the list, or create a new event.", "name": "event"}], "hint": "Use *broadcast* to tell another stack to start. Multiple stacks can start with one **event**.", "type": "StatementBlock", "name": "broadcast"}, "extensionOf": "1.statement.blocks.modk.it", "statementElements": [{"elements": [{"text": "broadcast", "type": "CodeElement", "value": "broadcast("}, {"assetGlobals": {"subBlocks": {"0": "subBlock"}}, "type": "BlockHolder", "elements": [{"elements": [{"feed": "USEREVENTListChange", "onOpen": "if(this.values.length==1){ if($.isPlainObject(this.values[0])){if(this.values[0].name == 'new...'){ Events.broadcast('component.popoverShowContent', [this.container, {uid:'ui.addEventDialog.modk.it', modal:true, cancelable:true, saveButtonText:'Create Event'}, function(obj){if(Boolean(obj.name)){CodeManager.addToGlobalEventList(obj.name,obj.name); this.container.setValue(obj.name); }}, this]); } } } ", "type": "DropdownMenu", "autoMinWidth": "true", "values": []}], "assetGlobals": {"params": {"0": "value"}}, "onRemove": "Events.broadcast('notifyEventRemoval',[this.id]);", "value": "", "color": "blue", "readonly": true, "onSetValue": "Events.broadcast('notifyEventNameChange',[this.id,value]);", "type": "NameArgument"}], "accepts": ["NoBlock"]}, {"type": "CodeElement", "value": ");"}], "type": "LineElement"}], "tokens": ["motorOn"], "sibling": null}, "1.vex.iq.angle.blocks.modk.it": {"category": "input", "groupElements": [{"assetGlobals": {"localScope": "ignore", "subBlocks": {"0": "subBlock"}}, "ignore": true, "elements": [{"assetGlobals": {"params": {"0": "value"}}, "color": "blue", "readonly": true, "elements": [{"feed": "1.vex.iq.angle.blocks.modk.itComponentListChange", "values": [], "type": "DropdownMenu", "autoMinWidth": "true"}], "type": "NameArgument"}], "accepts": ["NoBlock"], "type": "BlockHolder"}, {"assetGlobals": {"localScope": "ignore"}, "ignore": true, "type": "CodeElement", "value": ".", "text": ""}, {"text": "angle in", "type": "CodeElement", "value": "angle("}, {"assetGlobals": {"params": {"1": "value"}}, "readonly": true, "elements": [{"values": ["deg"], "type": "DropdownMenu", "autoMinWidth": "true"}], "type": "NameArgument", "value": "deg"}, {"type": "CodeElement", "value": ")"}], "uid": "1.vex.iq.angle.blocks.modk.it", "color": "purple", "docs": {"category": "input", "type": "NumberBlock", "description": "Gets the *angle* of the __COMPONENT__ in degrees (deg) or revolutions (rev).", "name": "angle", "hint": ""}, "extensionOf": "1.number.blocks.modk.it", "tokens": ["currentMotorEncoder"], "stateVars": {"localScope": false, "params": false, "subBlocks": false}}, "1.modkit.h.code.modk.it": {"code": "#ifndef Modkit_Analog_Pin_Fix\n#define Modkit_Analog_Pin_Fix\n#ifndef FRAMEWORK_ENERGIA\n#define analogRead(pin) analogRead(pin-14)\n#else\n#define analogRead(pin) analogRead(pin-2) \n#endif\n #endif\n#define randomNumber(lower,upper) random(lower,upper+1)\n#define forever for(;;)\n#define repeat(times) for(int modkitRepeatCounter=0; modkitRepeatCounter= this.maxComponents || this.maxComponents == 0){ if(!Boolean(this.container) || this.container.id != 'hardware_pad'){ this.$markup.removeClass('myAcceptableClass');}}", "onConfigOverride": "var motorLayout = this.settingsPopover.settings.motorLayout; this.configOverrides={'wires':this.getFullState()['wires']}; if(motorLayout=='1Right'){this.configOverrides['wires'][0]='INVALID_PORT'; } if(motorLayout=='1Left'){this.configOverrides['wires'][1]='INVALID_PORT';} var limitSwitches = this.settingsPopover.settings.limitSwitches; if(limitSwitches=='1Front' || limitSwitches=='none'){this.configOverrides['wires'][2]='INVALID_PORT'; } if(limitSwitches=='1Rear' || limitSwitches=='none'){this.configOverrides['wires'][3]='INVALID_PORT';} if(!Boolean( this.configOverrides['settings'] )){ this.configOverrides['settings']={};} this.configOverrides['settings']['reverseLeft'] = ' '+Boolean(this.settingsPopover.settings.leftReverseDirection); this.configOverrides['settings']['reverseRight'] = ' '+Boolean(this.settingsPopover.settings.rightReverseDirection); this.configOverrides['settings']['ratioIn']=this.settingsPopover.settings.ratioIn; this.configOverrides['settings']['ratioOut']=this.settingsPopover.settings.ratioOut; ", "stateVars": {"top": true, "wires": true, "name": true, "left": true}, "_otherBlocks": [{"uid": "1.vex.iq.motorDirection.blocks.modk.it"}, {"uid": "1.vex.iq.motorSpeed.blocks.modk.it"}, {"uid": "1.vex.iq.motorDirection.blocks.modk.it"}, {"uid": "1.vex.iq.motorSpeed.blocks.modk.it"}, {"uid": "1.vex.iq.resetRotatorPosition.blocks.modk.it"}, {"uid": "1.vex.iq.rotatorDirection.blocks.modk.it"}, {"uid": "1.vex.iq.rotatorSpeed.blocks.modk.it"}, {"uid": "1.vex.iq.rotatorRotation.blocks.modk.it"}, {"uid": "1.vex.iq.rotatorCurrent.blocks.modk.it"}], "settingsPopover": {"type": "SettingsPopover", "settings": {"uid": "1.vex.iq.settingsRotator.mechanism.modk.it"}}, "hack_to_disabled_dropping": false}, "1.vex.iq.rotateRotator.blocks.modk.it": {"category": "output", "uid": "1.vex.iq.rotateRotator.blocks.modk.it", "color": "blue", "docs": {"category": "output", "description": "*Rotate* the **Rotator** a selected direction.", "parameters": [{"options": ["FWD", "REV"], "type": "rotation", "description": "select a direction from the list", "name": "direction"}], "hint": "", "type": "StatementBlock", "name": "rotate"}, "extensionOf": "1.statement.blocks.modk.it", "statementElements": [{"elements": [{"text": "rotate", "type": "CodeElement", "value": "rotate("}, {"assetGlobals": {"subBlocks": {"0": "subBlock"}}, "type": "BlockHolder", "elements": [{"enumIcon": "images/vex/enum_icons/rotation-black.png", "elements": [{"feed": "@name@.outDirection.values", "values": ["FWD", "REV"], "type": "DropdownMenu", "autoMinWidth": "true"}], "assetGlobals": {"params": {"0": "value"}}, "value": "", "color": "blue", "readonly": true, "type": "EnumArgument"}], "accepts": ["EnumBlock.rotaryDirection"]}, {"type": "CodeElement", "value": ");"}], "type": "LineElement"}], "tokens": ["rotateRotator"], "sibling": null}, "1.vex.iq.motor.components.modk.it": {"uid": "1.vex.iq.motor.components.modk.it", "library": "1.motor.library.modk.it", "_onSettingsHide": "", "maxComponents": 12, "_excluded_blocks": [{"uid": "1.break.blocks.modk.it"}, {"uid": "1.vex.iq.print.blocks.modk.it"}, {"uid": "1.randomNumber.blocks.modk.it"}], "otherBlocksCategory": "Motor", "componentImage": {"src": "images/hardware/lilypad/lilypad_rgb_led.png", "top": "1px", "left": "1px"}, "type": "VexComponent", "styles": {"normal": {"width": 140, "height": 110}}, "onLoad": "this.renameHelper=function(name){this.$markup.find('.vex_component_label_name').get(0).blockObject.setText(name);}; if(!Boolean(this.configOverrides)){this.configOverrides={};} this.configOverrides['reverseDirection']='false'; var name=this.name||'DEFAULT_COMPONENT_NAMES_'+this.defaultName; Identifiers.addUsedLocalIdentifier(this.settingsPopover.settings.labelCW,'is already used for '+name,name); Identifiers.addUsedLocalIdentifier(this.settingsPopover.settings.labelCCW,'is already used for '+name,name);", "elements": [{"styles": {"normal": {"borderRadius": "15px", "top": "-50px", "height": 200, "width": 210, "backgroundColor": "", "position": "absolute", "border": "4px solid rgba(18, 52, 86, 0.4)", "display": "none", "left": "-20px"}}, "htmlClass": "vex_component_wrapper", "elements": [{"styles": {"active": {"backgroundPosition": "0px -0px"}, "disabled": {"backgroundPosition": "0px -60px"}, "hover": {"backgroundPosition": "0px -20px"}, "normal": {"right": "5px", "bottom": "5px", "height": "20px", "width": "20px", "position": "absolute", "left": "auto"}}, "elements": [], "name": "MotorConfigButton", "type": "ConfigButton", "onClick": "function(){ this.container.container.showComponentSettings(this); }", "htmlClass": "hardware_settings_button"}, {"uid": "ui.button.controllerConfig.modk.it"}], "type": "Container", "name": "Wrapper"}, {"styles": {"placed": {"top": "0px", "left": "0px"}, "normal": {"width": "auto", "top": "30px", "height": "42px", "left": 110}}, "htmlClass": "vex_component_label vex_component_motor clearfix", "elements": [{"styles": {"placed": {"marginLeft": "10px"}, "normal": {"width": "auto", "color": "#2a323d", "marginBottom": "auto", "height": "auto", "fontWeight": "bold", "marginLeft": 42, "fontSize": "20px", "marginRight": "10px", "position": "relative", "marginTop": "10px", "textShadow": "0px 1px 0 #C4C4C4"}}, "text": "Motor", "type": "FrameworkText", "htmlClass": "vex_component_label_name"}], "type": "Container"}, {"styles": {"normal": {"position": "absolute"}}, "htmlClass": "vex_component_drawer_image", "type": "Image", "src": "images/vex/components/motor-150x.png"}, {"styles": {"selected": {"backgroundImage": "url(images/vex/components/motor-selected.png)", "backgroundPosition": "5px 0"}, "normal": {"position": "absolute", "width": "145px", "left": 8, "background": "transparent url(images/vex/components/motor.png) no-repeat", "height": 120}}, "onLoad": "Events.register(this.container.id+'.MotorOver', function(){this.select();}, this); Events.register(this.container.id+'.MotorOut', function(){this.deselect();}, this);", "elements": [{"y": 50, "x": -42, "angle": 90, "uid": "1.vex.iq.ui.wire.modk.it"}], "name": "OriginalMotor", "type": "Container", "htmlClass": "vex_component_pad_image"}, {"styles": {"normal": {"zIndex": 2, "maxWidth": 240, "bottom": -36, "float": "left", "height": "auto", "padding": "3px 2px 0px 0px", "width": "auto", "background": "rgba(18, 52, 86, 0.4);", "position": "absolute", "left": -16}}, "htmlClass": "vex_component_pins clearfix", "type": "HorizontalContainer"}, {"feed": "digitalOutPinsListChange", "styles": {"normal": {"width": "100px"}}, "layer": "pins", "angle": 0, "onMouseout": "Events.broadcast(this.container.id+'.MotorOut', []);", "assetGlobals": {"wire": "name"}, "values": [], "mode": "OUTPUT_COMPONENT", "type": "VexPin", "onMouseover": "Events.broadcast(this.container.id+'.MotorOver', []);"}], "blocks": [{"uid": "1.vex.iq.setMotorSpeed.blocks.modk.it"}, {"uid": "1.vex.iq.setMotorPower.blocks.modk.it"}, {"uid": "1.vex.iq.setMotorTimeout.blocks.modk.it"}, {"uid": "1.vex.iq.setMotorHolding.blocks.modk.it"}, {"uid": "1.vex.iq.resetMotorPosition.blocks.modk.it"}, {"uid": "1.vex.iq.turnMotorTo.blocks.modk.it"}, {"uid": "1.vex.iq.turnMotorBy.blocks.modk.it"}, {"uid": "1.vex.iq.turnMotor.blocks.modk.it"}, {"uid": "1.vex.iq.stopMotor.blocks.modk.it"}, {"uid": "1.vex.iq.motorDirection.blocks.modk.it"}, {"uid": "1.vex.iq.motorSpeed.blocks.modk.it"}, {"uid": "1.vex.iq.rotation.blocks.modk.it"}, {"uid": "1.vex.iq.motorCurrent.blocks.modk.it"}], "docs": {"type": "VexComponent", "description": "The motor component configures a regular DC motor. You can control the motor's speed and direction.", "title": "Motor"}, "onRemove": "console.log('remove bfore');Identifiers.removeUsedLocalIdentifier(this.settingsPopover.settings.labelCW,this.name);Identifiers.removeUsedLocalIdentifier(this.settingsPopover.settings.labelCCW,this.name);console.log('remove after');", "classBased": true, "defaultName": "MOTOR", "componentArray": "int motorArray[3]", "configuration": [{"type": "text", "value": "extendVexMotorClass(VexMotor_"}, {"type": "objectVar", "value": "name"}, {"type": "text", "value": ","}, {"type": "objectVar", "value": "settings.labelCW"}, {"type": "text", "value": ","}, {"type": "objectVar", "value": "settings.labelCCW"}, {"type": "text", "value": ");\n"}, {"type": "text", "value": "VexMotor_"}, {"type": "objectVar", "value": "name"}, {"type": "text", "value": " "}, {"type": "objectVar", "value": "name"}, {"type": "text", "value": " = VexMotor_"}, {"type": "objectVar", "value": "name"}, {"type": "text", "value": "("}, {"type": "objectVar", "value": "wire"}, {"type": "text", "value": ","}, {"type": "objectVar", "value": "reverseDirection"}, {"type": "text", "value": ");\n"}, {"type": "text", "value": "Scope("}, {"type": "objectVar", "value": "name"}, {"type": "text", "value": ",VexMotor);"}, {"type": "text", "value": "extendVexMotorScope("}, {"type": "objectVar", "value": "name"}, {"type": "text", "value": ","}, {"type": "objectVar", "value": "settings.labelCW"}, {"type": "text", "value": ","}, {"type": "objectVar", "value": "settings.labelCCW"}, {"type": "text", "value": ");\n"}, {"type": "text", "value": "\n#endif //ifndef IQ_GET_JUMPTABLE_DEFINE_MODKIT_VEX\n\n#ifdef IQ_GET_JUMPTABLE_DEFINE_MODKIT_VEX\n#define IQ_"}, {"type": "objectVar", "value": "wire"}, {"type": "text", "value": "_DEVICE_ID_STR IQ_MOTOR_SENSOR_STR//set device id\n#endif //IQ_GET_JUMPTABLE_DEFINE_MODKIT_VEX\n\n#ifndef IQ_GET_JUMPTABLE_DEFINE_MODKIT_VEX\n"}], "icon": "images/vex/components/drawer_icons/motor.png", "displayName": "Motor", "onStartDrag": "if(Boolean(modkitNamespace.GenericComponent.managers[this.uid]) && modkitNamespace.GenericComponent.managers[this.uid].count >= this.maxComponents || this.maxComponents == 0){ if(!Boolean(this.container) || this.container.id != 'hardware_pad'){ this.$markup.removeClass('myAcceptableClass');}}", "onConfigOverride": "if(!Boolean(this.configOverrides)){this.configOverrides={};} if(this.settingsPopover.settings.reverseDirection){this.configOverrides['reverseDirection']='true';} else{this.configOverrides['reverseDirection']='false';}", "stateVars": {"top": true, "wire": true, "name": true, "left": true}, "settingsPopover": {"type": "SettingsPopover", "settings": {"uid": "1.vex.iq.settingsMotor.components.modk.it"}}, "controllerActionsPopover": {"type": "ControllerActionsPopover", "settings": {"uid": "1.vex.iq.motor.controllerActions.components.modk.it"}}, "otherBlocks": [{"uid": "1.vex.iq.rotation.blocks.modk.it"}, {"uid": "1.vex.iq.motorSpeed.blocks.modk.it"}, {"uid": "1.vex.iq.motorDirection.blocks.modk.it"}, {"uid": "1.vex.iq.motorCurrent.blocks.modk.it"}]}, "1.openshield_mega.pins.modk.it": {"elements": [{"layer": "pins", "angle": 90, "name": "PIN2", "digitalOut": true, "assetGlobals": {"d2": {"name": "name", "mode": "mode"}}, "top": "-25px", "digitalIn": true, "number": "2", "mode": "INPUT", "type": "DigitalPin", "analogOut": true, "left": "325px"}, {"layer": "pins", "angle": 90, "name": "PIN3", "digitalOut": true, "assetGlobals": {"d3": {"name": "name", "mode": "mode"}}, "top": "-25px", "digitalIn": true, "number": "3", "mode": "INPUT", "type": "DigitalPin", "analogOut": true, "left": "312px"}, {"layer": "pins", "angle": 90, "name": "PIN4", "digitalOut": true, "assetGlobals": {"d4": {"name": "name", "mode": "mode"}}, "top": "-25px", "digitalIn": true, "number": "4", "mode": "INPUT", "type": "DigitalPin", "analogOut": true, "left": "299px"}, {"layer": "pins", "angle": 90, "name": "PIN5", "digitalOut": true, "assetGlobals": {"d5": {"name": "name", "mode": "mode"}}, "top": "-25px", "digitalIn": true, "number": "5", "mode": "INPUT", "type": "DigitalPin", "analogOut": true, "left": "286px"}, {"layer": "pins", "angle": 90, "name": "PIN6", "digitalOut": true, "assetGlobals": {"d6": {"name": "name", "mode": "mode"}}, "top": "-25px", "digitalIn": true, "number": "6", "mode": "INPUT", "type": "DigitalPin", "analogOut": true, "left": "273px"}, {"layer": "pins", "angle": 90, "name": "PIN7", "digitalOut": true, "assetGlobals": {"d7": {"name": "name", "mode": "mode"}}, "top": "-25px", "digitalIn": true, "number": "7", "mode": "INPUT", "type": "DigitalPin", "analogOut": true, "left": "260px"}, {"layer": "pins", "angle": 90, "name": "PIN8", "digitalOut": true, "assetGlobals": {"d8": {"name": "name", "mode": "mode"}}, "top": "-25px", "digitalIn": true, "number": "8", "mode": "INPUT", "type": "DigitalPin", "analogOut": true, "left": "242px"}, {"layer": "pins", "angle": 90, "name": "PIN9", "digitalOut": true, "assetGlobals": {"d9": {"name": "name", "mode": "mode"}}, "top": "-25px", "digitalIn": true, "number": "9", "mode": "INPUT", "type": "DigitalPin", "analogOut": true, "left": "229px"}, {"layer": "pins", "angle": 90, "name": "PIN10", "digitalOut": true, "assetGlobals": {"d10": {"name": "name", "mode": "mode"}}, "top": "-25px", "digitalIn": true, "number": "10", "mode": "INPUT", "type": "DigitalPin", "analogOut": true, "left": "216px"}, {"layer": "pins", "angle": 90, "name": "PIN11", "digitalOut": true, "assetGlobals": {"d11": {"name": "name", "mode": "mode"}}, "top": "-25px", "digitalIn": true, "number": "11", "mode": "INPUT", "type": "DigitalPin", "analogOut": true, "left": "203px"}, {"layer": "pins", "angle": 90, "name": "PIN12", "digitalOut": true, "assetGlobals": {"d12": {"name": "name", "mode": "mode"}}, "top": "-25px", "digitalIn": true, "number": "12", "mode": "INPUT", "type": "DigitalPin", "analogOut": true, "left": "190px"}, {"layer": "pins", "angle": 90, "name": "PIN13", "digitalOut": true, "assetGlobals": {"d13": {"name": "name", "mode": "mode"}}, "top": "-25px", "digitalIn": true, "number": "13", "mode": "OUTPUT", "type": "DigitalPin", "analogOut": true, "left": "177px"}, {"layer": "pins", "angle": 90, "name": "PIN14", "digitalOut": true, "assetGlobals": {"d14": {"name": "name", "mode": "mode"}}, "top": "-25px", "digitalIn": true, "number": "14", "mode": "INPUT", "type": "DigitalPin", "left": "372px"}, {"layer": "pins", "angle": 90, "name": "PIN15", "digitalOut": true, "assetGlobals": {"d15": {"name": "name", "mode": "mode"}}, "top": "-25px", "digitalIn": true, "number": "15", "mode": "INPUT", "type": "DigitalPin", "left": "385px"}, {"layer": "pins", "angle": 90, "name": "PIN16", "digitalOut": true, "assetGlobals": {"d16": {"name": "name", "mode": "mode"}}, "top": "-25px", "digitalIn": true, "number": "16", "mode": "INPUT", "type": "DigitalPin", "left": "398px"}, {"layer": "pins", "angle": 90, "name": "PIN17", "digitalOut": true, "assetGlobals": {"d17": {"name": "name", "mode": "mode"}}, "top": "-25px", "digitalIn": true, "number": "17", "mode": "INPUT", "type": "DigitalPin", "left": "411px"}, {"layer": "pins", "angle": 90, "name": "PIN18", "digitalOut": true, "assetGlobals": {"d18": {"name": "name", "mode": "mode"}}, "top": "-25px", "digitalIn": true, "number": "18", "mode": "INPUT", "type": "DigitalPin", "left": "424px"}, {"layer": "pins", "angle": 90, "name": "PIN19", "digitalOut": true, "assetGlobals": {"d19": {"name": "name", "mode": "mode"}}, "top": "-25px", "digitalIn": true, "number": "19", "mode": "INPUT", "type": "DigitalPin", "left": "437px"}, {"layer": "pins", "angle": 90, "name": "PIN20", "digitalOut": true, "assetGlobals": {"d20": {"name": "name", "mode": "mode"}}, "top": "-25px", "digitalIn": true, "number": "20", "mode": "INPUT", "type": "DigitalPin", "left": "450px"}, {"layer": "pins", "angle": 90, "name": "PIN21", "digitalOut": true, "assetGlobals": {"d21": {"name": "name", "mode": "mode"}}, "top": "-25px", "digitalIn": true, "number": "21", "mode": "INPUT", "type": "DigitalPin", "left": "463px"}, {"layer": "pins", "angle": 270, "name": "A0", "digitalOut": true, "assetGlobals": {"a0": {"name": "name", "mode": "mode"}}, "top": "268px", "digitalIn": true, "number": "54", "mode": "INPUT", "left": "287px", "type": "DigitalPin", "analogIn": true}, {"layer": "pins", "angle": 270, "name": "A1", "digitalOut": true, "assetGlobals": {"a1": {"name": "name", "mode": "mode"}}, "top": "268px", "digitalIn": true, "number": "55", "mode": "INPUT", "left": "300px", "type": "DigitalPin", "analogIn": true}, {"layer": "pins", "angle": 270, "name": "A2", "digitalOut": true, "assetGlobals": {"a2": {"name": "name", "mode": "mode"}}, "top": "268px", "digitalIn": true, "number": "56", "mode": "INPUT", "left": "313px", "type": "DigitalPin", "analogIn": true}, {"layer": "pins", "angle": 270, "name": "A3", "digitalOut": true, "assetGlobals": {"a3": {"name": "name", "mode": "mode"}}, "top": "268px", "digitalIn": true, "number": "57", "mode": "INPUT", "left": "326px", "type": "DigitalPin", "analogIn": true}, {"layer": "pins", "angle": 270, "name": "A4", "digitalOut": true, "assetGlobals": {"a4": {"name": "name", "mode": "mode"}}, "top": "268px", "digitalIn": true, "number": "58", "mode": "INPUT", "left": "339px", "type": "DigitalPin", "analogIn": true}, {"layer": "pins", "angle": 270, "name": "A5", "digitalOut": true, "assetGlobals": {"a5": {"name": "name", "mode": "mode"}}, "top": "268px", "digitalIn": true, "number": "59", "mode": "INPUT", "left": "352px", "type": "DigitalPin", "analogIn": true}, {"layer": "pins", "angle": 270, "name": "A6", "digitalOut": true, "assetGlobals": {"a6": {"name": "name", "mode": "mode"}}, "top": "268px", "digitalIn": true, "number": "60", "mode": "INPUT", "left": "365px", "type": "DigitalPin", "analogIn": true}, {"layer": "pins", "angle": 270, "name": "A7", "digitalOut": true, "assetGlobals": {"a7": {"name": "name", "mode": "mode"}}, "top": "268px", "digitalIn": true, "number": "61", "mode": "INPUT", "left": "378px", "type": "DigitalPin", "analogIn": true}, {"layer": "pins", "angle": 270, "name": "A8", "digitalOut": true, "assetGlobals": {"a8": {"name": "name", "mode": "mode"}}, "top": "268px", "digitalIn": true, "number": "62", "mode": "INPUT", "left": "402px", "type": "DigitalPin", "analogIn": true}, {"layer": "pins", "angle": 270, "name": "A9", "digitalOut": true, "assetGlobals": {"a9": {"name": "name", "mode": "mode"}}, "top": "268px", "digitalIn": true, "number": "63", "mode": "INPUT", "left": "415px", "type": "DigitalPin", "analogIn": true}, {"layer": "pins", "angle": 270, "name": "A10", "digitalOut": true, "assetGlobals": {"a10": {"name": "name", "mode": "mode"}}, "top": "268px", "digitalIn": true, "number": "64", "mode": "INPUT", "left": "428px", "type": "DigitalPin", "analogIn": true}, {"layer": "pins", "angle": 270, "name": "A11", "digitalOut": true, "assetGlobals": {"a11": {"name": "name", "mode": "mode"}}, "top": "268px", "digitalIn": true, "number": "65", "mode": "INPUT", "left": "441px", "type": "DigitalPin", "analogIn": true}, {"layer": "pins", "angle": 270, "name": "A12", "digitalOut": true, "assetGlobals": {"a12": {"name": "name", "mode": "mode"}}, "top": "268px", "digitalIn": true, "number": "66", "mode": "INPUT", "left": "454px", "type": "DigitalPin", "analogIn": true}, {"layer": "pins", "angle": 270, "name": "A13", "digitalOut": true, "assetGlobals": {"a13": {"name": "name", "mode": "mode"}}, "top": "268px", "digitalIn": true, "number": "67", "mode": "INPUT", "left": "467px", "type": "DigitalPin", "analogIn": true}, {"layer": "pins", "angle": 270, "name": "A14", "digitalOut": true, "assetGlobals": {"a14": {"name": "name", "mode": "mode"}}, "top": "268px", "digitalIn": true, "number": "68", "mode": "INPUT", "left": "480px", "type": "DigitalPin", "analogIn": true}, {"layer": "pins", "angle": 270, "name": "A15", "digitalOut": true, "assetGlobals": {"a15": {"name": "name", "mode": "mode"}}, "top": "268px", "digitalIn": true, "number": "69", "mode": "INPUT", "left": "493px", "type": "DigitalPin", "analogIn": true}], "uid": "1.openshield_mega.pins.modk.it", "top": "0px", "bounds": {"top": -120, "bottom": 394, "right": 628, "left": 170}, "stateVars": {"d10": false, "d11": false, "d12": false, "d13": false, "top": false, "a1": false, "a0": false, "a3": false, "a2": false, "a5": false, "a4": false, "d8": false, "d9": false, "d6": false, "d7": false, "d4": false, "d5": false, "d2": false, "d3": false, "left": false}, "type": "AssetGroup", "left": "0px"}, "1.while.blocks.modk.it": {"category": "control", "uid": "1.while.blocks.modk.it", "color": "orange", "docs": {"parameters": [{"type": "bool", "description": "Drag in an operator >, <, =, not, and, or.", "name": "condition"}], "description": "Blocks inside *while* run when the **condition** is true. Otherwise the block do not run.", "name": "while", "hint": ""}, "extensionOf": "1.c.autoyield.blocks.modk.it", "statementElements": [{"elements": [{"text": "while", "type": "CodeElement", "value": "while("}, {"assetGlobals": {"subBlocks": {"0": "subBlock"}}, "type": "BlockHolder", "elements": [{"color": "orange", "type": "BooleanArgument", "value": "1"}], "accepts": ["BooleanBlock"]}, {"type": "CodeElement", "value": "){"}], "type": "LineElement"}], "includes": ["1.modkit.h.code.modk.it"], "tokens": ["while"], "children": [null]}, "1.vex.iq.setTouchLedColor.blocks.modk.it": {"category": "setup", "uid": "1.vex.iq.setTouchLedColor.blocks.modk.it", "color": "darkblue", "docs": {"parameters": [{"options": ["WHITE", "RED", "RED_VIOLET", "VIOLET", "BLUE_VIOLET", "BLUE", "BLUE_GREEN", "GREEN", "YELLOW_GREEN", "YELLOW", "YELLOW_ORANGE", "ORANGE", "RED_ORANGE"], "type": "color", "description": "Select from the list.", "name": "color"}], "type": "StatementBlock", "description": "Sets the color of the **Touch LED**. ", "name": "set color", "hint": "The **Touch LED** must be ON for the color to show. Use the the *light* block to turn the **Touch LED** ON. "}, "extensionOf": "1.statement.blocks.modk.it", "statementElements": [{"elements": [{"text": "set color to", "type": "CodeElement", "value": "setColor("}, {"assetGlobals": {"subBlocks": {"0": "subBlock"}}, "type": "BlockHolder", "elements": [{"enumIcon": "images/vex/enum_icons/color.png", "elements": [{"values": ["WHITE", "RED", "RED_VIOLET", "VIOLET", "BLUE_VIOLET", "BLUE", "BLUE_GREEN", "GREEN", "YELLOW_GREEN", "YELLOW", "YELLOW_ORANGE", "ORANGE", "RED_ORANGE"], "type": "DropdownMenu", "autoMinWidth": "true"}], "assetGlobals": {"params": {"0": "value"}}, "color": "darkblue", "readonly": true, "type": "EnumArgument"}], "accepts": ["EnumBlock.color"]}, {"text": "", "type": "CodeElement", "value": ");"}], "type": "LineElement"}], "tokens": ["setMotorBraking"]}, "1.if_else.blocks.modk.it": {"category": "control", "elements": [{"color": "orange", "elements": [{"elements": [{"text": "if  ", "type": "CodeElement", "value": "if("}, {"assetGlobals": {"subBlocks": {"0": "subBlock"}}, "type": "BlockHolder", "elements": [{"color": "orange", "type": "BooleanArgument", "value": "1"}], "accepts": ["BooleanBlock"]}, {"type": "CodeElement", "value": "){"}], "type": "LineElement"}], "type": "StatementElement"}, {"color": "orange", "elements": [{"assetGlobals": {"children": {"0": "subBlock"}}, "type": "BlockHolder", "elements": [{"type": "StatementHighlight"}], "accepts": ["StatementBlock"]}], "type": "CompoundStatementElement"}, {"color": "orange", "elements": [{"elements": [{"text": "else", "type": "CodeElement", "value": "}\nelse{"}], "type": "LineElement"}], "type": "SubStatementElement"}, {"color": "orange", "elements": [{"assetGlobals": {"children": {"1": "subBlock"}}, "type": "BlockHolder", "elements": [{"type": "StatementHighlight"}], "accepts": ["StatementBlock"]}], "type": "CompoundStatementElement"}, {"color": "orange", "elements": [{"elements": [{"type": "CodeElement", "value": "}"}], "type": "LineElement"}], "type": "SubStatementElement"}, {"elements": [{"assetGlobals": {"color": "color", "sibling": "subBlock"}, "type": "BlockHolder", "elements": [{"type": "StatementHighlight"}], "accepts": ["StatementBlock"]}], "type": "SiblingElement"}], "uid": "1.if_else.blocks.modk.it", "color": "orange", "docs": {"parameters": [{"type": "bool", "description": "Drag in an operator >, <, =, not, and, or.", "name": "condition"}], "description": "Blocks placed inside *if* run when the **condition** is true. Blocks placed inside the *else* run when the **condition** is false.", "name": "if else", "hint": ""}, "tokens": ["if", "else"], "stateVars": {"top": true, "subBlocks": false, "sibling": false, "params": false, "children": false, "left": true}, "type": "CompoundBlock"}, "1.vex.iq.slideSliderBy.blocks.modk.it": {"category": "output", "uid": "1.vex.iq.slideSliderBy.blocks.modk.it", "color": "blue", "docs": {"category": "output", "description": "*Slides* the **Slider** a selected direction by a selected amount of *slide*. The *direction* is either FWD or REV. The amount of *slide* can be in millimeters (mm) or inches (in).", "parameters": [{"options": ["FWD", "REV"], "type": "slide", "description": "select a direction from the list", "name": "direction"}, {"type": "num", "description": "select a **amount of slide** from the list, type a number, or use a variable (any negative or positive number)", "name": "slide"}], "hint": "Negative amounts of *slide* will go in the opposite direction that is selected. Numbers with decimals are allowed.", "type": "StatementBlock", "name": "slide"}, "extensionOf": "1.statement.blocks.modk.it", "statementElements": [{"elements": [{"text": "slide", "type": "CodeElement", "value": "slideRelative("}, {"assetGlobals": {"subBlocks": {"0": "subBlock"}}, "type": "BlockHolder", "elements": [{"enumIcon": "images/vex/enum_icons/direction-black.png", "elements": [{"feed": "@name@.outDirection.values", "values": ["FWD", "REV"], "type": "DropdownMenu", "autoMinWidth": "true"}], "assetGlobals": {"params": {"0": "value"}}, "value": "", "color": "blue", "readonly": true, "type": "EnumArgument"}], "accepts": ["EnumBlock.linearDirection"]}, {"text": "", "type": "CodeElement", "value": ","}, {"assetGlobals": {"subBlocks": {"1": "subBlock"}}, "type": "BlockHolder", "elements": [{"elements": [{"values": ["45", "90", "180", "360", "720"], "type": "DropdownMenu", "autoMinWidth": "true"}], "assetGlobals": {"params": {"1": "value"}}, "maxChars": "32", "color": "blue", "allowChars": "0-9.", "type": "NumberArgument"}], "accepts": ["NumberBlock"]}, {"text": "", "type": "CodeElement", "value": ","}, {"assetGlobals": {"params": {"2": "value"}}, "readonly": true, "elements": [{"values": ["mm", "in"], "type": "DropdownMenu", "autoMinWidth": "true"}], "type": "NameArgument", "value": "mm"}, {"text": "", "type": "CodeElement", "value": ");"}], "type": "LineElement"}], "tokens": ["slideMotor"], "sibling": null}, "1.vex.iq.driveDrivetrain.blocks.modk.it": {"category": "output", "uid": "1.vex.iq.driveDrivetrain.blocks.modk.it", "color": "blue", "docs": {"category": "output", "description": "*Drives* the **Drivetrain** a selected **direction**. The **direction** is either FWD or REV. ", "parameters": [{"type": "direction", "description": "Select from the list.", "name": "direction"}], "hint": "", "type": "StatementBlock", "name": "drive"}, "extensionOf": "1.statement.blocks.modk.it", "statementElements": [{"elements": [{"text": "drive  ", "type": "CodeElement", "value": "drive("}, {"assetGlobals": {"subBlocks": {"0": "subBlock"}}, "type": "BlockHolder", "elements": [{"elements": [{"values": ["FWD", "REV"], "type": "DropdownMenu", "autoMinWidth": "true"}], "assetGlobals": {"params": {"0": "value"}}, "value": "", "color": "blue", "readonly": true, "type": "NumberArgument"}], "accepts": ["NumberBlock"]}, {"type": "CodeElement", "value": ");"}], "type": "LineElement"}], "tokens": ["goMotor"], "sibling": null}, "ui.projectControls.modk.it": {"styles": {"normal": {"boxShadow": "0 1px 0 rgba(255,255,255,0.6)", "_borderColor": "#5C5C5C", "height": 37, "width": 260, "marginLeft": 16, "background": "transparent url(images/bg_project_info.png) no-repeat 0 0", "marginTop": 10, "border": "1px solid #6a6e71"}}, "elements": [{"styles": {"normal": {"margin": 0}}, "name": "ProgramTitle", "type": "HTMLContainer", "html": "
Status...
Error...
Success...
", "htmlClass": "project_title", "id": ""}, {"styles": {"normal": {"right": 0, "top": 0, "height": 35, "width": 56, "background": "transparent url(images/bg_project_info_coverup.png) no-repeat 0 0", "position": "absolute"}}, "type": "Container", "name": "project_name_coverup"}, {"styles": {"normal": {"right": 6, "top": 10, "height": 15, "width": 50, "background": "transparent url(images/btn_project_dropdown.png) no-repeat 0 0", "position": "absolute"}}, "onLoad": "if(pyInterface == 'cfe' || Boolean(isCordova)){this.items=this.loggedInItems;this.parseItems();} else{this.loggedOutItems = this.items; Events.register('SignedInOut', function(status,email){ if(status=='signed_in'){ this.items=this.loggedInItems.slice(0);/* slice(0) to clone so we don't keep adding email addresses to original*/ this.items.push( {'name':email,'value':'logged_in','disabled':true,'color':'#88F'} ); this.parseItems(); } else if(status=='signed_out'){ this.items = this.loggedOutItems; this.parseItems(); } },this); Events.register('UpdateAvailable', function(){this.items=this.updateAvailableItems.slice(0); this.parseItems();},this);}", "name": "project_dropdown", "items": [{"callback": "StateManager.newProject();", "name": "New Project…", "value": "new"}, {"disabled": true, "callback": "Events.broadcast('component.popoverShowContent', [this, {uid:'ui.loadProjects.modk.it', modal:false, cancelable:false, saveButtonText:'close', positions: ['bottom','left','right','top'] }, function(obj){/*console.log('BROWSE CALLBACK = ',obj);*/}, this, null, {'normal':{'maxWidth':840}}]);", "name": "Browse…", "value": "browse"}, {"divider": true}, {"disabled": true, "callback": "Events.broadcast('doSave', []);", "name": "Save", "value": "save"}, {"divider": true}, {"disabled": false, "callback": "Events.broadcast('doDownloadMkc', []);", "name": "Save to Desktop", "value": "download"}, {"divider": true}, {"color": "#88F", "disabled": true, "name": "Please Sign In", "value": "not_logged_in"}], "updateAvailableItems": [{"callback": "StateManager.newProject();", "name": "New Project…", "value": "new"}, {"disabled": true, "callback": "Events.broadcast('component.popoverShowContent', [this, {uid:'ui.loadProjects.modk.it', modal:false, cancelable:false, saveButtonText:'close', positions: ['bottom','left','right','top'] }, function(obj){/*console.log('BROWSE CALLBACK = ',obj);*/}, this, null, {'normal':{'maxWidth':840}}]);", "name": "Browse…", "value": "browse"}, {"divider": true}, {"disabled": true, "callback": "Events.broadcast('doSave', []);", "name": "Save", "value": "save"}, {"divider": true}, {"disabled": false, "callback": "Events.broadcast('doDownloadMkc', []);", "name": "Save to Desktop", "value": "download"}, {"divider": true}, {"color": "#88F", "disabled": true, "name": "Please Sign In", "value": "not_logged_in"}], "loggedInItems": [{"callback": "StateManager.newProject();", "name": "New Project…", "value": "new"}, {"callback": "Events.broadcast('component.popoverShowContent', [this, {uid:'ui.loadProjects.modk.it', modal:false, cancelable:false, saveButtonText:'Close', positions: ['bottom','left','right','top'] }, function(obj){console.log('BROWSE CALLBACK = ',obj);}, this, null, {'normal':{'maxWidth':840}}]);", "name": "Browse…", "value": "browse"}, {"divider": true}, {"callback": "Events.broadcast('doSave', []);", "name": "Save", "value": "save"}, {"divider": true}, {"disabled": false, "callback": "Events.broadcast('doDownloadMkc', []);", "name": "Save to Desktop", "value": "download"}, {"divider": true}], "type": "ImageDropdown", "id": "project_dropdown_button"}], "type": "Container", "name": "ProjectControls", "uid": "ui.projectControls.modk.it"}, "1.vex.pins.modk.it": {"elements": [{"layer": "pins", "angle": 90, "name": "PORT1", "digitalOut": true, "assetGlobals": {"d1": {"name": "name", "mode": "mode"}}, "top": "-25px", "digitalIn": true, "number": "1", "mode": "VEX", "hidden": "true", "type": "DigitalPin", "left": "325px"}, {"layer": "pins", "angle": 90, "name": "PORT2", "digitalOut": true, "assetGlobals": {"d2": {"name": "name", "mode": "mode"}}, "top": "-25px", "digitalIn": true, "number": "2", "mode": "VEX", "hidden": "true", "type": "DigitalPin", "left": "325px"}, {"layer": "pins", "angle": 90, "name": "PORT3", "digitalOut": true, "assetGlobals": {"d3": {"name": "name", "mode": "mode"}}, "top": "-25px", "digitalIn": true, "number": "3", "mode": "VEX", "hidden": "true", "type": "DigitalPin", "analogOut": true, "left": "312px"}, {"layer": "pins", "angle": 90, "name": "PORT4", "digitalOut": true, "assetGlobals": {"d4": {"name": "name", "mode": "mode"}}, "top": "-25px", "digitalIn": true, "number": "4", "mode": "VEX", "hidden": "true", "type": "DigitalPin", "left": "299px"}, {"layer": "pins", "angle": 90, "name": "PORT5", "digitalOut": true, "assetGlobals": {"d5": {"name": "name", "mode": "mode"}}, "top": "-25px", "digitalIn": true, "number": "5", "mode": "VEX", "hidden": "true", "type": "DigitalPin", "analogOut": true, "left": "286px"}, {"layer": "pins", "angle": 90, "name": "PORT6", "digitalOut": true, "assetGlobals": {"d6": {"name": "name", "mode": "mode"}}, "top": "-25px", "digitalIn": true, "number": "6", "mode": "VEX", "hidden": "true", "type": "DigitalPin", "analogOut": true, "left": "273px"}, {"layer": "pins", "angle": 90, "name": "PORT7", "digitalOut": true, "assetGlobals": {"d7": {"name": "name", "mode": "mode"}}, "top": "-25px", "digitalIn": true, "number": "7", "mode": "VEX", "hidden": "true", "type": "DigitalPin", "left": "260px"}, {"layer": "pins", "angle": 90, "name": "PORT8", "digitalOut": true, "assetGlobals": {"d8": {"name": "name", "mode": "mode"}}, "top": "-25px", "digitalIn": true, "number": "8", "mode": "VEX", "hidden": "true", "type": "DigitalPin", "left": "242px"}, {"layer": "pins", "angle": 90, "name": "PORT9", "digitalOut": true, "assetGlobals": {"d9": {"name": "name", "mode": "mode"}}, "top": "-25px", "digitalIn": true, "number": "9", "mode": "VEX", "hidden": "true", "type": "DigitalPin", "analogOut": true, "left": "229px"}, {"layer": "pins", "angle": 90, "name": "PORT10", "digitalOut": true, "assetGlobals": {"d10": {"name": "name", "mode": "mode"}}, "top": "-25px", "digitalIn": true, "number": "10", "mode": "VEX", "hidden": "true", "type": "DigitalPin", "analogOut": true, "left": "216px"}, {"layer": "pins", "angle": 90, "name": "PORT11", "digitalOut": true, "assetGlobals": {"d11": {"name": "name", "mode": "mode"}}, "top": "-25px", "digitalIn": true, "number": "11", "mode": "VEX", "hidden": "true", "type": "DigitalPin", "analogOut": true, "left": "203px"}, {"layer": "pins", "angle": 90, "name": "PORT12", "digitalOut": true, "assetGlobals": {"d12": {"name": "name", "mode": "mode"}}, "top": "-25px", "digitalIn": true, "number": "12", "mode": "VEX", "hidden": "true", "type": "DigitalPin", "left": "190px"}], "uid": "1.vex.pins.modk.it", "top": "0px", "bounds": {"top": -120, "bottom": 394, "right": 468, "left": 170}, "stateVars": {"d10": false, "d11": false, "d12": false, "d13": false, "top": false, "a1": false, "a0": false, "a3": false, "a2": false, "a5": false, "a4": false, "d8": false, "d9": false, "d6": false, "d7": false, "d4": false, "d5": false, "d2": false, "d3": false, "left": false}, "type": "AssetGroup", "left": "0px"}, "1.vex.iq.goMotor.blocks.modk.it": {"category": "output", "uid": "1.vex.iq.goMotor.blocks.modk.it", "color": "blue", "docs": {"category": "output", "description": "", "parameters": [{"type": "num", "description": "determines which _Motor_ you are controlling", "name": "motor"}, {"type": "num", "description": "sets the direction the _Motor_ will move", "name": "direction"}], "hint": "", "type": "StatementBlock", "name": "drive"}, "extensionOf": "1.statement.blocks.modk.it", "statementElements": [{"elements": [{"text": "go    ", "type": "CodeElement", "value": "goMotor("}, {"assetGlobals": {"subBlocks": {"0": "subBlock"}}, "type": "BlockHolder", "elements": [{"elements": [{"values": ["FWD", "REV"], "type": "DropdownMenu", "autoMinWidth": "true"}], "assetGlobals": {"params": {"0": "value"}}, "value": "", "color": "blue", "readonly": true, "type": "NumberArgument"}], "accepts": ["NumberBlock"]}, {"type": "CodeElement", "value": ");"}], "type": "LineElement"}], "tokens": ["goMotor"], "sibling": null}, "1.vex.iq.sliderPosition.blocks.modk.it": {"category": "input", "groupElements": [{"assetGlobals": {"localScope": "ignore", "subBlocks": {"0": "subBlock"}}, "ignore": true, "elements": [{"assetGlobals": {"params": {"0": "value"}}, "color": "blue", "readonly": true, "elements": [{"feed": "1.vex.iq.position.blocks.modk.itComponentListChange", "values": [], "type": "DropdownMenu", "autoMinWidth": "true"}], "type": "NameArgument"}], "accepts": ["NoBlock"], "type": "BlockHolder"}, {"assetGlobals": {"localScope": "ignore"}, "ignore": true, "type": "CodeElement", "value": ".", "text": ""}, {"text": "position in", "type": "CodeElement", "value": "position("}, {"assetGlobals": {"params": {"1": "value"}}, "readonly": true, "elements": [{"values": ["mm", "in"], "type": "DropdownMenu", "autoMinWidth": "true"}], "type": "NameArgument", "value": "mm"}, {"type": "CodeElement", "value": ")"}], "uid": "1.vex.iq.sliderPosition.blocks.modk.it", "color": "purple", "docs": {"category": "input", "type": "NumberBlock", "description": "Gets the *position* the **Slider** in mm.", "name": "position", "hint": ""}, "extensionOf": "1.number.blocks.modk.it", "tokens": ["currentSliderEncoder"], "stateVars": {"localScope": false, "params": false, "subBlocks": false}}, "1.vex.iq.resetGyroAngle.blocks.modk.it": {"category": "setup", "uid": "1.vex.iq.resetGyroAngle.blocks.modk.it", "color": "darkblue", "docs": {"type": "StatementBlock", "description": "*Resets* the **Gyro's** angle & rotation to zero.", "name": "reset angle & rotation", "hint": ""}, "extensionOf": "1.statement.blocks.modk.it", "statementElements": [{"elements": [{"text": "reset angle & rotation", "type": "CodeElement", "value": "resetAngle("}, {"text": "", "type": "CodeElement", "value": ");"}], "type": "LineElement"}], "tokens": ["setMotorBraking"]}, "1.vex.iq.speed.blocks.modk.it": {"category": "input", "groupElements": [{"assetGlobals": {"localScope": "ignore", "subBlocks": {"0": "subBlock"}}, "ignore": true, "elements": [{"assetGlobals": {"params": {"0": "value"}}, "color": "blue", "readonly": true, "elements": [{"feed": "1.vex.iq.speed.blocks.modk.itComponentListChange", "values": [], "type": "DropdownMenu", "autoMinWidth": "true"}], "type": "NameArgument"}], "accepts": ["NoBlock"], "type": "BlockHolder"}, {"assetGlobals": {"localScope": "ignore"}, "ignore": true, "type": "CodeElement", "value": ".", "text": ""}, {"text": "speed", "type": "CodeElement", "value": "currentVelocity("}, {"type": "CodeElement", "value": ")"}], "uid": "1.vex.iq.speed.blocks.modk.it", "color": "purple", "docs": {"category": "input", "description": "Gets the *speed* of the **Drivetrain**, **Rotator** or **Slider** in revolutions per minute (RPM).", "title": "speed", "hint": "", "type": "NumberBlock", "name": "speed"}, "extensionOf": "1.number.blocks.modk.it", "tokens": ["speed"], "stateVars": {"localScope": false, "params": false, "subBlocks": false}}, "1.knob.components.modk.it": {"elements": [{"feed": "analogInPinsListChange", "layer": "pins", "angle": 0, "assetGlobals": {"wire": "name"}, "top": "-3px", "label": "SIG", "values": [], "mode": "INPUT_COMPONENT", "type": "NewDigitalPin", "left": "15px"}, {"layer": "pins", "angle": 0, "name": "GND", "top": "-3px", "label": "GND", "mode": "GROUND_COMPONENT", "type": "NewPowerPin", "left": "15px"}, {"layer": "pins", "angle": 0, "name": "5V", "top": "-3px", "label": "5V", "mode": "VCC_COMPONENT", "type": "NewPowerPin", "left": "15px"}], "blocks": [{"uid": "1.readKnob.blocks.modk.it"}], "uid": "1.knob.components.modk.it", "docs": {"type": "GenericComponent", "description": "The knob component configures a common potentiometer.", "title": "knob"}, "library": "1.knob.library.modk.it", "defaultName": "KNOB", "componentImage": {"src": "images/hardware/knob.png", "top": "5px", "left": "5px"}, "stateVars": {"top": true, "wire": false, "name": true, "left": true}, "componentArray": "int knobArray", "configuration": [{"type": "text", "value": "setupKnob("}, {"type": "objectVar", "value": "name"}, {"type": "text", "value": ","}, {"type": "objectVar", "value": "wire"}, {"type": "text", "value": ");"}], "type": "GenericComponent", "icon": "images/hardware/generic_components/knob.png"}, "1.motoproto.hardware.modk.it": {"elements": [{"src": "images/hardware/motoproto.png", "layer": "base", "type": "SimpleImage"}], "blocks": [{"uid": "1.motorSpeed.blocks.modk.it"}, {"uid": "1.motorOn.blocks.modk.it"}, {"uid": "1.motorOff.blocks.modk.it"}], "uid": "1.motoproto.hardware.modk.it", "pinsUsed": ["PIN2", "PIN3", "PIN4", "PIN5", "PIN6", "PIN7", "PIN8", "PIN9", "PIN10", "PIN11", "PIN12", "PIN13", "A4", "A5"], "stateVars": {"draggable": true, "top": true, "left": true}, "hardwareComponents": [{"isInstance": true, "wire": "PIN13", "uid": "1.led.components.modk.it", "name": "LED1"}, {"isInstance": true, "wire": "PIN12", "uid": "1.button.components.modk.it", "name": "BUTTON1"}], "type": "GenericHardware", "thumbnail": "images/hardware/motoproto-tiny.png", "name": "Modkit MotoProto"}, "1.vex.iq.setRotatorHolding.blocks.modk.it": {"category": "setup", "uid": "1.vex.iq.setRotatorHolding.blocks.modk.it", "color": "darkblue", "docs": {"parameters": [{"range": "ON, OFF", "options": ["ON", "OFF"], "type": "name", "description": "select ON or OFF from the list", "name": "hold"}], "type": "StatementBlock", "description": "When *set holding to* is ON the rotator resists turning. When *set holding to* is OFF the rotator turns freely. *Holding* only applies when the rotator is stopped or when velocity is set to zero.", "name": "set holding", "hint": "**Holding** is useful when you raise a load and want it to stay in place, or for parking your robot on hills."}, "extensionOf": "1.statement.blocks.modk.it", "statementElements": [{"elements": [{"text": "set Holding to", "type": "CodeElement", "value": "setHolding("}, {"assetGlobals": {"subBlocks": {"0": "subBlock"}}, "type": "BlockHolder", "elements": [{"elements": [{"values": ["ON", "OFF"], "type": "DropdownMenu", "autoMinWidth": "true"}], "assetGlobals": {"params": {"0": "value"}}, "value": "ON", "color": "darkblue", "readonly": true, "type": "NumberArgument"}], "accepts": ["NumberBlock"]}, {"text": "", "type": "CodeElement", "value": ");"}], "type": "LineElement"}], "tokens": ["setRotatorBraking"]}, "1.vex.iq.resetSliderPosition.blocks.modk.it": {"category": "setup", "uid": "1.vex.iq.resetSliderPosition.blocks.modk.it", "color": "darkblue", "docs": {"type": "StatementBlock", "description": "Resets the **Slider's** rotation to zero. This does not move the slider. It just resets the position's value.", "name": "reset position", "hint": "Resetting the position of a slider after the slider is at a known position can simplify programming."}, "extensionOf": "1.statement.blocks.modk.it", "statementElements": [{"elements": [{"text": "reset position", "type": "CodeElement", "value": "resetPosition();"}], "type": "LineElement"}], "tokens": ["setSliderPosition"]}, "1.vex.wizard.upgradelink.modk.it": {"onLoad": "", "elements": [{"styles": {"normal": {"top": 0, "height": 385, "padding": "20px 50px", "width": 600, "backgroundColor": "#DCDEE0", "position": "absolute", "left": 0}}, "onLoad": "downloadURL(linkDownloadURL);", "elements": [{"styles": {"normal": {"width": "auto", "float": "none", "height": "auto", "fontWeight": "bold", "fontSize": 18, "position": "relative"}}, "text": "The latest version of Modkit Link should automatically start downloading in a few seconds.", "type": "FrameworkText"}, {"styles": {"normal": {"fontWeight": "bold", "float": "none", "paddingTop": 40, "height": "auto", "width": "auto", "fontSize": 18, "position": "relative", "textAlign": "center"}}, "text": "If it doesn't Click here to download.", "type": "FrameworkText", "disableUnderscoreHack": true, "onLoad": "$.later(100,this,function(){this.setText('If it doesn't Click here to download.'); },false);"}, {"styles": {"show": {"styleCondition": "navigator.userAgent.toLowerCase().indexOf('macintosh')>-1", "display": "block", "visibility": "visible"}, "normal": {"display": "none", "float": "none", "paddingTop": 40, "height": "auto", "width": "auto", "fontSize": 14, "visibility": "hidden", "position": "relative", "textAlign": "left"}}, "markdown": true, "name": "LinkInstallInstructionsMac", "disableUnderscoreHack": true, "text": "**When the download has completed:** \n\n1. Quit Modkit Link by clicking on the \"M\" icon in the menu bar in the upper right of your screen and selecting quit from the menu. \n2. Locate & open Modkit-Link-2014-10-03.dmg in your Downloads folder (it may open automatically)\n3. Accept the License and then drag Modkit Link to your Applications folder (if asked, replace the old app). \n4. **When the installation is complete, browse to your Applications folder and start the new version of Modkit Link and then click Restart below.**", "type": "FrameworkText"}, {"styles": {"show": {"styleCondition": "navigator.userAgent.toLowerCase().indexOf('windows')>-1", "display": "block", "visibility": "visible"}, "normal": {"display": "none", "float": "none", "paddingTop": 48, "height": "auto", "width": "auto", "fontSize": 14, "visibility": "hidden", "position": "relative", "textAlign": "left"}}, "text": "**When the download has completed:** \n\n1. Quit Modkit Link by clicking on the icon in the system tray (the icon may be hidden click the arrow by the system tray to show it). \n2. Locate & Run Modkit-Link-2014-10-03.exe. \n3. Follow the instructions to install Modkit Link \n4. **When the installation is complete, start the new version of Modkit Link and click Continue below.**", "markdown": true, "type": "FrameworkText", "name": "LinkInstallInstructionsWindows"}], "type": "Container", "name": "FindAndRunModkitLink"}], "uid": "1.vex.wizard.upgradelink.modk.it", "title": "Find Modkit Link", "onNext": "window.onbeforeunload = null;location.reload();", "next": {"uid": "1.vex.wizard.runlink.modk.it"}, "type": "WizardStep", "nextText": "Next"}, "ui.button.controllerConfig.modk.it": {"styles": {"active": {"backgroundPosition": "0px -0px"}, "disabled": {"backgroundPosition": "0px -60px"}, "hover": {"backgroundPosition": "0px -20px"}, "hide": {"styleCondition": "!Boolean(modkitNamespace.GenericComponent.managers['1.vex.iq.controller.components.modk.it'])", "display": "none", "visibility": "hidden"}, "normal": {"right": 30, "bottom": 4, "height": 21, "zIndex": 1, "width": 25, "position": "absolute", "left": "auto"}}, "onLoad": "Events.register('ComponentManager.Added.1.vex.iq.controller.components.modk.it', function(){this.testStyleConditions();}, this); Events.register('ComponentManager.Removed.1.vex.iq.controller.components.modk.it', function(){this.testStyleConditions();}, this);", "uid": "ui.button.controllerConfig.modk.it", "type": "ConfigButton", "onClick": "function(){ this.container.container.showControllerActions(this); }", "htmlClass": "controller_settings_button"}, "1.vex.iq.setDrivetrainPower.blocks.modk.it": {"category": "setup", "uid": "1.vex.iq.setDrivetrainPower.blocks.modk.it", "color": "darkblue", "docs": {"parameters": [{"range": "0-100%", "options": ["0", "25", "50", "75", "100"], "type": "num", "description": "select a power from the list, type a number, or use a variable (power ranges from 0 to 100 percent)", "name": "power"}], "type": "StatementBlock", "description": "*Set max power* sets the maximum output power of the **Drivetrain**. Power is set as a percent of maximum power.", "name": "set max power", "hint": "Setting max power to 25% will help a claw not crush an object."}, "extensionOf": "1.statement.blocks.modk.it", "statementElements": [{"elements": [{"text": "set max power to", "type": "CodeElement", "value": "setMaxPower("}, {"assetGlobals": {"subBlocks": {"0": "subBlock"}}, "type": "BlockHolder", "elements": [{"elements": [{"values": ["25", "50", "75", "100"], "type": "DropdownMenu", "autoMinWidth": "true"}], "assetGlobals": {"params": {"0": "value"}}, "maxChars": "32", "color": "darkblue", "readonly": false, "rangeMin": 0, "allowChars": "0-9.", "rangeMax": 100, "type": "NumberArgument"}], "accepts": ["NumberBlock"]}, {"elements": [{"values": ["%"], "type": "DropdownMenu", "autoMinWidth": "true"}], "assetGlobals": {"params": {"1": "value"}}, "value": "%", "readonly": true, "hideCodeView": true, "type": "NameArgument"}, {"text": "", "type": "CodeElement", "value": ");"}], "type": "LineElement"}], "tokens": ["setDrivetrainSpeed"]}, "1.vex.iq.colorSensorClose.blocks.modk.it": {"category": "input", "groupElements": [{"assetGlobals": {"localScope": "ignore", "subBlocks": {"0": "subBlock"}}, "ignore": true, "elements": [{"assetGlobals": {"params": {"0": "value"}}, "color": "blue", "readonly": true, "elements": [{"feed": "1.vex.iq.colorSensorClose.blocks.modk.itComponentListChange", "values": [], "type": "DropdownMenu", "autoMinWidth": "true"}], "type": "NameArgument"}], "accepts": ["NoBlock"], "type": "BlockHolder"}, {"assetGlobals": {"localScope": "ignore"}, "ignore": true, "type": "CodeElement", "value": ".", "text": ""}, {"text": "near", "type": "CodeElement", "value": "close("}, {"text": "", "type": "CodeElement", "value": ")"}], "uid": "1.vex.iq.colorSensorClose.blocks.modk.it", "color": "purple", "docs": {"category": "input", "type": "BooleanBlock", "description": "This block is true when an object is close to the **Color Sensor**. Otherwise the block is false.", "name": "near", "hint": "Use *near* to determine is an object is in front of the **Color Sensor** before checking an objects color."}, "extensionOf": "1.boolean.blocks.modk.it", "tokens": ["colorSensorClose"], "stateVars": {"localScope": false, "params": false, "subBlocks": false}}, "1.vex.iq.settingsSlider.mechanism.modk.it": {"styles": {"normal": {"width": "300px", "height": "auto"}}, "elements": [{"text": "Slider Settings", "uid": "1.vex.iq.settingsHeading.modk.it"}, {"uid": "buttonClose.modk.it", "onClick": "function(){ this.container.container.container.saveAndHide(); }"}, {"styles": {"normal": {"position": "relative", "marginTop": "3px", "marginBottom": "2px", "width": "100%", "height": "auto"}}, "type": "HorizontalRule"}, {"styles": {"normal": {"position": "relative", "marginRight": "10px", "width": "140px", "height": 50}}, "onLoad": "this.prevNameHack = this.topLevelWidget.getState().componentName;", "onKeypress": "this.value = this.value.toUpperCase();", "assetGlobals": {"componentName": "value", "inputs": {"0": "this"}}, "maxChars": 12, "value": "", "label": "Name", "readonly": false, "key": "componentName", "allowChars": "A-Za-z0-9 _", "validate": "this.value=this.value.replace(' ','_').replace(' ','_'); if(this.value==this.prevNameHack){this.hideError();}else{ if(this.value==''){this.showError('Please choose a valid name.'); }else{var used = Identifiers.used(this.value); if(!used){this.hideError();}else{this.showError('The name \"'+this.value+'\" cannot be used because it '+used+'.
Please choose another name.'); /*this.$input.focus();*/}}}", "type": "Input", "inputType": "text"}, {"styles": {"hover": {"color": "#24a0ff"}, "focus": {"color": "#24a0ff"}, "normal": {"position": "relative", "marginRight": 10, "width": 140, "height": 50}}, "assetGlobals": {"motorLayout": "value"}, "text": "Left Motor", "value": "1Left", "label": "Motor Layout", "values": [{"name": "Left Motor", "value": "1Left"}, {"name": "Right Motor", "value": "1Right"}, {"name": "2 Motors", "value": "2"}], "key": "motorLayout", "onChange": "this.container[this.key] = this.value; Events.broadcast('slider.MotorLayoutChange', [], true);", "type": "Input", "inputType": "select"}, {"styles": {"hover": {"color": "#24a0ff"}, "focus": {"color": "#24a0ff"}, "normal": {"position": "relative", "marginRight": 20, "width": 110, "height": 50}}, "assetGlobals": {"limitSwitches": "value"}, "text": "None", "value": "none", "label": "Limit Switches", "values": [{"name": "None", "value": "none"}, {"name": "Forward Limit", "value": "1Front"}, {"name": "Reverse Limit", "value": "1Rear"}, {"name": "Both Limits", "value": "2"}], "key": "limitSwitches", "onChange": "this.container[this.key] = this.value; Events.broadcast('slider.LimitSwitchChange', [], true);", "type": "Input", "inputType": "select"}, {"styles": {"normal": {"position": "relative", "text-align": "right", "width": "30px", "height": 50}}, "assetGlobals": {"ratioIn": "value"}, "maxChars": "3", "value": "1", "label": "Gear Ratio", "key": "ratioIn", "allowChars": "0-9", "onChange": "this.container[this.key] = this.value;", "type": "Input", "inputType": "text"}, {"styles": {"normal": {"width": "10", "marginBottom": "2px", "height": "auto", "fontFamily": "Helvetica, Arial, sans-serif", "fontSize": "12px", "position": "relative", "marginTop": "24px", "textAlign": "left"}}, "text": " :", "type": "FrameworkText"}, {"styles": {"normal": {"position": "relative", "text-align": "right", "marginRight": 10, "width": "30px", "height": "auto"}}, "assetGlobals": {"ratioOut": "value"}, "maxChars": "3", "value": "1", "label": "", "key": "ratioOut", "allowChars": "0-9", "onChange": "this.container[this.key] = this.value;", "type": "Input", "inputType": "text"}, {"styles": {"hover": {"color": "#24a0ff"}, "focus": {"color": "#24a0ff"}, "normal": {"position": "relative", "marginRight": 0, "width": 80, "height": 50}}, "assetGlobals": {"pinionTeeth": "value"}, "value": "12", "label": "Pinion Teeth", "values": [{"name": "12", "value": "12"}, {"name": "24", "value": "24"}, {"name": "36", "value": "36"}, {"name": "48", "value": "48"}, {"name": "60", "value": "60"}], "key": "pinionTeeth", "onChange": "this.container[this.key] = this.value;", "type": "Input", "inputType": "select"}, {"styles": {"show": {"styleCondition": "this.container.motorLayout == '1Left' || this.container.motorLayout == '2'", "display": "block", "visibility": "visible"}, "normal": {"position": "relative", "width": "140px", "display": "none", "visibility": "hidden", "height": "auto"}}, "onLoad": "this.testStyleConditions(); Events.register('SettingsUpdate', function(){ $.later( 10, this, 'testStyleConditions'); }, this);", "assetGlobals": {"leftReverseDirection": "checked"}, "label": "left motor reversed", "onChange": "this.container.container.leftReverseDirection = this.checked;", "type": "Input", "inputType": "checkbox"}, {"styles": {"show": {"styleCondition": "this.container.motorLayout == '1Right' || this.container.motorLayout == '2'", "display": "block", "visibility": "visible"}, "normal": {"position": "relative", "width": "140px", "display": "none", "visibility": "hidden", "height": "auto"}}, "onLoad": " this.testStyleConditions(); Events.register('SettingsUpdate', function(){ $.later( 10, this, 'testStyleConditions'); }, this);", "assetGlobals": {"rightReverseDirection": "checked"}, "label": "right motor reversed", "onChange": "this.container.container.rightReverseDirection = this.checked;", "type": "Input", "inputType": "checkbox"}], "uid": "1.vex.iq.settingsSlider.mechanism.modk.it", "onUpdate": "this.container.container.save();", "stateVars": {"componentName": true, "motorLayout": true, "leftReverseDirection": true, "ratioOut": true, "ratioIn": true, "pinionTeeth": true, "limitSwitches": true, "rightReverseDirection": true}, "type": "Container"}, "1.12.vex.iq.build.modk.it": {"rules": {"all": {"requires": ["UserTask1.bin"]}, "vexIQ.ld.out": {"redirect": {"cmd": [{"alias": "TOOLSPATH"}, {"alias": "ARMCPP"}, {"text": " -P "}, {"alias": "BUILDDIR"}, {"text": "vexIQ.ld.in"}], "out": [{"alias": "BUILDDIR"}, {"text": "vexIQ.ld.out "}]}, "name": "generating linker script"}, "UserTask1.bin": {"requires": ["JumpTable.o", "c_init.o", "UserTask.o", "main.o", "vexIQ.ld.out"], "exec": [{"cmd": [{"alias": "TOOLSPATH"}, {"alias": "ARMGNU"}, {"text": "-ld -o "}, {"alias": "BUILDDIR"}, {"text": "UserTask1.elf -T "}, {"alias": "BUILDDIR"}, {"text": "vexIQ.ld.out "}, {"alias": "BUILDDIR"}, {"text": "jumpTable.o "}, {"alias": "BUILDDIR"}, {"text": "c_init.o "}, {"alias": "BUILDDIR"}, {"text": "UserTask.o "}, {"alias": "BUILDDIR"}, {"text": "main.o "}, {"alias": "LINC"}, {"text": " -lc -lgcc"}], "name": "building elf"}, {"cmd": [{"alias": "TOOLSPATH"}, {"alias": "ARMGNU"}, {"text": "-objcopy "}, {"alias": "BUILDDIR"}, {"text": "UserTask1.elf "}, {"alias": "BUILDDIR"}, {"text": "UserTask1.bin -O binary"}], "name": "building bin"}]}, "JumpTable.o": {"exec": [{"cmd": [{"alias": "TOOLSPATH"}, {"alias": "ARMGCC"}, {"alias": "COPS"}, {"alias": "CINC"}, {"alias": "BUILDDIR"}, {"text": "jumpTable.c -o "}, {"alias": "BUILDDIR"}, {"text": "jumpTable.o"}], "name": "building vex jump (vector) table"}]}, "main.o": {"exec": [{"cmd": [{"alias": "TOOLSPATH"}, {"alias": "ARMGPP"}, {"alias": "CPPOPS"}, {"alias": "CINC"}, {"alias": "BUILDDIR"}, {"text": "main.c -o "}, {"alias": "BUILDDIR"}, {"text": "main.o"}], "name": "building vex main"}]}, "UserTask.o": {"exec": [{"cmd": [{"alias": "TOOLSPATH"}, {"alias": "ARMGPP"}, {"alias": "CPPOPS"}, {"alias": "CINC"}, {"alias": "BUILDDIR"}, {"text": "UserTask.cpp -o "}, {"alias": "BUILDDIR"}, {"text": "UserTask.o"}], "name": "building vex user task"}]}, "c_init.o": {"exec": [{"cmd": [{"alias": "TOOLSPATH"}, {"alias": "ARMGCC"}, {"alias": "COPS"}, {"alias": "CINC"}, {"alias": "BUILDDIR"}, {"text": "c_init.c -o "}, {"alias": "BUILDDIR"}, {"text": "c_init.o"}], "name": "building vex custom c-startup"}]}}, "uid": "1.12.vex.iq.build.modk.it", "sourceDir": "VEX/IQv1.12/", "aliases": {"ARMGPP": [{"text": "arm-none-eabi-g++"}], "LCPPOPS": [{"text": " -Os -nostartfiles -nostdlib -Wl,--gc-sections --entry=ResetISR -mthumb -mcpu=cortex-m4 -mfloat-abi=hard -mfpu=fpv4-sp-d16 -fsingle-precision-constant "}], "ARMCPP": [{"text": "arm-none-eabi-cpp"}], "CPPOPS": [{"text": " -c -g -Os -Wall -fno-rtti -fno-exceptions -ffunction-sections -fdata-sections -mthumb -mcpu=cortex-m4 -mfloat-abi=hard -mfpu=fpv4-sp-d16 -fsingle-precision-constant -DF_CPU=80000000L -MMD -DARDUINO=101 -DENERGIA=9 "}], "TOOLSPATH": [{"alias": "TOOLSDIR"}, {"text": "/lm4f/bin/"}], "CINC": [{"text": " -I ../lm4f -I ../lm4f/inc -I ../stellarpad "}], "COPS": [{"text": " -c -g -Os -Wall -ffunction-sections -fdata-sections -mthumb -mcpu=cortex-m4 -mfloat-abi=hard -mfpu=fpv4-sp-d16 -fsingle-precision-constant -DF_CPU=80000000L -MMD -DARDUINO=101 -DENERGIA=9 "}], "ARMGNU": [{"text": "arm-none-eabi"}], "ARMGCC": [{"text": "arm-none-eabi-gcc"}], "LINC": [{"text": " -L"}, {"alias": "TOOLSDIR"}, {"text": "/lm4f/arm-none-eabi/lib/thumb/armv7e-m/fpu/fpv4-sp-d16 -L"}, {"alias": "TOOLSDIR"}, {"text": "/lm4f/lib/gcc/arm-none-eabi/4.7.1 "}]}}, "1.vex.iq.drivetrainTurnSpeed.blocks.modk.it": {"category": "input", "groupElements": [{"assetGlobals": {"localScope": "ignore", "subBlocks": {"0": "subBlock"}}, "ignore": true, "elements": [{"assetGlobals": {"params": {"0": "value"}}, "color": "blue", "readonly": true, "elements": [{"feed": "1.vex.iq.drivetrainTurnSpeed.blocks.modk.itComponentListChange", "values": [], "type": "DropdownMenu", "autoMinWidth": "true"}], "type": "NameArgument"}], "accepts": ["NoBlock"], "type": "BlockHolder"}, {"assetGlobals": {"localScope": "ignore"}, "ignore": true, "type": "CodeElement", "value": ".", "text": ""}, {"text": "turn speed in ", "type": "CodeElement", "value": "turnSpeed("}, {"elements": [{"values": ["&"], "type": "DropdownMenu", "autoMinWidth": "true"}], "assetGlobals": {"params": {"1": "value"}}, "value": "%", "readonly": true, "hideCodeView": true, "type": "NameArgument"}, {"type": "CodeElement", "value": ")"}], "uid": "1.vex.iq.drivetrainTurnSpeed.blocks.modk.it", "color": "purple", "docs": {"category": "input", "type": "NumberBlock", "description": "Gets the *speed* of the **Drivetrain** turning in (%).", "name": "speed", "hint": ""}, "extensionOf": "1.number.blocks.modk.it", "tokens": ["motorSpeed"], "stateVars": {"localScope": false, "params": false, "subBlocks": false}}, "1.vex.iq.calibrateGyro.blocks.modk.it": {"category": "setup", "uid": "1.vex.iq.calibrateGyro.blocks.modk.it", "color": "darkblue", "docs": {"type": "StatementBlock", "description": "Causes the gyro to perform a 3 second calibration. This calibration minimizes errors in angle and rotation. Do not move the gyro during this command.", "name": "calibrate ", "hint": "No, really, don't move the gyro during this command. We recommend putting this block at the beginning of your program."}, "extensionOf": "1.statement.blocks.modk.it", "statementElements": [{"elements": [{"text": "calibrate", "type": "CodeElement", "value": "calibrate("}, {"text": "", "type": "CodeElement", "value": ");"}], "type": "LineElement"}], "tokens": [""]}, "1.vex.iq.turnMotorRevolutions.blocks.modk.it": {"category": "output", "uid": "1.vex.iq.turnMotorRevolutions.blocks.modk.it", "color": "blue", "docs": {"category": "output", "description": "Turns on a _Motor_ for a set number of revolutions and sets its direction.", "parameters": [{"type": "num", "description": "determines which _Motor_ you are controlling", "name": "motor"}, {"type": "num", "description": "sets the direction the _Motor_ will move", "name": "direction"}], "hint": "Deprecated", "type": "StatementBlock", "name": "turn motor revolutions"}, "extensionOf": "1.statement.blocks.modk.it", "statementElements": [{"elements": [{"text": "turn  ", "type": "CodeElement", "value": "turnRevolutions("}, {"assetGlobals": {"subBlocks": {"0": "subBlock"}}, "type": "BlockHolder", "elements": [{"elements": [{"values": ["FWD", "REV"], "type": "DropdownMenu", "autoMinWidth": "true"}], "assetGlobals": {"params": {"0": "value"}}, "value": "", "color": "blue", "readonly": true, "type": "NumberArgument"}], "accepts": ["NumberBlock"]}, {"text": "for", "type": "CodeElement", "value": ","}, {"assetGlobals": {"subBlocks": {"1": "subBlock"}}, "type": "BlockHolder", "elements": [{"assetGlobals": {"params": {"1": "value"}}, "color": "blue", "elements": [{"values": ["1", "5", "10", "20"], "type": "DropdownMenu", "autoMinWidth": "true"}], "type": "NumberArgument"}], "accepts": ["NumberBlock"]}, {"text": "revs", "type": "CodeElement", "value": ");"}], "type": "LineElement"}], "tokens": ["turnMotorFor"], "sibling": null}, "1.vex.iq.batteryVoltage.blocks.modk.it": {"category": "input", "groupElements": [{"text": "battery voltage", "type": "CodeElement", "value": "vexPtr->GetCalculatedBrainBatteryVoltage("}, {"type": "CodeElement", "value": ")"}], "uid": "1.vex.iq.batteryVoltage.blocks.modk.it", "color": "purple", "docs": {"category": "input", "description": "Gets the battery voltage.", "parameters": [], "hint": "", "type": "NumberBlock", "name": "battery voltage"}, "extensionOf": "1.number.blocks.modk.it", "tokens": ["batteryVoltage"]}, "1.c.blocks.modk.it": {"stateVars": {"top": true, "subBlocks": false, "sibling": false, "params": false, "children": false, "left": true}, "elements": [{"assetGlobals": {"color": "color", "statementElements": "elements"}, "assetGlobalsExclude": {"elements": true}, "type": "StatementElement"}, {"color": "orange", "elements": [{"assetGlobals": {"children": {"0": "subBlock"}}, "accepts": ["StatementBlock"], "elements": [{"type": "StatementHighlight"}], "type": "BlockHolder", "subBlock": null}], "type": "CompoundStatementElement"}, {"color": "orange", "elements": [{"elements": [{"type": "CodeElement", "value": "}"}], "type": "LineElement"}], "type": "SubStatementElement"}, {"elements": [{"assetGlobals": {"color": "color", "sibling": "subBlock"}, "accepts": ["StatementBlock"], "elements": [{"type": "StatementHighlight"}], "type": "BlockHolder"}], "type": "SiblingElement"}], "type": "StatementBlock", "uid": "1.c.blocks.modk.it"}, "1.vex.wizard.downloadlink.modk.it": {"onLoad": "", "elements": [{"styles": {"normal": {"top": 0, "height": 385, "padding": "20px 50px", "width": 600, "backgroundColor": "#DCDEE0", "position": "absolute", "left": 0}}, "onLoad": "downloadURL(linkDownloadURL);", "elements": [{"styles": {"normal": {"width": "auto", "float": "none", "height": "auto", "fontWeight": "bold", "fontSize": 18, "position": "relative"}}, "text": "The latest version of Modkit Link should automatically start downloading in a few seconds.", "type": "FrameworkText"}, {"styles": {"normal": {"fontWeight": "bold", "float": "none", "paddingTop": 40, "height": "auto", "width": "auto", "fontSize": 18, "position": "relative", "textAlign": "center"}}, "text": "If it doesn't Click here to download.", "type": "FrameworkText", "disableUnderscoreHack": true, "onLoad": "$.later(100,this,function(){this.setText('If it doesn't Click here to download.'); },false);"}, {"styles": {"show": {"styleCondition": "navigator.userAgent.toLowerCase().indexOf('macintosh')>-1", "display": "block", "visibility": "visible"}, "normal": {"display": "none", "float": "none", "paddingTop": 40, "height": "auto", "width": "auto", "fontSize": 14, "visibility": "hidden", "position": "relative", "textAlign": "left"}}, "markdown": true, "name": "LinkInstallInstructionsMac", "disableUnderscoreHack": true, "text": "**When the download has completed:** \n\n1. Locate & open Modkit-Link-2014-10-03.dmg in your Downloads folder (it may open automatically)\n2. Accept the License and then drag Modkit Link to your Applications folder (if asked, replace the old app). \n3. **When the installation is complete, browse to your Applications folder and start the new version of Modkit Link and then click Restart below.**", "type": "FrameworkText"}, {"styles": {"show": {"styleCondition": "navigator.userAgent.toLowerCase().indexOf('windows')>-1", "display": "block", "visibility": "visible"}, "normal": {"display": "none", "float": "none", "paddingTop": 48, "height": "auto", "width": "auto", "fontSize": 14, "visibility": "hidden", "position": "relative", "textAlign": "left"}}, "text": "**When the download has completed:** \n\n1. Locate & Run Modkit-Link-2014-10-03.exe. \n2. Follow the instructions to install Modkit Link \n3. **When the installation is complete, start the new version of Modkit Link and click Continue below.**", "markdown": true, "type": "FrameworkText", "name": "LinkInstallInstructionsWindows"}], "type": "Container", "name": "FindAndRunModkitLink"}], "uid": "1.vex.wizard.downloadlink.modk.it", "title": "Find Modkit Link", "onNext": "window.onbeforeunload = null;location.reload();", "next": {"uid": "1.vex.wizard.runlink.modk.it"}, "type": "WizardStep", "nextText": "Next"}, "1.motor.h.code.modk.it": {"config": "motorSetup();\n", "code": "#define M1 0\n#define M2 1\n#define MOTOR_A 0\n#define MOTOR_B 1\n#define FWD 0\n#define REV 1\n\nint pwm_a = 3; //PWM control for motor outputs 1 and 2 is on digital pin 10\nint pwm_b = 5; //PWM control for motor outputs 3 and 4 is on digital pin 11\n\nint dir_a = 2; //direction control for motor outputs 1 and 2 is on digital pin 12\n\nint dir_b = 4; //direction control for motor outputs 3 and 4 is on digital pin 13\nint motor_a_speed=255;\nint motor_b_speed=255;\n\nvoid motorOn(int motor,int dir){\nif(motor==MOTOR_A){\ndigitalWrite(dir_a,dir);\nanalogWrite(pwm_a,motor_a_speed);\n}\nif(motor==MOTOR_B){\ndigitalWrite(dir_b,dir);\nanalogWrite(pwm_b,motor_b_speed);\n}\n\n}\nvoid motorOff(int motor){\nif(motor==MOTOR_A){\nanalogWrite(pwm_a,0);\n}\nif(motor==MOTOR_B){\n\nanalogWrite(pwm_b,0);\n}\n\n}\nvoid motorSpeed(int motor,int speed){\nif(speed<0){speed=0;}\nif(speed>100){speed=100;}\nif(motor==MOTOR_A){\nmotor_a_speed=map(speed,0,100,0,255);\nanalogWrite(pwm_a,motor_a_speed);\n}\nif(motor==MOTOR_B){\nmotor_b_speed=map(speed,0,100,0,255);\nanalogWrite(pwm_b,motor_b_speed);\n}\n\n}\nvoid motorSetup(){pinMode(pwm_a, OUTPUT);\npinMode(pwm_b, OUTPUT);\n\npinMode(dir_a, OUTPUT);\npinMode(dir_b, OUTPUT);\n}", "type": "HeaderFile", "uid": "1.motor.h.code.modk.it", "name": "motor.h"}, "1.vex.iq.drivetrainCurrent.blocks.modk.it": {"category": "input", "groupElements": [{"assetGlobals": {"localScope": "ignore", "subBlocks": {"0": "subBlock"}}, "ignore": true, "elements": [{"assetGlobals": {"params": {"0": "value"}}, "color": "blue", "readonly": true, "elements": [{"feed": "1.vex.iq.drivetrainCurrent.blocks.modk.itComponentListChange", "values": [], "type": "DropdownMenu", "autoMinWidth": "true"}], "type": "NameArgument"}], "accepts": ["NoBlock"], "type": "BlockHolder"}, {"assetGlobals": {"localScope": "ignore"}, "ignore": true, "type": "CodeElement", "value": ".", "text": ""}, {"text": "current in", "type": "CodeElement", "value": "current("}, {"elements": [{"values": ["amps"], "type": "DropdownMenu", "autoMinWidth": "true"}], "assetGlobals": {"params": {"1": "value"}}, "value": "amps", "readonly": true, "hideCodeView": true, "type": "NameArgument"}, {"type": "CodeElement", "value": ")"}], "uid": "1.vex.iq.drivetrainCurrent.blocks.modk.it", "color": "purple", "docs": {"category": "input", "type": "NumberBlock", "description": "Gets the *current* the **Drivetrain** is drawing in amps.", "name": "current ", "hint": ""}, "extensionOf": "1.number.blocks.modk.it", "tokens": ["currentMotorEncoder"], "stateVars": {"localScope": false, "params": false, "subBlocks": false}}, "welcome_wizard.hardware.vex.modk.it": {"extensionOf": "wizard.modk.it", "uid": "welcome_wizard.hardware.vex.modk.it", "currentStep": {"textStyle": "top:314px; left:60px; width:490px; font-size:17px;", "title": "Welcome", "text": "First, we'll help you get your computer and robot setup.
This will take about a minute.", "image": "images/vex/welcome.png", "next": {"_uid": "licensing.steps.hardware.vex.modk.it", "uid": "board_detection.steps.hardware.vex.modk.it"}, "type": "WizardImageStep", "nextText": "Get Started"}}, "1.vex.iq.newLine.blocks.modk.it": {"category": "output", "uid": "1.vex.iq.newLine.blocks.modk.it", "color": "blue", "docs": {"category": "output", "description": "Clears the current line from the text entry point to the end of the row, then moves the text entry point to the beginning of the next row.", "parameters": [], "hint": "The text entry point is like the cursor of a word processor.", "type": "StatementBlock", "name": "new line"}, "extensionOf": "1.statement.blocks.modk.it", "statementElements": [{"elements": [{"text": "new line ↵ ", "type": "CodeElement", "value": "BRAIN.newLine();"}], "type": "LineElement"}], "tokens": ["printLine"], "sibling": null, "params": ["HELLO"]}, "1.vex.iq.settingsDrivetrain.components.modk.it": {"styles": {"calibrating": {"styleCondition": "this.$markup.hasClass('calibrating')", "left": -450}, "normal": {"transition": "left 400ms ease-in-out", "-webkit-transition": "left 400ms ease-in-out", "width": 430, "-moz-transition": "left 400ms ease-in-out", "-ms-transition": "left 400ms ease-in-out", "height": "auto", "-o-transition": "left 400ms ease-in-out", "left": 0}}, "onLoad": "console.log('Drivetrain settings this/getState/getFullState=',this,this.getState(),this.getFullState());", "elements": [{"text": "Drivetrain Settings", "uid": "1.vex.iq.settingsHeading.modk.it"}, {"uid": "buttonClose.modk.it", "onClick": "function(){ this.container.container.container.saveAndHide(); }"}, {"styles": {"normal": {"position": "relative", "marginTop": "3px", "marginBottom": "2px", "width": "100%", "height": "auto"}}, "type": "HorizontalRule"}, {"styles": {"normal": {"position": "relative", "marginRight": "10px", "width": "140px", "height": "auto"}}, "onLoad": "this.prevNameHack = this.topLevelWidget.getState().componentName;", "onKeypress": "this.value = this.value.toUpperCase();", "assetGlobals": {"componentName": "value", "inputs": {"0": "this"}}, "maxChars": 12, "value": "", "label": "Name", "readonly": false, "key": "componentName", "allowChars": "A-Za-z0-9 _", "validate": "this.value=this.value.replace(' ','_').replace(' ','_'); if(this.value==this.prevNameHack){this.hideError();}else{ if(this.value==''){this.showError('Please choose a valid name.'); }else{var used = Identifiers.used(this.value); if(!used){this.hideError();}else{this.showError('The name \"'+this.value+'\" cannot be used because it '+used+'.
Please choose another name.'); /*this.$input.focus();*/}}}", "type": "Input", "inputType": "text"}, {"styles": {"hover": {"color": "#24a0ff"}, "focus": {"color": "#24a0ff"}, "normal": {"position": "relative", "marginRight": 10, "width": 130, "height": "auto"}}, "onLoad": "Events.register('VexMotorLayoutMouseover', function(){this.mouseover();}, this); Events.register('VexMotorLayoutMouseout', function(){this.mouseout();}, this);", "onMouseout": "this.mouseout(); Events.broadcast('VexMotorLayoutInputMouseout', [], true);", "assetGlobals": {"motorLayout": "value"}, "text": "2 Motors Rear", "value": "TWO_REAR_MOTORS", "label": "Motor Layout", "values": [{"name": "4 Motors", "value": "FOUR_MOTORS"}, {"name": "2 Motors Front", "value": "TWO_FRONT_MOTORS"}, {"name": "2 Motors Rear", "value": "TWO_REAR_MOTORS"}], "onMouseover": "this.mouseover(); Events.broadcast('VexMotorLayoutInputMouseover', [], true);", "key": "motorLayout", "onChange": "console.log('changing the motor layout',this.key, this.container[this.key],this.value); this.container[this.key] = this.value; Events.broadcast('MotorLayoutChange', [], true);", "type": "Input", "inputType": "select"}, {"styles": {"hover": {"color": "#24a0ff"}, "focus": {"color": "#24a0ff"}, "normal": {"position": "relative", "marginRight": 0, "width": 130, "height": "auto"}}, "onLoad": "Events.register('VexWheelGroupingMouseover', function(){this.mouseover();}, this); Events.register('VexWheelGroupingMouseout', function(){this.mouseout();}, this);", "onMouseout": "this.mouseout(); Events.broadcast('VexWheelGroupingInputMouseout', [], true);", "assetGlobals": {"wheelGrouping": "value"}, "text": "Separate", "value": "WHEELS_INDEPENDENT", "label": "Wheel Grouping", "values": [{"name": "Separate", "value": "WHEELS_INDEPENDENT"}, {"name": "Connected", "value": "WHEELS_COUPLED"}], "onMouseover": "this.mouseover(); Events.broadcast('VexWheelGroupingInputMouseover', [], true);", "key": "wheelGrouping", "onChange": "console.log('chaning the wheel grouping', this.container); this.container[this.key] = this.value; Events.broadcast('WheelGroupingChange', [], true);", "type": "Input", "inputType": "select"}, {"styles": {"LWB": {"backgroundImage": "url(images/vex/drivetrain/config_window/standard_chassis-LWB.png)", "styleCondition": "this.container.frontWheelType == 'FRONT_250_TRACTION' && this.container.rearWheelType == 'REAR_250_TRACTION'"}, "calibrating": {"styleCondition": "this.container.$markup.hasClass('calibrating')", "left": 450}, "normal": {"transition": "left 400ms ease-in-out", "-webkit-transition": "left 400ms ease-in-out", "-o-transition": "left 400ms ease-in-out", "height": "375px", "width": "430px", "backgroundImage": "url(images/vex/drivetrain/config_window/standard_chassis.png)", "-ms-transition": "left 400ms ease-in-out", "position": "relative", "background-position": "87px 106px", "-moz-transition": "left 400ms ease-in-out", "left": 0}}, "onLoad": "Events.register('RearWheelsChange', function(){ this.testStyleConditions();}, this); Events.register('FrontWheelsChange', function(){ this.testStyleConditions();}, this);", "elements": [{"styles": {"normal": {"top": 310, "left": 0}}, "src": "images/vex/drivetrain/config_window/compass_rose.png", "type": "Image"}, {"styles": {"travel160": {"backgroundImage": "url(images/vex/drivetrain/config_window/160mmwheels.png)", "styleCondition": "this.container.container.frontWheelType == 'FRONT_160_TRACTION'"}, "hover": {"backgroundPosition": "0 -113px"}, "omni": {"backgroundImage": "url(images/vex/drivetrain/config_window/omniwheels.png)", "styleCondition": "this.container.container.frontWheelType == 'FRONT_200_OMNI'"}, "normal": {"top": 113, "height": 113, "width": 282, "backgroundImage": "url(images/vex/drivetrain/config_window/200mmwheels.png)", "position": "absolute", "backgroundPosition": "0 0", "left": 75}, "focus": {"backgroundPosition": "0 -113px"}, "travel250": {"backgroundImage": "url(images/vex/drivetrain/config_window/250mmwheels.png)", "styleCondition": "this.container.container.frontWheelType == 'FRONT_250_TRACTION'"}}, "onLoad": "Events.register('VexFrontWheelsInputMouseover', function(){this.mouseover();}, this); Events.register('VexFrontWheelsInputMouseout', function(){this.mouseout();}, this); Events.register('FrontWheelsChange', function(){ this.testStyleConditions();}, this);", "onMouseout": "Events.broadcast('VexFrontWheelsMouseout', [], true);", "type": "Container", "onMouseover": "Events.broadcast('VexFrontWheelsMouseover', [], true);", "htmlClass": "vex_frontwheels"}, {"styles": {"travel160": {"backgroundImage": "url(images/vex/drivetrain/config_window/160mmwheels.png)", "styleCondition": "this.container.container.rearWheelType == 'REAR_160_TRACTION'"}, "hover": {"backgroundPosition": "0 -113px"}, "omni": {"backgroundImage": "url(images/vex/drivetrain/config_window/omniwheels.png)", "styleCondition": "this.container.container.rearWheelType == 'REAR_200_OMNI'"}, "normal": {"top": 203, "height": 113, "width": 282, "backgroundImage": "url(images/vex/drivetrain/config_window/200mmwheels.png)", "position": "absolute", "left": 75}, "focus": {"backgroundPosition": "0 -113px"}, "LWB": {"top": 231, "styleCondition": "this.container.container.frontWheelType == 'FRONT_250_TRACTION' && this.container.container.rearWheelType == 'REAR_250_TRACTION'"}, "travel250": {"backgroundImage": "url(images/vex/drivetrain/config_window/250mmwheels.png)", "styleCondition": "this.container.container.rearWheelType == 'REAR_250_TRACTION'"}}, "onLoad": "Events.register('VexRearWheelsInputMouseover', function(){this.mouseover();}, this); Events.register('VexRearWheelsInputMouseout', function(){this.mouseout();}, this); Events.register('VexRearWheelsInputBlur', function(){this.blur();}, this); Events.register('VexRearWheelsInputFocus', function(){this.focus();}, this); Events.register('RearWheelsChange', function(){ this.testStyleConditions();}, this); Events.register('FrontWheelsChange', function(){ this.testStyleConditions();}, this);", "onMouseout": "Events.broadcast('VexRearWheelsMouseout', [], true);", "type": "Container", "onMouseover": "Events.broadcast('VexRearWheelsMouseover', [], true);", "onClick": "function(){Events.broadcast('VexRearWheelsClick', [], true);}", "htmlClass": "vex_rearwheels"}, {"styles": {"ganged": {"styleCondition": "this.container.container.wheelGrouping != 'WHEELS_COUPLED'", "display": "none", "visibility": "hidden"}, "LWB": {"backgroundImage": "url(images/vex/drivetrain/config_window/gang-LWB.png)", "styleCondition": "this.container.container.frontWheelType == 'FRONT_250_TRACTION' && this.container.container.rearWheelType == 'REAR_250_TRACTION'"}, "hover": {"backgroundPosition": "0 -185px"}, "focus": {"backgroundPosition": "0 -185px"}, "normal": {"top": 135, "height": 185, "width": 196, "backgroundImage": "url(images/vex/drivetrain/config_window/gang.png)", "position": "absolute", "left": 117}}, "onLoad": "Events.register('VexWheelGroupingInputMouseover', function(){this.mouseover();}, this); Events.register('VexWheelGroupingInputMouseout', function(){this.mouseout();}, this); Events.register('WheelGroupingChange', function(){ this.testStyleConditions();}, this); Events.register('RearWheelsChange', function(){ this.testStyleConditions();}, this); Events.register('FrontWheelsChange', function(){ this.testStyleConditions();}, this);", "onMouseout": "Events.broadcast('VexWheelGroupingMouseout', [], true);", "type": "Container", "onMouseover": "Events.broadcast('VexWheelGroupingMouseover', [], true);", "onClick": "function(){this.focus(); Events.broadcast('VexWheelGroupingClick', [], true);}", "htmlClass": "vex_motor_grouping"}, {"styles": {"hover": {"backgroundImage": "url(images/vex/drivetrain/config_window/motors_4-selected.png)"}, "focus": {"backgroundImage": "url(images/vex/drivetrain/config_window/motors_4-selected.png)"}, "four_motors": {"styleCondition": "(this.container.container.motorLayout == 'FOUR_MOTORS')", "display": "block", "visibility": "visible"}, "normal": {"top": 139, "visibility": "hidden", "height": "147px", "width": "135px", "backgroundImage": "url(images/vex/drivetrain/config_window/motors_4.png)", "position": "absolute", "display": "none", "left": "148px"}}, "onLoad": "console.log('MOTOR LAYOUT',this);Events.register('VexMotorLayoutInputMouseover', function(){this.mouseover();}, this); Events.register('VexMotorLayoutInputMouseout', function(){this.mouseout();}, this); Events.register('MotorLayoutChange', function(){ console.log('motor layout change triggered style conditions',this.container.container.motorLayout);this.testStyleConditions();}, this);", "onMouseout": "Events.broadcast('VexMotorLayoutMouseout', [], true);", "type": "Container", "onMouseover": "Events.broadcast('VexMotorLayoutMouseover', [], true);", "htmlClass": "vex_motors_4"}, {"styles": {"hover": {"backgroundImage": "url(images/vex/drivetrain/config_window/motors_2_front-selected.png)"}, "focus": {"backgroundImage": "url(images/vex/drivetrain/config_window/motors_2_front-selected.png)"}, "four_motors": {"styleCondition": "(this.container.container.motorLayout == 'TWO_FRONT_MOTORS')", "display": "block", "visibility": "visible"}, "normal": {"top": 139, "visibility": "hidden", "height": "147px", "width": "135px", "backgroundImage": "url(images/vex/drivetrain/config_window/motors_2_front.png)", "position": "absolute", "display": "none", "left": "148px"}}, "onLoad": "Events.register('VexMotorLayoutInputMouseover', function(){this.mouseover();}, this); Events.register('VexMotorLayoutInputMouseout', function(){this.mouseout();}, this); Events.register('MotorLayoutChange', function(){this.testStyleConditions();}, this);", "onMouseout": "Events.broadcast('VexMotorLayoutMouseout', [], true);", "type": "Container", "onMouseover": "Events.broadcast('VexMotorLayoutMouseover', [], true);", "htmlClass": "vex_motors_2_front"}, {"styles": {"hover": {"backgroundImage": "url(images/vex/drivetrain/config_window/motors_2_rear-selected.png)"}, "focus": {"backgroundImage": "url(images/vex/drivetrain/config_window/motors_2_rear-selected.png)"}, "four_motors": {"styleCondition": "(this.container.container.motorLayout == 'TWO_REAR_MOTORS')", "display": "block", "visibility": "visible"}, "normal": {"top": 139, "visibility": "hidden", "height": "147px", "width": "135px", "backgroundImage": "url(images/vex/drivetrain/config_window/motors_2_rear.png)", "position": "absolute", "display": "none", "left": "148px"}}, "onLoad": "Events.register('VexMotorLayoutInputMouseover', function(){this.mouseover();}, this); Events.register('VexMotorLayoutInputMouseout', function(){this.mouseout();}, this); Events.register('MotorLayoutChange', function(){this.testStyleConditions();}, this);", "onMouseout": "Events.broadcast('VexMotorLayoutMouseout', [], true);", "type": "Container", "onMouseover": "Events.broadcast('VexMotorLayoutMouseover', [], true);", "htmlClass": "vex_motors_2_rear"}], "name": "drivetrain_display", "type": "Container", "id": "drivetrain_display"}, {"styles": {"normal": {"position": "absolute", "top": 76, "height": 375, "left": 0, "width": 430}}, "onLoad": "Events.register('RearWheelsChange', function(){ this.testStyleConditions();}, this); Events.register('FrontWheelsChange', function(){ this.testStyleConditions();}, this);", "elements": [{"styles": {"hover": {"backgroundImage": "url(images/vex/drivetrain/config_window/track-selected.png)"}, "focus": {"backgroundImage": "url(images/vex/drivetrain/config_window/track-selected.png)"}, "normal": {"top": "25px", "height": "81px", "width": "251px", "backgroundImage": "url(images/vex/drivetrain/config_window/track.png)", "position": "absolute", "textAlign": "center", "left": "90px"}}, "elements": [{"styles": {"hover": {"color": "#24a0ff"}, "focus": {"color": "#24a0ff"}, "normal": {"top": "-20px", "height": "auto", "width": 85, "padding-right": 30, "background": "#ced5db", "position": "absolute", "left": 86, "padding-left": 8}}, "onLoad": "Events.register('VexTrackMouseover', function(){this.mouseover();}, this); Events.register('VexTrackMouseout', function(){this.mouseout();}, this);", "assetGlobals": {"track": "value"}, "maxChars": "10", "value": "162", "label": "Track", "key": "track", "allowChars": "0-9.", "type": "Input", "inputType": "text"}], "onMouseout": "Events.broadcast('VexTrackMouseout', [], true);", "type": "Container", "onMouseover": "Events.broadcast('VexTrackMouseover', [], true);", "htmlClass": "vex_track"}, {"styles": {"normal": {"width": 18, "top": 4, "marginBottom": 2, "height": "auto", "fontFamily": "Helvetica, Arial, sans-serif", "fontSize": 12, "position": "absolute", "marginTop": 24, "textAlign": "left", "left": 234}}, "text": "mm", "type": "FrameworkText", "key": "track_units"}, {"styles": {"hover": {"color": "#24a0ff"}, "focus": {"color": "#24a0ff"}, "normal": {"top": "50px", "height": "auto", "width": 160, "marginRight": "10px", "position": "absolute", "textAlign": "center", "left": 139}}, "onLoad": "Events.register('_RearWheelsChange',function(){if(this.value!='FRONT_250_TRACTION' && this.container.container.rearWheelType=='REAR_250_TRACTION') {this.disableChangeEvent=true; this.updateValue('FRONT_250_TRACTION','250mm Wheel');} else if(this.value!='FRONT_160_TRACTION' && this.container.container.rearWheelType=='REAR_160_TRACTION') {this.disableChangeEvent=true; this.updateValue('FRONT_160_TRACTION','160mm Wheel');} else if(this.container.container.rearWheelType=='REAR_200_OMNI' || (this.container.container.rearWheelType=='REAR_200_TRACTION' && this.value!='FRONT_200_TRACTION' && this.value!='FRONT_200_OMNI')) {this.disableChangeEvent=true; this.updateValue('FRONT_200_TRACTION','200mm Wheel');} },this); Events.register('VexFrontWheelsMouseover', function(){this.mouseover();}, this); Events.register('VexFrontWheelsMouseout', function(){this.mouseout();}, this);", "onMouseout": "this.mouseout(); Events.broadcast('VexFrontWheelsInputMouseout', [], true);", "assetGlobals": {"frontWheelType": "value"}, "text": "200mm Wheel", "value": "FRONT_200_TRACTION", "label": "Front Wheel Type", "values": [{"name": "200mm Wheel", "value": "FRONT_200_TRACTION"}, {"name": "250mm Wheel", "value": "FRONT_250_TRACTION"}, {"name": "160mm Wheel", "value": "FRONT_160_TRACTION"}, {"name": "Omni Wheel", "value": "FRONT_200_OMNI"}], "onMouseover": "this.mouseover(); Events.broadcast('VexFrontWheelsInputMouseover', [], true);", "key": "frontWheelType", "onChange": "this.container.container[this.key] = this.value; Events.broadcast('FrontWheelsChange', [], true); if(!Boolean(this.disableChangeEvent)) {Events.broadcast('_FrontWheelsChange', [], true);} this.disableChangeEvent=false;", "type": "Input", "inputType": "select"}, {"styles": {"hover": {"backgroundImage": "url(images/vex/drivetrain/config_window/wheelbase-selected.png)"}, "focus": {"backgroundImage": "url(images/vex/drivetrain/config_window/wheelbase-selected.png)"}, "normal": {"top": "160px", "height": "95px", "width": "40px", "backgroundImage": "url(images/vex/drivetrain/config_window/wheelbase.png)", "position": "absolute", "left": "30px"}}, "elements": [{"styles": {"hover": {"color": "#24a0ff"}, "focus": {"color": "#24a0ff"}, "normal": {"top": "30px", "height": "auto", "width": 46, "background": "#ced5db", "position": "absolute", "textAlign": "center", "left": -24}}, "onLoad": "Events.register('VexWheelbaseMouseover', function(){this.mouseover();}, this); Events.register('VexWheelbaseMouseout', function(){this.mouseout();}, this);", "assetGlobals": {"wheelbase": "value"}, "maxChars": "10", "value": "76", "label": "Wheelbase", "key": "wheelbase", "allowChars": "0-9.", "type": "Input", "inputType": "text"}, {"styles": {"normal": {"width": 18, "top": 29, "marginBottom": 2, "height": "auto", "fontFamily": "Helvetica, Arial, sans-serif", "fontSize": 12, "position": "absolute", "marginTop": 24, "textAlign": "left", "left": 26}}, "text": "mm", "type": "FrameworkText", "key": "wheelbase_units"}], "onMouseout": "Events.broadcast('VexWheelbaseMouseout', [], true);", "type": "Container", "onMouseover": "Events.broadcast('VexWheelbaseMouseover', [], true);", "htmlClass": "vex_wheelbase"}, {"styles": {"hover": {"color": "#24a0ff"}, "focus": {"color": "#24a0ff"}, "single_ratio_hide": {"styleCondition": "true", "visibility": "hidden", "_styleCondition": "this.container.container.motorLayout == 'TWO_FRONT_MOTORS' || this.container.container.motorLayout == 'TWO_REAR_MOTORS' || this.container.container.wheelGrouping == 'WHEELS_COUPLED'", "display": "none"}, "normal": {"display": "block", "top": 228, "visibility": "visible", "height": "auto", "width": 30, "position": "absolute", "textAlign": "center", "left": 360}}, "onLoad": "Events.register('MotorLayoutChange', function(){ this.testStyleConditions();}, this); Events.register('WheelGroupingChange', function(){ this.testStyleConditions();}, this);", "assetGlobals": {"ratioInRear": "value"}, "maxChars": "10", "value": "1", "label": "Rear Ratio", "key": "ratioInRear", "allowChars": "0-9", "onChange": "this.container.container[this.key] = this.value;", "type": "Input", "inputType": "text"}, {"styles": {"single_ratio_hide": {"styleCondition": "true", "visibility": "hidden", "_styleCondition": "this.container.container.motorLayout == 'TWO_FRONT_MOTORS' || this.container.container.motorLayout == 'TWO_REAR_MOTORS' || this.container.container.wheelGrouping == 'WHEELS_COUPLED'", "display": "none"}, "normal": {"width": 18, "top": 228, "marginBottom": 2, "visibility": "visible", "height": "auto", "fontFamily": "Helvetica, Arial, sans-serif", "display": "block", "fontSize": 12, "position": "absolute", "marginTop": 24, "textAlign": "left", "left": 387}}, "text": "  : ", "type": "FrameworkText", "onLoad": "Events.register('MotorLayoutChange', function(){ this.testStyleConditions();}, this); Events.register('WheelGroupingChange', function(){ this.testStyleConditions();}, this);"}, {"styles": {"single_ratio_hide": {"styleCondition": "true", "visibility": "hidden", "_styleCondition": "this.container.container.motorLayout == 'TWO_FRONT_MOTORS' || this.container.container.motorLayout == 'TWO_REAR_MOTORS' || this.container.container.wheelGrouping == 'WHEELS_COUPLED'", "display": "none"}, "normal": {"top": 228, "visibility": "visible", "height": "auto", "width": 30, "position": "absolute", "left": 400, "display": "block", "text-align": "center"}}, "onLoad": "Events.register('MotorLayoutChange', function(){ this.testStyleConditions();}, this); Events.register('WheelGroupingChange', function(){ this.testStyleConditions();}, this);", "assetGlobals": {"ratioOutRear": "value"}, "maxChars": "10", "value": "1", "label": "", "key": "ratioOutRear", "allowChars": "0-9", "type": "Input", "inputType": "text"}, {"styles": {"hover": {"color": "#24a0ff"}, "focus": {"color": "#24a0ff"}, "single_ratio_show": {"styleCondition": "true", "visibility": "visible", "_styleCondition": "this.container.container.motorLayout == 'TWO_FRONT_MOTORS' || this.container.container.motorLayout == 'TWO_REAR_MOTORS' || this.container.container.wheelGrouping == 'WHEELS_COUPLED'", "display": "block"}, "normal": {"display": "none", "top": 188, "visibility": "hidden", "height": "auto", "width": 30, "position": "absolute", "textAlign": "center", "left": 360}}, "onLoad": "Events.register('MotorLayoutChange', function(){ this.testStyleConditions();}, this); Events.register('WheelGroupingChange', function(){ this.testStyleConditions();}, this);", "assetGlobals": {"ratioIn": "value"}, "maxChars": "10", "value": "1", "label": "Gear Ratio", "key": "ratioIn", "allowChars": "0-9", "type": "Input", "inputType": "text"}, {"styles": {"single_ratio_show": {"styleCondition": "true", "visibility": "visible", "_styleCondition": "this.container.container.motorLayout == 'TWO_FRONT_MOTORS' || this.container.container.motorLayout == 'TWO_REAR_MOTORS' || this.container.container.wheelGrouping == 'WHEELS_COUPLED'", "display": "block"}, "normal": {"width": 18, "top": 188, "marginBottom": 2, "visibility": "hidden", "height": "auto", "fontFamily": "Helvetica, Arial, sans-serif", "display": "none", "fontSize": 12, "position": "absolute", "marginTop": 24, "textAlign": "left", "left": 387}}, "text": "  : ", "type": "FrameworkText", "onLoad": "Events.register('MotorLayoutChange', function(){ this.testStyleConditions();}, this); Events.register('WheelGroupingChange', function(){ this.testStyleConditions();}, this);"}, {"styles": {"single_ratio_show": {"styleCondition": "true", "visibility": "visible", "_styleCondition": "this.container.container.motorLayout == 'TWO_FRONT_MOTORS' || this.container.container.motorLayout == 'TWO_REAR_MOTORS' || this.container.container.wheelGrouping == 'WHEELS_COUPLED'", "display": "block"}, "normal": {"top": 188, "visibility": "hidden", "height": "auto", "width": 30, "position": "absolute", "left": 400, "display": "none", "text-align": "center"}}, "onLoad": "Events.register('MotorLayoutChange', function(){ this.testStyleConditions();}, this); Events.register('WheelGroupingChange', function(){ this.testStyleConditions();}, this);", "assetGlobals": {"ratioOut": "value"}, "maxChars": "10", "value": "1", "label": "", "key": "ratioOut", "allowChars": "0-9", "type": "Input", "inputType": "text"}, {"styles": {"hover": {"color": "#24a0ff"}, "focus": {"color": "#24a0ff"}, "single_ratio_hide": {"styleCondition": "true", "visibility": "hidden", "_styleCondition": "this.container.container.motorLayout == 'TWO_FRONT_MOTORS' || this.container.container.motorLayout == 'TWO_REAR_MOTORS' || this.container.container.wheelGrouping == 'WHEELS_COUPLED'", "display": "none"}, "normal": {"display": "block", "top": 138, "visibility": "visible", "height": "auto", "width": 30, "position": "absolute", "textAlign": "center", "left": 360}}, "onLoad": "Events.register('MotorLayoutChange', function(){ this.testStyleConditions();}, this); Events.register('WheelGroupingChange', function(){ this.testStyleConditions();}, this);", "assetGlobals": {"ratioInFront": "value"}, "maxChars": "10", "value": "1", "label": "Front Ratio", "key": "ratioInFront", "allowChars": "0-9", "type": "Input", "inputType": "text"}, {"styles": {"single_ratio_hide": {"styleCondition": "true", "visibility": "hidden", "_styleCondition": "this.container.container.motorLayout == 'TWO_FRONT_MOTORS' || this.container.container.motorLayout == 'TWO_REAR_MOTORS' || this.container.container.wheelGrouping == 'WHEELS_COUPLED'", "display": "none"}, "normal": {"width": 18, "top": 138, "marginBottom": 2, "visibility": "visible", "height": "auto", "fontFamily": "Helvetica, Arial, sans-serif", "display": "block", "fontSize": 12, "position": "absolute", "marginTop": 24, "textAlign": "left", "left": 387}}, "text": "  : ", "type": "FrameworkText", "onLoad": "Events.register('MotorLayoutChange', function(){ this.testStyleConditions();}, this); Events.register('WheelGroupingChange', function(){ this.testStyleConditions();}, this);"}, {"styles": {"single_ratio_hide": {"styleCondition": "true", "visibility": "hidden", "_styleCondition": "this.container.container.motorLayout == 'TWO_FRONT_MOTORS' || this.container.container.motorLayout == 'TWO_REAR_MOTORS' || this.container.container.wheelGrouping == 'WHEELS_COUPLED'", "display": "none"}, "normal": {"top": 138, "visibility": "visible", "height": "auto", "width": 30, "position": "absolute", "left": 400, "display": "block", "text-align": "center"}}, "onLoad": "Events.register('MotorLayoutChange', function(){ this.testStyleConditions();}, this); Events.register('WheelGroupingChange', function(){ this.testStyleConditions();}, this);", "assetGlobals": {"ratioOutFront": "value"}, "maxChars": "10", "value": "1", "label": "", "key": "ratioOutFront", "allowChars": "0-9", "type": "Input", "inputType": "text"}, {"styles": {"showFrontReverseChecks": {"styleCondition": "this.container.container.motorLayout == 'TWO_FRONT_MOTORS' || this.container.container.motorLayout == 'FOUR_MOTORS'", "visibility": "visible"}, "normal": {"position": "absolute", "top": 183, "left": 157, "visibility": "hidden", "height": "auto"}}, "onLoad": "Events.register('MotorLayoutChange', function(){ this.testStyleConditions();}, this);", "assetGlobals": {"reverseDirectionFrontLeft": "checked"}, "label": "rev", "onChange": "console.log('reversed direction');", "type": "Input", "inputType": "checkbox"}, {"styles": {"showFrontReverseChecks": {"styleCondition": "this.container.container.motorLayout == 'TWO_REAR_MOTORS' || this.container.container.motorLayout == 'FOUR_MOTORS'", "visibility": "visible"}, "normal": {"position": "absolute", "top": 248, "left": 157, "visibility": "hidden", "height": "auto"}}, "onLoad": "Events.register('MotorLayoutChange', function(){ this.testStyleConditions();}, this);", "assetGlobals": {"reverseDirectionRearLeft": "checked"}, "label": "rev", "onChange": "console.log('reversed direction');", "type": "Input", "inputType": "checkbox"}, {"styles": {"showFrontReverseChecks": {"styleCondition": "this.container.container.motorLayout == 'TWO_FRONT_MOTORS' || this.container.container.motorLayout == 'FOUR_MOTORS'", "visibility": "visible"}, "normal": {"position": "absolute", "top": 183, "left": 214, "visibility": "hidden", "height": "auto"}}, "onLoad": "Events.register('MotorLayoutChange', function(){ this.testStyleConditions();}, this);", "assetGlobals": {"reverseDirectionFrontRight": "checked"}, "label": "rev", "onChange": "console.log('reversed direction');", "type": "Input", "inputType": "checkbox"}, {"styles": {"showFrontReverseChecks": {"styleCondition": "this.container.container.motorLayout == 'TWO_REAR_MOTORS' || this.container.container.motorLayout == 'FOUR_MOTORS'", "visibility": "visible"}, "normal": {"position": "absolute", "top": 248, "left": 214, "visibility": "hidden", "height": "auto"}}, "onLoad": "Events.register('MotorLayoutChange', function(){ this.testStyleConditions();}, this);", "assetGlobals": {"reverseDirectionRearRight": "checked"}, "label": "rev", "onChange": "console.log('reversed direction');", "type": "Input", "inputType": "checkbox"}, {"styles": {"hover": {"color": "#24a0ff"}, "focus": {"color": "#24a0ff"}, "normal": {"top": "325px", "height": "auto", "width": 160, "marginRight": "10px", "position": "absolute", "textAlign": "center", "left": 139}}, "onLoad": "Events.register('_FrontWheelsChange',function(){if(this.value!='REAR_250_TRACTION' && this.container.container.frontWheelType=='FRONT_250_TRACTION') {this.disableChangeEvent=true; this.updateValue('REAR_250_TRACTION','250mm Wheel');} else if(this.value!='REAR_160_TRACTION' && this.container.container.frontWheelType=='FRONT_160_TRACTION') {this.disableChangeEvent=true; this.updateValue('REAR_160_TRACTION','160mm Wheel');} else if(this.container.container.frontWheelType=='FRONT_200_OMNI' || ( this.container.container.frontWheelType=='FRONT_200_TRACTION' && this.value!='REAR_200_TRACTION' && this.value!='REAR_200_OMNI') ) {this.disableChangeEvent=true; this.updateValue('REAR_200_TRACTION','200mm Wheel');} },this); Events.register('VexRearWheelsMouseover', function(){this.mouseover();}, this); Events.register('VexRearWheelsMouseout', function(){this.mouseout();}, this); Events.register('VexRearWheelsClick', function(){this.focus(); console.log('clicked the rear wheels', this);}, this);", "onMouseout": "this.mouseout(); Events.broadcast('VexRearWheelsInputMouseout', [], true);", "assetGlobals": {"rearWheelType": "value"}, "text": "200mm Wheel", "_onBlur": "Events.broadcast('VexRearWheelsInputBlur', [], true);", "value": "REAR_200_TRACTION", "label": "Rear Wheel Type", "_onFocus": "Events.broadcast('VexRearWheelsInputFocus', [], true);", "values": [{"name": "200mm Wheel", "value": "REAR_200_TRACTION"}, {"name": "250mm Wheel", "value": "REAR_250_TRACTION"}, {"name": "160mm Wheel", "value": "REAR_160_TRACTION"}, {"name": "Omni Wheel", "value": "REAR_200_OMNI"}], "onMouseover": "this.mouseover(); Events.broadcast('VexRearWheelsInputMouseover', [], true);", "key": "rearWheelType", "onChange": "this.container.container[this.key] = this.value; Events.broadcast('RearWheelsChange', [], true); if(!Boolean(this.disableChangeEvent)){Events.broadcast('_RearWheelsChange', [], true);}this.disableChangeEvent=false;", "type": "Input", "inputType": "select"}], "type": "Container", "name": "drivetrain_config"}, {"styles": {"normal": {"color": "#ffffff", "position": "absolute", "bottom": 33, "left": 332}}, "html": "
Calibrate
", "type": "HTMLContainer", "onClick": "function(){this.container.$markup.addClass('calibrating'); $('#drivetrain_display').addClass('calibrating');}"}, {"styles": {"normal": {"position": "absolute", "height": "100%", "width": 430, "left": 450}}, "elements": [{"text": "Drivetrain Calibration", "uid": "1.vex.iq.settingsHeading.modk.it"}, {"uid": "buttonClose.modk.it", "onClick": "function(){ this.container.container.container.container.saveAndHide(); }"}, {"styles": {"normal": {"position": "relative", "marginTop": "3px", "marginBottom": "2px", "width": "100%", "height": "auto"}}, "type": "HorizontalRule"}, {"styles": {"normal": {"__background": "#b4bfc8 url(images/vex/drivetrain/config_window/center_of_rotation-animation.gif) no-repeat 10px 0", "borderRadius": 4, "top": 36, "borderBottom": "1px solid rgba(255, 255, 255, 0.5)", "height": 100, "padding": "10px 10px 10px 140px", "width": 280, "fontSize": 12, "background": "#b4bfc8", "borderTop": "1px solid #89939C", "left": 0}}, "text": "#The Center or Rotation (COR)\n\n **COR** is the point about which the robot turns. See the animation to the left. Ensure your robot responds accurately to Turn commands by adjusting the X/Y offsets from the center of your robot below. These should be determined experimentally.", "markdown": true, "type": "FrameworkText"}, {"styles": {"normal": {"cursor": "pointer", "width": 123, "top": 37, "left": 8, "height": 120}}, "src": "", "type": "Image", "onClick": "function(){ this.$markup.children('img').first().attr('src', this.$markup.image); }", "onLoad": "this.$markup.image = new Image(); this.$markup.image = 'images/vex/drivetrain/config_window/center_of_rotation-animation.gif'; this.$markup.children('img').first().attr('src', this.$markup.image);"}, {"styles": {"normal": {"position": "absolute", "left": 364, "bottom": 0, "height": 33}}, "html": "
Back
", "type": "HTMLContainer", "onClick": "function(evt){this.container.container.$markup.removeClass('calibrating'); $('#drivetrain_display').removeClass('calibrating');}"}, {"styles": {"normal": {"width": 278, "top": 165, "left": 77, "background": "transparent url(images/vex/drivetrain/config_window/center_of_rotation-gauge.png) no-repeat", "height": 240}}, "elements": [{"styles": {"hover": {"__backgroundImage": "url(images/vex/drivetrain/config_window/track-selected.png)"}, "focus": {"__backgroundImage": "url(images/vex/drivetrain/config_window/track-selected.png)"}, "normal": {"top": 89, "height": 65, "width": 85, "position": "absolute", "textAlign": "left", "left": 270}}, "elements": [{"styles": {"hover": {"color": "#24a0ff"}, "focus": {"color": "#24a0ff"}, "normal": {"top": 0, "height": "auto", "width": 85, "padding-right": 30, "background": "#ced5db", "position": "absolute", "left": 0, "padding-left": 8}}, "assetGlobals": {"offsetX": "value"}, "maxChars": "10", "value": "0.0", "label": "X Offset", "step": "0.1", "key": "offsetX", "allowChars": "0-9.\\-", "type": "Input", "inputType": "number"}, {"styles": {"normal": {"width": 18, "top": -1, "marginBottom": 2, "height": "auto", "fontFamily": "Helvetica, Arial, sans-serif", "fontSize": 12, "position": "absolute", "marginTop": 24, "textAlign": "left", "left": 60}}, "text": "mm", "type": "FrameworkText", "key": "offset_x_units"}], "__onMouseover": "Events.broadcast('OffsetXOver', [], true);", "__onMouseout": "Events.broadcast('OffsetXOut', [], true);", "type": "Container", "htmlClass": "vex_offset_x"}, {"styles": {"hover": {"__backgroundImage": "url(images/vex/drivetrain/config_window/track-selected.png)"}, "focus": {"__backgroundImage": "url(images/vex/drivetrain/config_window/track-selected.png)"}, "normal": {"top": 241, "height": 65, "width": 85, "position": "absolute", "textAlign": "left", "left": 110}}, "elements": [{"styles": {"hover": {"color": "#24a0ff"}, "focus": {"color": "#24a0ff"}, "normal": {"top": 0, "height": "auto", "width": 85, "padding-right": 30, "background": "#ced5db", "position": "absolute", "left": 0, "padding-left": 8}}, "assetGlobals": {"offsetY": "value"}, "maxChars": "10", "value": "0.0", "label": "Y Offset", "step": "0.1", "key": "offsetY", "allowChars": "0-9.\\-", "type": "Input", "inputType": "number"}, {"styles": {"normal": {"width": 18, "top": -1, "marginBottom": 2, "height": "auto", "fontFamily": "Helvetica, Arial, sans-serif", "fontSize": 12, "position": "absolute", "marginTop": 24, "textAlign": "left", "left": 60}}, "text": "mm", "type": "FrameworkText", "key": "offset_y_units"}], "__onMouseover": "Events.broadcast('OffsetYOver', [], true);", "__onMouseout": "Events.broadcast('OffsetYOut', [], true);", "type": "Container", "htmlClass": "vex_offset_y"}, {"styles": {"normal": {"top": 91, "overflow": "visible", "left": 112}}, "elements": [{"styles": {"normal": {"top": 0, "left": 0}}, "src": "images/vex/drivetrain/config_window/center_of_rotation-marker.png", "type": "Image", "name": "Center of Rotation Marker", "onLoad": "console.debug('initial xoffset:', this.container.container); this.$markup.css({left:0, right:0}); Events.register('OffsetXChange', function(){console.debug('xoffset changed:', this.container.container);}, this); "}], "type": "Container", "name": "marker_holder"}], "type": "Container", "name": "COR_calibration"}], "type": "Container", "name": "drivetrain_calibraion"}], "uid": "1.vex.iq.settingsDrivetrain.components.modk.it", "type": "Container", "onUpdate": "console.log('onUpdate.. calling this.container.container.save()', this.container.container.save);this.container.container.save();", "stateVars": {"ratioInFront": true, "reverseDirectionRearRight": true, "wheelGrouping": true, "reverseDirectionRearLeft": true, "ratioInRear": true, "track": true, "componentName": true, "motorLayout": true, "offsetX": true, "offsetY": true, "wheelbase": true, "ratioOutRear": true, "frontWheelType": true, "ratioOutFront": true, "ratioIn": true, "reverseDirectionFrontLeft": true, "rearWheelType": true, "ratioOut": true, "reverseDirectionFrontRight": true}, "valueMap": {"inTurnDirection": {"static": ["LEFT", "RIGHT", "NONE"]}, "outTurnDirection": {"static": ["LEFT", "RIGHT"]}, "inDriveDirection": {"static": ["FWD", "REV", "NONE"]}, "outDriveDirection": {"static": ["FWD", "REV"]}}, "htmlClass": "settingsDrivetrain"}, "ui.addEventDialog.modk.it": {"styles": {"normal": {"layout": "wrap", "float": "left", "minHeight": "40px", "height": "auto", "minWidth": 150, "width": 300, "position": "relative"}}, "elements": [{"styles": {"normal": {"fontFamily": "Helvetica, Arial, sans-serif", "height": "auto", "width": "100%", "fontSize": "18px", "position": "relative", "textAlign": "left"}}, "text": "Add New Event", "type": "FrameworkText"}, {"styles": {"normal": {"position": "relative", "marginTop": "3px", "marginBottom": "2px", "width": "100%", "height": "auto"}}, "type": "HorizontalRule"}, {"styles": {"normal": {"position": "relative", "marginRight": "10px", "width": "180px", "height": "auto"}}, "onLoad": "", "onShow": "this.focus();", "onKeypress": "this.value = this.value.toUpperCase();", "assetGlobals": {"inputs": {"0": "this"}, "name": "value"}, "maxChars": 20, "value": "", "label": "Event Name", "validateDelay": 2500, "key": "name", "allowChars": "A-Za-z0-9_", "validate": "var used = Identifiers.used(this.value); if(isNormalInteger(this.value.charAt(0))){this.showError('The name \"'+this.value+'\" cannot be used because it starts with a number.
Please chose another event name.'); this.$input.focus(); } else if(!used){this.hideError();}else{this.showError('The name \"'+this.value+'\" cannot be used because it '+used+'.
Please chose another event name.'); this.$input.focus();}", "onChange": "this.container[this.key] = this.value; Events.broadcast('ComponentNameChange', [], true);", "type": "Input", "inputType": "text"}], "uid": "ui.addEventDialog.modk.it", "type": "Container", "stateVars": {"name": false}, "htmlClass": "dialog_container"}, "1.vex.iq.rangefinderDistance.blocks.modk.it": {"category": "input", "groupElements": [{"assetGlobals": {"localScope": "ignore", "subBlocks": {"0": "subBlock"}}, "ignore": true, "elements": [{"assetGlobals": {"params": {"0": "value"}}, "color": "blue", "readonly": true, "elements": [{"feed": "1.vex.iq.rangefinderDistance.blocks.modk.itComponentListChange", "values": [], "type": "DropdownMenu", "autoMinWidth": "true"}], "type": "NameArgument"}], "accepts": ["NoBlock"], "type": "BlockHolder"}, {"assetGlobals": {"localScope": "ignore"}, "ignore": true, "type": "CodeElement", "value": ".", "text": ""}, {"text": "distance in", "type": "CodeElement", "value": "distance("}, {"elements": [{"values": ["mm"], "type": "DropdownMenu", "autoMinWidth": "true"}], "assetGlobals": {"params": {"1": "value"}}, "value": "mm", "readonly": true, "hideCodeView": true, "type": "NameArgument"}, {"type": "CodeElement", "value": ")"}], "uid": "1.vex.iq.rangefinderDistance.blocks.modk.it", "color": "purple", "docs": {"category": "input", "description": "Gets the *distance* in millimeters (mm) to the first object within range. If no object is found, the distance will be greater than 26,000.", "title": "distance", "hint": "Using the **set max distance** block to decrease the max range will improve object detection accuracy.", "type": "NumberBlock", "name": "distance"}, "extensionOf": "1.number.blocks.modk.it", "tokens": ["currentMotorEncoder"], "stateVars": {"localScope": false, "params": false, "subBlocks": false}}, "1.vex.iq.stopSlider.blocks.modk.it": {"category": "output", "uid": "1.vex.iq.stopSlider.blocks.modk.it", "color": "blue", "docs": {"category": "output", "description": "The *stop* block stops the slider from turning.", "title": "stop slider", "hint": "", "type": "StatementBlock", "name": "stop"}, "extensionOf": "1.statement.blocks.modk.it", "statementElements": [{"elements": [{"text": "stop  ", "type": "CodeElement", "value": "stop();"}], "type": "LineElement"}], "tokens": ["goMotor"], "sibling": null}, "1.vex.iq.ui.wire.modk.it": {"styles": {"show": {"styleCondition": "!this.disabled && this.showWire === true || (('wireIndex' in this) && eval(this.componentPath).getState().wires[this.wireIndex] != undefined && eval(this.componentPath).getState().wires[this.wireIndex] != 'select port' ) || (!('wireIndex' in this) && eval(this.componentPath).getState().wire != undefined) && eval(this.componentPath).getState().wire != 'select port'", "display": "block", "visibility": "visible"}, "normal": {"visibility": "hidden", "height": 30, "zIndex": 1, "width": 30, "position": "absolute", "display": "none"}}, "onLoad": "this.setX(this.x); this.setY(this.y); Events.register(eval(this.componentPath).id+'.PinChange', function(pin, label){/*console.log('pin changed', eval(this.componentPath).getState().wires, ('wireIndex' in this)); */ if(('wireIndex' in this)){ if(eval(this.componentPath).getState().wires[this.wireIndex] != undefined){ this.elements[1].elements[0].setText(eval(this.componentPath).getState().wires[this.wireIndex].substr(4,2)); } }else{ this.elements[1].elements[0].setText(pin.substr(4,2)); }; this.testStyleConditions();}, this);", "elements": [{"styles": {"top180": {"backgroundImage": "url(images/vex/components/wires/top-180.png)", "styleCondition": "(this.container.side == 'top' && this.container.angle == 180)"}, "front180": {"backgroundImage": "url(images/vex/components/wires/front-180.png)", "styleCondition": "(this.container.side == 'front' && this.container.angle == 180)"}, "normal": {"width": 73, "background": "transparent url(images/vex/components/wires/front-0.png) no-repeat top right", "height": 52}, "brain_back": {"opacity": 0.5, "backgroundImage": "url(images/vex/components/wires/back-brain.png)", "styleCondition": "(this.container.brain && this.container.side == 'back')"}, "top": {"width": "24px !important", "styleCondition": "(this.container.side == 'top')", "height": "58px !important"}, "back": {"backgroundImage": "url(images/vex/components/wires/back.png)", "styleCondition": "(this.container.side == 'back' && !this.container.brain)"}, "top0": {"backgroundImage": "url(images/vex/components/wires/top-0.png)", "styleCondition": "(this.container.side == 'top' && this.container.angle == 0)"}, "front270": {"backgroundImage": "url(images/vex/components/wires/front-270.png)", "styleCondition": "(this.container.side == 'front' && this.container.angle == 270)"}, "top270": {"backgroundImage": "url(images/vex/components/wires/top-270.png)", "styleCondition": "(this.container.side == 'top' && this.container.angle == 270)"}, "top90": {"backgroundImage": "url(images/vex/components/wires/top-90.png)", "styleCondition": "(this.container.side == 'top' && this.container.angle == 90)"}, "brain_front": {"backgroundImage": "url(images/vex/components/wires/front-brain.png)", "styleCondition": "(this.container.brain && this.container.side == 'front')"}, "front90": {"backgroundImage": "url(images/vex/components/wires/front-90.png)", "styleCondition": "(this.container.side == 'front' && this.container.angle == 90)"}}, "type": "Container", "name": "WireImage"}, {"styles": {"top": {"borderRadius": "4px 0 0 4px", "top": 18, "styleCondition": "(this.container.side == 'top')", "left": -19}, "hide": {"styleCondition": "this.container.noLabel == true", "display": "none", "visibility": "hidden"}, "back": {"top": -16, "styleCondition": "(this.container.side == 'back' && false)", "left": 24}, "normal": {"_top_floating": -6, "borderRadius": "4px 4px 0 0", "top": 0, "height": 25, "width": 26, "-webkit-background-clip": "padding-box", "_left_floating": 16, "-webkit-transform": "skew(0deg, -30deg)", "border": "1px solid #4A6088", "left": 19}}, "htmlClass": "vex_wire_label", "elements": [{"styles": {"normal": {"paddingBottom": 1, "width": "100%", "color": "white", "paddingTop": 2, "height": "auto", "fontWeight": "normal", "fontSize": 18, "letterSpacing": "-0.15em", "textAlign": "center", "textShadow": "0 -1px 0 #000"}}, "type": "FrameworkText"}], "type": "Container", "name": "WireLabel"}], "angle": 0, "componentPath": "this.container.container", "type": "VexComponentWire", "y": 50, "x": -42, "htmlClass": "vex_component_wire", "side": "front", "uid": "1.vex.iq.ui.wire.modk.it"}, "1.mega_pro.sparkfun.hardware.modk.it": {"description": "Sparkfun's Mega Pro is the heavyweight of their Arduino-compatible line, with 54 digital I/O pins and 16 analog pins. It runs on 3.3 volts, making it a handy companion to 3.3 v sensors and accessories.

Connect the Pro to an FTDI breakout board to program. Header pins and power jack are not included.", "microcontrollerOptions": {"1.atmega2560.avr.microcontrollers.modk.it": {"flash_size": 262144, "device_signature": 2004993, "programmer": {"type": "stk500v2", "speed": 115200}, "boot_sizes": [16384, 8192, 4096, 2048, 1024], "compiler": {"f_cpu": "16000000L", "maker": "Arduino", "framework": "wiring", "mcu": "atmega2560", "type": "avrgcc", "model": "Mega12802560"}}}, "uid": "1.mega_pro.sparkfun.hardware.modk.it", "dropdown_text": "SparkFun Pro Mega", "extensionOf": "1.compatible.arduino.hardware.modk.it", "pinDef": "1.openshield_mega.pins.modk.it", "brand": "SparkFun", "boardImage": {"src": "images/hardware/boards/Sparkfun_Mega_Pro.png", "bounds": {"top": 0, "bottom": 274, "right": 462, "left": 0}}, "images": {"small": "images/hardware/boards/Sparkfun_Mega_Pro_152x90.png", "medium": "images/hardware/boards/Sparkfun_Mega_Pro_x200.png"}, "model": "Mega Pro", "pinOffsets": {"top": "5px", "left": "-93px"}, "name": "SparkFun Pro Mega"}, "wizard.modk.it": {"styles": {"normal": {"width": "100%", "height": "100%"}}, "onLoad": " Events.broadcast('WizardLoaded', []); /*$('').attr({ 'src': '/micro/editor/images/stage/blocks/darkblue.png' }).appendTo('body'); $('').attr({ 'src': '/micro/editor/images/stage/blocks/purple.png' }).appendTo('body'); $('').attr({ 'src': '/micro/editor/images/stage/blocks/orange.png' }).appendTo('body'); $('').attr({ 'src': '/micro/editor/images/stage/blocks/green.png' }).appendTo('body'); $('').attr({ 'src': '/micro/editor/images/stage/blocks/blue.png' }).appendTo('body');*/", "elements": [{"styles": {"normal": {"pFlex": 100, "width": "100%"}}, "type": "Container", "name": "VerticalSpacer"}, {"styles": {"normal": {"width": "100%", "height": "500px"}}, "htmlClass": "overflow_visible", "elements": [{"styles": {"normal": {"pFlex": 100, "height": "100%"}}, "type": "Container", "name": "Spacer"}, {"styles": {"normal": {"zIndex": 1005, "width": "600px", "height": "500px"}}, "onLoad": "/*hack to do resize since parent doesn't have reference to thie subelement */this.calculatedHeight=500;this.resize();", "fadeOutSpeed": 0, "name": "WelcomeDialog", "htmlClass": "dialog", "elements": [{"styles": {"normal": {"borderColor": "#5C5C5C", "backgroundRepeat": "repeat-x", "height": 60, "zIndex": 1006, "width": "100%", "borderBottomWidth": "1px", "backgroundColor": "#939CA7", "backgroundImage": "url( images/toolbar/toolbar_bg.png )"}}, "htmlClass": "dialog_header overflow_visible", "elements": [{"styles": {"normal": {"position": "relative", "marginTop": 8, "marginLeft": 4}}, "src": "images/vex/logo_toolbar.png", "type": "Image"}, {"styles": {"normal": {"width": 260, "height": 60}}, "html": "

Select Hardware

", "type": "HTMLContainer", "name": "LoaderTitle"}, {"uid": "ui.login.modk.it"}], "type": "HorizontalContainer", "name": "LoaderHeader"}, {"styles": {"normal": {"width": 600, "height": 385}}, "type": "VerticalContainer", "id": "LoaderStepHolder"}, {"styles": {"normal": {"borderColor": "#89939C", "width": "100%", "height": 53, "backgroundColor": "#C4C9CE", "borderTopWidth": 1}}, "onLoad": "/*hack to do resize since parent doesn't have reference to the subelement*/ this.calculatedWidth=580;this.resize();", "elements": [{"styles": {"normal": {"width": "270px", "marginTop": "8px", "marginLeft": "20px", "name": "controls", "height": "53px"}}, "html": "
Back
", "type": "HTMLContainer", "onClick": "function(evt){Events.broadcast('WizardLast', []);}"}, {"styles": {"normal": {"width": "290px", "marginTop": "8px", "height": "53px"}}, "html": "
Continue
", "type": "HTMLContainer", "name": ",controls", "onClick": "function(evt){Events.broadcast('WizardNext', []);}"}], "name": "controls", "type": "HorizontalContainer", "htmlClass": "welcome_controls"}], "type": "VerticalContainer", "id": "WelcomeDialog"}, {"styles": {"normal": {"pFlex": 100, "height": "100%"}}, "type": "Container", "name": "Spacer"}], "type": "HorizontalContainer"}, {"styles": {"normal": {"pFlex": 100, "width": "100%"}}, "type": "Container", "name": "VerticalSpacer"}], "uid": "wizard.modk.it", "type": "Wizard", "name": "WizardContainer"}, "1.vex.iq.gyroAngle.blocks.modk.it": {"category": "input", "groupElements": [{"assetGlobals": {"localScope": "ignore", "subBlocks": {"0": "subBlock"}}, "ignore": true, "elements": [{"assetGlobals": {"params": {"0": "value"}}, "color": "blue", "readonly": true, "elements": [{"feed": "1.vex.iq.gyroAngle.blocks.modk.itComponentListChange", "values": [], "type": "DropdownMenu", "autoMinWidth": "true"}], "type": "NameArgument"}], "accepts": ["NoBlock"], "type": "BlockHolder"}, {"assetGlobals": {"localScope": "ignore"}, "ignore": true, "type": "CodeElement", "value": ".", "text": ""}, {"text": "angle", "type": "CodeElement", "value": "angle("}, {"type": "CodeElement", "value": ")"}], "uid": "1.vex.iq.gyroAngle.blocks.modk.it", "color": "purple", "docs": {"category": "input", "description": "Gets the current angle of the _Gyro_.", "title": "angle", "hint": "", "type": "NumberBlock", "name": "angle"}, "extensionOf": "1.number.blocks.modk.it", "tokens": ["gyroAngle"], "stateVars": {"localScope": false, "params": false, "subBlocks": false}}, "buttonClose.modk.it": {"styles": {"hover": {"backgroundPosition": "0 -23px"}, "normal": {"right": 0, "top": 0, "height": 23, "width": 23, "textIndent": "-9999px", "background": "transparent url('images/close_btn_sprite.png') no-repeat", "position": "absolute", "overflow": "hidden", "backgroundPosition": "0 0"}}, "type": "Button", "htmlClass": "button close_button", "uid": "buttonClose.modk.it", "name": "CloseButton"}, "ui.marker.error.modk.it": {"styles": {"hide": {"styleCondition": "this.hide == true", "display": "none", "visibility": "hidden"}, "normal": {"fontWeight": "bold", "right": 8, "boxShadow": "0 1px 3px rgba(0,0,0,0.3)", "fontFamily": "Georgia, serif", "borderRadius": 20, "top": 5, "height": 16, "width": 16, "fontSize": 14, "background": "#cc0000", "position": "absolute", "border": "2px solid #fff", "textAlign": "center", "color": "#fff", "textShadow": "none"}}, "text": "!", "type": "FrameworkText", "uid": "ui.marker.error.modk.it"}, "1.vex.iq.resetSystemClock.blocks.modk.it": {"category": "setup", "uid": "1.vex.iq.resetSystemClock.blocks.modk.it", "color": "darkblue", "docs": {"type": "StatementBlock", "description": "Resets the timer.", "name": "reset timer", "hint": ""}, "extensionOf": "1.statement.blocks.modk.it", "statementElements": [{"elements": [{"text": "reset timer", "type": "CodeElement", "value": "BRAIN.resetClock();"}], "type": "LineElement"}], "tokens": ["resetTimer"]}, "1.vex.iq.colorType.blocks.modk.it": {"category": "input", "groupElements": [{"assetGlobals": {"localScope": "ignore", "subBlocks": {"0": "subBlock"}}, "ignore": true, "elements": [{"assetGlobals": {"params": {"0": "value"}}, "color": "blue", "readonly": true, "elements": [{"feed": "1.vex.iq.colorType.blocks.modk.itComponentListChange", "values": [], "type": "DropdownMenu", "autoMinWidth": "true"}], "type": "NameArgument"}], "accepts": ["NoBlock"], "type": "BlockHolder"}, {"assetGlobals": {"localScope": "ignore"}, "ignore": true, "type": "CodeElement", "value": ".", "text": ""}, {"text": "color", "type": "CodeElement", "value": "color("}, {"assetGlobals": {"params": {"1": "value"}}, "readonly": true, "elements": [{"values": ["AMBIENT", "HUE"], "type": "DropdownMenu", "autoMinWidth": "true"}], "type": "NameArgument", "value": "HUE"}, {"type": "CodeElement", "value": ")"}], "uid": "1.vex.iq.colorType.blocks.modk.it", "color": "purple", "docs": {"category": "input", "type": "NumberBlock", "description": "Gets the *color* value for the __COMPONENT__. Options are AMBIENT and HUE values", "name": "colorType", "hint": ""}, "extensionOf": "1.number.blocks.modk.it", "tokens": ["currentMotorEncoder"], "stateVars": {"localScope": false, "params": false, "subBlocks": false}}, "1.launchpad.ti.hardware.modk.it": {"description": "The Launchpad comes equipped with 14 digital I/O pins (7 are PWM-enabled) and 6 analog pins.

Unlike its predecessors, the Leonardo can connect to your computer directly via USB, meaning it can act just like a mouse or keyboard.", "microcontrollerOptions": {"1.msp430g2553.msp430.microcontrollers.modk.it": {"flash_size": 32768, "device_signature": 2004359, "programmer": {"type": "mspdebug", "speed": 57600}, "boot_sizes": [4096], "compiler": {"f_cpu": "16000000L", "mcu": "msp430g2553", "type": "msp430", "variant": "launchpad", "framework": "energia"}}}, "uid": "1.launchpad.ti.hardware.modk.it", "dropdown_text": "TI Launchpad", "extensionOf": "1.compatible.arduino.hardware.modk.it", "pinDef": "1.launchpad.pins.modk.it", "brand": "Arduino", "stateVars": {"programmingSpeed": true, "framework": true, "mcu": true, "maxProgramSize": true, "f_cpu": true}, "boardImage": {"src": "images/hardware/boards/MSP430_Launchpad.png"}, "images": {"small": "images/hardware/boards/MSP430_Launchpad_115x90.png", "medium": "images/hardware/boards/MSP430_Launchpad_x200.png"}, "model": "Leonardo", "pinOffsets": {"top": "12px", "left": "144px"}, "name": "TI Launchpad"}, "1.vex.iq.colorSensor.components.modk.it": {"uid": "1.vex.iq.colorSensor.components.modk.it", "library": "1.motor.library.modk.it", "maxComponents": 12, "_excluded_blocks": [{"uid": "1.break.blocks.modk.it"}, {"uid": "1.randomNumber.blocks.modk.it"}, {"uid": "1.vex.iq.setColorSensorThreshold.blocks.modk.it"}], "otherBlocksCategory": "Color_Sensor", "onSettingsHide": "if(this.settingsPopover.settings.colorMode=='VEX_API_IQ_THREE_COLOR_MODE'){this.switchMode('color3');} else if(this.settingsPopover.settings.colorMode=='VEX_API_IQ_TWELVE_COLOR_MODE'){this.switchMode('color12');} else if(this.settingsPopover.settings.colorMode=='VEX_API_IQ_GREYSCALE_MODE'){this.switchMode('greyscale');} ", "type": "VexComponent", "styles": {"normal": {"width": "170px", "height": "100px"}}, "onLoad": "this.renameHelper=function(name){this.$markup.find('.vex_component_label_name').get(0).blockObject.setText(name);}; this.modeHelper=function(tries){ if(!Boolean(tries)){tries=1;}else{tries+=1;} if(tries>100){return;} if(!Boolean(this.manager)){ $.later(100,this,this.modeHelper,[tries]); return;}if(this.settingsPopover.settings.colorMode=='VEX_API_IQ_THREE_COLOR_MODE'){this.switchMode('color3');}else if(this.settingsPopover.settings.colorMode=='VEX_API_IQ_GREYSCALE_MODE'){this.switchMode('greyscale');} }; if(!Boolean(this.cloneable)){this.modeHelper();}", "elements": [{"styles": {"hover": {"visibility": "visible"}, "selected": {"visibility": "visible"}, "normal": {"borderRadius": "15px", "top": -50, "visibility": "hidden", "height": 190, "width": 210, "backgroundColor": "", "position": "absolute", "border": "4px solid rgba(18, 52, 86, 0.4)", "display": "none", "left": -30}}, "htmlClass": "vex_component_wrapper", "elements": [{"styles": {"normal": {"right": "5px", "bottom": "5px", "height": "20px", "width": "20px", "position": "absolute", "left": "auto"}}, "elements": [], "name": "ComponentConfigButton", "type": "ConfigButton", "onClick": "function(){ this.container.container.showComponentSettings(this); }", "htmlClass": "hardware_settings_button"}], "type": "Container", "name": "Wrapper"}, {"styles": {"placed": {"top": "0px", "left": "0px"}, "normal": {"width": "auto", "top": "48px", "height": "42px", "left": "88px"}}, "htmlClass": "vex_component_label vex_component_color_sensor clearfix", "elements": [{"styles": {"placed": {"marginLeft": "10px"}, "normal": {"width": "auto", "color": "#2a323d", "marginBottom": "auto", "height": "auto", "fontWeight": "bold", "marginLeft": 42, "fontSize": "20px", "marginRight": "10px", "position": "relative", "marginTop": "10px", "textShadow": "0px 1px 0 #C4C4C4"}}, "text": "Color Sensor", "type": "FrameworkText", "htmlClass": "vex_component_label_name"}], "type": "Container"}, {"styles": {"normal": {"position": "absolute"}}, "htmlClass": "vex_component_drawer_image", "type": "Image", "src": "images/vex/components/color_sensor-150x.png"}, {"styles": {"selected": {"backgroundImage": "url(images/vex/components/color_sensor-selected.png)"}, "normal": {"height": 83, "width": 106, "background": "transparent url(images/vex/components/color_sensor.png) no-repeat", "position": "absolute", "backgroundPosition": "0 0", "left": 30}}, "onLoad": "Events.register(this.container.id+'.ComponentOver', function(){this.select();}, this); Events.register(this.container.id+'.ComponentOut', function(){this.deselect();}, this);", "elements": [{"y": 32, "x": -44, "angle": 0, "uid": "1.vex.iq.ui.wire.modk.it"}], "name": "ComponentImage", "type": "Container", "htmlClass": "vex_component_pad_image"}, {"styles": {"normal": {"zIndex": 2, "maxWidth": 240, "bottom": -36, "float": "left", "height": "auto", "padding": "3px 2px 0px 0px", "width": "auto", "background": "rgba(18, 52, 86, 0.4);", "position": "absolute", "left": -26}}, "htmlClass": "vex_component_pins clearfix", "type": "HorizontalContainer"}, {"feed": "digitalOutPinsListChange", "styles": {"normal": {"width": "100px"}}, "layer": "pins", "angle": 0, "onMouseout": "Events.broadcast(this.container.id+'.ComponentOut', []);", "assetGlobals": {"wire": "name"}, "values": [], "mode": "OUTPUT_COMPONENT", "type": "VexPin", "onMouseover": "Events.broadcast(this.container.id+'.ComponentOver', []);"}], "blocks": [{"uid": "1.vex.iq.color.blocks.modk.it"}, {"uid": "1.vex.iq.colorType.blocks.modk.it"}, {"uid": "1.vex.iq.greyscale.blocks.modk.it"}, {"uid": "1.vex.iq.colorSensorClose.blocks.modk.it"}], "docs": {"pins": [{"type": "I2C", "description": "", "name": "color_sensor"}], "type": "VexComponent", "description": "The color sensor detects colors, and will give a value of the color in front of it. ", "title": "Color Sensor"}, "classBased": true, "defaultName": "COLOR_SENSOR", "componentArray": "int motorArray[3]", "configuration": [{"type": "text", "value": "VexColorSensor"}, {"index": "numColors", "type": "objectArray", "value": "settings"}, {"type": "text", "value": " "}, {"type": "objectVar", "value": "name"}, {"type": "text", "value": " = VexColorSensor"}, {"index": "numColors", "type": "objectArray", "value": "settings"}, {"type": "text", "value": "("}, {"type": "objectVar", "value": "wire"}, {"type": "text", "value": ","}, {"type": "objectVar", "value": "settings.colorMode"}, {"type": "text", "value": ");\n"}, {"type": "text", "value": "Scope("}, {"type": "objectVar", "value": "name"}, {"type": "text", "value": ",VexColorSensor"}, {"index": "numColors", "type": "objectArray", "value": "settings"}, {"type": "text", "value": ");\n#endif //ifndef IQ_GET_JUMPTABLE_DEFINE_MODKIT_VEX\n\n#ifdef IQ_GET_JUMPTABLE_DEFINE_MODKIT_VEX\n#define IQ_"}, {"type": "objectVar", "value": "wire"}, {"type": "text", "value": "_DEVICE_ID_STR IQ_RGB_SENSOR_STR//set device id\n#endif //IQ_GET_JUMPTABLE_DEFINE_MODKIT_VEX\n\n#ifndef IQ_GET_JUMPTABLE_DEFINE_MODKIT_VEX\n"}], "icon": "images/vex/components/drawer_icons/color_sensor.png", "displayName": "Color Sensor", "modes": {"greyscale": {"excludedBlocks": [{"uid": "1.vex.iq.color.blocks.modk.it"}, {"uid": "1.vex.iq.colorType.blocks.modk.it"}]}, "color3": {"excludedBlocks": [{"uid": "1.vex.iq.greyscale.blocks.modk.it"}]}, "color12": {"excludedBlocks": [{"uid": "1.vex.iq.greyscale.blocks.modk.it"}]}}, "onStartDrag": "if(Boolean(modkitNamespace.GenericComponent.managers[this.uid]) && modkitNamespace.GenericComponent.managers[this.uid].count >= this.maxComponents || this.maxComponents == 0){ if(!Boolean(this.container) || this.container.id != 'hardware_pad'){ this.$markup.removeClass('myAcceptableClass');}}", "onConfigOverride": "this.configOverrides={'settings':{'colorMode':this.settingsPopover.settings.colorMode}}; if(this.settingsPopover.settings.colorMode=='VEX_API_IQ_THREE_COLOR_MODE') { this.configOverrides.settings.numColors='3';} else if(this.settingsPopover.settings.colorMode=='VEX_API_IQ_GREYSCALE_MODE') { this.configOverrides.settings.numColors='3';} else if(this.settingsPopover.settings.colorMode=='VEX_API_IQ_TWELVE_COLOR_MODE') { this.configOverrides.settings.numColors='12';} ", "stateVars": {"top": true, "wire": true, "name": true, "left": true}, "mode": "greyscale", "settingsPopover": {"type": "SettingsPopover", "settings": {"uid": "1.vex.iq.settingsColorSensor.components.modk.it"}}, "otherBlocks": [{"uid": "1.vex.iq.color.blocks.modk.it"}, {"uid": "1.vex.iq.colorType.blocks.modk.it"}, {"uid": "1.vex.iq.greyscale.blocks.modk.it"}, {"uid": "1.vex.iq.colorSensorClose.blocks.modk.it"}]}, "1.number.blocks.modk.it": {"category": "operators", "stateVars": {"top": true, "params": false, "subBlocks": false, "left": true}, "elements": [{"assetGlobals": {"color": "color", "groupElements": "elements"}, "assetGlobalsExclude": {"elements": true}, "type": "GroupElement"}], "type": "NumberBlock", "uid": "1.number.blocks.modk.it"}, "1.vex.iq.turnDrivetrainRelative.blocks.modk.it": {"category": "output", "uid": "1.vex.iq.turnDrivetrainRelative.blocks.modk.it", "color": "blue", "docs": {"category": "output", "description": "*Turns* the **Drivetrain** by a set amount of degrees (or revolutions) in the selected direction.", "parameters": [{"options": ["LEFT", "RIGHT"], "type": "rotation", "description": "sets the direction to turn", "name": "direction"}, {"type": "num", "description": "the number of degrees (deg) or revolutions (rev) to turn", "name": "angle"}], "hint": "", "type": "StatementBlock", "name": "turn"}, "extensionOf": "1.statement.blocks.modk.it", "statementElements": [{"elements": [{"text": "turn  ", "type": "CodeElement", "value": "turnRelative("}, {"assetGlobals": {"subBlocks": {"0": "subBlock"}}, "type": "BlockHolder", "elements": [{"elements": [{"values": ["LEFT", "RIGHT"], "type": "DropdownMenu", "autoMinWidth": "true"}], "assetGlobals": {"params": {"0": "value"}}, "value": "", "color": "blue", "readonly": true, "type": "NumberArgument"}], "accepts": ["NumberBlock"]}, {"text": "", "type": "CodeElement", "value": ","}, {"assetGlobals": {"subBlocks": {"1": "subBlock"}}, "type": "BlockHolder", "elements": [{"elements": [{"values": ["45", "90", "180", "360", "720"], "type": "DropdownMenu", "autoMinWidth": "true"}], "assetGlobals": {"params": {"1": "value"}}, "maxChars": "32", "color": "blue", "allowChars": "0-9.", "type": "NumberArgument"}], "accepts": ["NumberBlock"]}, {"text": "", "type": "CodeElement", "value": ","}, {"assetGlobals": {"params": {"2": "value"}}, "readonly": true, "elements": [{"values": ["deg", "rev"], "type": "DropdownMenu", "autoMinWidth": "true"}], "type": "NameArgument", "value": "deg"}, {"text": "", "type": "CodeElement", "value": ");"}], "type": "LineElement"}], "tokens": ["turnDrivetrainBy"], "sibling": null}, "1.vex.iq.driveDrivetrainRelative.blocks.modk.it": {"category": "output", "uid": "1.vex.iq.driveDrivetrainRelative.blocks.modk.it", "color": "blue", "docs": {"category": "output", "description": "*Drive* the **Drivetrain** a set distance in the selected direction. The distance can be in millimeters (mm) or inches (in).", "parameters": [{"type": "direction", "description": "sets the direction to drive", "name": "direction"}, {"type": "num", "description": "distance to drive ", "name": "distance"}], "hint": "", "type": "StatementBlock", "name": "drive"}, "extensionOf": "1.statement.blocks.modk.it", "statementElements": [{"elements": [{"text": "drive  ", "type": "CodeElement", "value": "driveRelative("}, {"assetGlobals": {"subBlocks": {"0": "subBlock"}}, "type": "BlockHolder", "elements": [{"elements": [{"values": ["FWD", "REV"], "type": "DropdownMenu", "autoMinWidth": "true"}], "assetGlobals": {"params": {"0": "value"}}, "value": "", "color": "blue", "readonly": true, "type": "NumberArgument"}], "accepts": ["NumberBlock"]}, {"text": "", "type": "CodeElement", "value": ","}, {"assetGlobals": {"subBlocks": {"1": "subBlock"}}, "type": "BlockHolder", "elements": [{"elements": [{"values": ["25", "50", "100", "250", "500"], "type": "DropdownMenu", "autoMinWidth": "true"}], "assetGlobals": {"params": {"1": "value"}}, "maxChars": "32", "color": "blue", "allowChars": "0-9.", "type": "NumberArgument"}], "accepts": ["NumberBlock"]}, {"text": "", "type": "CodeElement", "value": ","}, {"assetGlobals": {"params": {"2": "value"}}, "readonly": true, "elements": [{"values": ["mm", "in"], "type": "DropdownMenu", "autoMinWidth": "true"}], "type": "NameArgument", "value": "mm"}, {"text": "", "type": "CodeElement", "value": ");"}], "type": "LineElement"}], "tokens": ["driveDrivetrainBy"], "sibling": null}, "1.vex.iq.hardware.vex.modk.it": {"microcontrollerOptions": {"1.LM4F232H5QD.tiva.microcontrollers.modk.it": {"programmer": {"type": "vex", "speed": 115200}, "compiler": {"f_cpu": "80000000L", "maker": "VEX", "framework": "make", "mcu": "LM4F232H5QD", "type": "armgcc", "model": "IQ"}}}, "uid": "1.vex.iq.hardware.vex.modk.it", "maxVersion": "1.12", "images": {"small": "images/vex/brain-150x.png", "medium": "images/vex/brain_missing-x200.png"}, "preferredVersion": "1.12", "serialPortList": true, "dropdown_text": "VEX IQ", "excluded_blocks": [{"uid": "1.vex.iq.setClock.blocks.modk.it"}, {"uid": "1.vex.iq.setSoundEffect.blocks.modk.it"}, {"uid": "1.vex.iq.playSound.blocks.modk.it"}, {"uid": "1.vex.iq.playTone.blocks.modk.it"}, {"uid": "1.vex.iq.batteryVoltage.blocks.modk.it"}, {"uid": "1.break.blocks.modk.it"}, {"uid": "1.randomNumber.blocks.modk.it"}, {"uid": "1.vex.iq.setI2CRegister.blocks.modk.it"}, {"uid": "1.vex.iq.readI2CWord.blocks.modk.it"}, {"uid": "1.vex.iq.readI2CRegister.blocks.modk.it"}], "boardImage": {"src": "images/vex/brain-big_numbers.png", "top": "0px", "left": "0px"}, "hardwareComponents": [{"uid": "1.vex.iq.motor.components.modk.it"}, {"uid": "1.vex.iq.controller.components.modk.it"}, {"uid": "1.vex.iq.button.components.modk.it"}, {"uid": "1.vex.iq.touchLED.components.modk.it"}, {"uid": "1.vex.iq.colorSensor.components.modk.it"}, {"uid": "1.vex.iq.rangefinder.components.modk.it"}, {"uid": "1.vex.iq.gyro.components.modk.it"}, {"uid": "1.vex.iq.drivetrain.components.modk.it"}, {"uid": "1.vex.iq.rotator.mechanism.modk.it"}, {"uid": "1.vex.iq.slider.mechanism.modk.it"}], "stateVars": {"d8": false, "d9": false, "d6": false, "d7": false, "d4": false, "d5": false, "d2": false, "d3": false, "d10": false, "d11": false, "d12": false, "d13": false, "subHardware": true, "top": true, "a1": false, "a0": false, "a3": false, "a2": false, "a5": false, "a4": false, "angle": true, "pinDef": false, "draggable": true, "hideHardwareComponents": true, "left": true}, "type": "VexHardware", "pinOffsets": {"top": "10px", "left": "-6px"}, "elements": [{"styles": {"normal": {"opacity": 1, "borderRadius": "15px", "top": -20, "height": 200, "width": 230, "backgroundColor": "", "position": "absolute", "border": "4px solid rgba(18, 52, 86, 0.4)", "display": "none", "left": -2}}, "htmlClass": "vex_component_wrapper", "elements": [], "type": "Container", "name": "Wrapper"}, {"styles": {"normal": {"zIndex": 1}}, "src": "images/hardware/arduino_compatible-385x275.png", "layer": "base", "assetGlobals": {"boardImage": {"src": "src", "top": "top", "bounds": "bounds", "left": "left"}}, "bounds": {"top": 0, "bottom": 274, "right": 379, "left": 0}, "type": "SimpleImage"}, {"styles": {"placed": {"top": "0px", "left": "0px"}, "normal": {"width": "auto", "top": -16, "height": "42px", "display": "block", "left": 2}}, "htmlClass": "vex_component_label vex_component_motor clearfix", "elements": [{"styles": {"placed": {"marginLeft": "10px"}, "normal": {"width": "auto", "color": "#2a323d", "marginBottom": "auto", "height": "auto", "fontWeight": "bold", "marginLeft": 42, "fontSize": "20px", "marginRight": "10px", "position": "relative", "marginTop": "10px", "textShadow": "0px 1px 0 #C4C4C4"}}, "text": "BRAIN", "type": "FrameworkText", "htmlClass": "vex_component_label_name"}], "type": "Container"}, {"onLoad": "this.setX(this.x); this.setY(this.y); Events.register('pinListAttach', function(pin){ if(pin == this.name){ this.showWire = true; this.testStyleConditions(); };}, this); Events.register('pinListDetach', function(pin){ if(pin == this.name){ this.showWire = false; this.testStyleConditions(); };}, this);", "uid": "1.vex.iq.ui.wire.modk.it", "noLabel": true, "brain": true, "y": 68, "x": -36, "name": "PORT7"}, {"onLoad": "this.setX(this.x); this.setY(this.y); Events.register('pinListAttach', function(pin){ if(pin == this.name){ this.showWire = true; this.testStyleConditions(); };}, this); Events.register('pinListDetach', function(pin){ if(pin == this.name){ this.showWire = false; this.testStyleConditions(); };}, this);", "uid": "1.vex.iq.ui.wire.modk.it", "noLabel": true, "brain": true, "y": 78, "x": -20, "name": "PORT8"}, {"onLoad": "this.setX(this.x); this.setY(this.y); Events.register('pinListAttach', function(pin){ if(pin == this.name){ this.showWire = true; this.testStyleConditions(); };}, this); Events.register('pinListDetach', function(pin){ if(pin == this.name){ this.showWire = false; this.testStyleConditions(); };}, this);", "uid": "1.vex.iq.ui.wire.modk.it", "noLabel": true, "brain": true, "y": 88, "x": -3, "name": "PORT9"}, {"onLoad": "this.setX(this.x); this.setY(this.y); Events.register('pinListAttach', function(pin){ if(pin == this.name){ this.showWire = true; this.testStyleConditions(); };}, this); Events.register('pinListDetach', function(pin){ if(pin == this.name){ this.showWire = false; this.testStyleConditions(); };}, this);", "uid": "1.vex.iq.ui.wire.modk.it", "noLabel": true, "brain": true, "y": 97, "x": 13, "name": "PORT10"}, {"onLoad": "this.setX(this.x); this.setY(this.y); Events.register('pinListAttach', function(pin){ if(pin == this.name){ this.showWire = true; this.testStyleConditions();};}, this); Events.register('pinListDetach', function(pin){ if(pin == this.name){ this.showWire = false; this.testStyleConditions(); };}, this);", "uid": "1.vex.iq.ui.wire.modk.it", "noLabel": true, "brain": true, "y": 106, "x": 29, "name": "PORT11"}, {"onLoad": "this.setX(this.x); this.setY(this.y); Events.register('pinListAttach', function(pin){ if(pin == this.name){ this.showWire = true; this.testStyleConditions(); };}, this); Events.register('pinListDetach', function(pin){ if(pin == this.name){ this.showWire = false; this.testStyleConditions(); };}, this);", "uid": "1.vex.iq.ui.wire.modk.it", "noLabel": true, "brain": true, "y": 116, "x": 46, "name": "PORT12"}, {"onLoad": "this.setX(this.x); this.setY(this.y); Events.register('pinListAttach', function(pin){ if(pin == this.name){ this.showWire = true; this.testStyleConditions(); };}, this); Events.register('pinListDetach', function(pin){ if(pin == this.name){ this.showWire = false; this.testStyleConditions(); };}, this);", "uid": "1.vex.iq.ui.wire.modk.it", "noLabel": true, "brain": true, "y": -21, "x": 108, "side": "back", "name": "PORT1"}, {"onLoad": "this.setX(this.x); this.setY(this.y); Events.register('pinListAttach', function(pin){ if(pin == this.name){ this.showWire = true; this.testStyleConditions(); };}, this); Events.register('pinListDetach', function(pin){ if(pin == this.name){ this.showWire = false; this.testStyleConditions(); };}, this);", "uid": "1.vex.iq.ui.wire.modk.it", "noLabel": true, "brain": true, "y": -12, "x": 124, "side": "back", "name": "PORT2"}, {"onLoad": "this.setX(this.x); this.setY(this.y); Events.register('pinListAttach', function(pin){ if(pin == this.name){ this.showWire = true; this.testStyleConditions(); };}, this); Events.register('pinListDetach', function(pin){ if(pin == this.name){ this.showWire = false; this.testStyleConditions(); };}, this);", "uid": "1.vex.iq.ui.wire.modk.it", "noLabel": true, "brain": true, "y": -2, "x": 141, "side": "back", "name": "PORT3"}, {"onLoad": "this.setX(this.x); this.setY(this.y); Events.register('pinListAttach', function(pin){ if(pin == this.name){ this.showWire = true; this.testStyleConditions(); };}, this); Events.register('pinListDetach', function(pin){ if(pin == this.name){ this.showWire = false; this.testStyleConditions(); };}, this);", "uid": "1.vex.iq.ui.wire.modk.it", "noLabel": true, "brain": true, "y": 7, "x": 157, "side": "back", "name": "PORT4"}, {"onLoad": "this.setX(this.x); this.setY(this.y); Events.register('pinListAttach', function(pin){ if(pin == this.name){ this.showWire = true; this.testStyleConditions(); };}, this); Events.register('pinListDetach', function(pin){ if(pin == this.name){ this.showWire = false; this.testStyleConditions(); };}, this);", "uid": "1.vex.iq.ui.wire.modk.it", "noLabel": true, "brain": true, "y": 16, "x": 173, "side": "back", "name": "PORT5"}, {"onLoad": "this.setX(this.x); this.setY(this.y); Events.register('pinListAttach', function(pin){ if(pin == this.name){ this.showWire = true; this.testStyleConditions(); };}, this); Events.register('pinListDetach', function(pin){ if(pin == this.name){ this.showWire = false; this.testStyleConditions(); };}, this);", "uid": "1.vex.iq.ui.wire.modk.it", "noLabel": true, "brain": true, "y": 26, "x": 190, "side": "back", "name": "PORT6"}, {"assetGlobals": {"pinDef": "uid", "pinOffsets": {"top": "top", "left": "left"}}, "top": "0px", "uid": "1.vex.pins.modk.it", "left": "0px"}], "blocks": [{"uid": "1.vex.iq.resetSystemClock.blocks.modk.it"}, {"uid": "1.vex.iq.setLCDRowColumn.blocks.modk.it"}, {"uid": "1.vex.iq.clearScreen.blocks.modk.it"}, {"uid": "1.vex.iq.clearLine.blocks.modk.it"}, {"uid": "1.vex.iq.print.blocks.modk.it"}, {"uid": "1.vex.iq.newLine.blocks.modk.it"}, {"uid": "1.vex.iq.playSound.blocks.modk.it"}, {"uid": "1.vex.iq.playTone.blocks.modk.it"}, {"uid": "1.vex.iq.systemClock.blocks.modk.it"}, {"uid": "1.vex.iq.batteryVoltage.blocks.modk.it"}, {"uid": "1.vex.iq.LCDColumn.blocks.modk.it"}, {"uid": "1.vex.iq.LCDRow.blocks.modk.it"}], "description": "Vex IQ Brain is cool, it allows you to add components from the Vex IQ kit and build competition robots with smarts!", "brand": "Vex", "minVersion": "1.12", "name": "VEX IQ", "thumbnail": "images/hardware/arduino_generic-tiny.png", "steps": {"uid": "detect_serial_port.steps.hardware.modk.it"}, "model": "IQ", "otherBlocks": [{"uid": "1.vex.iq.setLCDRowColumn.blocks.modk.it"}, {"uid": "1.vex.iq.clearScreen.blocks.modk.it"}, {"uid": "1.vex.iq.clearLine.blocks.modk.it"}, {"uid": "1.vex.iq.print.blocks.modk.it"}, {"uid": "1.vex.iq.newLine.blocks.modk.it"}, {"uid": "1.vex.iq.systemClock.blocks.modk.it"}, {"uid": "1.vex.iq.batteryVoltage.blocks.modk.it"}, {"uid": "1.vex.iq.LCDColumn.blocks.modk.it"}, {"uid": "1.vex.iq.LCDRow.blocks.modk.it"}], "top": "120px", "left": "300px"}, "1.app.vex.modk.it": {"styles": {"normal": {"backgroundColor": "#CCCCCC"}}, "onLoad": "$('#m_logo').fadeOut(100);this.data['neverLoaded'] = true; Events.broadcast('FrameworkLoaded', [],true);Events.register('EditorLoading', function(){ this.hide();},this); Events.register('EditorLoaded', function(){ this.resize();if(this.data['neverLoaded']){this.data['neverLoaded'] = false; Events.broadcast('NoView', [],true); this.show(0);Events.broadcast('HardwareView', [],true); Events.broadcast('BlockTabChange', ['SetupTab']); }},this);", "elements": [{"styles": {"normal": {"width": "100%", "height": "100%"}}, "onLoad": "/*var id=Events.register('Test', function(message){ alert(message)},this);Events.broadcast('Test', ['hi and bye']);Events.unregister('Test',id,this);Events.broadcast('Test', ['should never see this']);alert('setup');*/", "elements": [{"styles": {"normal": {"width": "100%", "height": "100%"}}, "onLoad": "/*Events.register('WizardLoaded', function(){ this.hide(1000);},this);*/", "elements": [{"styles": {"normal": {"borderColor": "#5C5C5C", "zIndex": 1001, "backgroundRepeat": "repeat-x", "height": "60px", "borderRightWidth": "0", "width": "100%", "backgroundImage": "url(images/toolbar/toolbar_bg.png)", "backgroundColor": "#939CA7", "borderBottomWidth": "1px"}}, "type": "HorizontalContainer", "elements": [{"styles": {"normal": {"position": "relative", "marginTop": "8px", "marginLeft": "10px"}}, "src": "images/vex/logo_toolbar.png", "type": "Image"}, {"styles": {"normal": {"pFlex": 100, "height": "100%"}}, "type": "Container", "name": "Spacer"}, {"styles": {"normal": {"width": "50px", "marginTop": "8px", "marginLeft": "20px", "height": 50}}, "elements": [{"styles": {"normal": {"width": "50px", "height": "100%"}}, "elements": [{"styles": {"normal": {"width": "50px", "height": "35px"}}, "elements": [{"styles": {"normal": {"width": "50px", "backgroundImage": "url(images/toolbar/toolbar_selected.png)", "height": "35px"}}, "onLoad": "Events.register('NoView', function(){this.hide(0);},this); Events.register('BlocksView', function(){this.hide();}, this);Events.register('HardwareView', function(){this.show();}, this);Events.register('CodeView', function(){this.hide();}, this);", "html": "
", "type": "HTMLContainer", "name": "hardware_btn_hightlight"}, {"styles": {"normal": {"height": "35px", "width": "50px", "marginLeft": "2px", "position": "relative"}}, "src": "images/vex/toolbar/icon_robot.png", "type": "Image"}], "type": "Container", "name": "hardware_btn_hightlight_stack"}, {"styles": {"normal": {"width": "100%", "color": "#4C4C4C", "height": "auto", "fontFamily": "Helvetica, Arial, sans-serif", "fontSize": "11px", "position": "relative", "textAlign": "center", "textShadow": "#CCC 0px 1px 0px"}}, "text": "Robot", "type": "FrameworkText"}], "type": "VerticalContainer", "name": ""}], "type": "Button", "name": "hardware_btn", "onClick": "function(){ Events.broadcast('HardwareView', []); }"}, {"styles": {"normal": {"width": "50px", "marginTop": "8px", "marginLeft": "10px", "height": 50}}, "elements": [{"styles": {"normal": {"width": "50px", "height": "100%"}}, "elements": [{"styles": {"normal": {"width": "48px", "height": "35px"}}, "elements": [{"styles": {"normal": {"width": "48px", "backgroundImage": "url(images/toolbar/toolbar_selected.png)", "height": "35px"}}, "onLoad": "Events.register('NoView', function(){this.hide(0);},this); Events.register('BlocksView', function(){this.show(); }, this);Events.register('HardwareView', function(){this.hide();}, this);Events.register('CodeView', function(){this.hide();}, this);", "html": "
", "type": "HTMLContainer", "name": "blocks_btn_highlight"}, {"styles": {"normal": {"width": "48px", "height": "35px", "position": "relative"}}, "src": "images/toolbar/icon_blocks.png", "type": "Image"}], "type": "Container", "name": "blocks_btn_highlight_stack"}, {"styles": {"normal": {"width": "100%", "color": "#4C4C4C", "height": "auto", "fontFamily": "Helvetica, Arial, sans-serif", "fontSize": "11px", "position": "relative", "textAlign": "center", "textShadow": "#CCC 0px 1px 0px"}}, "text": "Blocks", "type": "FrameworkText"}], "type": "VerticalContainer", "name": ""}], "type": "Button", "name": "blocks_btn", "onClick": "function(){ Events.broadcast('BlocksView', []); }"}, {"styles": {"normal": {"width": 0, "marginTop": "8px", "_width": 50, "marginLeft": "10px", "display": "none !important"}}, "elements": [{"styles": {"normal": {"width": "50px", "height": "100%"}}, "elements": [{"styles": {"normal": {"width": "50px", "height": "35px"}}, "elements": [{"styles": {"normal": {"width": "50px", "backgroundImage": "url(images/toolbar/toolbar_selected.png)", "height": "35px"}}, "onLoad": "Events.register('NoView', function(){this.hide(0);},this); Events.register('BlocksView', function(){this.hide();}, this);Events.register('HardwareView', function(){this.hide();}, this);Events.register('CodeView', function(){this.show();}, this);", "html": "
", "type": "HTMLContainer", "name": "code_btn_hightlight"}, {"styles": {"normal": {"height": "35px", "width": "50px", "marginLeft": "1px", "position": "relative"}}, "src": "images/toolbar/icon_code.png", "type": "Image"}], "type": "Container", "name": "code_btn_hightlight_stack"}, {"styles": {"normal": {"width": "100%", "color": "#4C4C4C", "height": "100%", "fontFamily": "Helvetica, Arial, sans-serif", "marginLeft": "1px", "fontSize": "11px", "position": "relative", "textAlign": "center", "textShadow": "#CCC 0px 1px 0px"}}, "text": "Source", "type": "FrameworkText"}], "type": "VerticalContainer", "name": ""}], "type": "Button", "name": "code_btn", "onClick": "function(){ Events.broadcast('CodeView', []); }"}, {"styles": {"normal": {"pFlex": 100, "height": "100%"}}, "type": "Container", "name": "Spacer"}, {"uid": "ui.projectControls.modk.it"}, {"styles": {"normal": {"pFlex": 100, "height": "100%"}}, "type": "Container", "name": "Spacer"}, {"uid": "1.vex.iq.ui.downloadPlayStop.modk.it"}, {"styles": {"normal": {"pFlex": 100, "height": "100%"}}, "type": "Container", "name": "Spacer"}, {"uid": "ui.login.modk.it"}], "htmlClass": "overflow_visible", "name": "Header"}, {"styles": {"normal": {"pFlex": 100, "width": "100%", "backgroundColor": "#CCCCCC"}}, "elements": [{"styles": {"normal": {"borderColor": "#89939C", "borderRightWidth": "1px", "maxWidth": "450px", "height": "100%", "minWidth": "200px", "width": "295px"}}, "onLoad": "Events.register('DrawerWidthChange', function(deltaX){this.changeWidth(deltaX);}, this);Events.register('DrawerDragStart', function(){this.startDrag();},this);", "elements": [{"styles": {"normal": {"borderColor": "#89939C", "height": "32px", "borderRightWidth": "1px", "width": "100%", "backgroundImage": "url(images/hardware_stack_sprite.png)", "borderBottomWidth": "1px", "backgroundPosition": "0 -168px"}}, "elements": [{"styles": {"normal": {"pFlex": 100, "height": "100%", "backgroundImage": "url(images/hardware_stack_sprite.png)", "backgroundPosition": "0 -168px"}}, "name": "DrawerHeader", "type": "HTMLContainer", "html": "
", "htmlClass": "tall_control_bar control_bar", "id": "hardware_stack"}, {"styles": {"normal": {"width": "35px", "height": "100%"}}, "elements": [{"styles": {"normal": {"width": "100%", "top": "6px", "height": "25px", "backgroundImage": "url(images/link_indicator_arrows.png)", "backgroundPosition": "0% 0%"}}, "onLoad": "this.hide();Events.register('ModkitLinkConnected', function(){this.show()}, this);Events.register('ModkitLinkDisconnected', function(){this.hide()}, this);Events.register('ModkitLinkBadVersion', function(){this.hide()}, this);", "type": "HTMLContainer"}, {"styles": {"normal": {"width": "100%", "top": "6px", "height": "25px", "backgroundImage": "url(images/link_indicator_arrows.png)", "backgroundPosition": "0% -90px"}}, "onLoad": "this.hide(); Events.register('ModkitLinkConnected', function(){this.hide()}, this);Events.register('ModkitLinkDisconnected', function(){this.hide()}, this);Events.register('ModkitLinkBadVersion', function(){this.show()}, this);", "type": "HTMLContainer"}, {"styles": {"normal": {"width": "100%", "top": "6px", "height": "25px", "backgroundImage": "url(images/link_indicator_arrows.png)", "backgroundPosition": "0% -60px"}}, "onLoad": "Events.register('ModkitLinkConnected', function(){this.hide()}, this);Events.register('ModkitLinkDisconnected', function(){this.show()}, this);Events.register('ModkitLinkBadVersion', function(){this.hide()}, this);", "type": "HTMLContainer"}], "type": "Button", "name": "DrawerContentsStack", "onClick": "function(){CommunicationManager.restartLink();}"}], "type": "HorizontalContainer", "name": "UnnecessaryWrapper"}, {"styles": {"normal": {"pFlex": 100, "width": "100%", "minHeight": "100px"}}, "elements": [{"styles": {"normal": {"width": "100%", "backgroundColor": "#FFFFFF", "height": "100%"}}, "onLoad": "Events.register('NoView', function(){this.hide(0);},this); Events.register('HardwareView', function(){this.show();}, this);Events.register('BlocksView', function(){this.hide();}, this);Events.register('CodeView', function(){this.hide();}, this);", "elements": [{"styles": {"normal": {"borderColor": "#89939C", "borderRightWidth": "1px", "overflowY": "auto", "pFlex": 100, "width": "100%", "background": "transparent"}}, "scrollable": true, "name": "hardwareDrawerHTMLContents", "absolutePositionHack": true, "html": "
Generic Hardware
", "onScrollY": "function(scrollTop){console.log('SCROLLED: '+scrollTop);}", "type": "HTMLContainer", "id": "hardware_drawer"}], "type": "VerticalContainer", "name": "hardwareDrawerContents"}, {"styles": {"normal": {"width": "100%", "backgroundColor": "white", "height": "100%"}}, "elements": [{"styles": {"normal": {"zIndex": "1000", "width": "100%", "height": "22px"}}, "onLoad": "Events.register('NoView', function(){this.hide(0);},this); Events.register('HardwareView', function(){this.hide();}, this);Events.register('BlocksView', function(){this.show();}, this);Events.register('CodeView', function(){this.show();}, this);", "elements": [{"styles": {"normal": {"pFlex": 100, "height": "100%"}}, "elements": [{"styles": {"normal": {"width": "100%", "height": "100%"}}, "elements": [{"styles": {"normal": {"backgroundRepeat": "repeat", "height": "100%", "backgroundImage": "url(images/drawer/bg_shortcut_button.png)", "backgroundColor": "#91A7BD", "width": "100%"}}, "onLoad": "Events.register('BlockTabChange', function(tab){if(tab=='SetupTab'){this.hide();}else{this.show()}}, this);", "elements": [{"styles": {"normal": {"width": "100%", "color": "white", "height": "100%", "fontFamily": "Helvetica, Arial, sans-serif", "fontSize": "12px", "position": "relative", "lineHeight": "22px", "textAlign": "center", "textShadow": "#333 0px 1px 0px"}}, "text": "Setup", "type": "FrameworkText"}], "type": "VerticalContainer", "name": "DrawerContents"}, {"styles": {"normal": {"backgroundRepeat": "repeat", "height": "100%", "backgroundImage": "url(images/drawer/bg_shortcut_button.png)", "backgroundColor": "#FFFFFF", "width": "100%"}}, "onLoad": "Events.register('BlockTabChange', function(tab){if(tab=='SetupTab'){this.show();}else{this.hide()}}, this);", "elements": [{"styles": {"normal": {"width": "100%", "color": "#003366", "height": "100%", "fontFamily": "Helvetica, Arial, sans-serif", "fontSize": "12px", "position": "relative", "lineHeight": "22px", "textAlign": "center", "textShadow": "#F2F2F2 0px 1px 0px"}}, "text": "Setup", "type": "FrameworkText"}], "type": "VerticalContainer", "name": "DrawerContents"}], "type": "Container", "name": "setup_btn_hightlight_stack"}], "type": "Button", "name": "control_btn", "onClick": "function(){ Events.broadcast('BlockTabChange', ['SetupTab']); }"}, {"styles": {"normal": {"pFlex": 100, "height": "100%"}}, "elements": [{"styles": {"normal": {"width": "100%", "height": "100%"}}, "elements": [{"styles": {"normal": {"backgroundRepeat": "repeat", "height": "100%", "backgroundImage": "url(images/drawer/bg_shortcut_button.png)", "backgroundColor": "#91BDD3", "width": "100%"}}, "onLoad": "Events.register('BlockTabChange', function(tab){if(tab=='OutputTab'){this.hide();}else{this.show()}}, this);", "elements": [{"styles": {"normal": {"width": "100%", "color": "white", "height": "100%", "fontFamily": "Helvetica, Arial, sans-serif", "fontSize": "12px", "position": "relative", "lineHeight": "22px", "textAlign": "center", "textShadow": "#333 0px 1px 0px"}}, "text": "Output", "type": "FrameworkText"}], "type": "VerticalContainer", "name": "DrawerContents"}, {"styles": {"normal": {"backgroundRepeat": "repeat", "height": "100%", "backgroundImage": "url(images/drawer/bg_shortcut_button.png)", "backgroundColor": "#FFFFFF", "width": "100%"}}, "onLoad": "Events.register('BlockTabChange', function(tab){if(tab=='OutputTab'){this.show();}else{this.hide()}}, this);", "elements": [{"styles": {"normal": {"width": "100%", "color": "#006699", "height": "100%", "fontFamily": "Helvetica, Arial, sans-serif", "fontSize": "12px", "position": "relative", "lineHeight": "22px", "textAlign": "center", "textShadow": "#F2F2F2 0px 1px 0px"}}, "text": "Output", "type": "FrameworkText"}], "type": "VerticalContainer", "name": "DrawerContents"}], "type": "Container", "name": "operators_btn_hightlight_stack"}], "type": "Button", "name": "control_btn", "onClick": "function(){ Events.broadcast('BlockTabChange', ['OutputTab']); }"}, {"styles": {"normal": {"pFlex": 100, "height": "100%"}}, "elements": [{"styles": {"normal": {"width": "100%", "height": "100%"}}, "elements": [{"styles": {"normal": {"backgroundRepeat": "repeat", "height": "100%", "backgroundImage": "url(images/drawer/bg_shortcut_button.png)", "backgroundColor": "#D3BDE9", "width": "100%"}}, "onLoad": "Events.register('BlockTabChange', function(tab){if(tab=='InputTab'){this.hide();}else{this.show()}}, this);", "elements": [{"styles": {"normal": {"width": "100%", "color": "white", "height": "100%", "fontFamily": "Helvetica, Arial, sans-serif", "fontSize": "12px", "position": "relative", "lineHeight": "22px", "textAlign": "center", "textShadow": "#333 0px 1px 0px"}}, "text": "Sensing", "type": "FrameworkText"}], "type": "VerticalContainer", "name": "DrawerContents"}, {"styles": {"normal": {"backgroundRepeat": "repeat", "height": "100%", "backgroundImage": "url(images/drawer/bg_shortcut_button.png)", "backgroundColor": "#FFFFFF", "width": "100%"}}, "onLoad": "Events.register('BlockTabChange', function(tab){if(tab=='InputTab'){this.show();}else{this.hide()}}, this);", "elements": [{"styles": {"normal": {"width": "100%", "color": "#9966CC", "height": "100%", "fontFamily": "Helvetica, Arial, sans-serif", "fontSize": "12px", "position": "relative", "lineHeight": "22px", "textAlign": "center", "textShadow": "#F2F2F2 0px 1px 0px"}}, "text": "Sensing", "type": "FrameworkText"}], "type": "VerticalContainer", "name": "DrawerContents"}], "type": "Container", "name": "operators_btn_hightlight_stack"}], "type": "Button", "name": "control_btn", "onClick": "function(){ Events.broadcast('BlockTabChange', ['InputTab']); }"}], "type": "HorizontalContainer", "name": "DrawerShortcuts"}, {"styles": {"normal": {"width": "100%", "height": "6px"}}, "type": "HorizontalContainer", "name": "Spacer"}, {"styles": {"normal": {"zIndex": "1000", "width": "100%", "height": "22px"}}, "onLoad": "Events.register('NoView', function(){this.hide(0);},this); Events.register('HardwareView', function(){this.hide();}, this);Events.register('BlocksView', function(){this.show();}, this);Events.register('CodeView', function(){this.show();}, this);", "elements": [{"styles": {"normal": {"width": "6px", "height": "100%"}}, "type": "VerticalContainer", "name": "Spacer"}, {"styles": {"normal": {"borderColor": "#89939C", "borderLeftWidth": "1px", "pFlex": 100, "height": "100%", "borderRightWidth": "1px", "borderTopWidth": "1px"}}, "elements": [{"styles": {"normal": {"pFlex": 100, "height": "100%"}}, "elements": [{"styles": {"normal": {"width": "100%", "height": "100%"}}, "elements": [{"styles": {"normal": {"backgroundRepeat": "repeat", "height": "100%", "backgroundImage": "url(images/drawer/bg_shortcut_button.png)", "backgroundColor": "#BDD3A7", "width": "100%"}}, "onLoad": "Events.register('BlockTabChange', function(tab){if(tab=='OperatorsTab'){this.hide();}else{this.show()}}, this);", "elements": [{"styles": {"normal": {"width": "100%", "color": "white", "height": "100%", "fontFamily": "Helvetica, Arial, sans-serif", "fontSize": "12px", "position": "relative", "lineHeight": "22px", "textAlign": "center", "textShadow": "#333 0px 1px 0px"}}, "text": "Operators", "type": "FrameworkText"}], "type": "VerticalContainer", "name": ""}, {"styles": {"normal": {"backgroundRepeat": "repeat", "height": "100%", "backgroundImage": "url(images/drawer/bg_shortcut_button.png)", "backgroundColor": "#FFFFFF", "width": "100%"}}, "onLoad": "Events.register('BlockTabChange', function(tab){if(tab=='OperatorsTab'){this.show();}else{this.hide()}}, this);", "elements": [{"styles": {"normal": {"width": "100%", "color": "#669933", "height": "100%", "fontFamily": "Helvetica, Arial, sans-serif", "fontSize": "12px", "position": "relative", "lineHeight": "22px", "textAlign": "center", "textShadow": "#F2F2F2 0px 1px 0px"}}, "text": "Operators", "type": "FrameworkText"}], "type": "VerticalContainer", "name": ""}], "type": "Container", "name": "operators_btn_hightlight_stack"}], "type": "Button", "name": "control_btn", "onClick": "function(){ Events.broadcast('BlockTabChange', ['OperatorsTab']); }"}, {"styles": {"normal": {"pFlex": 100, "height": "100%"}}, "elements": [{"styles": {"normal": {"width": "100%", "height": "100%"}}, "elements": [{"styles": {"normal": {"backgroundRepeat": "repeat", "height": "100%", "backgroundImage": "url(images/drawer/bg_shortcut_button.png)", "backgroundColor": "#FFD391", "width": "100%"}}, "onLoad": "Events.register('BlockTabChange', function(tab){if(tab=='ControlTab'){this.hide();}else{this.show()}}, this);", "elements": [{"styles": {"normal": {"width": "100%", "color": "white", "height": "100%", "fontFamily": "Helvetica, Arial, sans-serif", "fontSize": "12px", "position": "relative", "lineHeight": "22px", "textAlign": "center", "textShadow": "#333 0px 1px 0px"}}, "text": "Control", "type": "FrameworkText"}], "type": "VerticalContainer", "name": ""}, {"styles": {"normal": {"backgroundRepeat": "repeat", "height": "100%", "backgroundImage": "url(images/drawer/bg_shortcut_button.png)", "backgroundColor": "#FFFFFF", "width": "100%"}}, "onLoad": "Events.register('BlockTabChange', function(tab){if(tab=='ControlTab'){this.show();}else{this.hide()}}, this);", "elements": [{"styles": {"normal": {"width": "100%", "color": "#FF9900", "height": "100%", "fontFamily": "Helvetica, Arial, sans-serif", "fontSize": "12px", "position": "relative", "lineHeight": "22px", "textAlign": "center", "textShadow": "#F2F2F2 0px 1px 0px"}}, "text": "Control", "type": "FrameworkText"}], "type": "VerticalContainer", "name": ""}], "type": "Container", "name": "control_btn_hightlight_stack"}], "type": "Button", "name": "control_btn", "onClick": "function(){ Events.broadcast('BlockTabChange', ['ControlTab']); }"}, {"styles": {"normal": {"pFlex": 100, "height": "100%"}}, "elements": [{"styles": {"normal": {"width": "100%", "height": "100%"}}, "elements": [{"styles": {"normal": {"backgroundRepeat": "repeat", "height": "100%", "backgroundImage": "url(images/drawer/bg_shortcut_button.png)", "backgroundColor": "#FFBD91", "width": "100%"}}, "onLoad": "Events.register('BlockTabChange', function(tab){if(tab=='MyBlocksTab'){this.hide();}else{this.show()}}, this);", "elements": [{"styles": {"normal": {"width": "100%", "color": "white", "height": "100%", "fontFamily": "Helvetica, Arial, sans-serif", "fontSize": "12px", "position": "relative", "lineHeight": "22px", "textAlign": "center", "textShadow": "#333 0px 1px 0px"}}, "text": "My Blocks", "type": "FrameworkText"}], "type": "VerticalContainer", "name": ""}, {"styles": {"normal": {"backgroundRepeat": "repeat", "height": "100%", "backgroundImage": "url(images/drawer/bg_shortcut_button.png)", "backgroundColor": "#FFFFFF", "width": "100%"}}, "onLoad": "Events.register('BlockTabChange', function(tab){if(tab=='MyBlocksTab'){this.show();}else{this.hide()}}, this);", "elements": [{"styles": {"normal": {"width": "100%", "color": "#FF5500", "height": "100%", "fontFamily": "Helvetica, Arial, sans-serif", "fontSize": "12px", "position": "relative", "lineHeight": "22px", "textAlign": "center", "textShadow": "#F2F2F2 0px 1px 0px"}}, "text": "My Blocks", "type": "FrameworkText"}], "type": "VerticalContainer", "name": ""}], "type": "Container", "name": "operators_btn_hightlight_stack"}], "type": "Button", "name": "control_btn", "onClick": "function(){ Events.broadcast('BlockTabChange', ['MyBlocksTab']); }"}], "type": "HorizontalContainer", "name": "DrawerShortcuts"}, {"styles": {"normal": {"width": "5px", "height": "100%"}}, "type": "VerticalContainer", "name": "Spacer"}], "type": "HorizontalContainer", "name": "DrawerShortcuts2"}, {"styles": {"normal": {"pFlex": 100, "width": "100%"}}, "elements": [{"styles": {"normal": {"width": "100%", "backgroundColor": "#FFFFFF", "height": "100%"}}, "elements": [{"styles": {"normal": {"pFlex": 100, "width": "100%", "borderRightWidth": "1px"}}, "onLoad": "Events.register('NoView', function(){this.hide(0);},this); Events.register('HardwareView', function(){this.hide();}, this);Events.register('BlocksView', function(){this.show();}, this);Events.register('CodeView', function(){this.hide();}, this);", "elements": [{"uid": "1.blockdrawer.ui.modk.it", "id": "BRAIN_block_drawer_holder"}], "type": "Container", "id": "BlockDrawersHolder"}], "type": "VerticalContainer", "name": "blocksDrawerContents"}, {"styles": {"normal": {"width": "100%", "backgroundColor": "#FFFFFF", "height": "100%"}}, "onLoad": "Events.register('NoView', function(){this.hide(0);},this); Events.register('HardwareView', function(){this.hide();}, this);Events.register('BlocksView', function(){this.hide();}, this);Events.register('CodeView', function(){this.show();}, this);", "elements": [{"styles": {"normal": {"pFlex": 100, "width": "100%", "overflowY": "auto", "borderRightWidth": "1px"}}, "scrollable": true, "name": "CodeDrawerHTMLContents", "onShow": " if(Boolean(this.data['codeTab'])){ var tab=this.data['codeTab']; if(tab=='SetupTab'){ this.setScrollY($('#code_setup_lbl').position().top);} if(tab=='OutputTab'){ this.setScrollY($('#code_output_lbl').position().top);} if(tab=='InputTab'){ this.setScrollY($('#code_input_lbl').position().top);} if(tab=='OperatorsTab'){ this.setScrollY($('#code_operators_lbl').position().top);} if(tab=='ControlTab'){ this.setScrollY($('#code_control_lbl').position().top);} if(tab=='MyBlocksTab'){ this.setScrollY($('#code_myblocks_lbl').position().top);} }", "onLoad": "Events.register('BlockTabChange', function(tab){ this.data['codeTab']=tab; if(tab=='SetupTab'){ this.scrollToY($('#code_setup_lbl').position().top);} if(tab=='OutputTab'){ this.scrollToY($('#code_output_lbl').position().top);} if(tab=='InputTab'){ this.scrollToY($('#code_input_lbl').position().top);} if(tab=='OperatorsTab'){ this.scrollToY($('#code_operators_lbl').position().top);} if(tab=='ControlTab'){ this.scrollToY($('#code_control_lbl').position().top);} if(tab=='MyBlocksTab'){ this.scrollToY($('#code_myblocks_lbl').position().top);} }, this);", "absolutePositionHack": true, "html": "
Setup
Output
Input
Operators
Control
My Blocks

", "type": "HTMLContainer", "id": "code_drawer_holder"}], "type": "VerticalContainer", "name": "codeDrawerContents"}], "type": "Container", "name": "BlockCodeStack"}], "type": "VerticalContainer"}], "type": "Container", "name": "DrawerContentsStack"}, {"styles": {"normal": {"borderColor": "#89939C", "height": "21px", "zIndex": "1000", "width": "100%", "borderBottomWidth": "0px", "backgroundColor": "#FFFFFF", "borderTopWidth": "1px"}}, "htmlClass": "control_bar", "elements": [{"styles": {"normal": {"pFlex": 100, "height": "100%"}}, "type": "VerticalContainer", "name": "DrawerFooterSpacer"}, {"styles": {"normal": {"borderColor": "#89939C", "borderLeftWidth": "0px", "height": "100%", "width": "21px", "backgroundImage": "url(images/control_bar.png)", "backgroundPosition": "-84px -84px"}}, "startDrag": "function(){Events.broadcast('DrawerDragStart', []);}", "name": "DrawerDragHandle", "htmlClass": "resize_handle_horizontal", "onDrag": "function(){Events.broadcast('DrawerWidthChange', [this.deltaX]);}", "type": "VerticalContainer"}], "type": "HorizontalContainer", "name": "DrawerFooter"}], "type": "VerticalContainer", "name": "Drawer"}, {"styles": {"normal": {"pFlex": 100, "height": "100%"}}, "elements": [{"styles": {"normal": {"borderColor": "#89939C", "overflowY": "visible", "overflowX": "visible", "height": "32px", "borderRightWidth": "1px", "width": "100%", "borderBottomWidth": "1px", "backgroundColor": "#DCDEE0"}}, "absolutePositionHack_": true, "elements": [{"styles": {"_active": {"background": "rgba(0,0,0,0.5)"}, "hover": {"__width": "140px !important", "background": "rgba(255,255,255,0.5)"}, "selected": {"box-shadow": "0 1px 8px rgba(0,0,0,0.3) inset", "background": "#ACBFD3"}, "normal": {"borderColor": "#89939C", "pFlex": 4, "__transition": "all 400ms ease-in-out", "maxWidth": "200px", "__-ms-transition": "all 400ms ease-in-out", "borderRightWidth": "1px", "__-webkit-transition": "all 400ms ease-in-out", "__-moz-transition": "all 400ms ease-in-out", "__-o-transition": "all 400ms ease-in-out"}}, "onDeselect": "this.elements[2].testStyleConditions();", "elements": [{"styles": {"no_icon": {"styleCondition": "this.container.getWidth() < 20", "_display": "none"}, "normal": {"marginLeft": 2, "position": "relative", "height": 30, "width": 30, "backgroundPosition": "50% 50%"}}, "src": "images/vex/components/drawer_icons/brain.png", "type": "Image", "_onResize": "this.testStyleConditions(); /* onResize doesn't work in Image yet!!! */"}, {"styles": {"icon_only": {"styleCondition": "this.container.getWidth() < 60", "display": "none"}, "normal": {"fontWeight": "bold", "width": "0px", "color": "#36424d", "height": "auto", "fontFamily": "Helvetica, Arial, sans-serif", "marginLeft": "2px", "fontSize": "13px", "position": "relative", "marginTop": "8px", "textAlign": "center", "textShadow": "0px 1px 0px rgb(255,255,255)"}}, "text": "BRAIN", "type": "FrameworkText", "name": "Component Name", "onResize": "this.testStyleConditions();"}, {"styles": {"selected": {"backgroundImage": "url(images/hardware_tab_button_coverup-selected.png)", "styleCondition": "this.container.$markup.hasClass('selected')"}, "icon_only": {"styleCondition": "this.container.getWidth() < 60 && this.container.getWidth() > 40", "display": "none"}, "normal": {"right": 0, "top": 0, "height": "31px", "width": "10px", "background": "transparent url(images/hardware_tab_button_coverup.png) 0 0", "position": "absolute", "display": "block"}}, "onLoad": "/*console.log('loaded a hardware button', this.container.$markup.hasClass('selected'));*/ this.testStyleConditions();", "name": "Component Name Coverup", "htmlClass": "hardware_tab_button_coverup", "onResize": "/*console.log('width test:', this.container.getWidth());*/ this.testStyleConditions();", "type": "Container"}, {"hide": true, "uid": "ui.marker.blocks.modk.it"}, {"hide": true, "uid": "ui.marker.error.modk.it"}], "title": "Robot Brain", "htmlClass": "hardware_tab_button", "onLoad": "this.select();", "onResize": "/*console.debug('resized component tab', this);*/", "onSelect": "this.elements[2].testStyleConditions();", "onClick": "function(){var theBrain = modkitNamespace.AssetFactory.getAsset('main_board'); theBrain.select();}", "type": "HorizontalContainer", "id": "Brain_tab_button"}], "name": "HardwarePadHeader", "type": "Tabbar", "htmlClass": "control_bar tall_control_bar", "id": "hardware_tab_bar"}, {"styles": {"normal": {"pFlex": 100, "width": "100%"}}, "elements": [{"styles": {"normal": {"width": "100%", "overflow": "hidden", "height": "100%"}}, "onLoad": "Events.register('NoView', function(){this.hide(0);},this); Events.register('HardwareView', function(){this.show();}, this);Events.register('BlocksView', function(){this.hide();}, this);Events.register('CodeView', function(){this.hide();}, this);", "elements": [{"styles": {"normal": {"overflowY": "auto", "overflowX": "auto", "backgroundRepeat": "repeat", "_background": "#D7D7D9 url('images/vex/background_hardware_gradient.png') repeat-x", "pFlex": 100, "width": "100%", "backgroundImage": "url('images/vex/background_hardware.png')", "backgroundColor": "#DDDEE0", "backgroundAttachment": "local"}}, "scrollable": true, "elements": [{"styles": {"normal": {"width": "100%", "height": "100%"}}, "onLoad": "/*Events.register('hardwareDrop', function(){},this);*/", "name": "HardwarePad", "autoStretch": true, "droppable": {"classname": "hardware_element", "onDrop": "Events.broadcast('hardwareDrop', []);\n var $dragged = this.callbackdata.ui.draggable;\n var $helper, topOffset, leftOffset, leftAbsolute, topAbsolute;\n var blockObject = $dragged.get(0).blockObject;\n blockObject.dragRevert =false; if ($dragged.parents().is('#hardware_drawer')) { \n var blocksTopOffset = $('#hardware_pad').offset().top;\n var blocksLeftOffset = $('#hardware_pad').offset().left;\n var allowComponent=true; var totalComponents =0; var componentManagers = CodeManager.components; console.log('COMPONENT MANAGERS:::',componentManagers);for(var index in componentManagers){var theseComponents=0; for(var index2 in componentManagers[index].components){ console.log('what is the index ??',index);if(index!='1.vex.iq.controller.components.modk.it') {totalComponents+=1;} theseComponents+=1; } if((theseComponents>= componentManagers[index].maxComponents && index==blockObject.uid)|| (totalComponents>=12 && (blockObject.uid!='1.vex.iq.controller.components.modk.it') )){ allowComponent=false; blockObject.dragRevert =true; }} if(allowComponent){ blockObject = blockObject.clone($('#hardware_pad'));\n var newBlock = $('#' + blockObject.id);\n $helper = this.callbackdata.ui.helper;\n topOffset = parseInt(parseInt(newBlock.css('margin-top'),10),10);\n leftOffset = parseInt(parseInt(newBlock.css('margin-left'),10),10);\n leftAbsolute = parseInt($helper.css('left'),10) - leftOffset - parseInt(blocksLeftOffset,10)+ 'px';\n topAbsolute = parseInt($helper.css('top'),10) - topOffset - parseInt(blocksTopOffset,10) + 'px';\n newBlock.css( {'left' :$helper.position().left - $('#hardware_pad').offset().left, 'top' : $helper.position().top - $('#hardware_pad').offset().top});\n trace('dropped block at:', leftOffset, topOffset, leftAbsolute, topAbsolute);\n blockObject.updatePosition();\n } }\n else{\n $helper = this.callbackdata.ui.helper;\n var left = parseInt($helper.css('margin-left'), 10);\n var top = parseInt($helper.css('margin-top'), 10);\n $dragged.css( {'left' :$helper.offset().left - left - $('#hardware_pad').offset().left , 'top' : $helper.offset().top - top - $('#hardware_pad').offset().top});\n this.$markup.append($dragged);\n blockObject.updatePosition();\n }\n modkitNamespace.AssetFactory.getAsset('hardware_pad').resize();\n", "algorthim": "intersect"}, "htmlClass": "ui_touch_scroll_hack", "type": "HTMLContainer", "id": "hardware_pad"}], "name": "HardwarePad", "absolutePositionHack": true, "type": "Container", "id": "hardware_pad_holder"}], "type": "VerticalContainer", "name": "HardwarePadWrapper"}, {"styles": {"normal": {"width": "100%", "height": "100%"}}, "onLoad": "Events.register('NoView', function(){this.hide(0);},this); Events.register('BlocksView', function(){this.show();}, this);Events.register('HardwareView', function(){this.hide();}, this);Events.register('CodeView', function(){this.hide();}, this);", "elements": [{"onLoad": "/*hack to set current block pad to brain block pad.*/ Events.register('EditorLoaded',function(){modkitNamespace.GenericComponent.currentBlockPad = this.elements[0]; },this);", "uid": "1.blockpad.ui.modk.it", "id": "brain_blocks_pad_holder"}], "type": "Container", "id": "BlockPadStack"}, {"styles": {"normal": {"width": "100%", "height": "100%"}}, "elements": [{"styles": {"normal": {"borderColor": "#89939C", "height": "100%", "borderRightWidth": "1px", "width": "100%", "backgroundImage": "url(images/bg_code_add.png)", "backgroundColor": "#DCDEE0", "backgroundPosition": "50% 50%"}}, "scrollable": true, "name": "CodePad", "onLoad": "Events.register('NoView', function(){this.hide(0);},this); Events.register('HardwareView', function(){this.hide();}, this);Events.register('BlocksView', function(){this.hide();}, this);Events.register('CodeView', function(){this.show();}, this);", "divider": {"styles": {"normal": {"borderColor": "#89939C", "borderRightWidth": "1px", "width": "10px", "backgroundColor": "#F4F4F4", "height": "100%"}}, "type": "Container"}, "absolutePositionHack": true, "onClick": "function(evt){if($(evt.target).attr('id')==this.id){ var codeStack=modkitNamespace.AssetFactory.loadAsset({'type':'CodeStack','editable':true}, $('#code_pad')); codeStack.activate(); } }", "identifier": "CodePad", "type": "HorizontalContainer"}], "type": "Container", "name": "CodePadWrapper"}], "type": "Container", "name": "PadStack"}], "type": "VerticalContainer", "name": "PadArea"}], "type": "HorizontalContainer", "name": "MainView"}], "type": "VerticalContainer", "name": "App"}, {"uid": "ui.popover.modk.it"}, {"uid": "ui.tooltip.modk.it"}, {"uid": "ui.popover.modk.it", "id": "alert"}, {"styles": {"normal": {"backgroundRepeat": "repeat", "height": "100%", "zIndex": 1003, "width": "100%", "backgroundImage": "url(images/carbon4.png)", "backgroundColor": "#888"}}, "onLoad": "Events.register('EditorLoaded',function(){ Events.register('WizardUnloaded', function(){this.hide(1500);},this);},this);Events.register('WizardLoaded', function(){ this.show(500);},this);Events.register('LoadingMessage', function(msg,percentLoaded){$('.loading_progress_text').text(msg); $('.loading_icon_color').css({height:60*percentLoaded});},this);", "fadeOutSpeed": 0, "htmlClass": "red_class", "html": "
Loading
Drawing Editor
", "type": "HTMLContainer"}], "name": "MainStack", "html": "", "type": "Container", "id": "MainStack"}], "uid": "1.app.vex.modk.it", "type": "WindowContainer", "id": "app", "name": "Modkit for VEX - Editor"}, "1.mcp9700.library.modk.it": {"definitions": "void tempSenseSetup(int tempSenseNum,int pinNum){tempSenseNum-=TEMPSENSE_OFFSET;\ntempSenseArray[tempSenseNum]=pinNum;\npinMode(tempSenseArray[tempSenseNum],INPUT);}\nint readFarenheit(int tempSenseNum){\ntempSenseNum-=TEMPSENSE_OFFSET;\n//hack for analog FIXME when analog hack removed from all versions\n //back of napkin calculations for mcp9700 @ 5v\n//0degC ~= .5v ~= 105ADC\n//-50degC ~= 0v ~= 0ADC\n//50degC ~= 1v ~= 210ADC\n//degC=(ADC/2)-50\n//degF = (1.8* degC) + 32\nreturn( (1.8 * ((analogRead(tempSenseArray[tempSenseNum]-14)/2)-50) ) + 32 ); \n}\n", "componentArray": "tempSenseArray", "type": "ComponentLibrary", "uid": "1.mcp9700.library.modk.it"}, "ui.addNumberDialog.modk.it": {"styles": {"normal": {"layout": "wrap", "float": "left", "minHeight": "40px", "height": "auto", "minWidth": 150, "width": 300, "position": "relative"}}, "elements": [{"styles": {"normal": {"fontFamily": "Helvetica, Arial, sans-serif", "height": "auto", "width": "100%", "fontSize": "18px", "position": "relative", "textAlign": "left"}}, "text": "Add New Number", "type": "FrameworkText"}, {"styles": {"normal": {"position": "relative", "marginTop": "3px", "marginBottom": "2px", "width": "100%", "height": "auto"}}, "type": "HorizontalRule"}, {"styles": {"normal": {"position": "relative", "marginRight": "10px", "width": "180px", "height": "auto"}}, "onShow": "this.focus();", "assetGlobals": {"inputs": {"0": "this"}, "name": "value"}, "maxChars": 20, "value": "", "label": "Variable Name", "validateDelay": 2500, "key": "name", "allowChars": "A-Za-z0-9_", "validate": "var used = Identifiers.used(this.value); if(!used){this.hideError();}else{this.showError('The variable \"'+this.value+'\" cannot be used because it '+used+'.
Please chose another variable name.'); this.$input.focus();}", "onChange": "this.container[this.key] = this.value; Events.broadcast('ComponentNameChange', [], true);", "type": "Input", "inputType": "text"}], "uid": "ui.addNumberDialog.modk.it", "type": "Container", "stateVars": {"name": false, "testDropdown": false}, "htmlClass": "dialog_container"}, "1.lesser.blocks.modk.it": {"category": "operators", "groupElements": [{"type": "CodeElement", "value": "("}, {"assetGlobals": {"subBlocks": {"0": "subBlock"}}, "type": "BlockHolder", "elements": [{"allowChars": "0-9.//-", "assetGlobals": {"params": {"0": "value"}}, "readonly": false, "type": "NumberArgument", "maxDecimals": 3}], "accepts": ["NumberBlock"]}, {"text": "<", "type": "CodeElement", "value": ") < ("}, {"assetGlobals": {"subBlocks": {"1": "subBlock"}}, "type": "BlockHolder", "elements": [{"allowChars": "0-9.//-", "assetGlobals": {"params": {"1": "value"}}, "readonly": false, "type": "NumberArgument", "maxDecimals": 3}], "accepts": ["NumberBlock"]}, {"type": "CodeElement", "value": ")"}], "uid": "1.lesser.blocks.modk.it", "color": "green", "docs": {"parameters": [{"type": "num", "description": "Type a value or drag in a variable.", "name": "value 1"}, {"type": "num", "description": "Type a value or drag in a variable.", "name": "value 2"}], "description": "This block is true when **value 1** is smaller than **value 2**. Otherwise the block is false.", "name": "less than", "hint": ""}, "extensionOf": "1.boolean.blocks.modk.it"}, "ui.dropdownMenu.modk.it": {"styles": {"normal": {"zIndex": "200000", "top": "200px", "height": "auto", "minWidth": "200px", "width": "auto", "position": "absolute", "left": "200px"}}, "onLoad": "this.container = modkitNamespace.AssetFactory.getAsset(this.dropdownId);Events.register(this.dropdownId+'.CloseDropdown',function(){this.remove()},this); Events.register(this.dropdownId+'.CloseDropdownDelay',function(timeout){$.later(timeout,this,$.proxy(function(){if(!Boolean(this.canceledHide) && !Boolean(this.submenuOpen) ){this.remove();} },this));},this);", "elements": [{"styles": {"normal": {"width": "100%", "position": "relative", "height": "auto"}}, "type": "Container", "htmlClass": "dropdown", "assetGlobals": {"dropdownElements": "elements"}}], "uid": "ui.dropdownMenu.modk.it", "onMouseout": "this.canceledHide=false; Events.broadcast(this.dropdownId+'.CloseDropdownDelay',[150]);", "type": "Container", "onMouseover": "this.canceledHide=true;", "htmlClass": "dropdown_holder collinsDropdownTester"}, "1.vex.iq.color.blocks.modk.it": {"category": "input", "enumIcon": "images/vex/enum_icons/color-shadow.png", "extensionOf": "1.enum.blocks.modk.it", "groupElements": [{"assetGlobals": {"localScope": "ignore", "subBlocks": {"0": "subBlock"}}, "ignore": true, "elements": [{"assetGlobals": {"params": {"0": "value"}}, "color": "blue", "readonly": true, "elements": [{"feed": "1.vex.iq.color.blocks.modk.itComponentListChange", "values": [], "type": "DropdownMenu", "autoMinWidth": "true"}], "type": "NameArgument"}], "accepts": ["NoBlock"], "type": "BlockHolder"}, {"assetGlobals": {"localScope": "ignore"}, "ignore": true, "type": "CodeElement", "value": ".", "text": ""}, {"text": "color", "type": "CodeElement", "value": "color("}, {"type": "CodeElement", "value": ")"}], "onLoad": "", "color": "purple", "docs": {"category": "input", "type": "EnumBlock", "description": "Gets the *color* of the __COMPONENT__.", "name": "color", "hint": ""}, "enumValues": ["RED", "GREEN", "BLUE"], "tokens": ["colorSensorColor"], "stateVars": {"localScope": false, "params": false, "subBlocks": false}, "enumFeed": "@name@.colors.values", "uid": "1.vex.iq.color.blocks.modk.it", "enumType": "color"}, "1.vex.wizard.linknotfound.steps.modk.it": {"elements": [{"styles": {"normal": {"top": 0, "height": 385, "padding": 20, "width": 600, "backgroundColor": "#DCDEE0", "position": "absolute", "left": 0}}, "elements": [{"styles": {"normal": {"top": 30, "height": 64, "width": 64, "background": "transparent url(images/modkit_link-64x64.png) no-repeat 0 0", "position": "absolute", "left": 50}}, "type": "Container"}, {"styles": {"normal": {"marginBottom": 20, "height": 70, "width": 350, "marginLeft": 140, "position": "relative", "marginTop": 10}}, "onLoad": "if(navigator.userAgent.toLowerCase().indexOf('windows')>-1){this.setText('#Unable to connect to Modkit Link\\n\\nModkit Link is required to program your robot. Please run the Modkit Link exe from C:/Program Files/Modkit now or click one of the links below to get help.');}", "markdown": true, "name": "Heading", "text": "#Unable to connect to Modkit Link\n\nModkit Link is required to program your robot. Please start or restart the Modkit Link app from your applications folder now or click one of the links below to get help.", "type": "FrameworkText"}, {"styles": {"show": {"styleCondition": "CommunicationManager.badVersion == true", "display": "block", "visibility": "visible"}, "normal": {"_visibility": "hidden", "color": "#ffffff", "height": 56, "width": 420, "_display": "none", "position": "relative", "left": 60}}, "html": "
Modkit Link isn’t installed, help me install itDownload and installation instructions.
", "type": "HTMLContainer", "onClick": "function(){ /*override onNext or we'll enter a loop on current step*/this.container.container.wizard.currentStep.onNext=''; this.container.container.wizard.currentStep.setNext({'uid':'1.vex.wizard.downloadlink.modk.it'}); this.container.container.wizard.nextStep(); }"}, {"styles": {"show": {"styleCondition": "CommunicationManager.badVersion == true", "display": "block", "visibility": "visible"}, "normal": {"_visibility": "hidden", "color": "#ffffff", "height": 56, "width": 420, "_display": "none", "position": "relative", "left": 60}}, "html": "
Continue without Modkit LinkUse the editor, but downloading to the robot brain will be disabled.
", "type": "HTMLContainer", "onClick": "function(){StateManager.loadState({\"type\":\"EditorState\",\"uid\":\"default.arduino.examples.modk.it\",\"name\":\"Untitled Project\", \"hardware\":[{\"uid\":\"1.vex.iq.hardware.vex.modk.it\",\"port\":null ,\"mcu\":null, \"microcontroller\":{\"uuid\":null } } ]}); this.topLevelWidget.wizard.unload(); }"}], "type": "Container", "name": "ModkitLinkNotFound"}], "uid": "1.vex.wizard.linknotfound.steps.modk.it", "title": "Run Modkit Link", "onNext": "window.onbeforeunload = null;location.reload();", "type": "WizardStep", "nextText": "Retry"}, "1.vex.iq.setRotatorSpeed.blocks.modk.it": {"category": "setup", "uid": "1.vex.iq.setRotatorSpeed.blocks.modk.it", "color": "darkblue", "docs": {"parameters": [{"range": "-100-100 %", "type": "num", "description": "select the speed from the list, type a number, or use a variable (speed ranges from -100 to 100%)", "name": "speed"}], "type": "StatementBlock", "description": "*Set speed to* sets the speed of the **Rotator** in percent (%).", "name": "set speed", "hint": "Negative **speed** will go in the opposite direction that is selected. Numbers with decimals are allowed."}, "extensionOf": "1.statement.blocks.modk.it", "statementElements": [{"elements": [{"text": "set speed to", "type": "CodeElement", "value": "setSpeed("}, {"assetGlobals": {"subBlocks": {"0": "subBlock"}}, "type": "BlockHolder", "elements": [{"onBlur": "console.log(this.value);", "elements": [{"values": ["0", "20", "40", "60", "80", "100"], "type": "DropdownMenu", "autoMinWidth": "true"}], "assetGlobals": {"params": {"0": "value"}}, "maxChars": "32", "value": "60", "color": "darkblue", "readonly": false, "rangeMin": 0, "allowChars": "0-9.", "rangeMax": 150, "type": "NumberArgument"}], "accepts": ["NumberBlock"]}, {"elements": [{"values": ["%"], "type": "DropdownMenu", "autoMinWidth": "true"}], "assetGlobals": {"params": {"1": "value"}}, "value": "%", "readonly": true, "hideCodeView": true, "type": "NameArgument"}, {"text": "", "type": "CodeElement", "value": ");"}], "type": "LineElement"}], "tokens": ["setRotatorSpeed"]}, "ui.popover.modk.it": {"styles": {"normal": {"zIndex": 1000000, "layout": "wrap", "maxWidth": 500, "top": 100, "marginBottom": 5, "minHeight": 20, "visibility": "hidden", "height": "auto", "minWidth": 220, "width": "auto", "background": "#ced5db", "position": "absolute", "marginTop": 5, "border": "1px solid #888", "display": "none", "left": 700}}, "eventNamespace": "component", "name": "ConfigPopover", "positions": ["right", "bottom", "top", "left"], "elements": [{"styles": {"normal": {"padding": 10, "layout": "wrap", "float": "left", "minHeight": 40, "height": "auto", "minWidth": 200, "width": "auto", "overflow": "hidden"}}, "type": "Container", "elements": [], "htmlClass": "popover_container"}, {"styles": {"normal": {"background-image": "url(images/popover_point.png)", "position": "absolute", "zIndex": 10000, "background-repeat": "no-repeat", "background-color": "transparent"}}, "type": "Container", "class": "popover_point", "name": "settings_point"}], "type": "Popover", "htmlClass": "dialog_popover clearfix", "id": "popover", "uid": "ui.popover.modk.it"}, "1.vex.iq.buttonUp.blocks.modk.it": {"category": "input", "groupElements": [{"assetGlobals": {"localScope": "ignore", "subBlocks": {"0": "subBlock"}}, "ignore": true, "elements": [{"assetGlobals": {"params": {"0": "value"}}, "color": "blue", "readonly": true, "elements": [{"feed": "1.vex.iq.buttonUp.blocks.modk.itComponentListChange", "values": [], "type": "DropdownMenu", "autoMinWidth": "true"}], "type": "NameArgument"}], "accepts": ["NoBlock"], "type": "BlockHolder"}, {"assetGlobals": {"localScope": "ignore"}, "ignore": true, "type": "CodeElement", "value": ".", "text": ""}, {"text": "up", "type": "CodeElement", "value": "up("}, {"type": "CodeElement", "value": ")"}], "uid": "1.vex.iq.buttonUp.blocks.modk.it", "color": "purple", "docs": {"category": "input", "description": "The up block is true if _Button_ is not being pressed.", "title": "up", "hint": "", "type": "BooleanBlock", "name": "up"}, "extensionOf": "1.boolean.blocks.modk.it", "tokens": ["up"], "stateVars": {"localScope": false, "params": false, "subBlocks": false}}, "1.vex.iq.stopRotator.blocks.modk.it": {"category": "output", "uid": "1.vex.iq.stopRotator.blocks.modk.it", "color": "blue", "docs": {"category": "output", "description": "The *stop* block stops the rotator from turning.", "title": "stop rotator", "hint": "", "type": "StatementBlock", "name": "stop"}, "extensionOf": "1.statement.blocks.modk.it", "statementElements": [{"elements": [{"text": "stop  ", "type": "CodeElement", "value": "stop();"}], "type": "LineElement"}], "tokens": ["goMotor"], "sibling": null}, "1.vex.iq.settingsTouchLED.components.modk.it": {"styles": {"normal": {"width": "300px", "height": "auto"}}, "elements": [{"text": "Component Settings", "uid": "1.vex.iq.settingsHeading.modk.it"}, {"uid": "buttonClose.modk.it", "onClick": "function(){ this.container.container.container.saveAndHide(); }"}, {"styles": {"normal": {"position": "relative", "marginTop": "3px", "marginBottom": "2px", "width": "100%", "height": "auto"}}, "type": "HorizontalRule"}, {"styles": {"normal": {"position": "relative", "marginRight": "10px", "width": "140px", "height": "auto"}}, "onLoad": "this.prevNameHack = this.topLevelWidget.getState().componentName;", "onKeypress": "this.value = this.value.toUpperCase();", "assetGlobals": {"componentName": "value", "inputs": {"0": "this"}}, "maxChars": 12, "value": "", "label": "Name", "readonly": false, "key": "componentName", "allowChars": "A-Za-z0-9 _", "validate": "this.value=this.value.replace(' ','_').replace(' ','_'); if(this.value==this.prevNameHack){this.hideError();}else{ if(this.value==''){this.showError('Please choose a valid name.'); }else{var used = Identifiers.used(this.value); if(!used){this.hideError();}else{this.showError('The name \"'+this.value+'\" cannot be used because it '+used+'.
Please choose another name.'); /*this.$input.focus();*/}}}", "type": "Input", "inputType": "text"}], "uid": "1.vex.iq.settingsTouchLED.components.modk.it", "stateVars": {"componentName": true}, "valueMap": {"colors": {"static": ["WHITE", "RED", "RED_VIOLET", "VIOLET", "BLUE_VIOLET", "BLUE", "BLUE_GREEN", "GREEN", "YELLOW_GREEN", "YELLOW", "YELLOW_ORANGE", "ORANGE", "RED_ORANGE"]}}, "type": "Container"}, "1.vex.iq.motorSpeed.blocks.modk.it": {"category": "input", "groupElements": [{"assetGlobals": {"localScope": "ignore", "subBlocks": {"0": "subBlock"}}, "ignore": true, "elements": [{"assetGlobals": {"params": {"0": "value"}}, "color": "blue", "readonly": true, "elements": [{"feed": "1.vex.iq.motorSpeed.blocks.modk.itComponentListChange", "values": [], "type": "DropdownMenu", "autoMinWidth": "true"}], "type": "NameArgument"}], "accepts": ["NoBlock"], "type": "BlockHolder"}, {"assetGlobals": {"localScope": "ignore"}, "ignore": true, "type": "CodeElement", "value": ".", "text": ""}, {"text": "speed in ", "type": "CodeElement", "value": "currentVelocity("}, {"_hideCodeView": true, "code": "SPEED_PERCENT", "assetGlobals": {"params": {"1": "value"}}, "value": "%", "readonly": true, "elements": [{"values": [{"code": "SPEED_PERCENT", "name": "%", "value": "%"}, {"code": "RPM", "name": "RPM", "value": "RPM"}], "type": "DropdownMenu", "autoMinWidth": "true"}], "type": "NameArgument"}, {"type": "CodeElement", "value": ")"}], "uid": "1.vex.iq.motorSpeed.blocks.modk.it", "color": "purple", "docs": {"category": "input", "type": "NumberBlock", "description": "Gets the *speed* of the __COMPONENT__ in percent or revolutions per minute (RPM).", "name": "speed", "hint": ""}, "extensionOf": "1.number.blocks.modk.it", "tokens": ["motorSpeed"], "stateVars": {"localScope": false, "params": false, "subBlocks": false}}, "1.vex.iq.touchLED.components.modk.it": {"uid": "1.vex.iq.touchLED.components.modk.it", "library": "1.motor.library.modk.it", "maxComponents": 12, "_excluded_blocks": [{"uid": "1.break.blocks.modk.it"}, {"uid": "1.randomNumber.blocks.modk.it"}, {"uid": "1.vex.iq.setRGB.blocks.modk.it"}], "otherBlocksCategory": "Touch_LED", "type": "VexComponent", "events": ["TOUCHED", "UNTOUCHED"], "styles": {"normal": {"width": "170px", "height": "100px"}}, "onLoad": "this.renameHelper=function(name){this.$markup.find('.vex_component_label_name').get(0).blockObject.setText(name);};", "elements": [{"styles": {"hover": {"visibility": "visible"}, "selected": {"visibility": "visible"}, "normal": {"borderRadius": "15px", "top": -50, "visibility": "hidden", "height": 190, "width": 210, "backgroundColor": "", "position": "absolute", "border": "4px solid rgba(18, 52, 86, 0.4)", "display": "none", "left": -30}}, "htmlClass": "vex_component_wrapper", "elements": [{"styles": {"normal": {"right": "5px", "bottom": "5px", "height": "20px", "width": "20px", "position": "absolute", "left": "auto"}}, "elements": [], "name": "ComponentConfigButton", "type": "ConfigButton", "onClick": "function(){ this.container.container.showComponentSettings(this); }", "htmlClass": "hardware_settings_button"}], "type": "Container", "name": "Wrapper"}, {"styles": {"placed": {"top": "0px", "left": "0px"}, "normal": {"width": "auto", "top": "48px", "height": "42px", "left": "88px"}}, "htmlClass": "vex_component_label vex_component_touch_led clearfix", "elements": [{"styles": {"placed": {"marginLeft": "10px"}, "normal": {"width": "auto", "color": "#2a323d", "marginBottom": "auto", "height": "auto", "fontWeight": "bold", "marginLeft": 42, "fontSize": "20px", "marginRight": "10px", "position": "relative", "marginTop": "10px", "textShadow": "0px 1px 0 #C4C4C4"}}, "text": "Touch LED", "type": "FrameworkText", "htmlClass": "vex_component_label_name"}], "type": "Container"}, {"styles": {"normal": {"position": "absolute"}}, "htmlClass": "vex_component_drawer_image", "type": "Image", "src": "images/vex/components/touch_led-150x.png"}, {"styles": {"selected": {"backgroundImage": "url(images/vex/components/touch_led-selected.png)"}, "normal": {"top": 5, "height": 83, "width": 106, "background": "transparent url(images/vex/components/touch_led.png) no-repeat", "position": "absolute", "backgroundPosition": "0 0", "left": 30}}, "onLoad": "Events.register(this.container.id+'.ComponentOver', function(){this.select();}, this); Events.register(this.container.id+'.ComponentOut', function(){this.deselect();}, this);", "elements": [{"y": 32, "x": -44, "angle": 0, "uid": "1.vex.iq.ui.wire.modk.it"}], "name": "ComponentImage", "type": "Container", "htmlClass": "vex_component_pad_image"}, {"styles": {"normal": {"zIndex": 2, "maxWidth": 240, "bottom": -36, "float": "left", "height": "auto", "padding": "3px 2px 0px 0px", "width": "auto", "background": "rgba(18, 52, 86, 0.4);", "position": "absolute", "left": -26}}, "htmlClass": "vex_component_pins clearfix", "type": "HorizontalContainer"}, {"feed": "digitalOutPinsListChange", "styles": {"normal": {"width": "100px"}}, "layer": "pins", "angle": 0, "onMouseout": "Events.broadcast(this.container.id+'.ComponentOut', []);", "assetGlobals": {"wire": "name"}, "values": [], "mode": "OUTPUT_COMPONENT", "type": "VexPin", "onMouseover": "Events.broadcast(this.container.id+'.ComponentOver', []);"}], "blocks": [{"uid": "1.vex.iq.setTouchLedColor.blocks.modk.it"}, {"uid": "1.vex.iq.setTouchLedFading.blocks.modk.it"}, {"uid": "1.vex.iq.turnTouchLedOnOff.blocks.modk.it"}, {"uid": "1.vex.iq.touchLedTouched.blocks.modk.it"}, {"uid": "1.vex.iq.color.blocks.modk.it"}], "docs": {"pins": [{"type": "I2C", "description": "", "name": "touch_led"}], "type": "VexComponent", "description": "The Touch LED detects touch with capacitive sensing, and can be set to any color that can be made from combining Red, Green and Blue. ", "title": "Touch LED"}, "classBased": true, "defaultName": "TOUCH_LED", "componentArray": "int motorArray[3]", "configuration": [{"type": "text", "value": "VexTouchLED "}, {"type": "objectVar", "value": "name"}, {"type": "text", "value": " = VexTouchLED("}, {"type": "objectVar", "value": "wire"}, {"type": "text", "value": ");\n"}, {"type": "text", "value": "Scope("}, {"type": "objectVar", "value": "name"}, {"type": "text", "value": ",VexTouchLED);"}, {"type": "text", "value": "\n#endif //ifndef IQ_GET_JUMPTABLE_DEFINE_MODKIT_VEX\n\n#ifdef IQ_GET_JUMPTABLE_DEFINE_MODKIT_VEX\n#define IQ_"}, {"type": "objectVar", "value": "wire"}, {"type": "text", "value": "_DEVICE_ID_STR IQ_LED_SENSOR_STR//set device id\n#endif //IQ_GET_JUMPTABLE_DEFINE_MODKIT_VEX\n\n#ifndef IQ_GET_JUMPTABLE_DEFINE_MODKIT_VEX\n"}], "icon": "images/vex/components/drawer_icons/touch_led.png", "displayName": "Touch LED", "onStartDrag": "if(Boolean(modkitNamespace.GenericComponent.managers[this.uid]) && modkitNamespace.GenericComponent.managers[this.uid].count >= this.maxComponents || this.maxComponents == 0){ if(!Boolean(this.container) || this.container.id != 'hardware_pad'){ this.$markup.removeClass('myAcceptableClass');}}", "stateVars": {"top": true, "wire": true, "name": true, "left": true}, "settingsPopover": {"type": "SettingsPopover", "settings": {"uid": "1.vex.iq.settingsTouchLED.components.modk.it"}}, "otherBlocks": [{"uid": "1.vex.iq.touchLedTouched.blocks.modk.it"}, {"uid": "1.vex.iq.color.blocks.modk.it"}]}, "1.vex.iq.setTouchLedFading.blocks.modk.it": {"category": "setup", "uid": "1.vex.iq.setTouchLedFading.blocks.modk.it", "color": "darkblue", "docs": {"parameters": [{"options": ["OFF", "FAST", "SLOW"], "type": "name", "description": "Select from the list.", "name": "fade"}], "type": "StatementBlock", "description": "Fade makes smooth changes between colors and On OFF setting. Select OFF for instant changes, FAST for a fast fade, and SLOW for a slow fade.", "name": "set fade", "hint": "Fade is set to OFF if you do not use this block."}, "extensionOf": "1.statement.blocks.modk.it", "statementElements": [{"elements": [{"text": "set fade to", "type": "CodeElement", "value": "setFading("}, {"type": "BlockHolder", "elements": [{"elements": [{"values": ["FAST", "SLOW", "OFF"], "type": "DropdownMenu", "autoMinWidth": "true"}], "assetGlobals": {"params": {"0": "value"}}, "value": "SLOW", "color": "blue", "readonly": true, "type": "NameArgument"}], "accepts": ["NoBlock"]}, {"text": "", "type": "CodeElement", "value": ");"}], "type": "LineElement"}], "tokens": ["setMotorBraking"]}, "1.vex.iq.settingsPrint.blocks.modk.it": {"styles": {"normal": {"width": "300px", "height": "auto"}}, "elements": [{"text": "Print Formatting", "uid": "1.vex.iq.settingsHeading.modk.it"}, {"uid": "buttonClose.modk.it", "onClick": "function(){this.container.container.container.saveAndHide(); }"}, {"styles": {"normal": {"position": "relative", "marginTop": "3px", "marginBottom": "2px", "width": "100%", "height": "auto"}}, "type": "HorizontalRule"}, {"styles": {"normal": {"position": "relative", "marginRight": 40, "width": 100, "height": 50}}, "assetGlobals": {"justification": "value"}, "text": "Left Justified", "value": "LEFT_JUSTIFIED", "label": "Position", "values": [{"name": "Left Justified", "value": "LEFT_JUSTIFIED"}, {"name": "Right Justified", "value": "RIGHT_JUSTIFIED"}], "key": "justification", "onChange": "this.container[this.key] = this.value;", "type": "Input", "inputType": "select"}, {"styles": {"normal": {"position": "relative", "marginRight": 15, "width": 35, "height": 50}}, "assetGlobals": {"width": "value"}, "maxChars": 16, "value": "10", "label": "Width", "key": "width", "allowChars": "0-9", "onChange": "this.container[this.key] = this.value;", "type": "Input", "inputType": "text"}, {"styles": {"normal": {"width": "auto", "top": 20, "position": "relative", "height": "auto"}}, "onLoad": "if(this.checked){ this.container.elements[4].editable(false);}else{this.container.elements[4].editable(true); }", "assetGlobals": {"widthAuto": "checked"}, "label": "auto width", "onChange": "this.container.widthAuto = this.checked; if(this.checked){ this.container.elements[4].editable(false);}else{this.container.elements[4].editable(true); }", "type": "Input", "inputType": "checkbox"}, {"styles": {"normal": {"position": "relative", "marginRight": 40, "width": 100, "height": "auto"}}, "assetGlobals": {"plus": "value"}, "text": "None", "value": "NO_PLUS_SIGN", "label": "Plus Sign (+)", "values": [{"name": "None", "value": "NO_PLUS_SIGN"}, {"name": "Space", "value": "SPACE_PLUS_SIGN"}, {"name": "Show", "value": "PLUS_SIGN"}], "key": "plus", "onChange": "this.container[this.key] = this.value; ", "type": "Input", "inputType": "select"}, {"styles": {"normal": {"position": "relative", "marginRight": 0, "width": 30, "height": 50}}, "assetGlobals": {"decimals": "value"}, "text": "3", "value": "3", "label": "Decimals", "values": [{"name": "0", "value": "0"}, {"name": "1", "value": "1"}, {"name": "2", "value": "2"}, {"name": "3", "value": "3"}, {"name": "4", "value": "4"}, {"name": "5", "value": "5"}], "key": "decimals", "onChange": "this.container[this.key] = this.value; ", "type": "Input", "inputType": "select"}], "uid": "1.vex.iq.settingsPrint.blocks.modk.it", "onUpdate": "this.container.container.save();", "stateVars": {"widthAuto": false, "width": false, "justification": false, "plus": false, "decimals": false}, "type": "Container"}, "1.10.vex.iq.build.modk.it": {"rules": {"all": {"requires": ["UserTask1.bin"]}, "vexIQ.ld.out": {"redirect": {"cmd": [{"alias": "TOOLSPATH"}, {"alias": "ARMCPP"}, {"text": " -P "}, {"alias": "BUILDDIR"}, {"text": "vexIQ.ld.in"}], "out": [{"alias": "BUILDDIR"}, {"text": "vexIQ.ld.out "}]}, "name": "generating linker script"}, "UserTask1.bin": {"requires": ["JumpTable.o", "c_init.o", "UserTask.o", "main.o", "vexIQ.ld.out"], "exec": [{"cmd": [{"alias": "TOOLSPATH"}, {"alias": "ARMGNU"}, {"text": "-ld -o "}, {"alias": "BUILDDIR"}, {"text": "UserTask1.elf -T "}, {"alias": "BUILDDIR"}, {"text": "vexIQ.ld.out "}, {"alias": "BUILDDIR"}, {"text": "jumpTable.o "}, {"alias": "BUILDDIR"}, {"text": "c_init.o "}, {"alias": "BUILDDIR"}, {"text": "UserTask.o "}, {"alias": "BUILDDIR"}, {"text": "main.o "}, {"alias": "LINC"}, {"text": " -lc -lgcc"}], "name": "building elf"}, {"cmd": [{"alias": "TOOLSPATH"}, {"alias": "ARMGNU"}, {"text": "-objcopy "}, {"alias": "BUILDDIR"}, {"text": "UserTask1.elf "}, {"alias": "BUILDDIR"}, {"text": "UserTask1.bin -O binary"}], "name": "building bin"}]}, "JumpTable.o": {"exec": [{"cmd": [{"alias": "TOOLSPATH"}, {"alias": "ARMGCC"}, {"alias": "COPS"}, {"alias": "CINC"}, {"alias": "BUILDDIR"}, {"text": "jumpTable.c -o "}, {"alias": "BUILDDIR"}, {"text": "jumpTable.o"}], "name": "building vex jump (vector) table"}]}, "main.o": {"exec": [{"cmd": [{"alias": "TOOLSPATH"}, {"alias": "ARMGPP"}, {"alias": "CPPOPS"}, {"alias": "CINC"}, {"alias": "BUILDDIR"}, {"text": "main.c -o "}, {"alias": "BUILDDIR"}, {"text": "main.o"}], "name": "building vex main"}]}, "UserTask.o": {"exec": [{"cmd": [{"alias": "TOOLSPATH"}, {"alias": "ARMGPP"}, {"alias": "CPPOPS"}, {"alias": "CINC"}, {"alias": "BUILDDIR"}, {"text": "UserTask.cpp -o "}, {"alias": "BUILDDIR"}, {"text": "UserTask.o"}], "name": "building vex user task"}]}, "c_init.o": {"exec": [{"cmd": [{"alias": "TOOLSPATH"}, {"alias": "ARMGCC"}, {"alias": "COPS"}, {"alias": "CINC"}, {"alias": "BUILDDIR"}, {"text": "c_init.c -o "}, {"alias": "BUILDDIR"}, {"text": "c_init.o"}], "name": "building vex custom c-startup"}]}}, "uid": "1.10.vex.iq.build.modk.it", "sourceDir": "VEX/IQv1.10/", "aliases": {"ARMGPP": [{"text": "arm-none-eabi-g++"}], "LCPPOPS": [{"text": " -Os -nostartfiles -nostdlib -Wl,--gc-sections --entry=ResetISR -mthumb -mcpu=cortex-m4 -mfloat-abi=hard -mfpu=fpv4-sp-d16 -fsingle-precision-constant "}], "ARMCPP": [{"text": "arm-none-eabi-cpp"}], "CPPOPS": [{"text": " -c -g -Os -Wall -fno-rtti -fno-exceptions -ffunction-sections -fdata-sections -mthumb -mcpu=cortex-m4 -mfloat-abi=hard -mfpu=fpv4-sp-d16 -fsingle-precision-constant -DF_CPU=80000000L -MMD -DARDUINO=101 -DENERGIA=9 "}], "TOOLSPATH": [{"alias": "TOOLSDIR"}, {"text": "/lm4f/bin/"}], "CINC": [{"text": " -I ../lm4f -I ../lm4f/inc -I ../stellarpad "}], "COPS": [{"text": " -c -g -Os -Wall -ffunction-sections -fdata-sections -mthumb -mcpu=cortex-m4 -mfloat-abi=hard -mfpu=fpv4-sp-d16 -fsingle-precision-constant -DF_CPU=80000000L -MMD -DARDUINO=101 -DENERGIA=9 "}], "ARMGNU": [{"text": "arm-none-eabi"}], "ARMGCC": [{"text": "arm-none-eabi-gcc"}], "LINC": [{"text": " -L"}, {"alias": "TOOLSDIR"}, {"text": "/lm4f/arm-none-eabi/lib/thumb/armv7e-m/fpu/fpv4-sp-d16 -L"}, {"alias": "TOOLSDIR"}, {"text": "/lm4f/lib/gcc/arm-none-eabi/4.7.1 "}]}}, "licensing.steps.hardware.vex.modk.it": {"textStyle": "top:114px; left:240px; width:490px; font-size:18px;", "elements": [{"styles": {"normal": {"width": "600px", "height": "355px"}}, "onLoad": "LicensingManager.activateLicense(this.container.license,function(){/*alert('success callback!!!');this.container.setNext({'uid':'board_detection.steps.hardware.vex.modk.it'});*/Events.broadcast('WizardUnloaded', [], true); /*StateManager.loadState({ 'type': 'EditorState','uid': 'default.arduino.examples.modk.it', 'name': 'Untitled Project', 'hardware': [{'uid': '1.vex.iq.hardware.vex.modk.it', 'port': null, 'mcu': null, 'microcontroller': { 'uuid': null } }] });*/ this.container.wizard.unload(); },function(message){this.$markup.find(\"#activate_wizard_step_text\").html(message);this.$markup.find(\"#activate_wizard_step_icon\").attr('src','images/alert_icons-warn.png'); },this); ", "html": "
Connecting to Modkit.com Server for Activation... Please Wait...
", "type": "HTMLContainer"}], "uid": "licensing.steps.hardware.vex.modk.it", "title": "Activating", "type": "WizardImageStep", "nextText": "Continue"}, "1.vex.iq.sliderDirection.blocks.modk.it": {"category": "input", "enumIcon": "images/vex/enum_icons/direction-white.png", "extensionOf": "1.enum.blocks.modk.it", "groupElements": [{"assetGlobals": {"localScope": "ignore", "subBlocks": {"0": "subBlock"}}, "ignore": true, "elements": [{"assetGlobals": {"params": {"0": "value"}}, "color": "blue", "readonly": true, "elements": [{"feed": "1.vex.iq.sliderDirection.blocks.modk.itComponentListChange", "values": [], "type": "DropdownMenu", "autoMinWidth": "true"}], "type": "NameArgument"}], "accepts": ["NoBlock"], "type": "BlockHolder"}, {"assetGlobals": {"localScope": "ignore"}, "ignore": true, "type": "CodeElement", "value": ".", "text": ""}, {"text": "direction", "type": "CodeElement", "value": "currentDirection("}, {"type": "CodeElement", "value": ")"}], "color": "purple", "docs": {"category": "input", "type": "EnumBlock", "description": "Gets the *direction* the **Slider** is turning.", "name": "direction", "hint": ""}, "enumValues": ["FWD", "REV", "NONE"], "tokens": ["sliderDirection"], "stateVars": {"instance": false, "params": false, "subBlocks": false, "localScope": false}, "enumFeed": "@name@.inDirection.values", "uid": "1.vex.iq.sliderDirection.blocks.modk.it"}, "1.enum.blocks.modk.it": {"category": "operators", "stateVars": {"top": true, "params": false, "subBlocks": false, "left": true}, "elements": [{"assetGlobals": {"color": "color", "groupElements": "elements"}, "assetGlobalsExclude": {"elements": true}, "type": "GroupElement"}], "type": "EnumBlock", "uid": "1.enum.blocks.modk.it"}, "1.vex.iq.settingsButton.components.modk.it": {"styles": {"normal": {"width": 200, "height": "auto"}}, "elements": [{"text": "Button Settings", "uid": "1.vex.iq.settingsHeading.modk.it"}, {"uid": "buttonClose.modk.it", "onClick": "function(){ this.container.container.container.saveAndHide(); }"}, {"styles": {"normal": {"position": "relative", "marginTop": "3px", "marginBottom": "2px", "width": "100%", "height": "auto"}}, "type": "HorizontalRule"}, {"styles": {"normal": {"position": "relative", "marginRight": "10px", "width": "140px", "height": "auto"}}, "onLoad": "this.prevNameHack = this.topLevelWidget.getState().componentName;", "onKeypress": "this.value = this.value.toUpperCase();", "assetGlobals": {"componentName": "value", "inputs": {"0": "this"}}, "maxChars": 12, "value": "", "label": "Name", "readonly": false, "key": "componentName", "allowChars": "A-Za-z0-9 _", "validate": "this.value=this.value.replace(' ','_').replace(' ','_'); if(this.value==this.prevNameHack){this.hideError();}else{ if(this.value==''){this.showError('Please choose a valid name.'); }else{var used = Identifiers.used(this.value); if(!used){this.hideError();}else{this.showError('The name \"'+this.value+'\" cannot be used because it '+used+'.
Please choose another name.'); /*this.$input.focus();*/}}}", "type": "Input", "inputType": "text"}], "type": "Container", "uid": "1.vex.iq.settingsButton.components.modk.it"}, "1.piezo.sik.components.modk.it": {"layer": "wires", "elements": [{"src": "images/hardware/SIK/components/piezo.png", "type": "SimpleImage", "showState": "default"}, {"src": "images/hardware/SIK/components/piezo-hilite.png", "top": "-14px", "left": "-9px", "type": "SimpleImage", "showState": "highlight"}, {"text": "Piezo Buzzer", "top": "8px", "left": "85px", "type": "HardwareLabel", "showState": "highlight"}], "type": "MouseImage", "uid": "1.piezo.sik.components.modk.it"}, "1.vex.iq.rangefinder.components.modk.it": {"styles": {"normal": {"width": "170px", "height": "100px"}}, "onLoad": "this.renameHelper=function(name){this.$markup.find('.vex_component_label_name').get(0).blockObject.setText(name);};", "elements": [{"styles": {"hover": {"visibility": "visible"}, "selected": {"visibility": "visible"}, "normal": {"borderRadius": "15px", "top": -50, "visibility": "hidden", "height": 190, "width": 210, "backgroundColor": "", "position": "absolute", "border": "4px solid rgba(18, 52, 86, 0.4)", "display": "none", "left": -30}}, "htmlClass": "vex_component_wrapper", "elements": [{"styles": {"normal": {"right": "5px", "bottom": "5px", "height": "20px", "width": "20px", "position": "absolute", "left": "auto"}}, "elements": [], "name": "ComponentConfigButton", "type": "ConfigButton", "onClick": "function(){ this.container.container.showComponentSettings(this); }", "htmlClass": "hardware_settings_button"}], "type": "Container", "name": "Wrapper"}, {"styles": {"placed": {"top": "0px", "left": "0px"}, "normal": {"width": "auto", "top": "48px", "height": "42px", "left": "88px"}}, "htmlClass": "vex_component_label vex_component_rangefinder clearfix", "elements": [{"styles": {"placed": {"marginLeft": "10px"}, "normal": {"width": "auto", "color": "#2a323d", "marginBottom": "auto", "height": "auto", "fontWeight": "bold", "marginLeft": 42, "fontSize": "20px", "marginRight": "10px", "position": "relative", "marginTop": "10px", "textShadow": "0px 1px 0 #C4C4C4"}}, "text": "Distance Sensor", "type": "FrameworkText", "htmlClass": "vex_component_label_name"}], "type": "Container"}, {"styles": {"normal": {"position": "absolute"}}, "htmlClass": "vex_component_drawer_image", "type": "Image", "src": "images/vex/components/rangefinder-150x.png"}, {"styles": {"selected": {"backgroundImage": "url(images/vex/components/rangefinder-selected.png)"}, "normal": {"height": 95, "width": 106, "background": "transparent url(images/vex/components/rangefinder.png) no-repeat", "position": "absolute", "backgroundPosition": "0 0", "left": 20}}, "onLoad": "Events.register(this.container.id+'.ComponentOver', function(){this.select();}, this); Events.register(this.container.id+'.ComponentOut', function(){this.deselect();}, this);", "elements": [{"y": 36, "x": -34, "angle": 0, "uid": "1.vex.iq.ui.wire.modk.it"}], "name": "ComponentImage", "type": "Container", "htmlClass": "vex_component_pad_image"}, {"styles": {"normal": {"zIndex": 2, "maxWidth": 240, "bottom": -36, "float": "left", "height": "auto", "padding": "3px 2px 0px 0px", "width": "auto", "background": "rgba(18, 52, 86, 0.4);", "position": "absolute", "left": -26}}, "htmlClass": "vex_component_pins clearfix", "type": "HorizontalContainer"}, {"feed": "digitalOutPinsListChange", "styles": {"normal": {"width": "100px"}}, "layer": "pins", "angle": 0, "onMouseout": "Events.broadcast(this.container.id+'.ComponentOut', []);", "assetGlobals": {"wire": "name"}, "values": [], "mode": "OUTPUT_COMPONENT", "type": "VexPin", "onMouseover": "Events.broadcast(this.container.id+'.ComponentOver', []);"}], "blocks": [{"uid": "1.vex.iq.rangefinderDistance.blocks.modk.it"}, {"uid": "1.vex.iq.setMaxRangefinderDistance.blocks.modk.it"}], "uid": "1.vex.iq.rangefinder.components.modk.it", "icon": "images/vex/components/drawer_icons/rangefinder.png", "onStartDrag": "if(Boolean(modkitNamespace.GenericComponent.managers[this.uid]) && modkitNamespace.GenericComponent.managers[this.uid].count >= this.maxComponents || this.maxComponents == 0){ if(!Boolean(this.container) || this.container.id != 'hardware_pad'){ this.$markup.removeClass('myAcceptableClass');}}", "docs": {"pins": [{"type": "I2C", "description": "", "name": "rangefinder"}], "type": "VexComponent", "description": "The rangefinder will give the distance to an object or wall, it's useful for detecting and avoiding obstacles. ", "title": "Distance Sensor"}, "excluded_blocks": [], "library": "1.motor.library.modk.it", "otherBlocksCategory": "Distance", "defaultName": "DISTANCE", "maxComponents": 12, "stateVars": {"top": true, "wire": true, "name": true, "left": true}, "settingsPopover": {"type": "SettingsPopover", "settings": {"uid": "1.vex.iq.settings.components.modk.it"}}, "displayName": "Distance", "componentArray": "int motorArray[3]", "configuration": [{"type": "text", "value": "VexRangefinder "}, {"type": "objectVar", "value": "name"}, {"type": "text", "value": " = VexRangefinder("}, {"type": "objectVar", "value": "wire"}, {"type": "text", "value": ");\n"}, {"type": "text", "value": "Scope("}, {"type": "objectVar", "value": "name"}, {"type": "text", "value": ",VexRangefinder);"}, {"type": "text", "value": "\n#endif //ifndef IQ_GET_JUMPTABLE_DEFINE_MODKIT_VEX\n\n#ifdef IQ_GET_JUMPTABLE_DEFINE_MODKIT_VEX\n#define IQ_"}, {"type": "objectVar", "value": "wire"}, {"type": "text", "value": "_DEVICE_ID_STR IQ_SONAR_SENSOR_STR//set device id\n#endif //IQ_GET_JUMPTABLE_DEFINE_MODKIT_VEX\n\n#ifndef IQ_GET_JUMPTABLE_DEFINE_MODKIT_VEX\n"}], "type": "VexComponent", "classBased": true, "otherBlocks": [{"uid": "1.vex.iq.rangefinderDistance.blocks.modk.it"}]}, "1.vex.iq.turnTouchLedOnOff.blocks.modk.it": {"category": "output", "uid": "1.vex.iq.turnTouchLedOnOff.blocks.modk.it", "color": "blue", "docs": {"parameters": [{"options": ["ON", "OFF"], "type": "name", "description": "Select from the list.", "name": "command"}], "type": "StatementBlock", "description": "Switches the **Touch LED** light ON or OFF.", "name": "light", "hint": ""}, "extensionOf": "1.statement.blocks.modk.it", "statementElements": [{"elements": [{"text": "light", "type": "CodeElement", "value": "turn("}, {"assetGlobals": {"subBlocks": {"0": "subBlock"}}, "type": "BlockHolder", "elements": [{"assetGlobals": {"params": {"0": "value"}}, "color": "blue", "readonly": true, "elements": [{"values": ["ON", "OFF"], "type": "DropdownMenu", "autoMinWidth": "true"}], "type": "NameArgument"}], "accepts": ["NoBlock"]}, {"text": "", "type": "CodeElement", "value": ");"}], "type": "LineElement"}], "tokens": ["setMotorBraking"]}, "1.vex.iq.slideSlider.blocks.modk.it": {"category": "output", "uid": "1.vex.iq.slideSlider.blocks.modk.it", "color": "blue", "docs": {"category": "output", "description": "*Slide* the **Slider** a selected direction.", "parameters": [{"options": ["FWD", "REV"], "type": "rotation", "description": "select a direction from the list", "name": "direction"}], "hint": "", "type": "StatementBlock", "name": "slide"}, "extensionOf": "1.statement.blocks.modk.it", "statementElements": [{"elements": [{"text": "slide", "type": "CodeElement", "value": "slide("}, {"assetGlobals": {"subBlocks": {"0": "subBlock"}}, "type": "BlockHolder", "elements": [{"enumIcon": "images/vex/enum_icons/direction-black.png", "elements": [{"feed": "@name@.outDirection.values", "values": ["FWD", "REV"], "type": "DropdownMenu", "autoMinWidth": "true"}], "assetGlobals": {"params": {"0": "value"}}, "value": "", "color": "blue", "readonly": true, "type": "EnumArgument"}], "accepts": ["EnumBlock.linearDirection"]}, {"type": "CodeElement", "value": ");"}], "type": "LineElement"}], "tokens": ["slideSlider"], "sibling": null}, "1.if.blocks.modk.it": {"category": "control", "uid": "1.if.blocks.modk.it", "color": "orange", "docs": {"parameters": [{"type": "bool", "description": "Drag in an operator >, <, =, not, and, or.", "name": "condition"}], "description": "Blocks placed inside *if* run when the **condition** is true. The blocks do not run when the **condition** is false.", "name": "if", "hint": ""}, "extensionOf": "1.c.blocks.modk.it", "statementElements": [{"elements": [{"text": "if  ", "type": "CodeElement", "value": "if("}, {"assetGlobals": {"subBlocks": {"0": "subBlock"}}, "type": "BlockHolder", "elements": [{"color": "orange", "type": "BooleanArgument", "value": "1"}], "accepts": ["BooleanBlock"]}, {"type": "CodeElement", "value": "){"}], "type": "LineElement"}], "tokens": ["if"], "type": "CompoundBlock"}, "1.vex.iq.clearScreen.blocks.modk.it": {"category": "output", "uid": "1.vex.iq.clearScreen.blocks.modk.it", "color": "blue", "docs": {"category": "output", "type": "StatementBlock", "description": "Clears the LCD screen on the Brain. The text entry point is moved to row 1 and column 1.", "name": "clear LCD", "hint": "The text entry point is like the cursor of a word processor."}, "extensionOf": "1.statement.blocks.modk.it", "statementElements": [{"elements": [{"text": "clear LCD ", "type": "CodeElement", "value": "BRAIN.clearScreen("}, {"text": "", "type": "CodeElement", "value": ");"}], "type": "LineElement"}], "tokens": ["clearScreen"], "sibling": null, "params": ["HELLO"]}, "ui.addNumberVariableButton.modk.it": {"styles": {"active": {"backgroundImage": "url(images/btn_new_variable-active.png)"}, "hover": {"backgroundImage": "url(images/btn_new_variable-hover.png)"}, "normal": {"float": "none", "height": 47, "zIndex": 1, "width": 133, "marginLeft": 6, "background": "transparent url(images/btn_new_variable.png) no-repeat", "position": "relative"}}, "onLoad": "/*console.log('loaded:', this.text);*/", "name": "DialogTestButton", "text": "Add Number Variable", "onClick": "function(){Events.broadcast('component.popoverShowContent', [this, {uid:'ui.addNumberDialog.modk.it', modal:true, cancelable:true, saveButtonText:'Add Number'}, function(obj){Events.broadcast(\"Variables.addInteger\", [obj.name]);}, this]);}", "type": "Button", "uid": "ui.addNumberVariableButton.modk.it"}, "1.vex.iq.button.components.modk.it": {"uid": "1.vex.iq.button.components.modk.it", "library": "1.motor.library.modk.it", "maxComponents": 12, "_excluded_blocks": [{"uid": "1.break.blocks.modk.it"}, {"uid": "1.randomNumber.blocks.modk.it"}], "otherBlocksCategory": "Bumper_Switch", "type": "VexComponent", "events": ["PRESSED", "RELEASED"], "styles": {"normal": {"width": "170px", "height": "100px"}}, "onLoad": "this.renameHelper=function(name){this.$markup.find('.vex_component_label_name').get(0).blockObject.setText(name);};", "elements": [{"styles": {"hover": {"visibility": "visible"}, "selected": {"visibility": "visible"}, "normal": {"borderRadius": "15px", "top": -50, "visibility": "hidden", "height": 190, "width": 210, "backgroundColor": "", "position": "absolute", "border": "4px solid rgba(18, 52, 86, 0.4)", "display": "none", "left": -30}}, "htmlClass": "vex_component_wrapper", "elements": [{"styles": {"normal": {"right": "5px", "bottom": "5px", "height": "20px", "width": "20px", "position": "absolute", "left": "auto"}}, "elements": [], "name": "ComponentConfigButton", "type": "ConfigButton", "onClick": "function(){ this.container.container.showComponentSettings(this); }", "htmlClass": "hardware_settings_button"}], "type": "Container", "name": "Wrapper"}, {"styles": {"placed": {"top": "0px", "left": "0px"}, "normal": {"width": "auto", "top": "48px", "height": "42px", "left": "88px"}}, "htmlClass": "vex_component_label vex_component_button clearfix", "elements": [{"styles": {"placed": {"marginLeft": "10px"}, "normal": {"width": "auto", "color": "#2a323d", "marginBottom": "auto", "height": "auto", "fontWeight": "bold", "marginLeft": 42, "fontSize": "20px", "marginRight": "10px", "position": "relative", "marginTop": "10px", "textShadow": "0px 1px 0 #C4C4C4"}}, "text": "Bumper", "type": "FrameworkText", "htmlClass": "vex_component_label_name"}], "type": "Container"}, {"styles": {"normal": {"position": "absolute"}}, "htmlClass": "vex_component_drawer_image", "type": "Image", "src": "images/vex/components/button-150x.png"}, {"styles": {"selected": {"backgroundImage": "url(images/vex/components/button-selected.png)"}, "normal": {"height": 83, "width": 106, "background": "transparent url(images/vex/components/button.png) no-repeat", "position": "absolute", "backgroundPosition": "0 0", "left": 30}}, "onLoad": "Events.register(this.container.id+'.ComponentOver', function(){this.select();}, this); Events.register(this.container.id+'.ComponentOut', function(){this.deselect();}, this);", "elements": [{"y": 36, "x": -34, "angle": 0, "uid": "1.vex.iq.ui.wire.modk.it"}], "name": "ComponentImage", "type": "Container", "htmlClass": "vex_component_pad_image"}, {"styles": {"normal": {"zIndex": 2, "maxWidth": 240, "bottom": -36, "float": "left", "height": "auto", "padding": "3px 2px 0px 0px", "width": "auto", "background": "rgba(18, 52, 86, 0.4);", "position": "absolute", "left": -26}}, "htmlClass": "vex_component_pins clearfix", "type": "HorizontalContainer"}, {"feed": "digitalOutPinsListChange", "styles": {"normal": {"width": "100px"}}, "layer": "pins", "angle": 0, "onMouseout": "Events.broadcast(this.container.id+'.ComponentOut', []);", "assetGlobals": {"wire": "name"}, "values": [], "mode": "OUTPUT_COMPONENT", "type": "VexPin", "onMouseover": "Events.broadcast(this.container.id+'.ComponentOver', []);"}], "blocks": [{"uid": "1.vex.iq.buttonDown.blocks.modk.it"}], "docs": {"pins": [{"type": "digital", "description": "sets the pin that is checked when determining if the button is pressed", "name": "button"}], "type": "VexComponent", "description": "The button component is one simplest types of inputs. ", "title": "Bumper"}, "classBased": true, "defaultName": "BUMPER", "componentArray": "int motorArray[3]", "configuration": [{"type": "text", "value": "VexButton "}, {"type": "objectVar", "value": "name"}, {"type": "text", "value": " = VexButton("}, {"type": "objectVar", "value": "wire"}, {"type": "text", "value": ");\n"}, {"type": "text", "value": "Scope("}, {"type": "objectVar", "value": "name"}, {"type": "text", "value": ",VexButton);"}, {"type": "text", "value": "\n#endif //ifndef IQ_GET_JUMPTABLE_DEFINE_MODKIT_VEX\n\n#ifdef IQ_GET_JUMPTABLE_DEFINE_MODKIT_VEX\n#define IQ_"}, {"type": "objectVar", "value": "wire"}, {"type": "text", "value": "_DEVICE_ID_STR IQ_BUMPER_SENSOR_STR//set device id\n#endif //IQ_GET_JUMPTABLE_DEFINE_MODKIT_VEX\n\n#ifndef IQ_GET_JUMPTABLE_DEFINE_MODKIT_VEX\n"}], "icon": "images/vex/components/drawer_icons/button.png", "displayName": "Bumper", "onStartDrag": "if(Boolean(modkitNamespace.GenericComponent.managers[this.uid]) && modkitNamespace.GenericComponent.managers[this.uid].count >= this.maxComponents || this.maxComponents == 0){ if(!Boolean(this.container) || this.container.id != 'hardware_pad'){ this.$markup.removeClass('myAcceptableClass');}}", "stateVars": {"top": true, "wire": true, "name": true, "left": true}, "settingsPopover": {"type": "SettingsPopover", "settings": {"uid": "1.vex.iq.settings.components.modk.it"}}, "otherBlocks": [{"uid": "1.vex.iq.buttonDown.blocks.modk.it"}]}, "1.vex.iq.settingsMotor.components.modk.it": {"styles": {"normal": {"width": "300px", "height": "auto"}}, "elements": [{"text": "Motor Settings", "uid": "1.vex.iq.settingsHeading.modk.it"}, {"uid": "buttonClose.modk.it", "onClick": "function(){ this.container.container.container.saveAndHide(); }"}, {"styles": {"normal": {"position": "relative", "marginTop": "3px", "marginBottom": "2px", "width": "100%", "height": "auto"}}, "type": "HorizontalRule"}, {"styles": {"normal": {"position": "relative", "marginRight": "10px", "width": "140px", "height": "auto"}}, "onLoad": "this.prevNameHack = this.topLevelWidget.getState().componentName;", "onKeypress": "this.value = this.value.toUpperCase();", "assetGlobals": {"componentName": "value", "inputs": {"0": "this"}}, "maxChars": 12, "value": "", "label": "Name", "readonly": false, "validateDelay": 2500, "key": "componentName", "allowChars": "A-Za-z0-9 _", "validate": "this.value=this.value.replace(' ','_').replace(' ','_'); if(this.value==this.prevNameHack){this.hideError();}else{ if(this.value==''){this.showError('Please choose a valid name.'); }else{var used = Identifiers.used(this.value); if(!used){this.hideError();}else{this.showError('The name \"'+this.value+'\" cannot be used because it '+used+'.
Please choose another name.'); /*this.$input.focus();*/}}}", "type": "Input", "inputType": "text"}, {"styles": {"normal": {"position": "relative", "marginTop": "3px", "marginBottom": "2px", "width": "100%", "height": "auto"}}, "type": "HorizontalRule"}, {"styles": {"reversed": {"backgroundImage": "url(images/vex/components/motor_settings-reversed.png)", "styleCondition": "this.container.reverseDirection == true"}, "normal": {"width": 300, "position": "relative", "backgroundImage": "url(images/vex/components/motor_settings.png)", "background-position": "120px 16px", "height": 125}}, "onLoad": "Events.register('VEXMotorDirChange', function(){ this.testStyleConditions();}, this);", "elements": [{"styles": {"normal": {"position": "relative", "marginRight": "10px", "width": "140px", "height": "auto"}}, "text": "Direction Names", "type": "Label"}, {"styles": {"reversed": {"backgroundImage": "url(images/vex/components/motor_settings-fwd_arrow-reversed.png)", "styleCondition": "this.container.container.reverseDirection == true"}, "hover": {"display": "block", "visibility": "visible"}, "focus": {"display": "block", "visibility": "visible"}, "normal": {"top": 16, "visibility": "hidden", "height": 40, "width": 111, "background": "transparent url(images/vex/components/motor_settings-fwd_arrow.png) no-repeat 0 0", "position": "absolute", "display": "none", "left": 128}}, "onLoad": "Events.register('VexMotorFWDInputMouseover', function(){this.mouseover();}, this); Events.register('VexMotorFWDInputMouseout', function(){this.mouseout();}, this); Events.register('VexMotorFWDInputFocus', function(){this.focus();}, this); Events.register('VexMotorFWDInputBlur', function(){this.blur();}, this); Events.register('VexMotorREVFocus', function(){this.testStyleConditions();}, this); Events.register('VEXMotorDirChange', function(){ this.testStyleConditions();}, this);", "name": "Motor Forward Arrow", "onMouseout": "Events.broadcast('VexMotorFWDMouseout', [], true);", "type": "Container", "onMouseover": "Events.broadcast('VexMotorFWDMouseover', [], true);", "onClick": "function(){/*this.focus();*/ Events.broadcast('VexMotorFWDFocus', [], true);}", "htmlClass": "motor_direction_arrow"}, {"styles": {"reversed": {"backgroundImage": "url(images/vex/components/motor_settings-rev_arrow-reversed.png)", "styleCondition": "this.container.container.reverseDirection == true"}, "hover": {"display": "block", "visibility": "visible"}, "focus": {"display": "block", "visibility": "visible"}, "normal": {"top": 56, "visibility": "hidden", "height": 43, "width": 111, "background": "transparent url(images/vex/components/motor_settings-rev_arrow.png) no-repeat 0 0", "position": "absolute", "display": "none", "left": 128}}, "onLoad": "Events.register('VexMotorREVInputMouseover', function(){this.mouseover();}, this); Events.register('VexMotorREVInputMouseout', function(){this.mouseout();}, this); Events.register('VexMotorREVInputFocus', function(){this.focus();}, this); Events.register('VexMotorREVInputBlur', function(){this.blur();}, this); Events.register('VexMotorREVFocus', function(){this.testStyleConditions();}, this); Events.register('VEXMotorDirChange', function(){ this.testStyleConditions();}, this);", "name": "Motor Reverse Arrow", "onMouseout": "Events.broadcast('VexMotorREVMouseout', [], true);", "type": "Container", "onMouseover": "Events.broadcast('VexMotorREVMouseover', [], true);", "onClick": "function(){/*this.focus();*/ Events.broadcast('VexMotorREVFocus', [], true);}", "htmlClass": "motor_direction_arrow"}, {"styles": {"normal": {"position": "absolute", "top": 6, "left": 0, "width": 116, "height": "auto"}}, "onLoad": "this.prevValue=this.value; Identifiers.addUsedLocalIdentifier(this.value,'is already used for '+this.topLevelWidget.getState().componentName,this.topLevelWidget.getState().componentName);Events.register('VexMotorFWDMouseover', function(){this.mouseover();}, this); Events.register('VexMotorFWDMouseout', function(){this.mouseout();}, this); Events.register('VexMotorFWDFocus', function(){this.focus();}, this);", "onBlur": "Events.broadcast('VexMotorFWDInputBlur', [], true);", "onMouseout": "this.mouseout(); Events.broadcast('VexMotorFWDInputMouseout', [], true);", "assetGlobals": {"inputs": {"1": "this"}, "labelCCW": "value"}, "maxChars": 16, "value": "FWD", "label": "", "validateDelay": 2500, "key": "labelCCW", "onFocus": "Events.broadcast('VexMotorFWDInputFocus', [], true);", "allowChars": "A-Za-z0-9_", "validate": "if(this.prevValue!=undefined){Identifiers.removeUsedLocalIdentifier(this.prevValue,this.topLevelWidget.getState().componentName);}console.log(this.prevValue,this.value); this.prevValue=undefined; var used = Identifiers.used(this.value,this.topLevelWidget.getState().componentName); if(!used){this.hideError();Identifiers.addUsedLocalIdentifier(this.value,'is already used for '+this.topLevelWidget.getState().componentName,this.topLevelWidget.getState().componentName); this.prevValue=this.value;}else{this.showError('The variable \"'+this.value+'\" cannot be used because it '+used+'.
please choose another variable name.'); /*this.$input.focus();*/}", "type": "Input", "inputType": "text", "onMouseover": "this.mouseover(); Events.broadcast('VexMotorFWDInputMouseover', [], true);"}, {"styles": {"normal": {"position": "absolute", "top": 46, "left": 0, "width": 116, "height": "auto"}}, "onLoad": "this.prevValue=this.value; Identifiers.addUsedLocalIdentifier(this.value,'is already used for '+this.topLevelWidget.getState().componentName,this.topLevelWidget.getState().componentName); Events.register('VexMotorREVMouseover', function(){this.mouseover();}, this); Events.register('VexMotorREVMouseout', function(){this.mouseout();}, this); Events.register('VexMotorREVFocus', function(){this.focus();}, this);", "onBlur": "Events.broadcast('VexMotorREVInputBlur', [], true);", "onMouseout": "this.mouseout(); Events.broadcast('VexMotorREVInputMouseout', [], true);", "assetGlobals": {"inputs": {"2": "this"}, "labelCW": "value"}, "maxChars": 16, "value": "REV", "label": "", "validateDelay": 2500, "key": "labelCW", "onFocus": "Events.broadcast('VexMotorREVInputFocus', [], true);", "allowChars": "A-Za-z0-9_", "validate": "if(this.prevValue!=undefined){Identifiers.removeUsedLocalIdentifier(this.prevValue,this.topLevelWidget.getState().componentName);}console.log(this.prevValue,this.value); this.prevValue=undefined; var used = Identifiers.used(this.value,this.topLevelWidget.getState().componentName); if(!used){this.hideError(); Identifiers.addUsedLocalIdentifier(this.value,'is already used for '+this.topLevelWidget.getState().componentName,this.topLevelWidget.getState().componentName); this.prevValue=this.value; }else{this.showError('The variable \"'+this.value+'\" cannot be used because it '+used+'.
please choose another variable name.'); /*this.$input.focus();*/}", "type": "Input", "inputType": "text", "onMouseover": "this.mouseover(); Events.broadcast('VexMotorREVInputMouseover', [], true);"}, {"styles": {"normal": {"position": "absolute", "top": 106, "left": 0, "height": "auto"}}, "assetGlobals": {"reverseDirection": "checked"}, "label": "reverse direction", "onChange": "this.container.container.reverseDirection = this.checked; Events.broadcast('VEXMotorDirChange', [], true);", "type": "Input", "inputType": "checkbox"}], "type": "Container", "name": "DirectionWrapper"}], "uid": "1.vex.iq.settingsMotor.components.modk.it", "stateVars": {"componentName": true, "labelCCW": true, "reverseDirection": true, "labelCW": true}, "valueMap": {"inDirection": {"static": ["NONE"], "dynamic": ["labelCCW", "labelCW"]}, "outDirection": {"dynamic": ["labelCCW", "labelCW"]}}, "type": "Container"}, "1.vex.iq.clearLine.blocks.modk.it": {"category": "output", "uid": "1.vex.iq.clearLine.blocks.modk.it", "color": "blue", "docs": {"category": "output", "description": "Clears the current LCD line, then moves the text entry point to the beginning of the row.", "parameters": [], "hint": "The text entry point is like the cursor of a word processor.", "type": "StatementBlock", "name": "clear line"}, "extensionOf": "1.statement.blocks.modk.it", "statementElements": [{"elements": [{"text": "clear line ", "type": "CodeElement", "value": "BRAIN.clearLine();"}], "type": "LineElement"}], "tokens": ["printLine"], "sibling": null, "params": ["HELLO"]}, "1.minus.blocks.modk.it": {"category": "operators", "groupElements": [{"type": "CodeElement", "value": "("}, {"assetGlobals": {"subBlocks": {"0": "subBlock"}}, "type": "BlockHolder", "elements": [{"assetGlobals": {"params": {"0": "value"}}, "maxChars": "32", "readonly": false, "maxDecimals": 3, "allowChars": "0-9.//-", "type": "NumberArgument"}], "accepts": ["NumberBlock"]}, {"text": "−", "type": "CodeElement", "value": ") - ("}, {"assetGlobals": {"subBlocks": {"1": "subBlock"}}, "type": "BlockHolder", "elements": [{"assetGlobals": {"params": {"1": "value"}}, "maxChars": "32", "readonly": false, "maxDecimals": 3, "allowChars": "0-9.//-", "type": "NumberArgument"}], "accepts": ["NumberBlock"]}, {"type": "CodeElement", "value": ")"}], "uid": "1.minus.blocks.modk.it", "color": "green", "docs": {"parameters": [{"type": "num", "description": "Type a value or drag in a variable.", "name": "value 1"}, {"type": "num", "description": "Type a value or drag in a variable.", "name": "value 2"}], "description": "Calculates **value 1** minus **value 2**", "name": "subtract", "hint": ""}, "extensionOf": "1.number.blocks.modk.it"}, "1.vex.iq.setRGB.blocks.modk.it": {"category": "setup", "uid": "1.vex.iq.setRGB.blocks.modk.it", "color": "darkblue", "docs": {"parameters": [{"type": "number", "description": "Pick the Red value between 0-255", "name": "RED"}, {"type": "number", "description": "Pick the Green value between 0-255", "name": "GREEN"}, {"type": "number", "description": "Pick the Blue value between 0-255", "name": "BLUE"}], "type": "StatementBlock", "description": "Sets the color of the **Touch LED* with individual Red Green and Blue values. ", "name": "setColorRGB", "hint": "The **Touch LED** must be ON for the color to show. Use the the *light* block to turn the **Touch LED** ON. "}, "extensionOf": "1.statement.blocks.modk.it", "statementElements": [{"elements": [{"text": "set color R", "type": "CodeElement", "value": "setColorRGB("}, {"assetGlobals": {"subBlocks": {"0": "subBlock"}}, "type": "BlockHolder", "elements": [{"assetGlobals": {"params": {"0": "value"}}, "color": "blue", "type": "NumberArgument", "value": "255", "block": null}], "accepts": ["NumberBlock"], "block": null}, {"text": "G", "type": "CodeElement", "value": ","}, {"assetGlobals": {"subBlocks": {"1": "subBlock"}}, "type": "BlockHolder", "elements": [{"assetGlobals": {"params": {"1": "value"}}, "color": "blue", "type": "NumberArgument", "value": "255"}], "accepts": ["NumberBlock"], "block": null}, {"text": "B", "type": "CodeElement", "value": ","}, {"assetGlobals": {"subBlocks": {"2": "subBlock"}}, "type": "BlockHolder", "elements": [{"assetGlobals": {"params": {"2": "value"}}, "color": "blue", "type": "NumberArgument", "value": "255"}], "accepts": ["NumberBlock"], "block": null}, {"type": "CodeElement", "value": ");"}], "type": "LineElement"}], "tokens": ["digitalWrite"]}, "1.vex.iq.slider.mechanism.modk.it": {"uid": "1.vex.iq.slider.mechanism.modk.it", "library": "1.motor.library.modk.it", "controllerActions": {"type": "ControllerActionsPopover", "settings": {"uid": "1.vex.iq.settingsController.components.modk.it"}}, "maxComponents": 12, "onSettingsHide": " if(this.settingsPopover.settings.motorLayout == '1Right'){ this.pins[0].resetValue(); } if(this.settingsPopover.settings.motorLayout == '1Left'){ this.pins[1].resetValue(); } if( this.settingsPopover.settings.limitSwitches == '1Front' || this.settingsPopover.settings.limitSwitches == 'none' ){ this.pins[2].resetValue(); } if( this.settingsPopover.settings.limitSwitches == '1Rear' || this.settingsPopover.settings.limitSwitches == 'none' ){ this.pins[3].resetValue(); } ", "otherBlocksCategory": "Slider", "_maxComponents": 0, "componentImage": {"src": "images/hardware/lilypad/lilypad_rgb_led.png", "top": 1, "left": 1}, "type": "VexComponent", "styles": {"normal": {"width": 260, "height": 100}}, "onLoad": "this.renameHelper=function(name){this.$markup.find('.vex_component_label_name').get(0).blockObject.setText(name);};", "elements": [{"styles": {"normal": {"borderRadius": 15, "top": -50, "height": 280, "width": 397, "backgroundColor": "", "position": "absolute", "border": "4px solid rgba(18, 52, 86, 0.4)", "display": "none", "left": -20}}, "htmlClass": "vex_component_wrapper", "elements": [{"styles": {"normal": {"opacity": 0.6, "top": 42, "left": 200}}, "src": "images/vex/mechanisms/slider/compass_iso.png", "type": "Image"}, {"styles": {"normal": {"right": 5, "bottom": 5, "height": 20, "width": 20, "position": "absolute", "left": "auto"}}, "elements": [], "name": "DrivetrainConfigButton", "type": "ConfigButton", "onClick": "function(){ this.container.container.showComponentSettings(this); }", "htmlClass": "hardware_settings_button"}], "type": "Container", "name": "Wrapper"}, {"styles": {"placed": {"_background": "red !important", "top": -46, "styleCondition": "false && this.container.container.id == 'hardware_pad'", "left": -16}, "normal": {"width": "auto", "top": 20, "height": 42, "_opacity": 0.5, "left": 70}}, "htmlClass": "vex_component_label vex_component_slider clearfix", "elements": [{"styles": {"normal": {"width": "auto", "color": "#2a323d", "marginBottom": "auto", "height": "auto", "fontWeight": "bold", "_opacity": 0.5, "marginLeft": 82, "fontSize": 20, "marginRight": 10, "position": "relative", "marginTop": 10, "textShadow": "0px 1px 0 #C4C4C4"}}, "text": "Slider", "type": "FrameworkText", "htmlClass": "vex_component_label_name"}], "type": "Container", "onLoad": "Events.register(this.container.id+'.Dropped', function(){this.testStyleConditions();}, this);"}, {"styles": {"normal": {"position": "absolute"}}, "htmlClass": "vex_component_drawer_image", "type": "Image", "src": "images/vex/mechanisms/slider/icon-150x.png"}, {"styles": {"normal": {"top": 20, "height": 166, "width": 251, "background": "transparent url(images/vex/mechanisms/slider/no_motors.png) no-repeat", "position": "absolute", "backgroundPosition": "0 0", "left": 55}}, "htmlClass": "vex_component_pad_image", "type": "Container", "name": "SliderBG"}, {"styles": {"hover": {"backgroundImage": "url(images/vex/components/motor-ghost.png)"}, "selected": {"opacity": 0.5, "backgroundImage": "url(images/vex/components/motor-ghost.png)"}, "normal": {"top": 6, "height": 103, "width": 129, "background": "transparent no-repeat", "position": "absolute", "display": "none", "left": 50}}, "htmlClass": "vex_component_pad_image", "type": "Container", "name": "LeftSideDropzone"}, {"styles": {"selected": {"backgroundImage": "url(images/vex/components/motor-selected.png)", "backgroundPosition": "5px 0"}, "hide": {"styleCondition": "this.container.settingsPopover.settings.motorLayout == '1Right'", "display": "none", "visibility": "hidden"}, "normal": {"top": 6, "height": 115, "width": 134, "background": "transparent url(images/vex/components/motor.png) no-repeat", "position": "absolute", "backgroundPosition": "0 0", "left": 45}}, "onLoad": "Events.register(this.container.id+'.MotorLeftOver', function(){this.select();}, this); Events.register(this.container.id+'.MotorLeftOut', function(){this.deselect();}, this); Events.register('SettingsUpdate', function(){ this.testStyleConditions();}, this);", "elements": [{"wireIndex": 0, "angle": 90, "uid": "1.vex.iq.ui.wire.modk.it", "_disabled": true, "y": 50, "x": -42}], "name": "LeftSideMotor", "type": "Container", "htmlClass": "vex_component_pad_image"}, {"styles": {"normal": {"top": 51, "height": 63, "width": 79, "background": "transparent url(images/vex/mechanisms/slider/oppo_motors.png) no-repeat", "position": "absolute", "backgroundPosition": "-65px -31px", "left": 119}}, "htmlClass": "vex_component_pad_image", "type": "Container", "name": "LeftGearsFor1Motor"}, {"styles": {"show": {"_opacity": 1, "styleCondition": "(this.container.settingsPopover.settings.motorLayout == '1Right' || this.container.settingsPopover.settings.motorLayout == '2')", "display": "block", "visibility": "visible"}, "selected": {"backgroundImage": "url(images/vex/components/motor_back-selected.png)"}, "normal": {"top": 68, "visibility": "hidden", "height": 103, "width": 129, "_opacity": 0.2, "background": "transparent url(images/vex/components/motor_back.png) no-repeat", "position": "absolute", "display": "none", "left": 156}}, "onLoad": "Events.register(this.container.id+'.MotorRightOver', function(){this.select();}, this); Events.register(this.container.id+'.MotorRightOut', function(){this.deselect();}, this); Events.register('SettingsUpdate', function(){ this.testStyleConditions();}, this);", "elements": [{"wireIndex": 1, "angle": 270, "uid": "1.vex.iq.ui.wire.modk.it", "_disabled": true, "y": 72, "x": -17}], "name": "RightSideMotor", "type": "Container", "htmlClass": "vex_component_pad_image"}, {"styles": {"active": {"opacity": 0.5, "backgroundImage": "url(images/vex/components/motor_back-ghost.png)"}, "hover": {"backgroundImage": "url(images/vex/components/motor_back-ghost.png)"}, "normal": {"top": 68, "height": 103, "width": 129, "background": "transparent no-repeat", "position": "absolute", "display": "none", "left": 156}}, "_note": "This is out of date and needs to be fixed when adding drop-in components!!! --Collin", "name": "RightSideDropzone", "_droppable": {"classname": "myDraggableClass", "onDrop": "alert('test');", "algorthim": "pointer"}, "type": "Container", "htmlClass": "vex_component_pad_image"}, {"styles": {"show": {"_opacity": 1, "styleCondition": "(this.container.settingsPopover.settings.limitSwitches == '1Front' || this.container.settingsPopover.settings.limitSwitches == '2')", "display": "block", "visibility": "visible"}, "selected": {"backgroundImage": "url(images/vex/mechanisms/slider/button_limit_switch_out-selected.png)", "_backgroundPosition": "5px 0"}, "normal": {"top": -37, "visibility": "hidden", "height": 94, "width": 100, "_opacity": 0.2, "background": "transparent url(images/vex/mechanisms/slider/button_limit_switch_out.png) no-repeat", "position": "absolute", "display": "none", "left": 287}}, "onLoad": "Events.register(this.container.id+'.LimitOver', function(){this.select();}, this); Events.register(this.container.id+'.LimitOut', function(){this.deselect();}, this); Events.register('SettingsUpdate', function(){ this.testStyleConditions();}, this);", "elements": [{"wireIndex": 3, "angle": 180, "uid": "1.vex.iq.ui.wire.modk.it", "y": -26, "x": 25, "side": "top"}], "name": "FrontLimitSwitch", "type": "Container", "htmlClass": "vex_component_pad_image"}, {"styles": {"show": {"_opacity": 1, "styleCondition": "(this.container.settingsPopover.settings.limitSwitches == '1Rear' || this.container.settingsPopover.settings.limitSwitches == '2')", "display": "block", "visibility": "visible"}, "selected": {"backgroundImage": "url(images/vex/mechanisms/slider/button_limit_switch_in-selected.png)", "_backgroundPosition": "5px 0"}, "normal": {"top": 141, "visibility": "hidden", "height": 96, "width": 118, "_opacity": 0.2, "background": "transparent url(images/vex/mechanisms/slider/button_limit_switch_in.png) no-repeat", "position": "absolute", "display": "none", "left": -16}}, "onLoad": "Events.register(this.container.id+'.Limit2Over', function(){this.select();}, this); Events.register(this.container.id+'.Limit2Out', function(){this.deselect();}, this); Events.register('SettingsUpdate', function(){ this.testStyleConditions();}, this);", "elements": [{"wireIndex": 2, "angle": 0, "uid": "1.vex.iq.ui.wire.modk.it", "y": -30, "x": 34, "side": "top"}], "name": "BackLimitSwitch", "type": "Container", "htmlClass": "vex_component_pad_image"}, {"styles": {"normal": {"maxWidth": 240, "bottom": -126, "float": "left", "height": "auto", "zIndex": 2, "width": "auto", "background": "rgba(18, 52, 86, 0.4);", "padding:": "0px 10px 0px 0px", "position": "absolute", "left": -16}}, "htmlClass": "vex_component_pins clearfix", "elements": [{"styles": {"show": {"styleCondition": "this.container.$markup.children(':visible').not('.vex_pin_spacer_placeholder').length == 3", "display": "inline-block", "visibility": "visible"}, "normal": {"float": "right !important", "visibility": "hidden", "height": 57, "width": 100, "background": "transparent", "position": "relative", "display": "none"}}, "htmlClass": "vex_pin_spacer_placeholder clearfix", "type": "Container", "onLoad": "Events.register('SettingsUpdate', function(){ $.later( 10, this, 'testStyleConditions'); }, this);"}], "type": "Container", "flow": "wrap"}, {"feed": "digitalOutPinsListChange", "styles": {"show": {"styleCondition": "(this.container.settingsPopover.settings.limitSwitches == '1Front' || this.container.settingsPopover.settings.limitSwitches == '2')", "display": "inline-block", "visibility": "visible"}, "normal": {"width": "100px", "display": "none", "visibility": "hidden"}}, "layer": "pins", "angle": 0, "onMouseout": "Events.broadcast(this.container.id+'.LimitOut', []);", "onLoad": "Events.register('SettingsUpdate', function(){ this.testStyleConditions();}, this);", "assetGlobals": {"pins": {"3": "this"}, "wires": {"3": "name"}}, "label": "FORWARD LIMIT", "values": [], "mode": "OUTPUT_COMPONENT", "type": "VexPin", "onMouseover": "Events.broadcast(this.container.id+'.LimitOver', []);"}, {"feed": "digitalOutPinsListChange", "styles": {"show": {"styleCondition": "(this.container.settingsPopover.settings.limitSwitches == '1Rear' || this.container.settingsPopover.settings.limitSwitches == '2')", "display": "inline-block", "visibility": "visible"}, "normal": {"width": "100px", "display": "none", "visibility": "hidden"}}, "layer": "pins", "angle": 0, "onMouseout": "Events.broadcast(this.container.id+'.Limit2Out', []);", "onLoad": "Events.register('SettingsUpdate', function(){ this.testStyleConditions();}, this);", "assetGlobals": {"pins": {"2": "this"}, "wires": {"2": "name"}}, "label": "REVERSE LIMIT", "values": [], "mode": "OUTPUT_COMPONENT", "type": "VexPin", "onMouseover": "Events.broadcast(this.container.id+'.Limit2Over', []);"}, {"feed": "digitalOutPinsListChange", "styles": {"hide": {"styleCondition": "this.container.settingsPopover.settings.motorLayout == '1Right'", "display": "none", "visibility": "hidden"}, "normal": {"width": "100px", "display": "inline-block", "visibility": "visible"}}, "layer": "pins", "angle": 0, "onMouseout": "Events.broadcast(this.container.id+'.MotorLeftOut', []);", "onLoad": "Events.register('SettingsUpdate', function(){ this.testStyleConditions();}, this);", "assetGlobals": {"pins": {"0": "this"}, "wires": {"0": "name"}}, "label": "LEFT MOTOR", "values": [], "mode": "OUTPUT_COMPONENT", "type": "VexPin", "onMouseover": "Events.broadcast(this.container.id+'.MotorLeftOver', []);"}, {"feed": "digitalOutPinsListChange", "styles": {"show": {"styleCondition": "(this.container.settingsPopover.settings.motorLayout == '1Right' || this.container.settingsPopover.settings.motorLayout == '2')", "display": "inline-block", "visibility": "visible"}, "normal": {"width": "100px", "display": "none", "visibility": "hidden"}}, "layer": "pins", "angle": 0, "onMouseout": "Events.broadcast(this.container.id+'.MotorRightOut', []);", "onLoad": "Events.register('SettingsUpdate', function(){ this.testStyleConditions();}, this);", "assetGlobals": {"pins": {"1": "this"}, "wires": {"1": "name"}}, "label": "RIGHT MOTOR", "values": [], "mode": "OUTPUT_COMPONENT", "type": "VexPin", "onMouseover": "Events.broadcast(this.container.id+'.MotorRightOver', []);"}], "blocks": [{"uid": "1.vex.iq.setSliderSpeed.blocks.modk.it"}, {"uid": "1.vex.iq.setSliderPower.blocks.modk.it"}, {"uid": "1.vex.iq.setSliderHolding.blocks.modk.it"}, {"uid": "1.vex.iq.setMotorTimeout.blocks.modk.it"}, {"uid": "1.vex.iq.slideSliderBy.blocks.modk.it"}, {"uid": "1.vex.iq.slideSliderTo.blocks.modk.it"}, {"uid": "1.vex.iq.slideSlider.blocks.modk.it"}, {"uid": "1.vex.iq.stopSlider.blocks.modk.it"}], "docs": {"type": "VexComponent", "description": "The drivetrain component configures two regular DC motor. You can control the motor's speed and direction.", "title": "Motor"}, "classBased": true, "defaultName": "SLIDER", "componentArray": "int motorArray[3]", "configuration": [{"type": "text", "value": "#define Untitled INVALID_PORT\n"}, {"type": "text", "value": "VexMotor "}, {"type": "objectVar", "value": "name"}, {"type": "text", "value": "_left = VexMotor("}, {"index": 0, "type": "objectArray", "value": "wires"}, {"type": "text", "value": ","}, {"index": "reverseLeft", "type": "objectArray", "value": "settings"}, {"type": "text", "value": ");\n"}, {"type": "text", "value": "VexMotor "}, {"type": "objectVar", "value": "name"}, {"type": "text", "value": "_right = VexMotor("}, {"index": 1, "type": "objectArray", "value": "wires"}, {"type": "text", "value": ","}, {"index": "reverseRight", "type": "objectArray", "value": "settings"}, {"type": "text", "value": ");\n"}, {"type": "text", "value": "VexButton "}, {"type": "objectVar", "value": "name"}, {"type": "text", "value": "_fwd = VexButton("}, {"index": 3, "type": "objectArray", "value": "wires"}, {"type": "text", "value": ");\n"}, {"type": "text", "value": "VexButton "}, {"type": "objectVar", "value": "name"}, {"type": "text", "value": "_rev = VexButton("}, {"index": 2, "type": "objectArray", "value": "wires"}, {"type": "text", "value": ");\n"}, {"type": "text", "value": "VexLinearMechanism "}, {"type": "objectVar", "value": "name"}, {"type": "text", "value": " = VexLinearMechanism("}, {"type": "objectVar", "value": "name"}, {"type": "text", "value": "_left, "}, {"type": "objectVar", "value": "name"}, {"type": "text", "value": "_right, "}, {"type": "objectVar", "value": "name"}, {"type": "text", "value": "_fwd, "}, {"type": "objectVar", "value": "name"}, {"type": "text", "value": "_rev,"}, {"index": "ratioIn", "type": "objectArray", "value": "settings"}, {"type": "text", "value": ","}, {"index": "ratioOut", "type": "objectArray", "value": "settings"}, {"type": "text", "value": ","}, {"index": "pinionTeeth", "type": "objectArray", "value": "settings"}, {"type": "text", "value": ");"}, {"type": "text", "value": "Scope("}, {"type": "objectVar", "value": "name"}, {"type": "text", "value": ",VexLinearMechanism);"}, {"type": "text", "value": "\n#endif //ifndef IQ_GET_JUMPTABLE_DEFINE_MODKIT_VEX\n\n#ifdef IQ_GET_JUMPTABLE_DEFINE_MODKIT_VEX\n#define IQ_"}, {"index": 0, "type": "objectArray", "value": "wires"}, {"type": "text", "value": "_DEVICE_ID_STR IQ_MOTOR_SENSOR_STR//set device id\n#endif //IQ_GET_JUMPTABLE_DEFINE_MODKIT_VEX\n\n#ifndef IQ_GET_JUMPTABLE_DEFINE_MODKIT_VEX\n"}, {"type": "text", "value": "\n#endif //ifndef IQ_GET_JUMPTABLE_DEFINE_MODKIT_VEX\n\n#ifdef IQ_GET_JUMPTABLE_DEFINE_MODKIT_VEX\n#define IQ_"}, {"index": 1, "type": "objectArray", "value": "wires"}, {"type": "text", "value": "_DEVICE_ID_STR IQ_MOTOR_SENSOR_STR//set device id\n#endif //IQ_GET_JUMPTABLE_DEFINE_MODKIT_VEX\n\n#ifndef IQ_GET_JUMPTABLE_DEFINE_MODKIT_VEX\n"}, {"type": "text", "value": "\n#endif //ifndef IQ_GET_JUMPTABLE_DEFINE_MODKIT_VEX\n\n#ifdef IQ_GET_JUMPTABLE_DEFINE_MODKIT_VEX\n#define IQ_"}, {"index": 2, "type": "objectArray", "value": "wires"}, {"type": "text", "value": "_DEVICE_ID_STR IQ_BUMPER_SENSOR_STR//set device id\n#endif //IQ_GET_JUMPTABLE_DEFINE_MODKIT_VEX\n\n#ifndef IQ_GET_JUMPTABLE_DEFINE_MODKIT_VEX\n"}, {"type": "text", "value": "\n#endif //ifndef IQ_GET_JUMPTABLE_DEFINE_MODKIT_VEX\n\n#ifdef IQ_GET_JUMPTABLE_DEFINE_MODKIT_VEX\n#define IQ_"}, {"index": 3, "type": "objectArray", "value": "wires"}, {"type": "text", "value": "_DEVICE_ID_STR IQ_BUMPER_SENSOR_STR//set device id\n#endif //IQ_GET_JUMPTABLE_DEFINE_MODKIT_VEX\n\n#ifndef IQ_GET_JUMPTABLE_DEFINE_MODKIT_VEX\n"}], "icon": "images/vex/components/drawer_icons/slider.png", "displayName": "Slider", "onDrop": "Events.broadcast(this.id+'.Dropped', []);", "onStartDrag": "if(Boolean(modkitNamespace.GenericComponent.managers[this.uid]) && modkitNamespace.GenericComponent.managers[this.uid].count >= this.maxComponents || this.maxComponents == 0){ if(!Boolean(this.container) || this.container.id != 'hardware_pad'){ this.$markup.removeClass('myAcceptableClass');}}", "onConfigOverride": "var motorLayout = this.settingsPopover.settings.motorLayout; this.configOverrides={'wires':this.getFullState()['wires']}; if(motorLayout=='1Right'){this.configOverrides['wires'][0]='INVALID_PORT'; } if(motorLayout=='1Left'){this.configOverrides['wires'][1]='INVALID_PORT';} var limitSwitches = this.settingsPopover.settings.limitSwitches; if(limitSwitches=='1Front' || limitSwitches=='none'){this.configOverrides['wires'][2]='INVALID_PORT'; } if(limitSwitches=='1Rear' || limitSwitches=='none'){this.configOverrides['wires'][3]='INVALID_PORT';} if(!Boolean( this.configOverrides['settings'] )){ this.configOverrides['settings']={};} this.configOverrides['settings']['reverseLeft'] = ' '+Boolean(this.settingsPopover.settings.leftReverseDirection); this.configOverrides['settings']['reverseRight'] = ' '+Boolean(this.settingsPopover.settings.rightReverseDirection); this.configOverrides['settings']['ratioIn']=this.settingsPopover.settings.ratioIn; this.configOverrides['settings']['ratioOut']=this.settingsPopover.settings.ratioOut; this.configOverrides['settings']['pinionTeeth']=this.settingsPopover.settings.pinionTeeth;", "stateVars": {"top": true, "wires": true, "name": true, "left": true}, "_otherBlocks": [{"uid": "1.vex.iq.motorDirection.blocks.modk.it"}, {"uid": "1.vex.iq.speed.blocks.modk.it"}, {"uid": "1.vex.iq.motorDirection.blocks.modk.it"}, {"uid": "1.vex.iq.speed.blocks.modk.it"}, {"uid": "1.vex.iq.resetSliderPosition.blocks.modk.it"}, {"uid": "1.vex.iq.sliderDirection.blocks.modk.it"}, {"uid": "1.vex.iq.sliderSpeed.blocks.modk.it"}, {"uid": "1.vex.iq.sliderPosition.blocks.modk.it"}, {"uid": "1.vex.iq.sliderCurrent.blocks.modk.it"}], "settingsPopover": {"type": "SettingsPopover", "settings": {"uid": "1.vex.iq.settingsSlider.mechanism.modk.it"}}, "hack_to_disabled_dropping": false}, "1.vex.iq.setDrivetrainDriveSpeed.blocks.modk.it": {"category": "setup", "uid": "1.vex.iq.setDrivetrainDriveSpeed.blocks.modk.it", "color": "darkblue", "docs": {"parameters": [{"range": "-100-100 %", "type": "num", "description": "select the speed from the list, type a number, or use a variable (speed ranges from -100 to 100 %)", "name": "speed"}], "type": "StatementBlock", "description": "*Set drive speed to* sets the speed of the **Drivetrain** drive blocks in percent (%).", "name": "set drive speed", "hint": "Negative **speed** will go in the opposite direction that is selected. Numbers with decimals are allowed."}, "extensionOf": "1.statement.blocks.modk.it", "statementElements": [{"elements": [{"text": "set drive speed to", "type": "CodeElement", "value": "setDriveSpeed("}, {"assetGlobals": {"subBlocks": {"0": "subBlock"}}, "type": "BlockHolder", "elements": [{"onBlur": "console.log(this.value);", "elements": [{"values": ["0", "20", "40", "60", "80", "100"], "type": "DropdownMenu", "autoMinWidth": "true"}], "assetGlobals": {"params": {"0": "value"}}, "maxChars": "32", "value": "60", "color": "darkblue", "readonly": false, "rangeMin": 0, "allowChars": "0-9.", "rangeMax": 150, "type": "NumberArgument"}], "accepts": ["NumberBlock"]}, {"elements": [{"values": ["%"], "type": "DropdownMenu", "autoMinWidth": "true"}], "assetGlobals": {"params": {"1": "value"}}, "value": "%", "readonly": true, "hideCodeView": true, "type": "NameArgument"}, {"text": "", "type": "CodeElement", "value": ");"}], "type": "LineElement"}], "tokens": ["setDrivetrainSpeed"]}, "1.openshield_ext.pins.modk.it": {"elements": [{"layer": "pins", "angle": 90, "name": "PIN2", "digitalOut": true, "assetGlobals": {"d2": {"name": "name", "mode": "mode"}}, "top": "-25px", "digitalIn": true, "number": "2", "mode": "INPUT", "type": "DigitalPin", "left": "325px"}, {"layer": "pins", "angle": 90, "name": "PIN3", "digitalOut": true, "assetGlobals": {"d3": {"name": "name", "mode": "mode"}}, "top": "-25px", "digitalIn": true, "number": "3", "mode": "INPUT", "type": "DigitalPin", "analogOut": true, "left": "312px"}, {"layer": "pins", "angle": 90, "name": "PIN4", "digitalOut": true, "assetGlobals": {"d4": {"name": "name", "mode": "mode"}}, "top": "-25px", "digitalIn": true, "number": "4", "mode": "INPUT", "type": "DigitalPin", "left": "299px"}, {"layer": "pins", "angle": 90, "name": "PIN5", "digitalOut": true, "assetGlobals": {"d5": {"name": "name", "mode": "mode"}}, "top": "-25px", "digitalIn": true, "number": "5", "mode": "INPUT", "type": "DigitalPin", "analogOut": true, "left": "286px"}, {"layer": "pins", "angle": 90, "name": "PIN6", "digitalOut": true, "assetGlobals": {"d6": {"name": "name", "mode": "mode"}}, "top": "-25px", "digitalIn": true, "number": "6", "mode": "INPUT", "type": "DigitalPin", "analogOut": true, "left": "273px"}, {"layer": "pins", "angle": 90, "name": "PIN7", "digitalOut": true, "assetGlobals": {"d7": {"name": "name", "mode": "mode"}}, "top": "-25px", "digitalIn": true, "number": "7", "mode": "INPUT", "type": "DigitalPin", "left": "260px"}, {"layer": "pins", "angle": 90, "name": "PIN8", "digitalOut": true, "assetGlobals": {"d8": {"name": "name", "mode": "mode"}}, "top": "-25px", "digitalIn": true, "number": "8", "mode": "INPUT", "type": "DigitalPin", "left": "242px"}, {"layer": "pins", "angle": 90, "name": "PIN9", "digitalOut": true, "assetGlobals": {"d9": {"name": "name", "mode": "mode"}}, "top": "-25px", "digitalIn": true, "number": "9", "mode": "INPUT", "type": "DigitalPin", "analogOut": true, "left": "229px"}, {"layer": "pins", "angle": 90, "name": "PIN10", "digitalOut": true, "assetGlobals": {"d10": {"name": "name", "mode": "mode"}}, "top": "-25px", "digitalIn": true, "number": "10", "mode": "INPUT", "type": "DigitalPin", "analogOut": true, "left": "216px"}, {"layer": "pins", "angle": 90, "name": "PIN11", "digitalOut": true, "assetGlobals": {"d11": {"name": "name", "mode": "mode"}}, "top": "-25px", "digitalIn": true, "number": "11", "mode": "INPUT", "type": "DigitalPin", "analogOut": true, "left": "203px"}, {"layer": "pins", "angle": 90, "name": "PIN12", "digitalOut": true, "assetGlobals": {"d12": {"name": "name", "mode": "mode"}}, "top": "-25px", "digitalIn": true, "number": "12", "mode": "INPUT", "type": "DigitalPin", "left": "190px"}, {"layer": "pins", "angle": 90, "name": "PIN13", "digitalOut": true, "assetGlobals": {"d13": {"name": "name", "mode": "mode"}}, "top": "-25px", "digitalIn": true, "number": "13", "mode": "OUTPUT", "type": "DigitalPin", "left": "177px"}, {"layer": "pins", "angle": 270, "name": "A0", "digitalOut": true, "assetGlobals": {"a0": {"name": "name", "mode": "mode"}}, "top": "268px", "digitalIn": true, "number": "17", "mode": "INPUT", "left": "287px", "type": "DigitalPin", "analogIn": true}, {"layer": "pins", "angle": 270, "name": "A1", "digitalOut": true, "assetGlobals": {"a1": {"name": "name", "mode": "mode"}}, "top": "268px", "digitalIn": true, "number": "18", "mode": "INPUT", "left": "300px", "type": "DigitalPin", "analogIn": true}, {"layer": "pins", "angle": 270, "name": "A2", "digitalOut": true, "assetGlobals": {"a2": {"name": "name", "mode": "mode"}}, "top": "268px", "digitalIn": true, "number": "19", "mode": "INPUT", "left": "313px", "type": "DigitalPin", "analogIn": true}, {"layer": "pins", "angle": 270, "name": "A3", "digitalOut": true, "assetGlobals": {"a3": {"name": "name", "mode": "mode"}}, "top": "268px", "digitalIn": true, "number": "20", "mode": "INPUT", "left": "326px", "type": "DigitalPin", "analogIn": true}, {"layer": "pins", "angle": 270, "name": "A4", "digitalOut": true, "assetGlobals": {"a4": {"name": "name", "mode": "mode"}}, "top": "268px", "digitalIn": true, "number": "21", "mode": "INPUT", "left": "339px", "type": "DigitalPin", "analogIn": true}, {"layer": "pins", "angle": 270, "name": "A5", "digitalOut": true, "assetGlobals": {"a5": {"name": "name", "mode": "mode"}}, "top": "268px", "digitalIn": true, "number": "22", "mode": "INPUT", "left": "352px", "type": "DigitalPin", "analogIn": true}, {"layer": "pins", "angle": 270, "name": "A6", "digitalOut": true, "assetGlobals": {"a6": {"name": "name", "mode": "mode"}}, "top": "268px", "digitalIn": true, "number": "23", "mode": "INPUT", "left": "365px", "type": "DigitalPin", "analogIn": true}, {"layer": "pins", "angle": 270, "name": "A7", "digitalOut": true, "assetGlobals": {"a7": {"name": "name", "mode": "mode"}}, "top": "268px", "digitalIn": true, "number": "24", "mode": "INPUT", "left": "378px", "type": "DigitalPin", "analogIn": true}], "uid": "1.openshield_ext.pins.modk.it", "top": "0px", "bounds": {"top": -120, "bottom": 394, "right": 523, "left": 170}, "stateVars": {"d10": false, "d11": false, "d12": false, "d13": false, "top": false, "a1": false, "a0": false, "a3": false, "a2": false, "a5": false, "a4": false, "d8": false, "d9": false, "d6": false, "d7": false, "d4": false, "d5": false, "d2": false, "d3": false, "left": false}, "type": "AssetGroup", "left": "0px"}, "1.statement.blocks.modk.it": {"stateVars": {"sibling": false, "top": true, "params": false, "subBlocks": false, "left": true}, "elements": [{"assetGlobals": {"color": "color", "statementElements": "elements"}, "assetGlobalsExclude": {"elements": true}, "type": "StatementElement", "block": "null"}, {"elements": [{"assetGlobals": {"color": "color", "sibling": "subBlock"}, "accepts": ["StatementBlock"], "elements": [{"type": "StatementHighlight"}], "type": "BlockHolder", "subBlock": null}], "type": "SiblingElement"}], "type": "StatementBlock", "uid": "1.statement.blocks.modk.it", "lineElement": null}, "1.integer.blocks.modk.it": {"color": "darkorange", "extensionOf": "1.number.blocks.modk.it", "stateVars": {"text": false, "value": false}, "uid": "1.integer.blocks.modk.it", "groupElements": [{"assetGlobals": {"text": "text", "value": "value"}, "type": "CodeElement"}]}, "1.vex.iq.goMotorFor.blocks.modk.it": {"category": "output", "uid": "1.vex.iq.goMotorFor.blocks.modk.it", "color": "blue", "docs": {"category": "output", "description": "", "parameters": [{"type": "num", "description": "determines which _Motor_ you are controlling", "name": "motor"}, {"type": "num", "description": "sets the direction the _Motor_ will move", "name": "direction"}], "hint": "", "type": "StatementBlock", "name": "drive for"}, "extensionOf": "1.statement.blocks.modk.it", "statementElements": [{"elements": [{"text": "go    ", "type": "CodeElement", "value": "goMotorFor("}, {"assetGlobals": {"subBlocks": {"0": "subBlock"}}, "type": "BlockHolder", "elements": [{"elements": [{"values": ["FWD", "REV"], "type": "DropdownMenu", "autoMinWidth": "true"}], "assetGlobals": {"params": {"0": "value"}}, "value": "", "color": "blue", "readonly": true, "type": "NumberArgument"}], "accepts": ["NumberBlock"]}, {"text": "for", "type": "CodeElement", "value": ","}, {"assetGlobals": {"subBlocks": {"1": "subBlock"}}, "type": "BlockHolder", "elements": [{"assetGlobals": {"params": {"1": "value"}}, "color": "blue", "elements": [{"values": ["1", "5", "10", "60"], "type": "DropdownMenu", "autoMinWidth": "true"}], "type": "NumberArgument"}], "accepts": ["NumberBlock"]}, {"text": "sec", "type": "CodeElement", "value": ");"}], "type": "LineElement"}], "tokens": ["goMotorFor"], "sibling": null}, "1.divide.blocks.modk.it": {"category": "operators", "groupElements": [{"type": "CodeElement", "value": "("}, {"assetGlobals": {"subBlocks": {"0": "subBlock"}}, "type": "BlockHolder", "elements": [{"assetGlobals": {"params": {"0": "value"}}, "maxChars": "32", "readonly": false, "maxDecimals": 3, "allowChars": "0-9.//-", "type": "NumberArgument"}], "accepts": ["NumberBlock"]}, {"text": "/", "type": "CodeElement", "value": ") / ("}, {"assetGlobals": {"subBlocks": {"1": "subBlock"}}, "type": "BlockHolder", "elements": [{"assetGlobals": {"params": {"1": "value"}}, "maxChars": "32", "readonly": false, "maxDecimals": 3, "allowChars": "0-9.//-", "type": "NumberArgument"}], "accepts": ["NumberBlock"]}, {"type": "CodeElement", "value": ")"}], "uid": "1.divide.blocks.modk.it", "color": "green", "docs": {"parameters": [{"type": "num", "description": "Type a number or drag in a variable.", "name": "value 1"}, {"type": "num", "description": "Type a value or drag in a variable.", "name": "value 2"}], "description": "Calculates **value 1** divided by **value 2**.", "name": "divide", "hint": ""}, "extensionOf": "1.number.blocks.modk.it"}, "2341.usb_vid.modk.it": {"pids_to_uid": {"0042": {"microcontroller": {"uid": "1.atmega2560.avr.microcontrollers.modk.it"}, "uid": "1.mega.arduino.hardware.modk.it", "boot_size": 16384}, "0043": {"microcontroller": {"uid": "1.atmega328p.avr.microcontrollers.modk.it"}, "uid": "1.uno.arduino.hardware.modk.it", "boot_size": 4096}, "8036": {"microcontroller": {"uid": "1.atmega32u4.avr.microcontrollers.modk.it"}, "uid": "1.pro_micro.sparkfun.hardware.modk.it", "boot_size": 4096}, "0001": {"microcontroller": {"uid": "1.atmega328p.avr.microcontrollers.modk.it"}, "uid": "1.uno.arduino.hardware.modk.it", "boot_size": 4096}, "0010": {"microcontroller": {"uid": "1.atmega2560.avr.microcontrollers.modk.it"}, "uid": "1.mega.arduino.hardware.modk.it", "boot_size": 16384}}, "company": "Arduino", "uid": "2341.usb_vid.modk.it", "vid": "2341"}, "1.vex.iq.setMotorHolding.blocks.modk.it": {"category": "setup", "uid": "1.vex.iq.setMotorHolding.blocks.modk.it", "color": "darkblue", "docs": {"parameters": [{"range": "ON, OFF", "options": ["ON", "OFF"], "type": "name", "description": "Select from the list.", "name": "hold"}], "type": "StatementBlock", "description": "When *set holding* is ON the __COMPONENT__ resists turning. When *set holding* is OFF the motor turns freely. *Holding* applies after a *stop* and after a moving a specific amount.", "name": "set holding", "hint": "**Holding** is useful when you raise a load and want it to stay in place, or for parking your robot on hills."}, "extensionOf": "1.statement.blocks.modk.it", "statementElements": [{"elements": [{"text": "set Holding to", "type": "CodeElement", "value": "setHolding("}, {"assetGlobals": {"subBlocks": {"0": "subBlock"}}, "type": "BlockHolder", "elements": [{"elements": [{"values": ["ON", "OFF"], "type": "DropdownMenu", "autoMinWidth": "true"}], "assetGlobals": {"params": {"0": "value"}}, "value": "ON", "color": "darkblue", "readonly": true, "type": "NameArgument"}], "accepts": []}, {"text": "", "type": "CodeElement", "value": ");"}], "type": "LineElement"}], "tokens": ["setMotorBraking"]}, "1.led.lilypad.components.modk.it": {"elements": [{"assetGlobals": {"componentImage": {"src": "src", "top": "top", "left": "left"}}, "position": "relative", "type": "SimpleImage"}, {"color": "blue", "top": "16px", "right": "-28px", "type": "ComponentWire", "elements": [{"feed": "digitalOutPinsListChange", "layer": "pins", "angle": 0, "assetGlobals": {"wire": "name"}, "top": "-3px", "values": [], "mode": "OUTPUT_COMPONENT", "type": "DigitalPin", "left": "15px"}]}, {"color": "black", "top": "39px", "right": "-28px", "type": "ComponentWire", "elements": [{"layer": "pins", "angle": 0, "name": "GND", "top": "-3px", "mode": "GROUND_COMPONENT", "type": "DigitalPin", "left": "15px"}]}], "blocks": [{"uid": "1.setLED.blocks.modk.it"}], "uid": "1.led.lilypad.components.modk.it", "library": "1.led.library.modk.it", "hideBorder": true, "defaultName": "LED", "componentImage": {"src": "images/hardware/lilypad/lilypad_led.png", "top": "3px", "left": "2px"}, "stateVars": {"top": true, "wire": false, "name": true, "left": true}, "componentArray": "int ledArray", "configuration": [{"type": "text", "value": "setupLED("}, {"type": "objectVar", "value": "name"}, {"type": "text", "value": ","}, {"type": "objectVar", "value": "wire"}, {"type": "text", "value": ");"}], "type": "GenericComponent"}, "1.equals.blocks.modk.it": {"category": "operators", "groupElements": [{"type": "CodeElement", "value": "("}, {"onAddSubBlock": "console.log('this.subBlock',this.subBlock);if(this.subBlock.type=='EnumBlock'){var enumValues = this.subBlock.enumValues;var enumFeed = this.subBlock.enumFeed;this.block.elements[0].elements[3].elements[0].elements[0].enable(); if(Boolean(enumValues) && !Boolean(enumFeed)){this.block.elements[0].elements[3].elements[0].elements[0].changeValues(enumValues);} else{ if(Boolean(enumFeed)){ if(!Boolean(this.subBlock.getFullState().localScope)) {this.block.globalScope=this.subBlock.getState().params[0]; } this.block.elements[0].elements[3].disableDroppables(); this.block.elements[0].elements[3].elements[0].elements[0].changeFeed(enumFeed); this.block.elements[0].elements[3].elements[0].editable(false);} }}", "elements": [{"assetGlobals": {"params": {"0": "value"}}, "maxChars": "32", "readonly": false, "maxDecimals": 3, "allowChars": "0-9.//-", "type": "NumberEnumeratorStringArgument"}], "assetGlobals": {"subBlocks": {"0": "subBlock"}}, "accepts": ["NumberBlock", "EnumBlock", "StringBlock"], "onRemoveSubBlock": "this.block.globalScope=null;this.block.elements[0].elements[3].enableDroppables();this.block.elements[0].elements[3].elements[0].elements[0].changeValues([]);this.block.elements[0].elements[3].elements[0].elements[0].disable();this.block.elements[0].elements[3].elements[0].editable(true);", "type": "BlockHolder"}, {"text": "=", "type": "CodeElement", "value": ") == ("}, {"onAddSubBlock": "this.originalOtherAccepts = this.block.elements[0].elements[1].accepts; if(this.subBlock.type=='NumberBlock'){this.block.elements[0].elements[1].changeDropAccepts([this.subBlock.type]); }", "elements": [{"elements": [{"disabled": true, "values": [], "type": "DropdownMenu", "autoMinWidth": "true"}], "assetGlobals": {"params": {"1": "value"}}, "maxChars": "32", "readonly": false, "something": "somethingelse", "allowChars": "0-9.//-", "type": "NumberEnumeratorStringArgument", "maxDecimals": 3}], "assetGlobals": {"subBlocks": {"1": "subBlock"}}, "accepts": ["NumberBlock"], "onRemoveSubBlock": "if(Boolean(this.originalOtherAccepts)){this.block.elements[0].elements[1].changeDropAccepts(this.originalOtherAccepts);}", "type": "BlockHolder"}, {"type": "CodeElement", "value": ")"}], "uid": "1.equals.blocks.modk.it", "color": "green", "docs": {"parameters": [{"type": "num enum string", "description": "Type a value or drag in a variable.", "name": "value 1"}, {"type": "num enum string", "description": "Type a value or drag in a variable.", "name": "value 2"}], "description": "This block is true when **value 1** and **value 2** are the same. Otherwise this block is false.", "name": "equals", "hint": ""}, "extensionOf": "1.boolean.blocks.modk.it"}, "1.vex.wizard.findlink.modk.it": {"elements": [{"styles": {"normal": {"top": 0, "height": 385, "padding": 20, "width": 600, "backgroundColor": "#DCDEE0", "position": "absolute", "left": 0}}, "elements": [{"styles": {"normal": {"marginBottom": 20, "height": "auto", "width": 490, "marginLeft": 30, "marginRight": 0, "position": "relative", "marginTop": 0}}, "onLoad": "if(navigator.userAgent.toLowerCase().indexOf('windows')>-1){this.setText('#Unable to connect to Modkit Link\\n\\nModkit Link is required to program your robot. Please run the Modkit Link exe from C:/Program Files/Modkit now or click one of the links below to get help.');}", "markdown": true, "name": "Heading", "text": "##If Modkit Link is installed it should be located in the Applications folder on your harddrive.\n\n------------\n\n1. To launch it quickly, press command + space (or click the Spotlight icon in the menu bar) and type “Modkit Link” into the Spotlight search box.\nSpotlight Result\n\n2. If Modkit Link is installed it should show up in the list. Double click or select and press enter on Modkit Link to launch it.", "type": "FrameworkText"}], "type": "Container", "name": "FindAndRunModkitLink"}], "uid": "1.vex.wizard.findlink.modk.it", "title": "Find Modkit Link", "next": {"uid": "1.vex.wizard.runlink2.modk.it"}, "type": "WizardStep", "nextText": "Next"}, "1.motor.components.modk.it": {"elements": [{"feed": "digitalOutPinsListChange", "layer": "pins", "angle": 0, "assetGlobals": {"wires": {"0": "name"}}, "top": "-3px", "label": "SPEED", "values": [], "mode": "OUTPUT_COMPONENT", "type": "NewDigitalPin", "left": "15px"}, {"feed": "digitalOutPinsListChange", "layer": "pins", "angle": 0, "assetGlobals": {"wires": {"1": "name"}}, "top": "-3px", "label": "DIR", "values": [], "mode": "OUTPUT_COMPONENT", "type": "NewDigitalPin", "left": "15px"}, {"layer": "pins", "angle": 0, "name": "5V", "top": "-3px", "label": "BRAKE", "mode": "GROUND_COMPONENT", "type": "NewPowerPin", "left": "15px"}], "blocks": [{"uid": "1.motorOn.blocks.modk.it"}, {"uid": "1.motorOff.blocks.modk.it"}, {"uid": "1.motorSpeed.blocks.modk.it"}], "uid": "1.motor.components.modk.it", "docs": {"type": "GenericComponent", "description": "The motor component configures a regular DC motor. You can control the motor's speed and direction.", "title": "Motor"}, "library": "1.motor.library.modk.it", "defaultName": "MOTOR", "componentImage": {"src": "images/hardware/lilypad/lilypad_rgb_led.png", "top": "1px", "left": "1px"}, "stateVars": {"top": true, "wires": true, "name": true, "left": true}, "componentArray": "int motorArray[3]", "configuration": [{"type": "text", "value": "motorSetup("}, {"type": "objectVar", "value": "name"}, {"type": "text", "value": ","}, {"index": 0, "type": "objectArray", "value": "wires"}, {"type": "text", "value": ","}, {"index": 1, "type": "objectArray", "value": "wires"}, {"type": "text", "value": ");"}], "type": "GenericComponent", "icon": "images/hardware/generic_components/motor.png"}, "1.vex.iq.rotatorRotation.blocks.modk.it": {"category": "input", "groupElements": [{"assetGlobals": {"localScope": "ignore", "subBlocks": {"0": "subBlock"}}, "ignore": true, "elements": [{"assetGlobals": {"params": {"0": "value"}}, "color": "blue", "readonly": true, "elements": [{"feed": "1.vex.iq.rotation.blocks.modk.itComponentListChange", "values": [], "type": "DropdownMenu", "autoMinWidth": "true"}], "type": "NameArgument"}], "accepts": ["NoBlock"], "type": "BlockHolder"}, {"assetGlobals": {"localScope": "ignore"}, "ignore": true, "type": "CodeElement", "value": ".", "text": ""}, {"text": "rotation in", "type": "CodeElement", "value": "rotation("}, {"assetGlobals": {"params": {"1": "value"}}, "readonly": true, "elements": [{"values": ["deg", "rev"], "type": "DropdownMenu", "autoMinWidth": "true"}], "type": "NameArgument", "value": "deg"}, {"type": "CodeElement", "value": ")"}], "uid": "1.vex.iq.rotatorRotation.blocks.modk.it", "color": "purple", "docs": {"category": "input", "type": "NumberBlock", "description": "Gets the *rotation* the **Rotator** in degrees (deg) or revolutions (rev).", "name": "rotation", "hint": ""}, "extensionOf": "1.number.blocks.modk.it", "tokens": ["currentRotatorEncoder"], "stateVars": {"localScope": false, "params": false, "subBlocks": false}}, "1.vex.iq.controllerActions.components.modk.it": {"styles": {"normal": {"width": 430, "position": "relative", "height": "auto"}}, "elements": [{"text": "Controller Actions", "uid": "1.vex.iq.settingsHeading.modk.it"}, {"uid": "buttonClose.modk.it", "onClick": "function(){ this.container.container.container.saveAndHide(); }"}, {"styles": {"normal": {"position": "relative", "marginTop": "3px", "marginBottom": "2px", "width": "100%", "height": "auto"}}, "type": "HorizontalRule"}, {"styles": {"normal": {"background-image": "url(images/vex/controller/controller.png)", "position": "relative", "height": 327, "background-position": "118px 26px", "width": 430}}, "elements": [{"styles": {"hover": {"background-image": "url(images/vex/controller/aup.png)"}, "normal": {"background-image": "none", "top": 177, "height": 50, "width": 51, "position": "absolute", "left": "144px"}}, "htmlClass": "vex_a_up", "type": "Container"}, {"styles": {"hover": {"background-image": "url(images/vex/controller/adown.png)"}, "normal": {"background-image": "none", "top": 194, "height": 50, "width": 51, "position": "absolute", "left": "144px"}}, "htmlClass": "vex_a_down", "type": "Container"}, {"styles": {"hover": {"background-image": "url(images/vex/controller/dup.png)"}, "normal": {"background-image": "none", "top": 177, "height": 50, "width": 52, "position": "absolute", "left": 233}}, "htmlClass": "vex_d_up", "type": "Container"}, {"styles": {"hover": {"background-image": "url(images/vex/controller/ddown.png)"}, "normal": {"background-image": "none", "top": 194, "height": 50, "width": 52, "position": "absolute", "left": "233px"}}, "htmlClass": "vex_d_down", "type": "Container"}, {"styles": {"hover": {"background-image": "url(images/vex/controller/bleft.png)"}, "normal": {"background-image": "none", "top": 194, "height": 33, "width": 67, "position": "absolute", "left": "127px"}}, "htmlClass": "vex_b_left", "type": "Container"}, {"styles": {"hover": {"background-image": "url(images/vex/controller/bright.png)"}, "normal": {"background-image": "none", "top": 194, "height": 33, "width": 56, "position": "absolute", "left": 144}}, "htmlClass": "vex_b_right", "type": "Container"}, {"styles": {"hover": {"background-image": "url(images/vex/controller/cright.png)"}, "normal": {"background-image": "none", "top": 194, "height": 33, "width": 67, "position": "absolute", "left": 234}}, "htmlClass": "vex_c_right", "type": "Container"}, {"styles": {"hover": {"background-image": "url(images/vex/controller/cleft.png)"}, "normal": {"background-image": "none", "top": 194, "height": 33, "width": 56, "position": "absolute", "left": 228}}, "htmlClass": "vex_c_left", "type": "Container"}, {"styles": {"hover": {"background-image": "url(images/vex/controller/eup.png)"}, "normal": {"background-image": "none", "top": 228, "height": "16px", "width": "35px", "position": "absolute", "left": 170}}, "htmlClass": "vex_eup", "type": "Container"}, {"styles": {"hover": {"background-image": "url(images/vex/controller/edown.png)"}, "normal": {"background-image": "none", "top": 231, "height": "27px", "width": "25px", "position": "absolute", "left": 180}}, "htmlClass": "vex_edown", "type": "Container"}, {"styles": {"hover": {"background-image": "url(images/vex/controller/fup.png)"}, "normal": {"background-image": "none", "top": 228, "height": "16px", "width": "33px", "position": "absolute", "left": 224}}, "htmlClass": "vex_fup", "type": "Container"}, {"styles": {"hover": {"background-image": "url(images/vex/controller/fdown.png)"}, "normal": {"background-image": "none", "top": 231, "height": "27px", "width": "24px", "position": "absolute", "left": 224}}, "htmlClass": "vex_fdown", "type": "Container"}, {"styles": {"hover": {"background-image": "url(images/vex/controller/lup.png)"}, "normal": {"background-image": "none", "top": "59px", "height": "17px", "width": "42px", "position": "absolute", "left": "147px"}}, "htmlClass": "vex_lup", "type": "Container"}, {"styles": {"hover": {"background-image": "url(images/vex/controller/ldown.png)"}, "normal": {"background-image": "none", "top": "49px", "height": "18px", "width": "42px", "position": "absolute", "left": "147px"}}, "htmlClass": "vex_ldown", "type": "Container"}, {"styles": {"hover": {"background-image": "url(images/vex/controller/rup.png)"}, "normal": {"background-image": "none", "top": "60px", "height": "16px", "width": "43px", "position": "absolute", "left": "240px"}}, "htmlClass": "vex_rup", "type": "Container"}, {"styles": {"hover": {"background-image": "url(images/vex/controller/rdown.png)"}, "normal": {"background-image": "none", "top": "49px", "height": "18px", "width": "43px", "position": "absolute", "left": "240px"}}, "htmlClass": "vex_rdown", "type": "Container"}, {"styles": {"hover": {"color": "#24a0ff"}, "selected": {"color": "#24a0ff"}, "normal": {"top": "8px", "height": "auto", "width": 100, "marginRight": "10px", "position": "absolute", "left": 0}}, "assetGlobals": {"componentName": "componentName", "Button.L_DWN": "value", "digitalControllerValues": "values"}, "text": "None", "value": "none", "label": "L ▼", "key": "controller_ldown", "type": "Input", "inputType": "select"}, {"styles": {"hover": {"color": "#24a0ff"}, "selected": {"color": "#24a0ff"}, "normal": {"top": "50px", "height": "auto", "width": 100, "marginRight": "10px", "position": "absolute", "left": 0}}, "assetGlobals": {"Button.L_UP": "value", "digitalControllerValues": "values", "componentName": "componentName"}, "text": "None", "value": "none", "label": "L ▲", "key": "controller_lup", "type": "Input", "inputType": "select"}, {"styles": {"hover": {"color": "#24a0ff"}, "selected": {"color": "#24a0ff"}, "normal": {"top": "8px", "height": "auto", "width": 100, "marginRight": "10px", "position": "absolute", "left": 310}}, "assetGlobals": {"componentName": "componentName", "Button.R_DWN": "value", "digitalControllerValues": "values"}, "text": "None", "value": "none", "label": "R ▼", "key": "controller_rdown", "type": "Input", "inputType": "select"}, {"styles": {"hover": {"color": "#24a0ff"}, "selected": {"color": "#24a0ff"}, "normal": {"top": "50px", "height": "auto", "width": 100, "marginRight": "10px", "position": "absolute", "left": 310}}, "assetGlobals": {"componentName": "componentName", "digitalControllerValues": "values", "Button.R_UP": "value"}, "text": "None", "value": "none", "label": "R ▲", "key": "controller_rup", "type": "Input", "inputType": "select"}, {"styles": {"hover": {"color": "#24a0ff"}, "selected": {"color": "#24a0ff"}, "normal": {"top": 120, "height": "auto", "width": 100, "marginRight": "10px", "position": "absolute", "left": 0}}, "assetGlobals": {"analogControllerValuesY": "values", "componentName": "componentName", "Joystick.A": "value"}, "text": "None", "value": "none", "label": "A ▲▼", "key": "controller_a", "type": "Input", "inputType": "select"}, {"styles": {"hover": {"color": "#24a0ff"}, "selected": {"color": "#24a0ff"}, "normal": {"top": 166, "height": "auto", "width": 100, "marginRight": "10px", "position": "absolute", "left": 0}}, "assetGlobals": {"Joystick.B": "value", "analogControllerValuesX": "values", "componentName": "componentName"}, "text": "None", "value": "none", "label": "B ◀▶", "key": "controller_b", "type": "Input", "inputType": "select"}, {"styles": {"hover": {"color": "#24a0ff"}, "selected": {"color": "#24a0ff"}, "normal": {"top": 120, "height": "auto", "width": 100, "marginRight": "10px", "position": "absolute", "left": 310}}, "assetGlobals": {"analogControllerValuesY": "values", "componentName": "componentName", "Joystick.D": "value"}, "text": "None", "value": "none", "label": "D ▲▼", "key": "controller_d", "type": "Input", "inputType": "select"}, {"styles": {"hover": {"color": "#24a0ff"}, "selected": {"color": "#24a0ff"}, "normal": {"top": 166, "height": "auto", "width": 100, "marginRight": "10px", "position": "absolute", "left": 310}}, "assetGlobals": {"Joystick.C": "value", "componentName": "componentName", "analogControllerValuesX": "values"}, "text": "None", "value": "none", "label": "C ◀▶", "key": "controller_c", "type": "Input", "inputType": "select"}, {"styles": {"hover": {"color": "#24a0ff"}, "selected": {"color": "#24a0ff"}, "normal": {"top": 230, "height": "auto", "width": 100, "marginRight": "10px", "position": "absolute", "left": 0}}, "assetGlobals": {"componentName": "componentName", "digitalControllerValues": "values", "Button.E_UP": "value"}, "text": "None", "value": "none", "label": "E ▲", "key": "controller_eup", "type": "Input", "inputType": "select"}, {"styles": {"hover": {"color": "#24a0ff"}, "selected": {"color": "#24a0ff"}, "normal": {"top": 272, "height": "auto", "width": 100, "marginRight": "10px", "position": "absolute", "left": 0}}, "assetGlobals": {"componentName": "componentName", "Button.E_DWN": "value", "digitalControllerValues": "values"}, "text": "None", "value": "none", "label": "E ▼", "key": "controller_edown", "type": "Input", "inputType": "select"}, {"styles": {"hover": {"color": "#24a0ff"}, "selected": {"color": "#24a0ff"}, "normal": {"top": 230, "height": "auto", "width": 100, "marginRight": "10px", "position": "absolute", "left": 310}}, "assetGlobals": {"componentName": "componentName", "Button.F_UP": "value", "digitalControllerValues": "values"}, "text": "None", "value": "none", "label": "F ▲", "key": "controller_fup", "type": "Input", "inputType": "select"}, {"styles": {"hover": {"color": "#24a0ff"}, "selected": {"color": "#24a0ff"}, "normal": {"top": 272, "height": "auto", "width": 100, "marginRight": "10px", "position": "absolute", "left": 310}}, "assetGlobals": {"componentName": "componentName", "digitalControllerValues": "values", "Button.F_DWN": "value"}, "text": "None", "value": "none", "label": "F ▼", "key": "controller_fdown", "type": "Input", "inputType": "select"}], "type": "Container", "name": "vex_controller"}], "uid": "1.vex.iq.controllerActions.components.modk.it", "htmlClass": "vex_iq_settingsController", "fakeValue": "fake", "stateVars": {"Joystick.B": false, "Joystick.C": false, "Joystick.A": false, "Button.E_UP": false, "Joystick.D": false, "Button.F_UP": false, "Button.L_UP": false, "controllerEvents": true, "Button.E_DWN": false, "Button.R_UP": false, "Button.R_DWN": false, "Button.L_DWN": false, "Button.F_DWN": false}, "type": "Container"}, "licensing_wizard.hardware.vex.modk.it": {"extensionOf": "wizard.modk.it", "uid": "licensing_wizard.hardware.vex.modk.it", "currentStep": {"onUnload": "this.licenseValidator.cancel();", "elements": [{"styles": {"normal": {"width": "600px", "height": "355px"}}, "onLoad": "$('#licensing_string_part_1').focus(); for(var part=1; part<5; part++){(function(part){$('#licensing_string_part_'+part).keypress(function(){ $.later(1,this,function(){if($(this).val().length>=5){$('#licensing_string_part_'+(part+1)).focus();}}); });})(part); }this.testInputs=function(){var part1 = $('#licensing_string_part_1').val(); var part2 = $('#licensing_string_part_2').val(); var part3 = $('#licensing_string_part_3').val(); var part4 = $('#licensing_string_part_4').val(); var part5 = $('#licensing_string_part_5').val(); /*console.log(part1,part2,part2,part3,part4,part5); */if(part1.length==5 && part2.length==5 && part3.length==5 && part4.length==5 && part5.length==5){ this.container.setNext({'uid':'licensing.steps.hardware.vex.modk.it', 'license':part1+part2+part3+part4+part5 });}else{this.container.removeNext();} };this.container.licenseValidator=$.later(1,this,this.testInputs,[],true);", "html": "
Please enter your license string below
", "type": "HTMLContainer"}], "type": "WizardImageStep", "nextText": "Activate", "title": "Licensing"}}, "1.vex.iq.setLCDRowColumn.blocks.modk.it": {"category": "setup", "uid": "1.vex.iq.setLCDRowColumn.blocks.modk.it", "color": "darkblue", "docs": {"category": "setup", "description": "Moves the text entry point to the specified row and column. There are five rows and 21 columns on the **Brain's LCD screen**.", "parameters": [{"options": ["1", "2", "3", "4", "5"], "type": "num", "description": "Type a row or drag in a variable. Rows range from 1 to 5.", "name": "row"}, {"type": "num", "description": "Type a column or drag in a variable. Columns range from column 1 to 21.", "name": "column"}], "hint": "The text entry point is like an invisible cursor in a word processor.", "type": "StatementBlock", "name": "set LCD to row column"}, "extensionOf": "1.statement.blocks.modk.it", "statementElements": [{"elements": [{"text": "set LCD to row", "type": "CodeElement", "value": "BRAIN.setRowColumn("}, {"assetGlobals": {"subBlocks": {"0": "subBlock"}}, "type": "BlockHolder", "elements": [{"assetGlobals": {"params": {"0": "value"}}, "value": "1", "color": "darkblue", "rangeMin": 1, "allowChars": "0-9", "rangeMax": 5, "type": "NumberArgument"}], "accepts": ["NumberBlock"]}, {"text": "column", "type": "CodeElement", "value": ","}, {"assetGlobals": {"subBlocks": {"1": "subBlock"}}, "type": "BlockHolder", "elements": [{"assetGlobals": {"params": {"1": "value"}}, "value": "1", "color": "darkblue", "rangeMin": 1, "allowChars": "0-9", "rangeMax": 21, "type": "NumberArgument"}], "accepts": ["NumberBlock"]}, {"type": "CodeElement", "value": ");"}], "type": "LineElement"}], "tokens": ["setLCDRow"], "sibling": null}, "1.led.sik.components.modk.it": {"layer": "wires", "elements": [{"src": "images/hardware/SIK/components/led.png", "type": "SimpleImage", "showState": "default"}, {"src": "images/hardware/SIK/components/led-hilite.png", "top": "-13px", "left": "-10px", "type": "SimpleImage", "showState": "highlight"}, {"text": "5mm LED", "top": "-12px", "left": "45px", "type": "HardwareLabel", "showState": "highlight"}, {"pinType": "PWR", "left": "15px", "type": "BreadboardPin", "top": "4px", "showState": "selected"}, {"pinType": "GND", "left": "15px", "type": "BreadboardPin", "top": "16px", "showState": "selected"}], "type": "MouseImage", "uid": "1.led.sik.components.modk.it"}, "1.vex.iq.build.modk.it": {"rules": {"all": {"requires": ["UserTask1.bin"]}, "vexIQ.ld.out": {"redirect": {"cmd": [{"alias": "TOOLSPATH"}, {"alias": "ARMCPP"}, {"text": " -P "}, {"alias": "BUILDDIR"}, {"text": "vexIQ.ld.in"}], "out": [{"alias": "BUILDDIR"}, {"text": "vexIQ.ld.out "}]}, "name": "generating linker script"}, "UserTask1.bin": {"requires": ["JumpTable.o", "c_init.o", "UserTask.o", "main.o", "vexIQ.ld.out"], "exec": [{"cmd": [{"alias": "TOOLSPATH"}, {"alias": "ARMGNU"}, {"text": "-ld -o "}, {"alias": "BUILDDIR"}, {"text": "UserTask1.elf -T "}, {"alias": "BUILDDIR"}, {"text": "vexIQ.ld.out "}, {"alias": "BUILDDIR"}, {"text": "jumpTable.o "}, {"alias": "BUILDDIR"}, {"text": "c_init.o "}, {"alias": "BUILDDIR"}, {"text": "UserTask.o "}, {"alias": "BUILDDIR"}, {"text": "main.o "}, {"alias": "LINC"}, {"text": " -lc -lgcc"}], "name": "building elf"}, {"cmd": [{"alias": "TOOLSPATH"}, {"alias": "ARMGNU"}, {"text": "-objcopy "}, {"alias": "BUILDDIR"}, {"text": "UserTask1.elf "}, {"alias": "BUILDDIR"}, {"text": "UserTask1.bin -O binary"}], "name": "building bin"}]}, "JumpTable.o": {"exec": [{"cmd": [{"alias": "TOOLSPATH"}, {"alias": "ARMGCC"}, {"alias": "COPS"}, {"alias": "CINC"}, {"alias": "BUILDDIR"}, {"text": "jumpTable.c -o "}, {"alias": "BUILDDIR"}, {"text": "jumpTable.o"}], "name": "building vex jump (vector) table"}]}, "main.o": {"exec": [{"cmd": [{"alias": "TOOLSPATH"}, {"alias": "ARMGPP"}, {"alias": "CPPOPS"}, {"alias": "CINC"}, {"alias": "BUILDDIR"}, {"text": "main.c -o "}, {"alias": "BUILDDIR"}, {"text": "main.o"}], "name": "building vex main"}]}, "UserTask.o": {"exec": [{"cmd": [{"alias": "TOOLSPATH"}, {"alias": "ARMGPP"}, {"alias": "CPPOPS"}, {"alias": "CINC"}, {"alias": "BUILDDIR"}, {"text": "UserTask.cpp -o "}, {"alias": "BUILDDIR"}, {"text": "UserTask.o"}], "name": "building vex user task"}]}, "c_init.o": {"exec": [{"cmd": [{"alias": "TOOLSPATH"}, {"alias": "ARMGCC"}, {"alias": "COPS"}, {"alias": "CINC"}, {"alias": "BUILDDIR"}, {"text": "c_init.c -o "}, {"alias": "BUILDDIR"}, {"text": "c_init.o"}], "name": "building vex custom c-startup"}]}}, "uid": "1.vex.iq.build.modk.it", "sourceDir": "VEX/IQ/", "aliases": {"ARMGPP": [{"text": "arm-none-eabi-g++"}], "LCPPOPS": [{"text": " -Os -nostartfiles -nostdlib -Wl,--gc-sections --entry=ResetISR -mthumb -mcpu=cortex-m4 -mfloat-abi=hard -mfpu=fpv4-sp-d16 -fsingle-precision-constant "}], "ARMCPP": [{"text": "arm-none-eabi-cpp"}], "CPPOPS": [{"text": " -c -g -Os -Wall -fno-rtti -fno-exceptions -ffunction-sections -fdata-sections -mthumb -mcpu=cortex-m4 -mfloat-abi=hard -mfpu=fpv4-sp-d16 -fsingle-precision-constant -DF_CPU=80000000L -MMD -DARDUINO=101 -DENERGIA=9 "}], "TOOLSPATH": [{"alias": "TOOLSDIR"}, {"text": "/lm4f/bin/"}], "CINC": [{"text": " -I ../lm4f -I ../lm4f/inc -I ../stellarpad "}], "COPS": [{"text": " -c -g -Os -Wall -ffunction-sections -fdata-sections -mthumb -mcpu=cortex-m4 -mfloat-abi=hard -mfpu=fpv4-sp-d16 -fsingle-precision-constant -DF_CPU=80000000L -MMD -DARDUINO=101 -DENERGIA=9 "}], "ARMGNU": [{"text": "arm-none-eabi"}], "ARMGCC": [{"text": "arm-none-eabi-gcc"}], "LINC": [{"text": " -L"}, {"alias": "TOOLSDIR"}, {"text": "/lm4f/arm-none-eabi/lib/thumb/armv7e-m/fpu/fpv4-sp-d16 -L"}, {"alias": "TOOLSDIR"}, {"text": "/lm4f/lib/gcc/arm-none-eabi/4.7.1 "}]}}, "1.lilypad.hardware.modk.it": {"description": "The standard Lilypad is a lightweight, sewable, washable, Arduino-compatible board.

It can run on 2-5 volts. Program and power using an FTDI cable, or sew an external power supply to the +/- pins.", "microcontrollerOptions": {"1.atmega168.avr.microcontrollers.modk.it": {"flash_size": 16384, "device_signature": 2003974, "programmer": {"type": "stk500", "speed": 19200}, "boot_sizes": [1024], "compiler": {"f_cpu": "8000000L", "maker": "Arduino", "framework": "wiring", "mcu": "atmega168", "type": "avrgcc", "model": "DuemilanoveUno"}}, "1.atmega328p.avr.microcontrollers.modk.it": {"flash_size": 32768, "device_signature": 2004239, "programmer": {"type": "stk500", "speed": 57600}, "boot_sizes": [2048], "compiler": {"f_cpu": "8000000L", "maker": "Arduino", "framework": "wiring", "mcu": "atmega328p", "type": "avrgcc", "model": "DuemilanoveUno"}}}, "uid": "1.lilypad.hardware.modk.it", "dropdown_text": "LilyPad", "extensionOf": "1.compatible.lilypad.hardware.modk.it", "images": {"small": "images/hardware/lilypad-140x90.png", "medium": "images/hardware/lilypad.png"}, "model": "Standard", "brand": "Lilypad", "name": "Lilypad"}, "1.vex.iq.motorDirection.blocks.modk.it": {"category": "input", "enumIcon": "images/vex/enum_icons/rotation-white.png", "extensionOf": "1.enum.blocks.modk.it", "groupElements": [{"assetGlobals": {"localScope": "ignore", "subBlocks": {"0": "subBlock"}}, "ignore": true, "elements": [{"assetGlobals": {"params": {"0": "value"}}, "color": "blue", "readonly": true, "elements": [{"feed": "1.vex.iq.motorDirection.blocks.modk.itComponentListChange", "values": [], "type": "DropdownMenu", "autoMinWidth": "true"}], "type": "NameArgument"}], "accepts": ["NoBlock"], "type": "BlockHolder"}, {"assetGlobals": {"localScope": "ignore"}, "ignore": true, "type": "CodeElement", "value": ".", "text": ""}, {"text": "direction", "type": "CodeElement", "value": "currentDirection("}, {"type": "CodeElement", "value": ")"}], "color": "purple", "docs": {"category": "input", "type": "EnumBlock", "description": "Gets the *direction* the __COMPONENT__ is turning.", "name": "direction", "hint": ""}, "enumValues": ["FWD", "REV", "NONE"], "tokens": ["motorDirection"], "stateVars": {"instance": false, "params": false, "subBlocks": false, "localScope": false}, "enumFeed": "@name@.inDirection.values", "uid": "1.vex.iq.motorDirection.blocks.modk.it", "enumType": "rotaryDirection"}, "1.mega.arduino.hardware.modk.it": {"description": "Got pins? The Arduino Mega offers 54 I/O pins (14 PWM), 16 analog pins, and 4 UARTS. Power and program through USB.

Other power options include using an AC-to-DC adapter (through the on-board power jack) or a battery.", "microcontrollerOptions": {"1.atmega1280.avr.microcontrollers.modk.it": {"flash_size": 131072, "device_signature": 2004739, "programmer": {"type": "stk500", "speed": 57600}, "boot_sizes": [16384, 8192, 4096, 2048, 1024], "compiler": {"f_cpu": "16000000L", "maker": "Arduino", "framework": "wiring", "mcu": "atmega1280", "type": "avrgcc", "model": "Mega12802560"}}, "1.atmega2560.avr.microcontrollers.modk.it": {"flash_size": 262144, "device_signature": 2004993, "programmer": {"type": "stk500v2", "speed": 115200}, "boot_sizes": [16384, 8192, 4096, 2048, 1024], "compiler": {"f_cpu": "16000000L", "maker": "Arduino", "framework": "wiring", "mcu": "atmega2560", "type": "avrgcc", "model": "Mega12802560"}}}, "uid": "1.mega.arduino.hardware.modk.it", "dropdown_text": "Arduino™ Mega", "extensionOf": "1.compatible.arduino.hardware.modk.it", "pinDef": "1.openshield_mega.pins.modk.it", "brand": "Arduino", "stateVars": {"programmingSpeed": true, "framework": true, "mcu": true, "maxProgramSize": true, "f_cpu": true}, "boardImage": {"src": "images/hardware/boards/Generic_Mega.png", "bounds": {"top": 0, "bottom": 274, "right": 542, "left": 0}}, "images": {"small": "images/hardware/boards/Generic_Mega_178x90.png", "medium": "images/hardware/boards/Generic_Mega_x200.png"}, "steps": {"uid": "1280vs2560.steps.hardware.modk.it"}, "model": "Mega", "pinOffsets": {"top": "5px", "left": "-8px"}, "name": "ARDUINO™ Mega"}, "1.vex.iq.setSliderPower.blocks.modk.it": {"category": "setup", "uid": "1.vex.iq.setSliderPower.blocks.modk.it", "color": "darkblue", "docs": {"parameters": [{"range": "0-100%", "options": ["0", "25", "50", "75", "100"], "type": "num", "description": "select a power from the list, type a number, or use a variable (power ranges from 0 to 100 percent)", "name": "power"}], "type": "StatementBlock", "description": "*Set max power* sets the maximum output power of the **Slider**. Power is set as a percent of maximum power.", "name": "set max power", "hint": "Setting max power to 25% will help a claw not crush an object."}, "extensionOf": "1.statement.blocks.modk.it", "statementElements": [{"elements": [{"text": "set max power to", "type": "CodeElement", "value": "setMaxPower("}, {"assetGlobals": {"subBlocks": {"0": "subBlock"}}, "type": "BlockHolder", "elements": [{"elements": [{"values": ["25", "50", "75", "100"], "type": "DropdownMenu", "autoMinWidth": "true"}], "assetGlobals": {"params": {"0": "value"}}, "maxChars": "32", "color": "darkblue", "readonly": false, "rangeMin": 0, "allowChars": "0-9.", "rangeMax": 100, "type": "NumberArgument"}], "accepts": ["NumberBlock"]}, {"elements": [{"values": ["%"], "type": "DropdownMenu", "autoMinWidth": "true"}], "assetGlobals": {"params": {"1": "value"}}, "value": "%", "readonly": true, "hideCodeView": true, "type": "NameArgument"}, {"text": "", "type": "CodeElement", "value": ");"}], "type": "LineElement"}], "tokens": ["setSliderPower"]}, "1.openshield.pins.modk.it": {"elements": [{"layer": "pins", "angle": 90, "name": "PIN2", "digitalOut": true, "assetGlobals": {"d2": {"name": "name", "mode": "mode"}}, "top": "-25px", "digitalIn": true, "number": "2", "mode": "INPUT", "type": "DigitalPin", "left": "325px"}, {"layer": "pins", "angle": 90, "name": "PIN3", "digitalOut": true, "assetGlobals": {"d3": {"name": "name", "mode": "mode"}}, "top": "-25px", "digitalIn": true, "number": "3", "mode": "INPUT", "type": "DigitalPin", "analogOut": true, "left": "312px"}, {"layer": "pins", "angle": 90, "name": "PIN4", "digitalOut": true, "assetGlobals": {"d4": {"name": "name", "mode": "mode"}}, "top": "-25px", "digitalIn": true, "number": "4", "mode": "INPUT", "type": "DigitalPin", "left": "299px"}, {"layer": "pins", "angle": 90, "name": "PIN5", "digitalOut": true, "assetGlobals": {"d5": {"name": "name", "mode": "mode"}}, "top": "-25px", "digitalIn": true, "number": "5", "mode": "INPUT", "type": "DigitalPin", "analogOut": true, "left": "286px"}, {"layer": "pins", "angle": 90, "name": "PIN6", "digitalOut": true, "assetGlobals": {"d6": {"name": "name", "mode": "mode"}}, "top": "-25px", "digitalIn": true, "number": "6", "mode": "INPUT", "type": "DigitalPin", "analogOut": true, "left": "273px"}, {"layer": "pins", "angle": 90, "name": "PIN7", "digitalOut": true, "assetGlobals": {"d7": {"name": "name", "mode": "mode"}}, "top": "-25px", "digitalIn": true, "number": "7", "mode": "INPUT", "type": "DigitalPin", "left": "260px"}, {"layer": "pins", "angle": 90, "name": "PIN8", "digitalOut": true, "assetGlobals": {"d8": {"name": "name", "mode": "mode"}}, "top": "-25px", "digitalIn": true, "number": "8", "mode": "INPUT", "type": "DigitalPin", "left": "242px"}, {"layer": "pins", "angle": 90, "name": "PIN9", "digitalOut": true, "assetGlobals": {"d9": {"name": "name", "mode": "mode"}}, "top": "-25px", "digitalIn": true, "number": "9", "mode": "INPUT", "type": "DigitalPin", "analogOut": true, "left": "229px"}, {"layer": "pins", "angle": 90, "name": "PIN10", "digitalOut": true, "assetGlobals": {"d10": {"name": "name", "mode": "mode"}}, "top": "-25px", "digitalIn": true, "number": "10", "mode": "INPUT", "type": "DigitalPin", "analogOut": true, "left": "216px"}, {"layer": "pins", "angle": 90, "name": "PIN11", "digitalOut": true, "assetGlobals": {"d11": {"name": "name", "mode": "mode"}}, "top": "-25px", "digitalIn": true, "number": "11", "mode": "INPUT", "type": "DigitalPin", "analogOut": true, "left": "203px"}, {"layer": "pins", "angle": 90, "name": "PIN12", "digitalOut": true, "assetGlobals": {"d12": {"name": "name", "mode": "mode"}}, "top": "-25px", "digitalIn": true, "number": "12", "mode": "INPUT", "type": "DigitalPin", "left": "190px"}, {"layer": "pins", "angle": 90, "name": "PIN13", "digitalOut": true, "assetGlobals": {"d13": {"name": "name", "mode": "mode"}}, "top": "-25px", "digitalIn": true, "number": "13", "mode": "OUTPUT", "type": "DigitalPin", "left": "177px"}, {"layer": "pins", "angle": 270, "name": "A0", "digitalOut": true, "assetGlobals": {"a0": {"name": "name", "mode": "mode"}}, "top": "268px", "digitalIn": true, "number": "14", "mode": "INPUT", "left": "287px", "type": "DigitalPin", "analogIn": true}, {"layer": "pins", "angle": 270, "name": "A1", "digitalOut": true, "assetGlobals": {"a1": {"name": "name", "mode": "mode"}}, "top": "268px", "digitalIn": true, "number": "15", "mode": "INPUT", "left": "300px", "type": "DigitalPin", "analogIn": true}, {"layer": "pins", "angle": 270, "name": "A2", "digitalOut": true, "assetGlobals": {"a2": {"name": "name", "mode": "mode"}}, "top": "268px", "digitalIn": true, "number": "16", "mode": "INPUT", "left": "313px", "type": "DigitalPin", "analogIn": true}, {"layer": "pins", "angle": 270, "name": "A3", "digitalOut": true, "assetGlobals": {"a3": {"name": "name", "mode": "mode"}}, "top": "268px", "digitalIn": true, "number": "17", "mode": "INPUT", "left": "326px", "type": "DigitalPin", "analogIn": true}, {"layer": "pins", "angle": 270, "name": "A4", "digitalOut": true, "assetGlobals": {"a4": {"name": "name", "mode": "mode"}}, "top": "268px", "digitalIn": true, "number": "18", "mode": "INPUT", "left": "339px", "type": "DigitalPin", "analogIn": true}, {"layer": "pins", "angle": 270, "name": "A5", "digitalOut": true, "assetGlobals": {"a5": {"name": "name", "mode": "mode"}}, "top": "268px", "digitalIn": true, "number": "19", "mode": "INPUT", "left": "352px", "type": "DigitalPin", "analogIn": true}], "uid": "1.openshield.pins.modk.it", "top": "0px", "bounds": {"top": -120, "bottom": 394, "right": 468, "left": 170}, "stateVars": {"d10": false, "d11": false, "d12": false, "d13": false, "top": false, "a1": false, "a0": false, "a3": false, "a2": false, "a5": false, "a4": false, "d8": false, "d9": false, "d6": false, "d7": false, "d4": false, "d5": false, "d2": false, "d3": false, "left": false}, "type": "AssetGroup", "left": "0px"}, "1.randomNumber.blocks.modk.it": {"category": "operators", "groupElements": [{"text": "randomNumber", "type": "CodeElement", "value": "randomNumber("}, {"assetGlobals": {"subBlocks": {"0": "subBlock"}}, "type": "BlockHolder", "elements": [{"assetGlobals": {"params": {"0": "value"}}, "color": "purple", "readonly": true, "type": "NumberArgument", "value": "0"}], "accepts": ["NumberBlock"]}, {"type": "CodeElement", "value": ","}, {"assetGlobals": {"subBlocks": {"0": "subBlock"}}, "type": "BlockHolder", "elements": [{"assetGlobals": {"params": {"1": "value"}}, "color": "purple", "readonly": true, "type": "NumberArgument", "value": "100"}], "accepts": ["NumberBlock"]}, {"type": "CodeElement", "value": ")"}], "uid": "1.randomNumber.blocks.modk.it", "color": "green", "docs": {"category": "operators", "description": "The randomNumber command returns a random number between a minimum and maximum value.", "parameters": [{"type": "num", "description": "the minimum value for the random number", "name": "min"}, {"type": "num", "description": "the maximum value for the random number", "name": "max"}], "hint": "", "type": "NumberBlock", "name": "random number"}, "extensionOf": "1.number.blocks.modk.it", "tokens": ["randomNumber"]}, "1.boolean.blocks.modk.it": {"stateVars": {"top": true, "params": false, "subBlocks": false, "left": true}, "elements": [{"assetGlobals": {"color": "color", "groupElements": "elements"}, "assetGlobalsExclude": {"elements": true}, "type": "GroupElement"}], "type": "BooleanBlock", "uid": "1.boolean.blocks.modk.it"}, "1.motor.library.modk.it": {"definitions": "#define FWD 0\n#define REV 1\n#define MOTOR_COMPONENT_PWM_PIN 0\n#define MOTOR_COMPONENT_DIR_PIN 1\n#define MOTOR_COMPONENT_SPEED 2\n\nvoid motorOn(int motorNum,int dir){\nmotorNum-=MOTOR_OFFSET;\ndigitalWrite(motorArray[MOTOR_COMPONENT_DIR_PIN][motorNum],dir);\nanalogWrite(motorArray[MOTOR_COMPONENT_PWM_PIN][motorNum],motorArray[MOTOR_COMPONENT_SPEED][motorNum]);\n}\n\nvoid motorOff(int motorNum){\nmotorNum-=MOTOR_OFFSET;\n\nanalogWrite(motorArray[MOTOR_COMPONENT_PWM_PIN][motorNum],0);\n\n}\nvoid motorSpeed(int motorNum,int speed){\nmotorNum-=MOTOR_OFFSET;\nif(speed<0){speed=0;}\nif(speed>100){speed=100;}\n\n\nmotorArray[MOTOR_COMPONENT_SPEED][motorNum]=map(speed,0,100,0,255);\nanalogWrite(motorArray[MOTOR_COMPONENT_PWM_PIN][motorNum],motorArray[MOTOR_COMPONENT_SPEED][motorNum]);\n\n}\n\nvoid motorSetup(int motorNum, int speedPin,int dirPin){\nmotorNum-=MOTOR_OFFSET;\n\nmotorArray[MOTOR_COMPONENT_PWM_PIN][motorNum] = speedPin;\nmotorArray[MOTOR_COMPONENT_DIR_PIN][motorNum] = dirPin;\npinMode(motorArray[MOTOR_COMPONENT_PWM_PIN][motorNum], OUTPUT);\npinMode(motorArray[MOTOR_COMPONENT_DIR_PIN][motorNum], OUTPUT);\nmotorSpeed(motorNum+MOTOR_OFFSET,255);\nmotorOff(motorNum+MOTOR_OFFSET);}\n\n", "componentArray": "motorArray[3]", "type": "ComponentLibrary", "uid": "1.motor.library.modk.it"}, "1.vex.iq.turnMotor.blocks.modk.it": {"category": "output", "uid": "1.vex.iq.turnMotor.blocks.modk.it", "color": "blue", "docs": {"category": "output", "description": "*Spins* the **Motor** a selected direction.", "parameters": [{"options": ["FWD", "REV"], "type": "rotation", "description": "Select from the list.", "name": "direction"}], "hint": "", "type": "StatementBlock", "name": "spin"}, "extensionOf": "1.statement.blocks.modk.it", "statementElements": [{"elements": [{"text": "spin  ", "type": "CodeElement", "value": "turn("}, {"assetGlobals": {"subBlocks": {"0": "subBlock"}}, "type": "BlockHolder", "elements": [{"enumIcon": "images/vex/enum_icons/rotation-black.png", "elements": [{"feed": "@name@.outDirection.values", "values": ["FWD", "REV"], "type": "DropdownMenu", "autoMinWidth": "true"}], "assetGlobals": {"params": {"0": "value"}}, "color": "darkblue", "readonly": true, "type": "EnumArgument"}], "accepts": ["EnumBlock.rotaryDirection"]}, {"type": "CodeElement", "value": ");"}], "type": "LineElement"}], "tokens": ["spinMotor"], "sibling": null}, "1.vex.iq.greyscale.blocks.modk.it": {"category": "input", "groupElements": [{"assetGlobals": {"localScope": "ignore", "subBlocks": {"0": "subBlock"}}, "ignore": true, "elements": [{"assetGlobals": {"params": {"0": "value"}}, "color": "blue", "readonly": true, "elements": [{"feed": "1.vex.iq.greyscale.blocks.modk.itComponentListChange", "values": [], "type": "DropdownMenu", "autoMinWidth": "true"}], "type": "NameArgument"}], "accepts": ["NoBlock"], "type": "BlockHolder"}, {"assetGlobals": {"localScope": "ignore"}, "ignore": true, "type": "CodeElement", "value": ".", "text": ""}, {"text": "greyscale", "type": "CodeElement", "value": "greyscale("}, {"elements": [{"values": ["%"], "type": "DropdownMenu", "autoMinWidth": "true"}], "assetGlobals": {"params": {"1": "value"}}, "value": "%", "readonly": true, "hideCodeView": true, "type": "NameArgument"}, {"type": "CodeElement", "value": ")"}], "uid": "1.vex.iq.greyscale.blocks.modk.it", "color": "purple", "docs": {"category": "input", "type": "NumberBlock", "description": "Gets the *greyscale* value of the __COMPONENT__ in percent.", "name": "greyscale", "hint": ""}, "extensionOf": "1.number.blocks.modk.it", "tokens": ["motorSpeed"], "stateVars": {"localScope": false, "params": false, "subBlocks": false}}, "1.vex.iq.gyro.components.modk.it": {"styles": {"normal": {"width": "170px", "height": "100px"}}, "maxComponents": 12, "_excluded_blocks": [{"uid": "1.break.blocks.modk.it"}, {"uid": "1.randomNumber.blocks.modk.it"}], "elements": [{"styles": {"hover": {"visibility": "visible"}, "selected": {"visibility": "visible"}, "normal": {"borderRadius": "15px", "top": -50, "visibility": "hidden", "height": 190, "width": 210, "backgroundColor": "", "position": "absolute", "border": "4px solid rgba(18, 52, 86, 0.4)", "display": "none", "left": -30}}, "htmlClass": "vex_component_wrapper", "elements": [{"styles": {"normal": {"right": "5px", "bottom": "5px", "height": "20px", "width": "20px", "position": "absolute", "left": "auto"}}, "elements": [], "name": "ComponentConfigButton", "type": "ConfigButton", "onClick": "function(){ this.container.container.showComponentSettings(this); }", "htmlClass": "hardware_settings_button"}], "type": "Container", "name": "Wrapper"}, {"styles": {"placed": {"top": "0px", "left": "0px"}, "normal": {"width": "auto", "top": "48px", "height": "42px", "left": "88px"}}, "htmlClass": "vex_component_label vex_component_gyro clearfix", "elements": [{"htmlClass": "vex_component_label_name", "text": "Gyro", "styles": {"placed": {"marginLeft": "10px"}, "normal": {"width": "auto", "color": "#2a323d", "marginBottom": "auto", "height": "auto", "fontWeight": "bold", "marginLeft": 42, "fontSize": "20px", "marginRight": "10px", "position": "relative", "marginTop": "10px", "textShadow": "0px 1px 0 #C4C4C4"}}, "type": "FrameworkText", "onLoad": "this.topLevelWidget.renameHelper=function(name){this.setText(name);};"}], "type": "Container"}, {"styles": {"normal": {"position": "absolute"}}, "htmlClass": "vex_component_drawer_image", "type": "Image", "src": "images/vex/components/gyro-150x.png"}, {"styles": {"selected": {"backgroundImage": "url(images/vex/components/gyro-selected.png)"}, "normal": {"height": 83, "width": 106, "background": "transparent url(images/vex/components/gyro.png) no-repeat", "position": "absolute", "backgroundPosition": "0 0", "left": 30}}, "onLoad": "Events.register(this.container.id+'.ComponentOver', function(){this.select();}, this); Events.register(this.container.id+'.ComponentOut', function(){this.deselect();}, this);", "elements": [{"y": 32, "x": -44, "angle": 0, "uid": "1.vex.iq.ui.wire.modk.it", "pin": "2"}], "name": "ComponentImage", "type": "Container", "htmlClass": "vex_component_pad_image"}, {"styles": {"normal": {"zIndex": 2, "maxWidth": 240, "bottom": -36, "float": "left", "height": "auto", "padding": "3px 2px 0px 0px", "width": "auto", "background": "rgba(18, 52, 86, 0.4);", "position": "absolute", "left": -26}}, "htmlClass": "vex_component_pins clearfix", "type": "HorizontalContainer"}, {"feed": "digitalOutPinsListChange", "styles": {"normal": {"width": "100px"}}, "layer": "pins", "angle": 0, "onMouseout": "Events.broadcast(this.container.id+'.ComponentOut', []);", "assetGlobals": {"wire": "name"}, "values": [], "mode": "OUTPUT_COMPONENT", "type": "VexPin", "onMouseover": "Events.broadcast(this.container.id+'.ComponentOver', []);"}], "blocks": [{"uid": "1.vex.iq.calibrateGyro.blocks.modk.it"}, {"uid": "1.vex.iq.resetGyroAngle.blocks.modk.it"}, {"uid": "1.vex.iq.angle.blocks.modk.it"}, {"uid": "1.vex.iq.rotation.blocks.modk.it"}], "uid": "1.vex.iq.gyro.components.modk.it", "icon": "images/vex/components/drawer_icons/gyro.png", "onLoad": "this.renameHelper=function(name){this.$markup.find('.vex_component_label_name').get(0).blockObject.setText(name);};", "onStartDrag": "if(Boolean(modkitNamespace.GenericComponent.managers[this.uid]) && modkitNamespace.GenericComponent.managers[this.uid].count >= this.maxComponents || this.maxComponents == 0){ if(!Boolean(this.container) || this.container.id != 'hardware_pad'){ this.$markup.removeClass('myAcceptableClass');}}", "docs": {"pins": [{"type": "I2C", "description": "", "name": "gyro"}], "type": "VexComponent", "description": "The gyroscopic sensor detects movement and orientation. ", "title": "Gyro"}, "library": "1.motor.library.modk.it", "otherBlocksCategory": "Gyro", "defaultName": "GYRO", "classBased": true, "stateVars": {"top": true, "wire": true, "name": true, "left": true}, "settingsPopover": {"type": "SettingsPopover", "settings": {"uid": "1.vex.iq.settings.components.modk.it"}}, "displayName": "Gyro", "componentArray": "int motorArray[3]", "configuration": [{"type": "text", "value": "VexGyro "}, {"type": "objectVar", "value": "name"}, {"type": "text", "value": " = VexGyro("}, {"type": "objectVar", "value": "wire"}, {"type": "text", "value": ");\n"}, {"type": "text", "value": "Scope("}, {"type": "objectVar", "value": "name"}, {"type": "text", "value": ",VexGyro);"}, {"type": "text", "value": "\n#endif //ifndef IQ_GET_JUMPTABLE_DEFINE_MODKIT_VEX\n\n#ifdef IQ_GET_JUMPTABLE_DEFINE_MODKIT_VEX\n#define IQ_"}, {"type": "objectVar", "value": "wire"}, {"type": "text", "value": "_DEVICE_ID_STR IQ_GYRO_SENSOR_STR//set device id\n#endif //IQ_GET_JUMPTABLE_DEFINE_MODKIT_VEX\n\n#ifndef IQ_GET_JUMPTABLE_DEFINE_MODKIT_VEX\n"}], "type": "VexComponent", "otherBlocks": [{"uid": "1.vex.iq.angle.blocks.modk.it"}, {"uid": "1.vex.iq.rotation.blocks.modk.it"}]}, "1.vex.iq.turnMotorBy.blocks.modk.it": {"category": "output", "uid": "1.vex.iq.turnMotorBy.blocks.modk.it", "color": "blue", "docs": {"category": "output", "description": "*Spins* the **Motor** a selected direction for a selected amount of *spin*. The *direction* is either FWD or REV. The amount of *spin* can be in degrees (deg) or revolutions (rev).", "parameters": [{"options": ["FWD", "REV"], "type": "rotation", "description": "Select from the list.", "name": "direction"}, {"type": "num", "description": "Select a from the list, type a number, or use a variable. Spin can be any negative or positive number.", "name": "spin"}], "hint": "A negative **spin** (-90 deg) will go in the opposite **direction** that is selected. **Spin** can have decimals (40.75 mm).", "type": "StatementBlock", "name": "spin"}, "extensionOf": "1.statement.blocks.modk.it", "statementElements": [{"elements": [{"text": "spin  ", "type": "CodeElement", "value": "turnRelative("}, {"assetGlobals": {"subBlocks": {"0": "subBlock"}}, "type": "BlockHolder", "elements": [{"enumIcon": "images/vex/enum_icons/rotation-black.png", "elements": [{"feed": "@name@.outDirection.values", "values": ["FWD", "REV"], "type": "DropdownMenu", "autoMinWidth": "true"}], "assetGlobals": {"params": {"0": "value"}}, "color": "darkblue", "readonly": true, "type": "EnumArgument"}], "accepts": ["EnumBlock.rotaryDirection"]}, {"text": "", "type": "CodeElement", "value": ","}, {"assetGlobals": {"subBlocks": {"1": "subBlock"}}, "type": "BlockHolder", "elements": [{"elements": [{"feed": "@id@.amounts", "values": ["45", "90", "180", "360", "720"], "type": "DropdownMenu", "autoMinWidth": "true"}], "assetGlobals": {"params": {"1": "value"}}, "maxChars": "32", "color": "blue", "maxDecimals": 3, "allowChars": "0-9.\\-", "type": "NumberArgument"}], "accepts": ["NumberBlock"]}, {"text": "", "type": "CodeElement", "value": ","}, {"assetGlobals": {"params": {"2": "value"}}, "readonly": true, "elements": [{"values": [{"trigger": "Events.broadcast(this.container.container.container.block.id+'.amounts',[[ '45','90','180','360','720' ]]);", "value": "deg"}, {"trigger": "Events.broadcast(this.container.container.container.block.id+'.amounts',[['0.125','0.25','0.5','1.0','2.0']]);", "value": "rev"}], "type": "DropdownMenu", "autoMinWidth": "true"}], "type": "NameArgument", "value": "deg"}, {"text": "", "type": "CodeElement", "value": ");"}], "type": "LineElement"}], "tokens": ["spinMotor"], "sibling": null}, "1.launchpad.pins.modk.it": {"stateVars": {"d10": false, "d11": false, "d12": false, "d13": false, "top": false, "a1": false, "a0": false, "a3": false, "a2": false, "a5": false, "a4": false, "d8": false, "d9": false, "d6": false, "d7": false, "d4": false, "d5": false, "d2": false, "d3": false, "left": false}, "elements": [{"layer": "pins", "angle": 90, "name": "PIN17", "digitalOut": true, "assetGlobals": {"d15": {"name": "name", "mode": "mode"}}, "top": "-25px", "digitalIn": true, "number": "15", "mode": "INPUT", "type": "DigitalPin", "left": "76px"}, {"layer": "pins", "angle": 90, "name": "PIN16", "digitalOut": true, "assetGlobals": {"d14": {"name": "name", "mode": "mode"}}, "top": "-25px", "digitalIn": true, "number": "14", "mode": "INPUT", "type": "DigitalPin", "analogOut": true, "left": "89px"}, {"layer": "pins", "angle": 90, "name": "PIN25", "digitalOut": true, "assetGlobals": {"d13": {"name": "name", "mode": "mode"}}, "top": "-25px", "digitalIn": true, "number": "13", "mode": "INPUT", "type": "DigitalPin", "left": "102px"}, {"layer": "pins", "angle": 90, "name": "PIN24", "digitalOut": true, "assetGlobals": {"d12": {"name": "name", "mode": "mode"}}, "top": "-25px", "digitalIn": true, "number": "12", "mode": "INPUT", "type": "DigitalPin", "left": "115px"}, {"layer": "pins", "angle": 90, "name": "PIN23", "digitalOut": true, "assetGlobals": {"d11": {"name": "name", "mode": "mode"}}, "top": "-25px", "digitalIn": true, "number": "11", "mode": "INPUT", "type": "DigitalPin", "left": "128px"}, {"layer": "pins", "angle": 270, "name": "PIN10", "digitalOut": true, "assetGlobals": {"d2": {"name": "name", "mode": "mode"}}, "top": "254px", "digitalIn": true, "number": "2", "mode": "INPUT", "left": "27px", "type": "DigitalPin", "analogIn": true}, {"layer": "pins", "angle": 270, "name": "PIN11", "digitalOut": true, "assetGlobals": {"d3": {"name": "name", "mode": "mode"}}, "top": "254px", "digitalIn": true, "number": "3", "mode": "INPUT", "left": "40px", "type": "DigitalPin", "analogIn": true}, {"layer": "pins", "angle": 270, "name": "PIN12", "digitalOut": true, "assetGlobals": {"d4": {"name": "name", "mode": "mode"}}, "top": "254px", "digitalIn": true, "number": "4", "mode": "INPUT", "left": "53px", "type": "DigitalPin", "analogOut": true, "analogIn": true}, {"layer": "pins", "angle": 270, "name": "PIN13", "digitalOut": true, "assetGlobals": {"d5": {"name": "name", "mode": "mode"}}, "top": "254px", "digitalIn": true, "number": "5", "mode": "INPUT", "left": "66px", "type": "DigitalPin", "analogIn": true}, {"layer": "pins", "angle": 270, "name": "PIN14", "digitalOut": true, "assetGlobals": {"d6": {"name": "name", "mode": "mode"}}, "top": "254px", "digitalIn": true, "number": "6", "mode": "INPUT", "left": "79px", "type": "DigitalPin", "analogIn": true}, {"layer": "pins", "angle": 270, "name": "PIN15", "digitalOut": true, "assetGlobals": {"d7": {"name": "name", "mode": "mode"}}, "top": "254px", "digitalIn": true, "number": "7", "mode": "INPUT", "left": "92px", "type": "DigitalPin", "analogIn": true}, {"layer": "pins", "angle": 270, "name": "PIN20", "digitalOut": true, "assetGlobals": {"d8": {"name": "name", "mode": "mode"}}, "top": "254px", "digitalIn": true, "number": "8", "mode": "INPUT", "type": "DigitalPin", "left": "105px"}, {"layer": "pins", "angle": 270, "name": "PIN21", "digitalOut": true, "assetGlobals": {"d9": {"name": "name", "mode": "mode"}}, "top": "254px", "digitalIn": true, "number": "9", "mode": "INPUT", "type": "DigitalPin", "analogOut": true, "left": "118px"}, {"layer": "pins", "angle": 270, "name": "PIN22", "digitalOut": true, "assetGlobals": {"d10": {"name": "name", "mode": "mode"}}, "top": "254px", "digitalIn": true, "number": "10", "mode": "INPUT", "type": "DigitalPin", "left": "131px"}], "type": "AssetGroup", "uid": "1.launchpad.pins.modk.it"}, "1.vex.iq.settingsColorSensor.components.modk.it": {"styles": {"normal": {"width": "300px", "height": "auto"}}, "elements": [{"text": "Component Settings", "uid": "1.vex.iq.settingsHeading.modk.it"}, {"uid": "buttonClose.modk.it", "onClick": "function(){ this.container.container.container.saveAndHide(); }"}, {"styles": {"normal": {"position": "relative", "marginTop": "3px", "marginBottom": "2px", "width": "100%", "height": "auto"}}, "type": "HorizontalRule"}, {"styles": {"normal": {"position": "relative", "marginRight": "10px", "width": "140px", "height": "auto"}}, "onLoad": "this.prevNameHack = this.topLevelWidget.getState().componentName;", "onKeypress": "this.value = this.value.toUpperCase();", "assetGlobals": {"componentName": "value", "inputs": {"0": "this"}}, "maxChars": 12, "value": "", "label": "Name", "readonly": false, "key": "componentName", "allowChars": "A-Za-z0-9 _", "validate": "this.value=this.value.replace(' ','_').replace(' ','_'); if(this.value==this.prevNameHack){this.hideError();}else{ if(this.value==''){this.showError('Please choose a valid name.'); }else{var used = Identifiers.used(this.value); if(!used){this.hideError();}else{this.showError('The name \"'+this.value+'\" cannot be used because it '+used+'.
Please choose another name.'); /*this.$input.focus();*/}}}", "type": "Input", "inputType": "text"}, {"styles": {"hover": {"color": "#24a0ff"}, "focus": {"color": "#24a0ff"}, "normal": {"position": "relative", "marginRight": "10px", "width": 140, "height": "auto"}}, "onLoad": "this.oldValue=this.value;this.oldText=this.text;", "assetGlobals": {"colorMode": "value"}, "text": "3 Color", "value": "VEX_API_IQ_THREE_COLOR_MODE", "label": "Mode", "values": [{"name": "3 Color", "value": "VEX_API_IQ_THREE_COLOR_MODE"}, {"name": "12 Color", "value": "VEX_API_IQ_TWELVE_COLOR_MODE"}, {"name": "Greyscale", "value": "VEX_API_IQ_GREYSCALE_MODE"}], "key": "colorMode", "onChange": "if(!Boolean(this.disableChangeEvent)){ $.later(1,this,function(){/*alert(this.oldValue+','+this.oldText);*/this.disableChangeEvent=true;this.newValue=this.value; this.newText=this.text; this.updateValue(this.oldValue,this.oldText); Events.broadcast('component.popoverShowContent', [this, { uid: 'ui.alertDialog.modk.it', modal: true, cancelable: true, position: 'center',saveButtonText: 'OK', alertType: 'warn',alertTitleText: 'Changing Color Mode...', alertCopyText: 'Any color blocks not available in this mode will be deleted!' }, function(){/* alert(this.newValue+','+this.newText);*/this.disableChangeEvent=true;this.updateValue(this.newValue,this.newText);this.oldValue=this.newValue;this.oldText=this.newText;this.disableChangeEvent=false; }, this, 'tooltip']);this.disableChangeEvent=false;});}", "type": "Input", "inputType": "select"}], "uid": "1.vex.iq.settingsColorSensor.components.modk.it", "_Comment": "MOTOR.globalScope.inDirection.values... COLOR_SENSOR.globalScope.1.vex.iq.color.blocks.modk.it.mode_colors -> COLOR_SENSOR.globalScope.colors.values", "stateVars": {"componentName": true, "colorMode": true}, "valueMap": {"colors": {"switch": {"colorMode": {"VEX_API_IQ_THREE_COLOR_MODE": ["RED", "GREEN", "BLUE"], "VEX_API_IQ_TWELVE_COLOR_MODE": ["WHITE", "RED", "RED_VIOLET", "VIOLET", "BLUE_VIOLET", "BLUE", "BLUE_GREEN", "GREEN", "YELLOW_GREEN", "YELLOW", "YELLOW_ORANGE", "ORANGE", "RED_ORANGE"]}}}}, "type": "Container"}, "1.or.blocks.modk.it": {"category": "operators", "groupElements": [{"type": "CodeElement", "value": "("}, {"assetGlobals": {"subBlocks": {"0": "subBlock"}}, "type": "BlockHolder", "elements": [{"assetGlobals": {"params": {"0": "value"}}, "color": "orange", "type": "BooleanArgument"}], "accepts": ["BooleanBlock"]}, {"text": "or", "type": "CodeElement", "value": ") or ("}, {"assetGlobals": {"subBlocks": {"1": "subBlock"}}, "type": "BlockHolder", "elements": [{"assetGlobals": {"params": {"1": "value"}}, "color": "orange", "type": "BooleanArgument"}], "accepts": ["BooleanBlock"]}, {"type": "CodeElement", "value": ")"}], "uid": "1.or.blocks.modk.it", "color": "green", "docs": {"parameters": [{"type": "bool", "description": "Drag in an operator >, <, =, not, and, or.", "name": "condition 1"}, {"type": "bool", "description": "Drag in an operator >, <, =, not, and, or.", "name": "condition 2"}], "description": "This block is true when either **condition** is true. Otherwise the block is false.", "name": "or", "hint": ""}, "extensionOf": "1.boolean.blocks.modk.it"}, "1.vex.iq.motorRevolutions.blocks.modk.it": {"category": "input", "groupElements": [{"assetGlobals": {"localScope": "ignore", "subBlocks": {"0": "subBlock"}}, "ignore": true, "elements": [{"assetGlobals": {"params": {"0": "value"}}, "color": "blue", "readonly": true, "elements": [{"feed": "1.vex.iq.motorRevolutions.blocks.modk.itComponentListChange", "values": [], "type": "DropdownMenu", "autoMinWidth": "true"}], "type": "NameArgument"}], "accepts": ["NoBlock"], "type": "BlockHolder"}, {"assetGlobals": {"localScope": "ignore"}, "ignore": true, "type": "CodeElement", "value": ".", "text": ""}, {"text": "revolutions", "type": "CodeElement", "value": "positionRevolutions("}, {"type": "CodeElement", "value": ")"}], "uid": "1.vex.iq.motorRevolutions.blocks.modk.it", "color": "purple", "docs": {"category": "input", "description": "The number of revolutions that the _Motor_ has made since starting or reseting the _Motor_ position.", "title": "revolutions", "hint": "", "type": "NumberBlock", "name": "revolutions"}, "extensionOf": "1.number.blocks.modk.it", "tokens": ["currentMotorEncoder"], "stateVars": {"localScope": false, "params": false, "subBlocks": false}}, "1.blockpad.ui.modk.it": {"styles": {"normal": {"overflowY": "auto", "overflowX": "auto", "backgroundRepeat": "repeat", "height": "100%", "zIndex": 1000, "width": "100%", "backgroundImage": "url(images/bg_dot_beveled.gif)", "backgroundColor": "#DCDEE0", "backgroundAttachment": "local"}}, "scrollable": true, "elements": [{"styles": {"normal": {"width": "100%", "height": "100%"}}, "onLoad": "Events.register('blocksRedrawHack',function(){ this.$markup.find('.BooleanBlock').each(function(){$(this).get(0).blockObject.resize();});this.$markup.find('.EnumBlock').each(function(){$(this).get(0).blockObject.resize();});this.$markup.find('.NumberBlock').each(function(){$(this).get(0).blockObject.resize();}); this.previousShow=false;},this);", "name": "BlockPad", "onShow": " if(!Boolean(this.previousShow)){this.$markup.find('.BooleanBlock').each(function(){$(this).get(0).blockObject.resize();});this.$markup.find('.EnumBlock').each(function(){$(this).get(0).blockObject.resize();});this.$markup.find('.NumberBlock').each(function(){$(this).get(0).blockObject.resize();});this.previousShow=true;}", "autoStretch": true, "assetGlobals": {"scope": "scope"}, "type": "BlockPad", "htmlClass": "blocks_pad ui_touch_scroll_hack"}], "name": "BlocksPad", "absolutePositionHack": true, "type": "Container", "uid": "1.blockpad.ui.modk.it"}, "1.vex.iq.sliderCurrent.blocks.modk.it": {"category": "input", "groupElements": [{"assetGlobals": {"localScope": "ignore", "subBlocks": {"0": "subBlock"}}, "ignore": true, "elements": [{"assetGlobals": {"params": {"0": "value"}}, "color": "blue", "readonly": true, "elements": [{"feed": "1.vex.iq.sliderCurrent.blocks.modk.itComponentListChange", "values": [], "type": "DropdownMenu", "autoMinWidth": "true"}], "type": "NameArgument"}], "accepts": ["NoBlock"], "type": "BlockHolder"}, {"assetGlobals": {"localScope": "ignore"}, "ignore": true, "type": "CodeElement", "value": ".", "text": ""}, {"text": "current in", "type": "CodeElement", "value": "current("}, {"elements": [{"values": ["amps"], "type": "DropdownMenu", "autoMinWidth": "true"}], "assetGlobals": {"params": {"1": "value"}}, "value": "amps", "readonly": true, "hideCodeView": true, "type": "NameArgument"}, {"type": "CodeElement", "value": ")"}], "uid": "1.vex.iq.sliderCurrent.blocks.modk.it", "color": "purple", "docs": {"category": "input", "type": "NumberBlock", "description": "Gets the *current* the **Slider** is drawing in amps.", "name": "current ", "hint": ""}, "extensionOf": "1.number.blocks.modk.it", "tokens": ["currentSliderEncoder"], "stateVars": {"localScope": false, "params": false, "subBlocks": false}}, "1.vex.iq.resetRotatorPosition.blocks.modk.it": {"category": "setup", "uid": "1.vex.iq.resetRotatorPosition.blocks.modk.it", "color": "darkblue", "docs": {"type": "StatementBlock", "description": "Resets the **Rotator's** rotation to zero. This does not turn the rotator. It just resets the rotation's value.", "name": "reset rotation", "hint": "Resetting the rotation of a rotator after the rotator is at a known position can simplify programming."}, "extensionOf": "1.statement.blocks.modk.it", "statementElements": [{"elements": [{"text": "reset rotation", "type": "CodeElement", "value": "resetPosition();"}], "type": "LineElement"}], "tokens": ["setRotatorPosition"]}, "1.vex.iq.controller.components.modk.it": {"styles": {"normal": {"width": "170px", "height": "100px"}}, "elements": [{"styles": {"normal": {"borderRadius": "15px", "top": "-30px", "height": "200px", "width": "210px", "backgroundColor": "", "position": "absolute", "border": "4px solid rgba(18, 52, 86, 0.4)", "display": "none", "left": "0px"}}, "htmlClass": "vex_component_wrapper", "elements": [], "type": "Container", "name": "Wrapper"}, {"styles": {"placed": {"top": "0px", "left": "0px"}, "normal": {"width": "auto", "top": "30px", "height": "42px", "left": "100px"}}, "htmlClass": "vex_component_label vex_component_controller clearfix", "elements": [{"styles": {"placed": {"marginLeft": "10px"}, "normal": {"width": "auto", "color": "#2a323d", "marginBottom": "auto", "height": "auto", "fontWeight": "bold", "marginLeft": "52px", "fontSize": "20px", "marginRight": "10px", "position": "relative", "marginTop": "10px", "textShadow": "0px 1px 0 #C4C4C4"}}, "text": "Controller", "type": "FrameworkText", "htmlClass": "vex_component_label_name"}], "type": "Container"}, {"styles": {"normal": {"position": "absolute"}}, "htmlClass": "vex_component_drawer_image", "type": "Image", "src": "images/vex/components/controller-150x.png"}, {"styles": {"normal": {"position": "absolute", "width": "198px", "height": "157px", "background": "transparent url(images/vex/components/controller.png) no-repeat", "backgroundPosition": "0px -160px"}}, "htmlClass": "vex_component_pad_image", "type": "Container", "name": "OriginalController"}], "blocks": [{"uid": "1.vex.iq.joystickPosition.blocks.modk.it"}, {"uid": "1.vex.iq.controllerButtonDown.blocks.modk.it"}], "uid": "1.vex.iq.controller.components.modk.it", "icon": "images/vex/components/drawer_icons/controller.png", "onStartDrag": "if(Boolean(modkitNamespace.GenericComponent.managers[this.uid]) && modkitNamespace.GenericComponent.managers[this.uid].count >= this.maxComponents || this.maxComponents == 0){ if(!Boolean(this.container) || this.container.id != 'hardware_pad'){ this.$markup.removeClass('myAcceptableClass');}}", "docs": {"type": "VexComponent", "description": "The controller component configures a regular DC controller. You can control the controller's speed and direction.", "title": "Controller"}, "excluded_blocks": [{"uid": "1.break.blocks.modk.it"}, {"uid": "1.randomNumber.blocks.modk.it"}], "library": "1.motor.library.modk.it", "otherBlocksCategory": "Controller", "defaultName": "CONTROLLER", "componentImage": {"src": "images/hardware/lilypad/lilypad_rgb_led.png", "top": "1px", "left": "1px"}, "maxComponents": 1, "stateVars": {"top": true, "wires": true, "name": true, "left": true}, "displayName": "Controller", "componentArray": "int motorArray[3]", "configuration": [{"type": "text", "value": "VexController "}, {"type": "objectVar", "value": "name"}, {"type": "text", "value": " = VexController();\n"}, {"type": "text", "value": "Scope("}, {"type": "objectVar", "value": "name"}, {"type": "text", "value": ",VexController);"}, {"type": "text", "value": "\n#endif //ifndef IQ_GET_JUMPTABLE_DEFINE_MODKIT_VEX\n\n#ifdef IQ_GET_JUMPTABLE_DEFINE_MODKIT_VEX\n#define IQ_PROGRAM_TYPE_STR IQ_RADIO_REQUIRED_STR//set to controller required\n#endif //IQ_GET_JUMPTABLE_DEFINE_MODKIT_VEX\n\n#ifndef IQ_GET_JUMPTABLE_DEFINE_MODKIT_VEX\n"}], "type": "VexComponent", "events": ["Joystick.A.CHANGED", "Joystick.B.CHANGED", "Joystick.C.CHANGED", "Joystick.D.CHANGED", "Button.E_UP.PRESSED", "Button.E_UP.RELEASED", "Button.E_DWN.PRESSED", "Button.E_DWN.RELEASED", "Button.F_UP.PRESSED", "Button.F_UP.RELEASED", "Button.F_DWN.PRESSED", "Button.F_DWN.RELEASED", "Button.L_UP.PRESSED", "Button.L_UP.RELEASED", "Button.L_DWN.PRESSED", "Button.L_DWN.RELEASED", "Button.R_UP.PRESSED", "Button.R_UP.RELEASED", "Button.R_DWN.PRESSED", "Button.R_DWN.RELEASED"], "classBased": true, "otherBlocks": [{"uid": "1.vex.iq.controllerButtonDown.blocks.modk.it"}, {"uid": "1.vex.iq.joystickPosition.blocks.modk.it"}]}, "1.vex.iq.fadeTouchLedOnOff.blocks.modk.it": {"category": "output", "uid": "1.vex.iq.fadeTouchLedOnOff.blocks.modk.it", "color": "blue", "docs": {"parameters": [{"type": "num", "description": "determines which pin you are setting", "name": "pin"}], "type": "StatementBlock", "description": "", "name": "fade on", "hint": ""}, "extensionOf": "1.statement.blocks.modk.it", "statementElements": [{"elements": [{"text": "fade  ", "type": "CodeElement", "value": "fade("}, {"assetGlobals": {"subBlocks": {"0": "subBlock"}}, "type": "BlockHolder", "elements": [{"assetGlobals": {"params": {"0": "value"}}, "color": "blue", "readonly": true, "elements": [{"values": ["ON", "OFF"], "type": "DropdownMenu", "autoMinWidth": "true"}], "type": "NumberArgument"}], "accepts": ["NumberBlock"]}, {"text": "", "type": "CodeElement", "value": ");"}], "type": "LineElement"}], "tokens": ["setMotorBraking"]}, "1.vex.iq.controllerButtonDown.blocks.modk.it": {"category": "input", "groupElements": [{"assetGlobals": {"localScope": "ignore", "subBlocks": {"0": "subBlock"}}, "ignore": true, "elements": [{"assetGlobals": {"params": {"0": "value"}}, "color": "blue", "readonly": true, "elements": [{"feed": "1.vex.iq.controllerButtonDown.blocks.modk.itComponentListChange", "values": [], "type": "DropdownMenu", "autoMinWidth": "true"}], "type": "NameArgument"}], "accepts": ["NoBlock"], "type": "BlockHolder"}, {"assetGlobals": {"localScope": "ignore"}, "ignore": true, "type": "CodeElement", "value": ".", "text": ""}, {"assetGlobals": {"subBlocks": {"1": "subBlock"}}, "type": "BlockHolder", "elements": [{"assetGlobals": {"params": {"1": "value"}}, "color": "purple", "readonly": true, "elements": [{"feed": "BUTTONComponentListChange", "values": ["Button.E_UP", "Button.E_DWN", "Button.F_UP", "Button.F_DWN", "Button.L_UP", "Button.L_DWN", "Button.R_UP", "Button.R_DWN"], "type": "DropdownMenu", "autoMinWidth": "true"}], "type": "NameArgument"}], "accepts": ["NoBlock"]}, {"text": " down", "type": "CodeElement", "value": ".down()"}], "uid": "1.vex.iq.controllerButtonDown.blocks.modk.it", "color": "purple", "docs": {"category": "input", "description": "This block is true if the selected button on the __COMPONENT__ is pressed. Otherwise this block is false.", "parameters": [{"type": "", "description": "Select from the list.", "name": "button"}], "hint": "", "type": "BooleanBlock", "name": "down"}, "extensionOf": "1.boolean.blocks.modk.it", "tokens": ["buttonPressed"], "stateVars": {"localScope": false, "params": false, "subBlocks": false}}, "1.delay.blocks.modk.it": {"category": "control", "uid": "1.delay.blocks.modk.it", "color": "orange", "docs": {"category": "control", "description": "The delay command pauses program execution.", "parameters": [{"type": "num", "description": "determines how long to delay execution (in milliseconds)", "name": "milliseconds"}], "hint": "", "type": "StatementBlock", "name": "delay"}, "extensionOf": "1.statement.blocks.modk.it", "statementElements": [{"elements": [{"text": "delay", "type": "CodeElement", "value": "delay("}, {"assetGlobals": {"subBlocks": {"0": "subBlock"}}, "type": "BlockHolder", "elements": [{"assetGlobals": {"params": {"0": "value"}}, "color": "orange", "editable": true, "value": "1000", "type": "NumberArgument"}], "accepts": ["NumberBlock"]}, {"type": "CodeElement", "value": ");"}], "type": "LineElement"}], "tokens": ["delay"], "sibling": null}, "1.vex.iq.buttonDown.blocks.modk.it": {"category": "input", "groupElements": [{"assetGlobals": {"localScope": "ignore", "subBlocks": {"0": "subBlock"}}, "ignore": true, "elements": [{"assetGlobals": {"params": {"0": "value"}}, "color": "blue", "readonly": true, "elements": [{"feed": "1.vex.iq.buttonDown.blocks.modk.itComponentListChange", "values": [], "type": "DropdownMenu", "autoMinWidth": "true"}], "type": "NameArgument"}], "accepts": ["NoBlock"], "type": "BlockHolder"}, {"assetGlobals": {"localScope": "ignore"}, "ignore": true, "type": "CodeElement", "value": ".", "text": ""}, {"text": "down", "type": "CodeElement", "value": "down("}, {"type": "CodeElement", "value": ")"}], "uid": "1.vex.iq.buttonDown.blocks.modk.it", "color": "purple", "docs": {"category": "input", "type": "BooleanBlock", "description": "This block is true if the __COMPONENT__ is pressed. Otherwise this block is false.", "name": "down", "hint": ""}, "extensionOf": "1.boolean.blocks.modk.it", "tokens": ["buttonDown"], "stateVars": {"localScope": false, "params": false, "subBlock": false}}, "1.vex.iq.setColorSensorThreshold.blocks.modk.it": {"category": "setup", "uid": "1.vex.iq.setColorSensorThreshold.blocks.modk.it", "color": "darkblue", "docs": {"parameters": [{"type": "num", "description": "determines which pin you are setting", "name": "pin"}, {"type": "num", "description": "determines whether the pin will be an OUTPUT or an INPUT", "name": "mode"}], "type": "StatementBlock", "description": "The setMotorSpeed command determines whether a pin is an output or an input", "name": "set threshold", "hint": ""}, "extensionOf": "1.statement.blocks.modk.it", "statementElements": [{"elements": [{"text": "set near threshold to", "type": "CodeElement", "value": "setThreshold("}, {"assetGlobals": {"subBlocks": {"0": "subBlock"}}, "type": "BlockHolder", "elements": [{"assetGlobals": {"params": {"0": "value"}}, "color": "darkblue", "type": "NumberArgument", "value": "50"}], "accepts": ["NumberBlock"]}, {"text": "%", "type": "CodeElement", "value": ");"}], "type": "LineElement"}], "tokens": ["setMotorSpeed"]}, "ui.alertDialog.modk.it": {"styles": {"normal": {"minWidth": 150, "layout": "wrap", "width": 400, "float": "left", "minHeight": 103, "height": "auto", "padding": "10px 20px 10px 150px", "text-shadow": "0 1px 0 rgba(255,255,255, 0.5)", "position": "relative"}}, "alertCopyText": "Test copy for alert.", "elements": [{"styles": {"warn": {"background-image": "url(images/alert_icons-warn.png)", "styleCondition": "this.container.alertType == 'warn'"}, "error": {"background-image": "url(images/alert_icons-error.png)", "styleCondition": "this.container.alertType == 'error'"}, "timeout": {"background-image": "url(images/alert_icons-timeout.png)", "styleCondition": "this.container.alertType == 'timeout'"}, "normal": {"background-image": "url(images/alert_icons-info.png)", "background-repeat": "no-repeat", "top": 13, "height": "100%", "width": 110, "position": "absolute", "background-position": "50% 50%", "left": 13}}, "type": "Container"}, {"assetGlobals": {"alertTitleText": "text"}, "styles": {"normal": {"fontFamily": "Helvetica, Arial, sans-serif", "height": "auto", "width": "100%", "fontSize": "18px", "position": "relative", "textAlign": "left"}}, "type": "FrameworkText"}, {"styles": {"normal": {"position": "relative", "marginTop": "3px", "marginBottom": "2px", "width": "100%", "height": "auto"}}, "type": "HorizontalRule"}, {"assetGlobals": {"alertCopyText": "text"}, "htmlClass": "alert_copy", "styles": {"normal": {"width": "100%", "height": "auto", "fontFamily": "Helvetica, Arial, sans-serif", "fontSize": "13px", "fontWight": "normal", "position": "relative", "textAlign": "left"}}, "type": "FrameworkText"}], "uid": "ui.alertDialog.modk.it", "type": "Container", "hidePoint": true, "alertType": "error", "stateVars": {"name": false, "testDropdown": false}, "position": "center", "alertTitleText": "Attention!", "htmlClass": "dialog_container"}, "1.vex.iq.gyroRevolutions.blocks.modk.it": {"category": "input", "groupElements": [{"assetGlobals": {"localScope": "ignore", "subBlocks": {"0": "subBlock"}}, "ignore": true, "elements": [{"assetGlobals": {"params": {"0": "value"}}, "color": "blue", "readonly": true, "elements": [{"feed": "1.vex.iq.gyroRevolutions.blocks.modk.itComponentListChange", "values": [], "type": "DropdownMenu", "autoMinWidth": "true"}], "type": "NameArgument"}], "accepts": ["NoBlock"], "type": "BlockHolder"}, {"assetGlobals": {"localScope": "ignore"}, "ignore": true, "type": "CodeElement", "value": ".", "text": ""}, {"text": "revolutions", "type": "CodeElement", "value": "revolutions("}, {"type": "CodeElement", "value": ")"}], "uid": "1.vex.iq.gyroRevolutions.blocks.modk.it", "color": "purple", "docs": {"category": "input", "type": "NumberBlock", "description": "Counts the number of revolutions that the _Gyro_ has made since starting or reseting the gyro position.", "name": "revolutions", "hint": ""}, "extensionOf": "1.number.blocks.modk.it", "tokens": ["currentMotorVelocity"], "stateVars": {"localScope": false, "params": false, "subBlocks": false}}, "1.vex.iq.LCDColumn.blocks.modk.it": {"category": "input", "groupElements": [{"text": "LCD column", "type": "CodeElement", "value": "BRAIN.getColumn("}, {"type": "CodeElement", "value": ")"}], "uid": "1.vex.iq.LCDColumn.blocks.modk.it", "color": "purple", "docs": {"category": "input", "description": "Get's the *column* of the text entry point on the Brain's LCD. There are 21 columns.", "title": "LCD column", "hint": "The *column* is 22 when it is at the end of a row.", "type": "NumberBlock", "name": "LCD column"}, "extensionOf": "1.number.blocks.modk.it", "tokens": ["getColumn"]}, "ui.errorPopover.modk.it": {"styles": {"normal": {"layout": "wrap", "float": "left", "minHeight": "40px", "height": "auto", "minWidth": 150, "width": "auto", "position": "relative"}}, "onLoad": "Events.register('component.popoverClose', function(){ console.debug('component.popoverClose received!'); this.container.container.hide(); },this );", "elements": [{"assetGlobals": {"title": "text"}, "styles": {"normal": {"fontWeight": "bold", "color": "#cc0000", "height": "auto", "fontFamily": "Helvetica, Arial, sans-serif", "width": "100%", "fontSize": "14px", "position": "relative", "textAlign": "left"}}, "type": "FrameworkText"}, {"uid": "buttonClose.modk.it", "onClick": "function(){ this.container.container.container.hide(); }"}, {"assetGlobals": {"copy": "text"}, "htmlClass": "alert_copy", "styles": {"normal": {"width": "100%", "height": "auto", "fontFamily": "Helvetica, Arial, sans-serif", "fontSize": "13px", "fontWight": "normal", "position": "relative", "textAlign": "left"}}, "type": "FrameworkText"}], "uid": "ui.errorPopover.modk.it", "title": "Error!", "type": "Container", "stateVars": {"name": false, "testDropdown": false}, "copy": "Test copy for error.", "htmlClass": "dialog_container"}, "1.nxt.hardware.modk.it": {"uid": "1.nxt.hardware.modk.it", "d8": {"top": "-25px", "left": "242px", "angle": 90, "name": "PIN8", "mode": "INPUT"}, "d9": {"top": "-25px", "left": "229px", "angle": 90, "name": "PIN9", "mode": "INPUT"}, "d6": {"top": "-25px", "left": "273px", "angle": 90, "name": "PIN6", "mode": "INPUT"}, "d7": {"top": "-25px", "left": "260px", "angle": 90, "name": "PIN7", "mode": "INPUT"}, "d4": {"top": "-25px", "left": "299px", "angle": 90, "name": "PIN4", "mode": "INPUT"}, "d5": {"top": "-25px", "left": "286px", "angle": 90, "name": "PIN5", "mode": "INPUT"}, "d2": {"top": "-25px", "left": "325px", "angle": 90, "name": "PIN2", "mode": "INPUT"}, "d3": {"top": "-25px", "left": "312px", "angle": 90, "name": "PIN3", "mode": "INPUT"}, "serialPortList": true, "d10": {"top": "-25px", "left": "216px", "angle": 90, "name": "PIN10", "mode": "INPUT"}, "d11": {"top": "-25px", "left": "203px", "angle": 90, "name": "PIN11", "mode": "INPUT"}, "d12": {"top": "-25px", "left": "190px", "angle": 90, "name": "PIN12", "mode": "INPUT"}, "d13": {"top": "-25px", "left": "177px", "angle": 90, "name": "PIN13", "mode": "OUTPUT"}, "dropdown_text": "Select Board", "hardwareComponents": [{"uid": "1.led.components.modk.it"}, {"uid": "1.button.components.modk.it"}, {"uid": "1.knob.components.modk.it"}, {"uid": "1.speaker.components.modk.it"}, {"uid": "1.servo.components.modk.it"}, {"isInstance": true, "wire": "PIN0", "uid": "1.serial.components.modk.it", "name": "SERIAL1"}], "blockCategories": [{"blocks": [{"uid": "1.analogRead.blocks.modk.it"}, {"uid": "1.digitalRead.blocks.modk.it"}], "name": "input"}, {"blocks": [{"uid": "1.pinMode.blocks.modk.it"}], "name": "config"}, {"blocks": [{"uid": "1.forever.blocks.modk.it"}, {"uid": "1.repeat.blocks.modk.it"}, {"uid": "1.if.blocks.modk.it"}, {"uid": "1.if_else.blocks.modk.it"}, {"uid": "1.while.blocks.modk.it"}, {"uid": "1.delay.blocks.modk.it"}], "name": "control"}, {"blocks": [{"uid": "1.plus.blocks.modk.it"}, {"uid": "1.minus.blocks.modk.it"}, {"uid": "1.multiply.blocks.modk.it"}, {"uid": "1.divide.blocks.modk.it"}, {"uid": "1.greater.blocks.modk.it"}, {"uid": "1.lesser.blocks.modk.it"}, {"uid": "1.equals.blocks.modk.it"}, {"uid": "1.not.blocks.modk.it"}, {"uid": "1.and.blocks.modk.it"}, {"uid": "1.or.blocks.modk.it"}], "name": "operators"}, {"blocks": [{"uid": "1.digitalWrite.blocks.modk.it"}, {"uid": "1.analogWrite.blocks.modk.it"}], "name": "output"}], "type": "GenericHardware", "thumbnail": "images/hardware/arduino_generic-tiny.png", "elements": [{"assetGlobals": {"boardImage": {"src": "src", "top": "top", "left": "left"}}, "src": "images/hardware/nxt/nxt.png", "layer": "base", "type": "SimpleImage"}], "a1": {"top": "268px", "left": "298px", "angle": 270, "name": "A1", "mode": "INPUT"}, "a0": {"top": "268px", "left": "285px", "angle": 270, "name": "A0", "mode": "INPUT"}, "a3": {"top": "268px", "left": "324px", "angle": 270, "name": "A3", "mode": "INPUT"}, "a2": {"top": "268px", "left": "311px", "angle": 270, "name": "A2", "mode": "INPUT"}, "a5": {"top": "268px", "left": "350px", "angle": 270, "name": "A5", "mode": "INPUT"}, "a4": {"top": "268px", "left": "337px", "angle": 270, "name": "A4", "mode": "INPUT"}, "variants": [{"name": "Arduino™ Uno", "uid": "1.uno.arduino.hardware.modk.it"}, {"name": "Arduino™ Duemilanove", "uid": "1.duemilanove.arduino.hardware.modk.it"}, {"name": "Arduino™ Diecimila", "uid": "1.diecimila.arduino.hardware.modk.it"}], "name": "LEGO™ Mindstorm NXT", "stateVars": {"d8": false, "d9": false, "d6": false, "d7": false, "d4": false, "d5": false, "d2": false, "d3": false, "d10": false, "d11": false, "d12": false, "d13": false, "subHardware": true, "top": true, "a1": false, "a0": false, "a3": false, "a2": false, "a5": false, "a4": false, "angle": true, "draggable": true, "hideHardwareComponents": true, "left": true}, "top": "120px", "left": "300px"}, "1.integerEquals.blocks.modk.it": {"category": "variables", "uid": "1.integerEquals.blocks.modk.it", "color": "darkorange", "docs": {"parameters": [], "description": "Checks to see if two numbers are *equal*.", "name": "equals", "hint": ""}, "extensionOf": "1.statement.blocks.modk.it", "statementElements": [{"elements": [{"assetGlobals": {"text": "text", "value": "value"}, "type": "CodeElement"}, {"text": " = ", "type": "CodeElement", "value": " = "}, {"assetGlobals": {"subBlocks": {"0": "subBlock"}}, "type": "BlockHolder", "elements": [{"assetGlobals": {"params": {"0": "value"}}, "color": "blue", "type": "NumberArgument", "value": "0"}], "accepts": ["NumberBlock"]}, {"type": "CodeElement", "value": ";"}], "type": "LineElement"}], "stateVars": {"text": false, "value": false}}, "1.blockdrawer.ui.modk.it": {"styles": {"normal": {"overflowY": "auto", "overflowX": "auto", "_comment": "above is a hack or cant interact when abs pos disables", "height": "100%", "zIndex": "1", "width": "100%", "border-right": "1px solid rgb(137, 147, 156)"}}, "scrollable": true, "_note": "We can start doing the onscroll stuff when we fix the button highlight to use conditional styles, right now too much is happening when the BlockTabChange is broadcast (it doesn't just select the tab, it also scrolls the drawer to the tab's position)", "uid": "1.blockdrawer.ui.modk.it", "onShow": " if(Boolean(this.data['blockTab'])){/* if(!Boolean(this.previousShow)){this.$markup.find('.block').each(function(){this.blockObject.resize();}); this.previousShow=true;}*/ var tab=this.data['blockTab']; if(tab=='SetupTab'){ this.setScrollY($('#'+this.id+' .setup_lbl').position().top);} if(tab=='OutputTab'){ this.setScrollY($('#'+this.id+' .output_lbl').position().top);} if(tab=='InputTab'){ this.setScrollY($('#'+this.id+' .input_lbl').position().top);} if(tab=='OperatorsTab'){ this.setScrollY($('#'+this.id+' .operators_lbl').position().top);} if(tab=='ControlTab'){ this.setScrollY($('#'+this.id+' .control_lbl').position().top);} if(tab=='MyBlocksTab'){ this.setScrollY($('#'+this.id+' .myblocks_lbl').position().top);} }", "onLoad": "Events.broadcast('AddComponentGroup',[this.$markup.find(\".myblocks_lst\"), \"Variables\", \"Variables\", true],true); Events.broadcast('AddVariableButton',[this.component],true); Events.broadcast(\"Variables.loadIntegers\", [$(\"#\"+this.id)]); Events.register('BlockTabChange', function(tab){ this.data['blockTab']=tab; if(tab=='SetupTab'){ this.scrollToY($('#'+this.id+' .setup_lbl').position().top);} if(tab=='OutputTab'){ this.scrollToY($('#'+this.id+' .output_lbl').position().top);} if(tab=='InputTab'){ this.scrollToY($('#'+this.id+' .input_lbl').position().top);} if(tab=='OperatorsTab'){ this.scrollToY($('#'+this.id+' .operators_lbl').position().top);} if(tab=='ControlTab'){ this.scrollToY($('#'+this.id+' .control_lbl').position().top);} if(tab=='MyBlocksTab'){ this.scrollToY($('#'+this.id+' .myblocks_lbl').position().top);} }, this);", "_onScroll": "console.log('scrolled'); Events.broadcast('BlockTabChange', ['MyBlocksTab']);", "component": "BRAIN", "absolutePositionHack": true, "absolutePositionHack___TEMPORARILY_DISABLED": true, "html": "
Setup
Output
Sensing
Operators
Control
My Blocks

", "onScrollY": "function(scrollTop){console.log('SCROLLED: '+scrollTop);}", "icon": "images/vex/components/drawer_icons/brain.png", "type": "HTMLContainer", "name": "BlocksDrawerHTMLContents"}, "1.multiply.blocks.modk.it": {"category": "operators", "groupElements": [{"type": "CodeElement", "value": "("}, {"assetGlobals": {"subBlocks": {"0": "subBlock"}}, "type": "BlockHolder", "elements": [{"assetGlobals": {"params": {"0": "value"}}, "maxChars": "32", "readonly": false, "maxDecimals": 3, "allowChars": "0-9.//-", "type": "NumberArgument"}], "accepts": ["NumberBlock"]}, {"text": "×", "type": "CodeElement", "value": ") * ("}, {"assetGlobals": {"subBlocks": {"1": "subBlock"}}, "type": "BlockHolder", "elements": [{"assetGlobals": {"params": {"1": "value"}}, "maxChars": "32", "readonly": false, "maxDecimals": 3, "allowChars": "0-9.//-", "type": "NumberArgument"}], "accepts": ["NumberBlock"]}, {"type": "CodeElement", "value": ")"}], "uid": "1.multiply.blocks.modk.it", "color": "green", "docs": {"parameters": [{"type": "num", "description": "Type a value or drag in a variable.", "name": "value 1"}, {"type": "num", "description": "Type a value or drag in a variable.", "name": "value 2"}], "description": "Calculates **value 1** times **value 2**.", "name": "multiply", "hint": ""}, "extensionOf": "1.number.blocks.modk.it"}, "0451.usb_vid.modk.it": {"pids_to_uid": {"F432": {"microcontroller": {"uid": "1.msp430g2553.msp430.microcontrollers.modk.it"}, "uid": "1.launchpad.ti.hardware.modk.it", "boot_size": 4096}}, "company": "TI", "uid": "0451.usb_vid.modk.it", "vid": "0451"}, "1.c.autoyield.blocks.modk.it": {"stateVars": {"top": true, "subBlocks": false, "sibling": false, "params": false, "children": false, "left": true}, "elements": [{"assetGlobals": {"color": "color", "statementElements": "elements"}, "assetGlobalsExclude": {"elements": true}, "type": "StatementElement"}, {"color": "orange", "elements": [{"assetGlobals": {"children": {"0": "subBlock"}}, "accepts": ["StatementBlock"], "elements": [{"type": "StatementHighlight"}], "type": "BlockHolder", "subBlock": null}], "type": "CompoundStatementElement"}, {"color": "orange", "elements": [{"elements": [{"type": "CodeElement", "value": "yield();}"}], "type": "LineElement"}], "type": "SubStatementElement"}, {"elements": [{"assetGlobals": {"color": "color", "sibling": "subBlock"}, "accepts": ["StatementBlock"], "elements": [{"type": "StatementHighlight"}], "type": "BlockHolder"}], "type": "SiblingElement"}], "type": "CompoundBlock", "uid": "1.c.autoyield.blocks.modk.it"}, "1.lcd.components.modk.it": {"classBased": true, "blocks": [{"uid": "1.print.blocks.modk.it"}, {"uid": "1.printLine.blocks.modk.it"}], "uid": "1.lcd.components.modk.it", "docs": {"type": "GenericComponent", "description": "The speaker component configures an LCD display. ", "title": "LCD"}, "library": "1.lcd.library.modk.it", "className": "ModkitLCD", "defaultName": "LCD", "componentImage": {"src": "images/hardware/lilypad/lilypad_rgb_led.png", "top": "1px", "left": "1px"}, "elements": [{"feed": "digitalOutPinsListChange", "layer": "pins", "angle": 0, "assetGlobals": {"wires": {"0": "name"}}, "top": "-3px", "label": "RS", "values": [], "mode": "OUTPUT_COMPONENT", "type": "NewDigitalPin", "left": "15px"}, {"feed": "digitalOutPinsListChange", "layer": "pins", "angle": 0, "assetGlobals": {"wires": {"1": "name"}}, "top": "-3px", "label": "EN", "values": [], "mode": "OUTPUT_COMPONENT", "type": "NewDigitalPin", "left": "15px"}, {"feed": "digitalOutPinsListChange", "layer": "pins", "angle": 180, "assetGlobals": {"wires": {"2": "name"}}, "top": "-3px", "label": "D4", "values": [], "mode": "OUTPUT_COMPONENT", "type": "NewDigitalPin", "left": "-12px"}, {"feed": "digitalOutPinsListChange", "layer": "pins", "angle": 180, "assetGlobals": {"wires": {"3": "name"}}, "top": "-3px", "label": "D5", "values": [], "mode": "OUTPUT_COMPONENT", "type": "NewDigitalPin", "left": "-12px"}, {"feed": "digitalOutPinsListChange", "layer": "pins", "angle": 180, "assetGlobals": {"wires": {"4": "name"}}, "top": "-3px", "label": "D6", "values": [], "mode": "OUTPUT_COMPONENT", "type": "NewDigitalPin", "left": "-12px"}, {"feed": "digitalOutPinsListChange", "layer": "pins", "angle": 180, "assetGlobals": {"wires": {"5": "name"}}, "top": "-3px", "label": "D7", "values": [], "mode": "OUTPUT_COMPONENT", "type": "NewDigitalPin", "left": "-12px"}, {"layer": "pins", "angle": 0, "name": "5V", "top": "-3px", "label": "BACKLIGHT", "mode": "VCC_COMPONENT", "type": "NewPowerPin", "left": "15px"}], "stateVars": {"top": true, "wires": true, "name": true, "left": true}, "configuration": [{"type": "objectVar", "value": "name"}, {"type": "text", "value": " = lcdSetup("}, {"type": "objectVar", "value": "name"}, {"type": "text", "value": ","}, {"index": 0, "type": "objectArray", "value": "wires"}, {"type": "text", "value": ","}, {"index": 1, "type": "objectArray", "value": "wires"}, {"type": "text", "value": ","}, {"index": 2, "type": "objectArray", "value": "wires"}, {"type": "text", "value": ","}, {"index": 3, "type": "objectArray", "value": "wires"}, {"type": "text", "value": ","}, {"index": 4, "type": "objectArray", "value": "wires"}, {"type": "text", "value": ","}, {"index": 5, "type": "objectArray", "value": "wires"}, {"type": "text", "value": ",16,2);"}], "type": "GenericComponent", "icon": "images/hardware/generic_components/lcd.png"}, "1.vex.iq.settingsHeading.modk.it": {"styles": {"normal": {"fontFamily": "Helvetica, Arial, sans-serif", "height": "auto", "width": "100%", "fontSize": "18px", "position": "relative", "textAlign": "left"}}, "text": "Component Settings", "type": "FrameworkText", "uid": "1.vex.iq.settingsHeading.modk.it"}, "lilypad_simple_v1_vs_v2.steps.hardware.modk.it": {"choices": [{"text": "
Locate xx on your board. If it has xxx click here before continuing.", "image": "images/hardware/lilypad_simple_v1_choice.png", "next": {"uid": "detect_serial_port.steps.hardware.modk.it"}, "onClick": "this.data.hardware.version='1';", "title": "Lilypad Simple v1
"}, {"text": "
Locate xx on your board. If it has xxx click here before continuing.", "image": "images/hardware/lilypad_simple_v2_choice.png", "next": {"uid": "detect_serial_port.steps.hardware.modk.it"}, "onClick": "this.data.hardware.version='2';", "title": "Lilypad Simple v2
"}], "type": "WizardBinaryStep", "uid": "lilypad_simple_v1_vs_v2.steps.hardware.modk.it", "title": "Pick Your Chip"}, "ui.tooltip.modk.it": {"styles": {"normal": {"padding": 0, "zIndex": 1000000, "layout": "wrap", "maxWidth": 500, "borderRadius": 6, "top": 100, "marginBottom": 5, "minHeight": 20, "visibility": "hidden", "height": "auto", "minWidth": 100, "width": "auto", "background": "#fff", "position": "absolute", "marginTop": 5, "border": "1px solid #aaa", "display": "none", "left": 700}}, "elements": [{"styles": {"normal": {"padding": 10, "layout": "wrap", "float": "left", "minHeight": 40, "height": "auto", "minWidth": 200, "width": "auto", "overflow": "hidden"}}, "type": "Container", "elements": [], "htmlClass": "popover_container"}, {"styles": {"normal": {"background-image": "url(images/popover_point-white.png)", "position": "absolute", "zIndex": 10000, "background-repeat": "no-repeat", "background-color": "transparent"}}, "type": "Container", "class": "popover_point", "name": "settings_point"}], "uid": "ui.tooltip.modk.it", "positions": ["top", "right", "bottom", "left"], "extensionOf": "ui.popover.modk.it", "noCloseButton": true, "id": "tooltip"}, "1.vex.iq.turnControllerActionsOnOff.blocks.modk.it": {"category": "setup", "uid": "1.vex.iq.turnControllerActionsOnOff.blocks.modk.it", "color": "darkblue", "docs": {"parameters": [{"type": "num", "description": "determines which pin you are setting", "name": "pin"}, {"type": "num", "description": "determines whether the pin will be an OUTPUT or an INPUT", "name": "mode"}], "type": "StatementBlock", "description": "Turns on the controller actions on or off to disable the _Controller_ for certain tasks.", "name": "turn controller actions on/off", "hint": ""}, "extensionOf": "1.statement.blocks.modk.it", "statementElements": [{"elements": [{"text": "set controller actions", "type": "CodeElement", "value": "BRAIN.enableControllerActions("}, {"assetGlobals": {"subBlocks": {"0": "subBlock"}}, "type": "BlockHolder", "elements": [{"assetGlobals": {"params": {"0": "value"}}, "color": "darkblue", "readonly": true, "elements": [{"values": ["ON", "OFF"], "type": "DropdownMenu", "autoMinWidth": "true"}], "type": "NumberArgument"}], "accepts": ["NumberBlock"]}, {"text": "", "type": "CodeElement", "value": ");"}], "type": "LineElement"}], "tokens": ["setMotorBraking"]}, "1.vex.iq.setDrivetrainHolding.blocks.modk.it": {"category": "setup", "uid": "1.vex.iq.setDrivetrainHolding.blocks.modk.it", "color": "darkblue", "docs": {"parameters": [{"range": "ON, OFF", "options": ["ON", "OFF"], "type": "name", "description": "select ON or OFF from the list", "name": "hold"}], "type": "StatementBlock", "description": "When *set holding to* is ON the drivetrain resists turning. When *set holding to* is OFF the drivetrain turns freely. *Holding* only applies when the drivetrain is stopped or when velocity is set to zero.", "name": "set holding", "hint": "**Holding** is useful when you raise a load and want it to stay in place, or for parking your robot on hills."}, "extensionOf": "1.statement.blocks.modk.it", "statementElements": [{"elements": [{"text": "set Holding to", "type": "CodeElement", "value": "setHolding("}, {"assetGlobals": {"subBlocks": {"0": "subBlock"}}, "type": "BlockHolder", "elements": [{"elements": [{"values": ["ON", "OFF"], "type": "DropdownMenu", "autoMinWidth": "true"}], "assetGlobals": {"params": {"0": "value"}}, "value": "ON", "color": "darkblue", "readonly": true, "type": "NumberArgument"}], "accepts": ["NumberBlock"]}, {"text": "", "type": "CodeElement", "value": ");"}], "type": "LineElement"}], "tokens": ["setDrivetrainBraking"]}, "1.led.components.modk.it": {"elements": [{"feed": "digitalOutPinsListChange", "layer": "pins", "angle": 0, "assetGlobals": {"wire": "name"}, "top": "-3px", "label": "1.5V", "values": [], "mode": "OUTPUT_COMPONENT", "type": "NewDigitalPin", "left": "15px"}, {"layer": "pins", "angle": 0, "name": "GND", "top": "-3px", "label": "GND", "mode": "GROUND_COMPONENT", "type": "NewPowerPin", "left": "15px"}, {"elements": [], "type": "ConfigButton", "onClick": "function(){console.log('clicked config button', this);}"}], "blocks": [{"uid": "1.setLED.blocks.modk.it"}], "uid": "1.led.components.modk.it", "docs": {"type": "GenericComponent", "description": "The LED component configures a common LED.", "title": "LED"}, "library": "1.led.library.modk.it", "defaultName": "LED", "componentImage": {"src": "images/hardware/led_orange.png", "top": "5px", "left": "5px"}, "stateVars": {"top": true, "wire": true, "bounds": true, "name": true, "left": true}, "componentArray": "int ledArray", "configuration": [{"type": "text", "value": "setupLED("}, {"type": "objectVar", "value": "name"}, {"type": "text", "value": ","}, {"type": "objectVar", "value": "wire"}, {"type": "text", "value": ");"}], "type": "GenericComponent", "icon": "images/hardware/generic_components/led.png"}, "1.vex.iq.rotateRotatorTo.blocks.modk.it": {"category": "output", "uid": "1.vex.iq.rotateRotatorTo.blocks.modk.it", "color": "blue", "docs": {"category": "output", "type": "StatementBlock", "description": "*Rotates* the **Rotator** to a position. The amount of rotation can be in degrees (deg) or revolutions (rev).", "parameters": [{"type": "num", "description": "select a **amount of rotation** from the list, type a number, or use a variable (any negative or positive number)", "name": "rotate"}], "name": "rotate to"}, "extensionOf": "1.statement.blocks.modk.it", "statementElements": [{"elements": [{"text": "rotate to", "type": "CodeElement", "value": "turnAbsolute("}, {"assetGlobals": {"subBlocks": {"1": "subBlock"}}, "type": "BlockHolder", "elements": [{"elements": [{"values": ["45", "90", "180", "360", "720"], "type": "DropdownMenu", "autoMinWidth": "true"}], "assetGlobals": {"params": {"1": "value"}}, "maxChars": "32", "color": "blue", "allowChars": "0-9.", "type": "NumberArgument"}], "accepts": ["NumberBlock"]}, {"text": "", "type": "CodeElement", "value": ","}, {"assetGlobals": {"params": {"2": "value"}}, "readonly": true, "elements": [{"values": ["deg", "rev"], "type": "DropdownMenu", "autoMinWidth": "true"}], "type": "NameArgument", "value": "deg"}, {"text": "", "type": "CodeElement", "value": ");"}], "type": "LineElement"}], "tokens": ["rotateRotatorTo"], "sibling": null}, "1.vex.iq.playSound.blocks.modk.it": {"category": "output", "uid": "1.vex.iq.playSound.blocks.modk.it", "color": "blue", "docs": {"category": "output", "description": "Plays a sound.", "parameters": [{"type": "name", "description": "select a **sound** from the list", "name": "sound"}], "hint": "", "type": "StatementBlock", "name": "play sound"}, "extensionOf": "1.statement.blocks.modk.it", "statementElements": [{"elements": [{"text": "play sound", "type": "CodeElement", "value": "BRAIN.playSound("}, {"assetGlobals": {"subBlocks": {"1": "subBlock"}}, "type": "BlockHolder", "elements": [{"elements": [{"feed": "@id@.amounts", "values": [{"code": "ALARM", "value": "Alarm"}, {"code": "ALARM_SHORT", "value": "Alarm (short)"}, {"code": "CHIME", "value": "Chime"}, {"code": "CHIRP", "value": "Chirp"}, {"code": "CLICK", "value": "Click"}, {"code": "COIN", "value": "Coin"}, {"code": "HONK", "value": "Honk"}, {"code": "HORN", "value": "Horn"}, {"code": "OFF", "value": "Off"}, {"code": "ON", "value": "On"}, {"code": "RATCHET", "value": "Ratchet"}, {"code": "RATCHET_SHORT", "value": "Ratchet (short)"}, {"code": "SIREN", "value": "Siren"}, {"code": "SIREN_SHORT", "value": "Siren (short)"}, {"code": "TADA", "value": "Tada"}, {"code": "WRENCH", "value": "Wrench"}], "type": "DropdownMenu", "autoMinWidth": "true"}], "assetGlobals": {"params": {"1": "value"}}, "maxChars": "32", "value": "Alarm", "color": "blue", "type": "NameArgument"}], "accepts": []}, {"text": "", "type": "CodeElement", "value": ");"}], "type": "LineElement"}], "tokens": ["spinMotorTo"], "sibling": null}, "1.vex.iq.joystickPosition.blocks.modk.it": {"category": "input", "groupElements": [{"assetGlobals": {"localScope": "ignore", "subBlocks": {"0": "subBlock"}}, "ignore": true, "elements": [{"assetGlobals": {"params": {"0": "value"}}, "color": "blue", "readonly": true, "elements": [{"feed": "1.vex.iq.controllerButtonDown.blocks.modk.itComponentListChange", "values": [], "type": "DropdownMenu", "autoMinWidth": "true"}], "type": "NameArgument"}], "accepts": ["NoBlock"], "type": "BlockHolder"}, {"assetGlobals": {"localScope": "ignore"}, "ignore": true, "type": "CodeElement", "value": ".", "text": ""}, {"assetGlobals": {"subBlocks": {"1": "subBlock"}}, "type": "BlockHolder", "elements": [{"assetGlobals": {"params": {"1": "value"}}, "color": "purple", "readonly": true, "elements": [{"values": ["Joystick.A", "Joystick.B", "Joystick.C", "Joystick.D"], "type": "DropdownMenu", "autoMinWidth": "true"}], "type": "NameArgument"}], "accepts": ["NoBlock"]}, {"text": "position", "type": "CodeElement", "value": ".position()"}], "uid": "1.vex.iq.joystickPosition.blocks.modk.it", "color": "purple", "docs": {"category": "input", "description": "Gets the *position* of the selected **Joystick Axis** on the **Controler**. The *position* is 0 when the joystick is centered, +100% when full forward, and -100% when full reverse.", "parameters": [{"type": "name", "description": "Select from the list.", "name": "Joystick Axis"}], "hint": "The **Joystick Axis** are labeled on the joystick as A, B, C and D. The Up and Right directions are positive. The Down and Left directions are negative.", "type": "NumberBlock", "name": "position"}, "extensionOf": "1.number.blocks.modk.it", "tokens": ["buttonPressed"], "stateVars": {"localScope": false, "params": false, "subBlocks": false}}, "1.comment.blocks.modk.it": {"category": "myblocks", "uid": "1.comment.blocks.modk.it", "color": "yellow", "docs": {"category": "myblocks", "description": "Write notes and comments to help remember what a section of code is there for.", "parameters": [{"type": "string", "description": "Type a note or todo list.", "name": "note"}], "hint": "Todo Lists are a helpful way to remember what you need to finish when you're working on a big project.", "type": "CommentBlock", "name": "note"}, "extensionOf": "1.statement.blocks.modk.it", "statementElements": [{"elements": [{"type": "CodeElement", "value": "/** "}, {"assetGlobals": {"subBlocks": {"1": "subBlock"}}, "type": "BlockHolder", "elements": [{"assetGlobals": {"params": {"0": "value"}}, "color": "yellow", "type": "CommentArgument", "value": "note:"}], "accepts": ["NoBlock"]}, {"type": "CodeElement", "value": " */"}], "type": "LineElement"}], "tokens": ["comment"], "sibling": null, "params": ["note:"], "type": "CommentBlock"}, "1.vex.iq.sliderSpeed.blocks.modk.it": {"category": "input", "groupElements": [{"assetGlobals": {"localScope": "ignore", "subBlocks": {"0": "subBlock"}}, "ignore": true, "elements": [{"assetGlobals": {"params": {"0": "value"}}, "color": "blue", "readonly": true, "elements": [{"feed": "1.vex.iq.sliderSpeed.blocks.modk.itComponentListChange", "values": [], "type": "DropdownMenu", "autoMinWidth": "true"}], "type": "NameArgument"}], "accepts": ["NoBlock"], "type": "BlockHolder"}, {"assetGlobals": {"localScope": "ignore"}, "ignore": true, "type": "CodeElement", "value": ".", "text": ""}, {"text": "speed in ", "type": "CodeElement", "value": "currentVelocity("}, {"elements": [{"values": ["%"], "type": "DropdownMenu", "autoMinWidth": "true"}], "assetGlobals": {"params": {"1": "value"}}, "value": "%", "readonly": true, "hideCodeView": true, "type": "NameArgument"}, {"type": "CodeElement", "value": ")"}], "uid": "1.vex.iq.sliderSpeed.blocks.modk.it", "color": "purple", "docs": {"category": "input", "type": "NumberBlock", "description": "Gets the *speed* of the **Slider** in (%).", "name": "speed", "hint": ""}, "extensionOf": "1.number.blocks.modk.it", "tokens": ["motorSpeed"], "stateVars": {"localScope": false, "params": false, "subBlocks": false}}, "1.photo_resistor.sik.components.modk.it": {"layer": "wires", "elements": [{"src": "images/hardware/SIK/components/photo_resistor.png", "type": "SimpleImage", "showState": "default"}, {"src": "images/hardware/SIK/components/photo_resistor-hilite.png", "top": "-14px", "left": "-10px", "type": "SimpleImage", "showState": "highlight"}, {"text": "Photo Resistor", "top": "0px", "left": "55px", "type": "HardwareLabel", "showState": "highlight"}], "type": "MouseImage", "uid": "1.photo_resistor.sik.components.modk.it"}, "1.vex.wizard.linknotfound.modk.it": {"extensionOf": "wizard.modk.it", "uid": "1.vex.wizard.linknotfound.modk.it", "currentStep": {"uid": "1.vex.wizard.linknotfound.steps.modk.it"}}, "1.vex.iq.readI2CWord.blocks.modk.it": {"category": "input", "groupElements": [{"text": "read i2c word", "type": "CodeElement", "value": "vexPtr->ReadI2CDeviceWord("}, {"assetGlobals": {"subBlocks": {"1": "subBlock"}}, "type": "BlockHolder", "elements": [{"assetGlobals": {"params": {"0": "value"}}, "color": "purple", "readonly": true, "elements": [{"feed": "digitalOutPinsListChange", "values": [], "type": "DropdownMenu", "autoMinWidth": "true"}], "type": "NumberArgument"}], "accepts": ["NumberBlock"]}, {"type": "CodeElement", "value": ","}, {"assetGlobals": {"subBlocks": {"1": "subBlock"}}, "type": "BlockHolder", "elements": [{"assetGlobals": {"params": {"1": "value"}}, "color": "blue", "readonly": true, "type": "NumberArgument", "value": "0x00"}], "accepts": ["NumberBlock"], "block": null}, {"type": "CodeElement", "value": ")"}], "uid": "1.vex.iq.readI2CWord.blocks.modk.it", "color": "purple", "docs": {"parameters": [{"type": "num", "description": "determines which knob you are reading", "name": "pin"}], "type": "NumberBlock", "description": "The readKnob command returns the value of a knob connected to an analog pin.", "name": "read I2C word", "hint": ""}, "extensionOf": "1.number.blocks.modk.it", "tokens": ["readKnob"]}, "1.vex.iq.drivetrainDriveSpeed.blocks.modk.it": {"category": "input", "groupElements": [{"assetGlobals": {"localScope": "ignore", "subBlocks": {"0": "subBlock"}}, "ignore": true, "elements": [{"assetGlobals": {"params": {"0": "value"}}, "color": "blue", "readonly": true, "elements": [{"feed": "1.vex.iq.drivetrainDriveSpeed.blocks.modk.itComponentListChange", "values": [], "type": "DropdownMenu", "autoMinWidth": "true"}], "type": "NameArgument"}], "accepts": ["NoBlock"], "type": "BlockHolder"}, {"assetGlobals": {"localScope": "ignore"}, "ignore": true, "type": "CodeElement", "value": ".", "text": ""}, {"text": "drive speed in ", "type": "CodeElement", "value": "driveSpeed("}, {"elements": [{"values": ["%"], "type": "DropdownMenu", "autoMinWidth": "true"}], "assetGlobals": {"params": {"1": "value"}}, "value": "%", "readonly": true, "hideCodeView": true, "type": "NameArgument"}, {"type": "CodeElement", "value": ")"}], "uid": "1.vex.iq.drivetrainDriveSpeed.blocks.modk.it", "color": "purple", "docs": {"category": "input", "type": "NumberBlock", "description": "Gets the drive *speed* of the **Drivetrain** driving in percent (%).", "name": "speed", "hint": ""}, "extensionOf": "1.number.blocks.modk.it", "tokens": ["motorSpeed"], "stateVars": {"localScope": false, "params": false, "subBlocks": false}}, "1.vex.iq.settings.components.modk.it": {"styles": {"normal": {"width": "300px", "height": "auto"}}, "stateVars": {"componentName": true}, "elements": [{"text": "Component Settings", "uid": "1.vex.iq.settingsHeading.modk.it"}, {"uid": "buttonClose.modk.it", "onClick": "function(){ this.container.container.container.saveAndHide(); }"}, {"styles": {"normal": {"position": "relative", "marginTop": "3px", "marginBottom": "2px", "width": "100%", "height": "auto"}}, "type": "HorizontalRule"}, {"styles": {"normal": {"position": "relative", "marginRight": "10px", "width": "140px", "height": "auto"}}, "onLoad": "this.prevNameHack = this.topLevelWidget.getState().componentName;", "onKeypress": "this.value = this.value.toUpperCase();", "assetGlobals": {"componentName": "value", "inputs": {"0": "this"}}, "maxChars": 12, "value": "", "label": "Name", "readonly": false, "key": "componentName", "allowChars": "A-Za-z0-9 _", "validate": "this.value=this.value.replace(' ','_').replace(' ','_'); if(this.value==this.prevNameHack){this.hideError();}else{ if(this.value==''){this.showError('Please choose a valid name.'); }else{var used = Identifiers.used(this.value); if(!used){this.hideError();}else{this.showError('The name \"'+this.value+'\" cannot be used because it '+used+'.
Please choose another name.'); /*this.$input.focus();*/}}}", "type": "Input", "inputType": "text"}], "type": "Container", "uid": "1.vex.iq.settings.components.modk.it"}, "1.playNote.blocks.modk.it": {"category": "output", "uid": "1.playNote.blocks.modk.it", "color": "blue", "docs": {"parameters": [{"type": "num", "description": "determines which speaker you are controlling", "name": "speaker"}, {"type": "num", "description": "determines which note you are playing", "name": "note"}, {"type": "num", "description": "determines how long you are playing the note", "name": "time"}], "type": "StatementBlock", "description": "The playNote command plays a note on a speaker.", "name": "playNote", "hint": ""}, "extensionOf": "1.statement.blocks.modk.it", "statementElements": [{"elements": [{"text": "playNote", "type": "CodeElement", "value": "playNote("}, {"elements": [{"feed": "SPEAKERComponentListChange", "values": [], "type": "DropdownMenu", "autoMinWidth": "true"}], "assetGlobals": {"params": {"0": "value"}}, "value": "SPEAKER1", "color": "blue", "readonly": true, "type": "NumberArgument"}, {"type": "CodeElement", "value": ","}, {"assetGlobals": {"subBlocks": {"0": "subBlock"}}, "type": "BlockHolder", "elements": [{"elements": [{"values": ["NOTE_C3", "NOTE_A3", "NOTE_B3", "NOTE_C4", "NOTE_E4", "NOTE_G4", "NOTE_A4", "NOTE_B4", "NOTE_C5", "NOTE_E5", "NOTE_G5", "NOTE_A5", "NOTE_B5", "NOTE_C6", "REST"], "type": "DropdownMenu", "autoMinWidth": "true"}], "assetGlobals": {"params": {"1": "value"}}, "value": "NOTE_C4", "color": "blue", "readonly": true, "type": "NumberArgument"}], "accepts": ["NumberBlock"]}, {"type": "CodeElement", "value": ","}, {"assetGlobals": {"subBlocks": {"1": "subBlock"}}, "type": "BlockHolder", "elements": [{"elements": [{"values": ["10", "50", "100"], "type": "DropdownMenu", "autoMinWidth": "true"}], "assetGlobals": {"params": {"2": "value"}}, "value": "50", "color": "blue", "readonly": true, "type": "NumberArgument"}], "accepts": ["NumberBlock"]}, {"type": "CodeElement", "value": ");"}], "type": "LineElement"}], "tokens": ["playNote"]}, "1.vex.iq.rotatorDirection.blocks.modk.it": {"category": "input", "enumIcon": "images/vex/enum_icons/rotation-white.png", "extensionOf": "1.enum.blocks.modk.it", "groupElements": [{"assetGlobals": {"localScope": "ignore", "subBlocks": {"0": "subBlock"}}, "ignore": true, "elements": [{"assetGlobals": {"params": {"0": "value"}}, "color": "blue", "readonly": true, "elements": [{"feed": "1.vex.iq.rotatorDirection.blocks.modk.itComponentListChange", "values": [], "type": "DropdownMenu", "autoMinWidth": "true"}], "type": "NameArgument"}], "accepts": ["NoBlock"], "type": "BlockHolder"}, {"assetGlobals": {"localScope": "ignore"}, "ignore": true, "type": "CodeElement", "value": ".", "text": ""}, {"text": "direction", "type": "CodeElement", "value": "currentDirection("}, {"type": "CodeElement", "value": ")"}], "color": "purple", "docs": {"category": "input", "type": "EnumBlock", "description": "Gets the *direction* the **Rotator** is turning.", "name": "direction", "hint": ""}, "enumValues": ["FWD", "REV", "NONE"], "tokens": ["rotatorDirection"], "stateVars": {"instance": false, "params": false, "subBlocks": false, "localScope": false}, "enumFeed": "@name@.inDirection.values", "uid": "1.vex.iq.rotatorDirection.blocks.modk.it"}, "1.vex.iq.goMotorBy.blocks.modk.it": {"category": "output", "uid": "1.vex.iq.goMotorBy.blocks.modk.it", "color": "blue", "docs": {"category": "output", "description": "", "parameters": [{"type": "num", "description": "determines which _Motor_ you are controlling", "name": "motor"}, {"type": "num", "description": "sets the direction the _Motor_ will move", "name": "direction"}], "hint": "", "type": "StatementBlock", "name": "drive by"}, "extensionOf": "1.statement.blocks.modk.it", "statementElements": [{"elements": [{"text": "go    ", "type": "CodeElement", "value": "goMotorBy("}, {"assetGlobals": {"subBlocks": {"0": "subBlock"}}, "type": "BlockHolder", "elements": [{"elements": [{"values": ["FWD", "REV"], "type": "DropdownMenu", "autoMinWidth": "true"}], "assetGlobals": {"params": {"0": "value"}}, "value": "", "color": "blue", "readonly": true, "type": "NumberArgument"}], "accepts": ["NumberBlock"]}, {"text": "by", "type": "CodeElement", "value": ","}, {"assetGlobals": {"subBlocks": {"1": "subBlock"}}, "type": "BlockHolder", "elements": [{"assetGlobals": {"params": {"1": "value"}}, "color": "blue", "elements": [{"values": ["0", "45", "90", "135", "180"], "type": "DropdownMenu", "autoMinWidth": "true"}], "type": "NumberArgument"}], "accepts": ["NumberBlock"]}, {"text": "deg", "type": "CodeElement", "value": ");"}], "type": "LineElement"}], "tokens": ["goMotorBy"], "sibling": null}, "1.vex.iq.setMotorTimeout.blocks.modk.it": {"category": "setup", "uid": "1.vex.iq.setMotorTimeout.blocks.modk.it", "color": "darkblue", "docs": {"parameters": [{"options": [".2", ".5", "1", "2", "5"], "type": "num", "description": "Select from the list, type a number, or use a variable. Measured in seconds", "name": "timeout"}], "type": "StatementBlock", "description": "Sets the timeout for the __COMPONENT__. Timeout is set as the number of seconds of motor inactivity.", "name": "set timeout", "hint": "Setting timeout to 1 second will help a program keep running if it hits a mechanical limit."}, "extensionOf": "1.statement.blocks.modk.it", "statementElements": [{"elements": [{"text": "set timeout to", "type": "CodeElement", "value": "setTimeout("}, {"assetGlobals": {"subBlocks": {"0": "subBlock"}}, "type": "BlockHolder", "elements": [{"elements": [{"values": [".2", ".5", "1", "2", "5"], "type": "DropdownMenu", "autoMinWidth": "true"}], "assetGlobals": {"params": {"0": "value"}}, "maxChars": "32", "value": "1", "color": "darkblue", "readonly": false, "rangeMin": 0.1, "allowChars": "0-9.", "rangeMax": 5, "type": "NumberArgument"}], "accepts": ["NumberBlock"]}, {"elements": [{"values": ["sec"], "type": "DropdownMenu", "autoMinWidth": "true"}], "assetGlobals": {"params": {"1": "value"}}, "value": "sec", "readonly": true, "hideCodeView": true, "type": "NameArgument"}, {"text": "", "type": "CodeElement", "value": ");"}], "type": "LineElement"}], "tokens": ["setMotorSpeed"]}, "1.greater.blocks.modk.it": {"category": "operators", "groupElements": [{"type": "CodeElement", "value": "("}, {"assetGlobals": {"subBlocks": {"0": "subBlock"}}, "type": "BlockHolder", "elements": [{"allowChars": "0-9.//-", "assetGlobals": {"params": {"0": "value"}}, "readonly": false, "type": "NumberArgument", "maxDecimals": 3}], "accepts": ["NumberBlock"]}, {"text": ">", "type": "CodeElement", "value": ") > ("}, {"assetGlobals": {"subBlocks": {"1": "subBlock"}}, "type": "BlockHolder", "elements": [{"allowChars": "0-9.//-", "assetGlobals": {"params": {"1": "value"}}, "readonly": false, "type": "NumberArgument", "maxDecimals": 3}], "accepts": ["NumberBlock"]}, {"type": "CodeElement", "value": ")"}], "uid": "1.greater.blocks.modk.it", "color": "green", "docs": {"parameters": [{"type": "num", "description": "Type a value or drag in a variable.", "name": "value 1"}, {"type": "num", "description": "Type a value or drag in a variable.", "name": "value 2"}], "description": "This block is true when **value 1** is larger than **value 2**. Otherwise the block is false.", "name": "greater than", "hint": ""}, "extensionOf": "1.boolean.blocks.modk.it"}, "1.08.vex.iq.build.modk.it": {"rules": {"all": {"requires": ["UserTask1.bin"]}, "vexIQ.ld.out": {"redirect": {"cmd": [{"alias": "TOOLSPATH"}, {"alias": "ARMCPP"}, {"text": " -P "}, {"alias": "BUILDDIR"}, {"text": "vexIQ.ld.in"}], "out": [{"alias": "BUILDDIR"}, {"text": "vexIQ.ld.out "}]}, "name": "generating linker script"}, "UserTask1.bin": {"requires": ["JumpTable.o", "c_init.o", "UserTask.o", "main.o", "vexIQ.ld.out"], "exec": [{"cmd": [{"alias": "TOOLSPATH"}, {"alias": "ARMGNU"}, {"text": "-ld -o "}, {"alias": "BUILDDIR"}, {"text": "UserTask1.elf -T "}, {"alias": "BUILDDIR"}, {"text": "vexIQ.ld.out "}, {"alias": "BUILDDIR"}, {"text": "jumpTable.o "}, {"alias": "BUILDDIR"}, {"text": "c_init.o "}, {"alias": "BUILDDIR"}, {"text": "UserTask.o "}, {"alias": "BUILDDIR"}, {"text": "main.o "}, {"alias": "LINC"}, {"text": " -lc -lgcc"}], "name": "building elf"}, {"cmd": [{"alias": "TOOLSPATH"}, {"alias": "ARMGNU"}, {"text": "-objcopy "}, {"alias": "BUILDDIR"}, {"text": "UserTask1.elf "}, {"alias": "BUILDDIR"}, {"text": "UserTask1.bin -O binary"}], "name": "building bin"}]}, "JumpTable.o": {"exec": [{"cmd": [{"alias": "TOOLSPATH"}, {"alias": "ARMGCC"}, {"alias": "COPS"}, {"alias": "CINC"}, {"alias": "BUILDDIR"}, {"text": "jumpTable.c -o "}, {"alias": "BUILDDIR"}, {"text": "jumpTable.o"}], "name": "building vex jump (vector) table"}]}, "main.o": {"exec": [{"cmd": [{"alias": "TOOLSPATH"}, {"alias": "ARMGPP"}, {"alias": "CPPOPS"}, {"alias": "CINC"}, {"alias": "BUILDDIR"}, {"text": "main.c -o "}, {"alias": "BUILDDIR"}, {"text": "main.o"}], "name": "building vex main"}]}, "UserTask.o": {"exec": [{"cmd": [{"alias": "TOOLSPATH"}, {"alias": "ARMGPP"}, {"alias": "CPPOPS"}, {"alias": "CINC"}, {"alias": "BUILDDIR"}, {"text": "UserTask.cpp -o "}, {"alias": "BUILDDIR"}, {"text": "UserTask.o"}], "name": "building vex user task"}]}, "c_init.o": {"exec": [{"cmd": [{"alias": "TOOLSPATH"}, {"alias": "ARMGCC"}, {"alias": "COPS"}, {"alias": "CINC"}, {"alias": "BUILDDIR"}, {"text": "c_init.c -o "}, {"alias": "BUILDDIR"}, {"text": "c_init.o"}], "name": "building vex custom c-startup"}]}}, "uid": "1.08.vex.iq.build.modk.it", "sourceDir": "VEX/IQv1.08/", "aliases": {"ARMGPP": [{"text": "arm-none-eabi-g++"}], "LCPPOPS": [{"text": " -Os -nostartfiles -nostdlib -Wl,--gc-sections --entry=ResetISR -mthumb -mcpu=cortex-m4 -mfloat-abi=hard -mfpu=fpv4-sp-d16 -fsingle-precision-constant "}], "ARMCPP": [{"text": "arm-none-eabi-cpp"}], "CPPOPS": [{"text": " -c -g -Os -Wall -fno-rtti -fno-exceptions -ffunction-sections -fdata-sections -mthumb -mcpu=cortex-m4 -mfloat-abi=hard -mfpu=fpv4-sp-d16 -fsingle-precision-constant -DF_CPU=80000000L -MMD -DARDUINO=101 -DENERGIA=9 "}], "TOOLSPATH": [{"alias": "TOOLSDIR"}, {"text": "/lm4f/bin/"}], "CINC": [{"text": " -I ../lm4f -I ../lm4f/inc -I ../stellarpad "}], "COPS": [{"text": " -c -g -Os -Wall -ffunction-sections -fdata-sections -mthumb -mcpu=cortex-m4 -mfloat-abi=hard -mfpu=fpv4-sp-d16 -fsingle-precision-constant -DF_CPU=80000000L -MMD -DARDUINO=101 -DENERGIA=9 "}], "ARMGNU": [{"text": "arm-none-eabi"}], "ARMGCC": [{"text": "arm-none-eabi-gcc"}], "LINC": [{"text": " -L"}, {"alias": "TOOLSDIR"}, {"text": "/lm4f/arm-none-eabi/lib/thumb/armv7e-m/fpu/fpv4-sp-d16 -L"}, {"alias": "TOOLSDIR"}, {"text": "/lm4f/lib/gcc/arm-none-eabi/4.7.1 "}]}}, "trial.steps.hardware.vex.modk.it": {"textStyle": "top:114px; left:240px; width:490px; font-size:18px;", "elements": [{"styles": {"normal": {"width": "600px", "height": "355px"}}, "onLoad": "LicensingManager.testTrial(this.container.code,function(){Events.broadcast('WizardUnloaded', [], true); /*StateManager.loadState({ 'type': 'EditorState','uid': 'default.arduino.examples.modk.it', 'name': 'Untitled Project', 'hardware': [{'uid': '1.vex.iq.hardware.vex.modk.it', 'port': null, 'mcu': null, 'microcontroller': { 'uuid': null } }] });*/ this.container.wizard.unload(); },function(message){this.$markup.find(\"#activate_wizard_step_text\").html(message);this.$markup.find(\"#activate_wizard_step_icon\").attr('src','images/alert_icons-warn.png'); },this); ", "html": "
Connecting to Modkit.com Server for Authenitcation... Please Wait...
", "type": "HTMLContainer"}], "uid": "trial.steps.hardware.vex.modk.it", "onLoad": "$.later(200,this,function(){this.container.container.container.container.hideNext();});", "title": "Authentication", "type": "WizardImageStep"}, "1.msp430g2553.msp430.microcontrollers.modk.it": {"device_signature": 2004359, "uid": "1.msp430g2553.msp430.microcontrollers.modk.it", "name": "msp430g2553", "boot_sizes": [4096], "flash_size": 32768, "programmer": {}, "compiler": {"mcu": "msp430g2553", "type": "msp430"}}, "1.vex.iq.slideSliderTo.blocks.modk.it": {"category": "output", "uid": "1.vex.iq.slideSliderTo.blocks.modk.it", "color": "blue", "docs": {"category": "output", "type": "StatementBlock", "description": "*Slides* the **Slider** to a position", "parameters": [{"type": "num", "description": "select a **amount of slide** from the list, type a number, or use a variable (any negative or positive number)", "name": "slide"}], "name": "slide to"}, "extensionOf": "1.statement.blocks.modk.it", "statementElements": [{"elements": [{"text": "slide to", "type": "CodeElement", "value": "slideAbsolute("}, {"assetGlobals": {"subBlocks": {"1": "subBlock"}}, "type": "BlockHolder", "elements": [{"elements": [{"values": ["45", "90", "180", "360", "720"], "type": "DropdownMenu", "autoMinWidth": "true"}], "assetGlobals": {"params": {"1": "value"}}, "maxChars": "32", "color": "blue", "allowChars": "0-9.", "type": "NumberArgument"}], "accepts": ["NumberBlock"]}, {"text": "", "type": "CodeElement", "value": ","}, {"assetGlobals": {"params": {"2": "value"}}, "readonly": true, "elements": [{"values": ["mm", "in"], "type": "DropdownMenu", "autoMinWidth": "true"}], "type": "NameArgument", "value": "mm"}, {"text": "", "type": "CodeElement", "value": ");"}], "type": "LineElement"}], "tokens": ["slideSliderTo"], "sibling": null}, "1.vex.iq.setSliderHolding.blocks.modk.it": {"category": "setup", "uid": "1.vex.iq.setSliderHolding.blocks.modk.it", "color": "darkblue", "docs": {"parameters": [{"range": "ON, OFF", "options": ["ON", "OFF"], "type": "name", "description": "select ON or OFF from the list", "name": "hold"}], "type": "StatementBlock", "description": "When *set holding to* is ON the __COMPONENT__ resists turning. When *set holding to* is OFF the __COMPONENT__ moves freely. *Holding* only applies when the __COMPONENT__ is stopped or when velocity is set to zero.", "name": "set holding", "hint": "**Holding** is useful when you raise a load and want it to stay in place."}, "extensionOf": "1.statement.blocks.modk.it", "statementElements": [{"elements": [{"text": "set Holding to", "type": "CodeElement", "value": "setHolding("}, {"assetGlobals": {"subBlocks": {"0": "subBlock"}}, "type": "BlockHolder", "elements": [{"elements": [{"values": ["ON", "OFF"], "type": "DropdownMenu", "autoMinWidth": "true"}], "assetGlobals": {"params": {"0": "value"}}, "value": "ON", "color": "darkblue", "readonly": true, "type": "NumberArgument"}], "accepts": ["NumberBlock"]}, {"text": "", "type": "CodeElement", "value": ");"}], "type": "LineElement"}], "tokens": ["setSliderBraking"]}, "1.vex.wizard.runlink2.modk.it": {"elements": [{"styles": {"normal": {"top": 0, "height": 385, "padding": 20, "width": 600, "backgroundColor": "#DCDEE0", "position": "absolute", "left": 0}}, "elements": [{"styles": {"normal": {"marginBottom": 20, "height": "auto", "width": 490, "marginLeft": 30, "marginRight": 0, "position": "relative", "marginTop": 0}}, "onLoad": "if(navigator.userAgent.toLowerCase().indexOf('windows')>-1){this.setText('#Unable to connect to Modkit Link\\n\\nModkit Link is required to program your robot. Please run the Modkit Link exe from C:/Program Files/Modkit now or click one of the links below to get help.');}", "markdown": true, "name": "Heading", "text": "\n\n##Once Modkit link has started, the app will appear in the upper right side of the menu bar. \n\nModkit Link in OS X Menu Bar \n\nThis wizard should show a list of connected hardware automatically, if not click **Retry** below. \n\nIf it wasn't found, click the link below to reinstall or install Modkit Link for the first time.", "type": "FrameworkText"}, {"styles": {"show": {"styleCondition": "CommunicationManager.badVersion == true", "display": "block", "visibility": "visible"}, "normal": {"_visibility": "hidden", "color": "#ffffff", "height": 56, "width": 420, "_display": "none", "position": "relative", "left": 60}}, "html": "
Modkit Link isn’t installed, help me install itDownload and installation instructions.
", "type": "HTMLContainer", "onClick": "function(){ this.container.container.setNext({'uid':'1.vex.wizard.downloadlink.modk.it'}); console.debug(this.container.container.container.container.container); this.container.container.container.container.container.container.nextStep(); }"}, {"styles": {"show": {"styleCondition": "CommunicationManager.badVersion == true", "display": "block", "visibility": "visible"}, "normal": {"_visibility": "hidden", "color": "#ffffff", "height": 56, "width": 420, "_display": "none", "position": "relative", "left": 60}}, "html": "
Modkit Link is running, help me troubleshootInstructions for repairing Modkit Link or getting more help.
", "type": "HTMLContainer", "onClick": "function(){ this.container.container.setNext({'uid':'1.vex.wizard.troubleshootlink.modk.it'}); console.debug(this.container.container.container.container.container); this.container.container.container.container.container.container.nextStep(); }"}, {"styles": {"show": {"styleCondition": "CommunicationManager.badVersion == true", "display": "block", "visibility": "visible"}, "normal": {"_visibility": "hidden", "color": "#ffffff", "height": 56, "width": 420, "_display": "none", "position": "relative", "left": 60}}, "html": "
Continue without Modkit LinkUse the editor, but downloading to the robot brain will be disabled.
", "type": "HTMLContainer", "onClick": "function(){ this.container.container.setNext({}); console.debug(this.container.container.container.container.container); this.container.container.container.container.container.container.nextStep(); }"}], "type": "Container", "name": "FindAndRunModkitLink"}], "uid": "1.vex.wizard.runlink2.modk.it", "title": "Find Modkit Link", "next": {"uid": "board_detection.steps.hardware.vex.modk.it"}, "type": "WizardStep", "nextText": "Retry"}, "1.lol.hardware.modk.it": {"elements": [{"src": "images/hardware/lol_shield.png", "layer": "base", "type": "SimpleImage"}, {"spacingY": 22, "top": "42px", "down": 9, "spacingX": 25, "repeatElement": {"elements": [{"src": "images/hardware/led_red_3mm.png", "type": "SimpleImage", "showState": "default"}, {"src": "images/hardware/led_red_3mm_off.png", "top": "0px", "left": "0px", "type": "SimpleImage", "showState": "selected"}], "type": "ToggleImage"}, "type": "Multiplexer", "across": 14, "left": "9px"}], "uid": "1.lol.hardware.modk.it", "pinsUsed": ["PIN2", "PIN3", "PIN4", "PIN5", "PIN6", "PIN7", "PIN8", "PIN9", "PIN10", "PIN11", "PIN12", "PIN13", "A4", "A5"], "stateVars": {"draggable": true, "top": true, "left": true}, "hardwareComponents": [{"isInstance": true, "wire": "PIN13", "uid": "1.led.components.modk.it", "name": "LED1"}, {"isInstance": true, "wire": "PIN12", "uid": "1.button.components.modk.it", "name": "BUTTON1"}], "blockCategories": [{"blocks": [{"uid": "1.motorSpeed.blocks.modk.it"}, {"uid": "1.motorOn.blocks.modk.it"}, {"uid": "1.motorOff.blocks.modk.it"}], "name": "output"}], "type": "GenericHardware", "thumbnail": "images/hardware/lol_tiny.png", "name": "LOL Shield"}, "1.vex.iq.readI2CRegister.blocks.modk.it": {"category": "input", "groupElements": [{"text": "read i2c register", "type": "CodeElement", "value": "vexPtr->ReadI2CDeviceRegister("}, {"assetGlobals": {"subBlocks": {"1": "subBlock"}}, "type": "BlockHolder", "elements": [{"assetGlobals": {"params": {"0": "value"}}, "color": "purple", "readonly": true, "elements": [{"feed": "digitalOutPinsListChange", "values": [], "type": "DropdownMenu", "autoMinWidth": "true"}], "type": "NumberArgument"}], "accepts": ["NumberBlock"]}, {"type": "CodeElement", "value": ","}, {"assetGlobals": {"subBlocks": {"1": "subBlock"}}, "type": "BlockHolder", "elements": [{"assetGlobals": {"params": {"1": "value"}}, "color": "blue", "readonly": true, "type": "NumberArgument", "value": "0x00"}], "accepts": ["NumberBlock"], "block": null}, {"type": "CodeElement", "value": ")"}], "uid": "1.vex.iq.readI2CRegister.blocks.modk.it", "color": "purple", "docs": {"parameters": [{"type": "num", "description": "determines which knob you are reading", "name": "pin"}], "type": "NumberBlock", "description": "The readKnob command returns the value of a knob connected to an analog pin.", "name": "read I2C register", "hint": ""}, "extensionOf": "1.number.blocks.modk.it", "tokens": ["readKnob"]}, "1.ui.blockInfo.modk.it": {"styles": {"normal": {"width": "300px", "height": "auto"}}, "_stateVars": {"labelCCW": false, "labelCW": false, "blockName": false}, "elements": [{"assetGlobals": {"blockName": "text"}, "text": "BlockName", "uid": "1.vex.iq.settingsHeading.modk.it"}, {"styles": {"normal": {"position": "relative", "marginTop": "3px", "marginBottom": "2px", "width": "100%", "height": "auto"}}, "type": "HorizontalRule"}, {"assetGlobals": {"blockDesc": "text"}, "htmlClass": "block_description", "styles": {"normal": {"width": "100%", "height": "auto", "fontFamily": "Helvetica, Arial, sans-serif", "fontSize": "13px", "fontWight": "normal", "position": "relative", "textAlign": "left"}}, "markdown": true, "type": "FrameworkText"}, {"assetGlobals": {"paramElements": "elements"}, "htmlClass": "paramsBlock", "styles": {"normal": {"width": "100%", "height": "auto", "position": "relative"}}, "elements": [], "type": "Container"}, {"assetGlobals": {"blockHint": "elements"}, "htmlClass": "hintBlock", "styles": {"normal": {"width": "100%", "height": "auto", "position": "relative"}}, "elements": [], "type": "Container"}], "type": "Container", "uid": "1.ui.blockInfo.modk.it"}, "1.vex.iq.resetMotorPosition.blocks.modk.it": {"category": "setup", "uid": "1.vex.iq.resetMotorPosition.blocks.modk.it", "color": "darkblue", "docs": {"type": "StatementBlock", "description": "Resets the **Motor's** rotation to zero. This does not turn the motor. It just resets the rotation's value.", "name": "reset rotation", "hint": "Resetting the rotation of a motor after the motor is at a known position can simplify programming."}, "extensionOf": "1.statement.blocks.modk.it", "statementElements": [{"elements": [{"text": "reset rotation", "type": "CodeElement", "value": "resetPosition();"}], "type": "LineElement"}], "tokens": ["setMotorSpeed"]}, "1.vex.iq.setClock.blocks.modk.it": {"category": "setup", "uid": "1.vex.iq.setClock.blocks.modk.it", "color": "darkblue", "docs": {"category": "setup", "description": "The startClock resets a timer variable to 0.", "parameters": [{"type": "num", "description": "either a serial port or sceen to print to", "name": "target"}, {"type": "num", "description": "data to be printed", "name": "data"}], "hint": "", "type": "StatementBlock", "name": "reset clock"}, "extensionOf": "1.statement.blocks.modk.it", "statementElements": [{"elements": [{"text": "set clock to ", "type": "CodeElement", "value": "setClock("}, {"assetGlobals": {"subBlocks": {"0": "subBlock"}}, "type": "BlockHolder", "elements": [{"assetGlobals": {"params": {"0": "value"}}, "color": "darkblue", "type": "NumberArgument", "value": "0"}], "accepts": ["NumberBlock"]}, {"text": "  sec", "type": "CodeElement", "value": ");"}], "type": "LineElement"}], "tokens": ["setClock"], "sibling": null, "params": ["0"]}, "1.vex.iq.LCDRow.blocks.modk.it": {"category": "input", "groupElements": [{"text": "LCD row", "type": "CodeElement", "value": "BRAIN.getRow("}, {"type": "CodeElement", "value": ")"}], "uid": "1.vex.iq.LCDRow.blocks.modk.it", "color": "purple", "docs": {"category": "input", "description": "Get's the *row* of the text entry point on the Brain's LCD. There are 5 rows. ", "title": "LCD row", "hint": "The row will never be more than 5.", "type": "NumberBlock", "name": "LCD row"}, "extensionOf": "1.number.blocks.modk.it", "tokens": ["getRow"]}, "1.pinMode.blocks.modk.it": {"category": "setup", "uid": "1.pinMode.blocks.modk.it", "color": "darkblue", "docs": {"parameters": [{"type": "num", "description": "determines which pin you are setting", "name": "pin"}, {"type": "num", "description": "determines whether the pin will be an OUTPUT or an INPUT", "name": "mode"}], "type": "StatementBlock", "description": "The pinMode command determines whether a pin is an output or an input", "name": "pinMode", "hint": ""}, "extensionOf": "1.statement.blocks.modk.it", "statementElements": [{"elements": [{"text": "pinMode", "type": "CodeElement", "value": "pinMode("}, {"assetGlobals": {"subBlocks": {"0": "subBlock"}}, "type": "BlockHolder", "elements": [{"assetGlobals": {"params": {"0": "value"}}, "color": "darkblue", "readonly": true, "elements": [{"feed": "digitalInPinsListChange", "values": [], "type": "DropdownMenu", "autoMinWidth": "true"}], "type": "NumberArgument"}], "accepts": ["NumberBlock"]}, {"type": "CodeElement", "value": ","}, {"assetGlobals": {"subBlocks": {"1": "subBlock"}}, "type": "BlockHolder", "elements": [{"elements": [{"values": ["INPUT", "OUTPUT"], "type": "DropdownMenu", "autoMinWidth": "true"}], "assetGlobals": {"params": {"1": "value"}}, "value": "INPUT", "color": "darkblue", "readonly": true, "type": "NumberArgument"}], "accepts": ["NumberBlock"]}, {"type": "CodeElement", "value": ");"}], "type": "LineElement"}], "tokens": ["pinMode"]}, "1.list.micros.modk.it": {"micros": [{"uid": "1.atmega2560.micros.modk.it"}, {"uid": "1.atmega328.micros.modk.it"}], "type": "MicrocontrollerList", "uid": "1.list.micros.modk.it"}, "1.digital.pins.modk.it": {"type": "DigitalPin", "uid": "1.digital.pins.modk.it"}, "1.vex.iq.setI2CWord.blocks.modk.it": {"category": "output", "uid": "1.vex.iq.setI2CWord.blocks.modk.it", "color": "blue", "docs": {"category": "output", "description": "The digitalWrite command sets the value of a digital pin.", "parameters": [{"type": "num", "description": "determines which pin you are setting", "name": "pin"}, {"type": "num", "description": "determines whether the pin will be HIGH or LOW", "name": "state"}], "hint": "", "type": "StatementBlock", "name": "set I2C word"}, "extensionOf": "1.statement.blocks.modk.it", "statementElements": [{"elements": [{"text": "send i2c word", "type": "CodeElement", "value": "vexPtr->WriteI2CDeviceWord("}, {"assetGlobals": {"subBlocks": {"0": "subBlock"}}, "type": "BlockHolder", "elements": [{"assetGlobals": {"params": {"0": "value"}}, "color": "blue", "elements": [{"feed": "digitalOutPinsListChange", "readonly": false, "values": [], "autoMinWidth": "true", "type": "DropdownMenu", "block": null}], "type": "NumberArgument", "block": null}], "accepts": ["NumberBlock"], "block": null}, {"type": "CodeElement", "value": ","}, {"assetGlobals": {"subBlocks": {"1": "subBlock"}}, "type": "BlockHolder", "elements": [{"assetGlobals": {"params": {"1": "value"}}, "color": "blue", "readonly": true, "type": "NumberArgument", "value": "0x00"}], "accepts": ["NumberBlock"], "block": null}, {"type": "CodeElement", "value": ","}, {"assetGlobals": {"subBlocks": {"2": "subBlock"}}, "type": "BlockHolder", "elements": [{"assetGlobals": {"params": {"2": "value"}}, "color": "blue", "readonly": true, "type": "NumberArgument", "value": "0"}], "accepts": ["NumberBlock"], "block": null}, {"type": "CodeElement", "value": ");"}], "type": "LineElement"}], "tokens": ["digitalWrite"]}, "ui.loadProjects.modk.it": {"styles": {"normal": {"width": 730, "height": "auto"}}, "stateVars": {}, "elements": [{"styles": {"normal": {"fontFamily": "Helvetica, Arial, sans-serif", "height": "auto", "width": "100%", "fontSize": "18px", "position": "relative", "textAlign": "left"}}, "text": "Browse", "type": "FrameworkText"}, {"styles": {"normal": {"borderRadius": "4px", "marginBottom": 10, "_boxShadow": "0px 1px 5px rgba(0, 0, 0, 0.5) inset", "height": "100%", "padding": "5px", "width": 730, "background": "#f6f6f6", "position": "relative", "marginTop": 10, "border": "1px solid #a4a7ab"}}, "elements": [{"styles": {"normal": {"overflowY": "auto", "minHeight": 130, "maxHeight": 360, "height": "auto", "padding": "6px 3px 6px 6px", "width": "720px"}}, "scrollable": true, "smooshScrollContent": true, "name": "projects_holder", "testProjects": [{"uid": "ui.projectListing.modk.it", "projectName": "My First Projy is a really long title.", "projectTags": ["tag 1", "tag 2", "tag 3"], "userID": "test@test.com", "projectCodeCount": "x10", "projectID": "My_First_Projy_is_a_really_long_title-0", "projectDate": "Sept. 29, 2013", "projectPartCount": "x7"}, {"uid": "ui.projectListing.modk.it", "projectID": "My_Second_Project_is_Long-0", "projectTags": ["tag 1", "tag 2", "tag 3"], "userID": "test@test.com", "projectCodeCount": "x33", "projectName": "My Second Project is Long", "projectDate": "Sept. 30, 2013", "projectPartCount": "x1"}, {"uid": "ui.projectListing.modk.it", "projectName": "My Third Projy", "projectTags": ["tag 1", "tag 2", "tag 3"], "userID": "test@test.com", "projectCodeCount": "x4", "projectID": "My_Third_Projy-0", "projectDate": "Sept. 31, 2013", "projectPartCount": "x12"}, {"uid": "ui.projectListing.modk.it", "projectName": "My Third Projy", "projectTags": ["tag 1", "tag 2", "tag 3"], "userID": "test@test.com", "projectCodeCount": "x4", "projectID": "My_Third_Projy-1", "projectDate": "Sept. 31, 2013", "projectPartCount": "x12"}, {"uid": "ui.projectListing.modk.it", "projectID": "My_Third_Projy-2", "projectTags": ["tag 1", "tag 2", "tag 3"], "userID": "test@test.com", "projectCodeCount": "x4", "projectName": "My Third Projy", "projectDate": "Sept. 31, 2013", "projectPartCount": "x12"}, {"uid": "ui.projectListing.modk.it", "projectName": "My Third Projy", "projectTags": ["tag 1", "tag 2", "tag 3"], "userID": "test@test.com", "projectCodeCount": "x4", "projectID": "My_Third_Projy-3", "projectDate": "Sept. 31, 2013", "projectPartCount": "x12"}], "onLoad": "this.removeProjects=function(){this.removeAllSubElements();};this.updateProjects = function(){this.removeProjects(); if(!Boolean(__debug__projects)){for(var i=0; i This Computer", "htmlClass": "mk_tab disabled", "onClick": "function(evt){/*console.debug('clicked Local');*/}", "type": "FrameworkButton"}, {"styles": {"active": {"border-top-left-radius": 4, "border-top-right-radius": 4, "border-left": "1px solid #a4a7ab", "border-bottom": "none", "border-top": "1px solid #a4a7ab", "border-right": "1px solid #a4a7ab", "background-color": "#f6f6f6"}, "selected": {"border-top-left-radius": 4, "border-top-right-radius": 4, "border-left": "1px solid #a4a7ab", "border-bottom": "none", "border-top": "1px solid #a4a7ab", "border-right": "1px solid #a4a7ab", "background-color": "#f6f6f6"}, "normal": {"border-left": "1px solid transparent", "height": "auto", "padding": "3px 3px 4px", "width": "auto", "border-top": "1px solid transparent", "background": "none", "border-right": "1px solid #a4a7ab", "position": "relative", "display": "inline-block"}}, "name": "OpenOnlineButton", "text": " My Cloud Projects", "_text": " Username's Online Projects", "onClick": "function(evt){/*console.debug('clicked Cloud');*/}", "type": "FrameworkButton", "htmlClass": "mk_tab selected"}, {"styles": {"active": {"border-top-left-radius": 4, "border-top-right-radius": 4, "border-left": "1px solid #a4a7ab", "border-bottom": "none", "border-top": "1px solid #a4a7ab", "border-right": "1px solid #a4a7ab", "background-color": "#f6f6f6"}, "selected": {"border-top-left-radius": 4, "border-top-right-radius": 4, "border-left": "1px solid #a4a7ab", "border-bottom": "none", "border-top": "1px solid #a4a7ab", "border-right": "1px solid #a4a7ab", "background-color": "#f6f6f6"}, "normal": {"border-left": "1px solid transparent", "height": "auto", "padding": "3px 3px 4px", "width": "auto", "border-top": "1px solid transparent", "background": "none", "border-right": "1px solid transparent", "position": "relative", "display": "inline-block"}}, "name": "ExploreCommunityButton", "type": "FrameworkButton", "onClick": "function(evt){/*console.debug('clicked Explore');*/}", "text": " Community & Examples", "htmlClass": "mk_tab disabled"}], "type": "Container", "name": "project_tab_group"}, {"styles": {"normal": {"position": "relative", "width": "100%", "float": "none", "height": "auto"}}, "elements": [{"styles": {"normal": {"height": 20, "position": "relative", "float": "right", "width": 2}}, "type": "Container", "name": "SaveButtonSpacer"}, {"styles": {"normal": {"height": "auto", "position": "relative", "float": "right", "width": "auto"}}, "text": "Close", "type": "FrameworkButton", "name": "DialogCancelButton", "onClick": "function(evt){this.container.container.container.container.hide(500)}"}], "type": "Container"}], "type": "Container", "uid": "ui.loadProjects.modk.it"}, "1.forever.blocks.modk.it": {"category": "control", "uid": "1.forever.blocks.modk.it", "color": "orange", "docs": {"parameters": [], "description": "Blocks placed inside the *forever* loop will be run over and over.", "name": "forever", "hint": "If you want to stop a *forever* loop you can use a *break* block."}, "extensionOf": "1.c.autoyield.blocks.modk.it", "statementElements": [{"elements": [{"text": "forever", "type": "CodeElement", "value": "forever{"}], "type": "LineElement"}], "includes": ["1.modkit.h.code.modk.it"], "tokens": ["forever"]}, "ui.marker.blocks.modk.it": {"styles": {"hide": {"styleCondition": "this.hide == true", "display": "none", "visibility": "hidden"}, "normal": {"right": 3, "top": 6, "height": 22, "width": 29, "background": "transparent url(images/marker_blocks.png) no-repeat -2px -6px", "position": "absolute"}}, "text": "!", "type": "Container", "uid": "ui.marker.blocks.modk.it"}, "1.vibe.library.modk.it": {"definitions": "#define ON HIGH\n#define OFF LOW\nvoid vibeSetup(int vibeNum,int pinNum){vibeNum-=VIBE_OFFSET;\nvibeArray[vibeNum]=pinNum;\npinMode(vibeArray[vibeNum],OUTPUT);}\nvoid setVibration(int vibeNum,int value){vibeNum-=VIBE_OFFSET;\ndigitalWrite(vibeArray[vibeNum],value);}", "componentArray": "vibeArray", "type": "ComponentLibrary", "uid": "1.vibe.library.modk.it"}, "1.vex.iq.rotateRotatorBy.blocks.modk.it": {"category": "output", "uid": "1.vex.iq.rotateRotatorBy.blocks.modk.it", "color": "blue", "docs": {"category": "output", "description": "*Rotates* the __COMPONENT__ a selected direction by a selected amount of *rotation*. The *direction* is either FWD or REV. The amount of *rotation* can be in degrees (deg) or revolutions (rev).", "parameters": [{"options": ["FWD", "REV"], "type": "rotation", "description": "select a direction from the list", "name": "direction"}, {"type": "num", "description": "select a **amount of rotation** from the list, type a number, or use a variable (any negative or positive number)", "name": "rotate"}], "hint": "Negative amounts of *rotation* will go in the opposite direction that is selected. Numbers with decimals are allowed.", "type": "StatementBlock", "name": "rotate"}, "extensionOf": "1.statement.blocks.modk.it", "statementElements": [{"elements": [{"text": "rotate", "type": "CodeElement", "value": "turnRelative("}, {"assetGlobals": {"subBlocks": {"0": "subBlock"}}, "type": "BlockHolder", "elements": [{"enumIcon": "images/vex/enum_icons/rotation-black.png", "elements": [{"feed": "@name@.outDirection.values", "values": ["FWD", "REV"], "type": "DropdownMenu", "autoMinWidth": "true"}], "assetGlobals": {"params": {"0": "value"}}, "value": "", "color": "blue", "readonly": true, "type": "EnumArgument"}], "accepts": ["EnumBlock.rotaryDirection"]}, {"text": "", "type": "CodeElement", "value": ","}, {"assetGlobals": {"subBlocks": {"1": "subBlock"}}, "type": "BlockHolder", "elements": [{"elements": [{"values": ["45", "90", "180", "360", "720"], "type": "DropdownMenu", "autoMinWidth": "true"}], "assetGlobals": {"params": {"1": "value"}}, "maxChars": "32", "color": "blue", "allowChars": "0-9.", "type": "NumberArgument"}], "accepts": ["NumberBlock"]}, {"text": "", "type": "CodeElement", "value": ","}, {"assetGlobals": {"params": {"2": "value"}}, "readonly": true, "elements": [{"values": ["deg", "rev"], "type": "DropdownMenu", "autoMinWidth": "true"}], "type": "NameArgument", "value": "deg"}, {"text": "", "type": "CodeElement", "value": ");"}], "type": "LineElement"}], "tokens": ["rotateMotor"], "sibling": null}, "2888.usb_vid.modk.it": {"pids_to_uid": {"0002": {"microcontroller": {"uid": "1.LM4F232H5QD.tiva.microcontrollers.modk.it"}, "uid": "1.vex.iq.hardware.vex.modk.it"}}, "company": "VEX", "uid": "2888.usb_vid.modk.it", "vid": "2888"}, "ui.loginPopover.modk.it": {"styles": {"normal": {"width": 200, "textAlign": "center", "height": "auto"}}, "stateVars": {"loggedIn": false}, "elements": [{"styles": {"normal": {"fontFamily": "Helvetica, Arial, sans-serif", "float": "none", "height": "auto", "width": "100%", "fontSize": "18px", "position": "relative", "textAlign": "center"}}, "text": "Sign in with Open ID", "type": "FrameworkText"}, {"styles": {"normal": {"float": "none", "height": "inherit", "zIndex": 1, "width": 120, "marginLeft": "auto", "marginRight": "auto", "position": "relative", "marginTop": 5}}, "onLoad": "/*console.log('loaded:', this.text);*/", "name": "DialogTestButton", "text": "Google", "image": "images/openid_providers/google_32.png", "buttonType": "large_button", "onClick": "function(){ this.topLevelWidget.container.container.hide(1000);openid_login('google'); }", "type": "Button", "id": "google_login_btn"}, {"styles": {"normal": {"float": "none", "height": "inherit", "zIndex": 1, "width": 120, "marginLeft": "auto", "marginRight": "auto", "position": "relative", "marginTop": 5}}, "onLoad": "/*console.log('loaded:', this.text);*/", "name": "DialogTestButton", "text": "Yahoo ", "image": "images/openid_providers/yahoo_32.png", "buttonType": "large_button", "onClick": "function(){ this.topLevelWidget.container.container.hide(1000);openid_login('yahoo'); }", "type": "Button", "id": "yahoo_login_btn"}], "type": "Container", "uid": "ui.loginPopover.modk.it"}, "1.vex.iq.setDrivetrainTurnSpeed.blocks.modk.it": {"category": "setup", "uid": "1.vex.iq.setDrivetrainTurnSpeed.blocks.modk.it", "color": "darkblue", "docs": {"parameters": [{"range": "-100-100 %", "type": "num", "description": "select the speed from the list, type a number, or use a variable (speed ranges from -100 to 100 %)", "name": "speed"}], "type": "StatementBlock", "description": "*Set turn speed to* sets the speed of the **Drivetrain** turn blocks in percent (%).", "name": "set turn speed", "hint": "Negative **speed** will go in the opposite direction that is selected. Numbers with decimals are allowed."}, "extensionOf": "1.statement.blocks.modk.it", "statementElements": [{"elements": [{"text": "set turn speed to", "type": "CodeElement", "value": "setTurnSpeed("}, {"assetGlobals": {"subBlocks": {"0": "subBlock"}}, "type": "BlockHolder", "elements": [{"onBlur": "console.log(this.value);", "elements": [{"values": ["0", "20", "40", "60", "80", "100"], "type": "DropdownMenu", "autoMinWidth": "true"}], "assetGlobals": {"params": {"0": "value"}}, "maxChars": "32", "value": "60", "color": "darkblue", "readonly": false, "rangeMin": 0, "allowChars": "0-9.", "rangeMax": 150, "type": "NumberArgument"}], "accepts": ["NumberBlock"]}, {"elements": [{"values": ["%"], "type": "DropdownMenu", "autoMinWidth": "true"}], "assetGlobals": {"params": {"1": "value"}}, "value": "%", "readonly": true, "hideCodeView": true, "type": "NameArgument"}, {"text": "", "type": "CodeElement", "value": ");"}], "type": "LineElement"}], "tokens": ["setDrivetrainSpinSpeed"]}, "1.plus.blocks.modk.it": {"category": "operators", "groupElements": [{"type": "CodeElement", "value": "("}, {"assetGlobals": {"subBlocks": {"0": "subBlock"}}, "type": "BlockHolder", "elements": [{"assetGlobals": {"params": {"0": "value"}}, "maxChars": "32", "readonly": false, "maxDecimals": 3, "allowChars": "0-9.//-", "type": "NumberArgument"}], "accepts": ["NumberBlock"]}, {"text": "+", "type": "CodeElement", "value": ") + ("}, {"assetGlobals": {"subBlocks": {"1": "subBlock"}}, "type": "BlockHolder", "elements": [{"assetGlobals": {"params": {"1": "value"}}, "maxChars": "32", "readonly": false, "maxDecimals": 3, "allowChars": "0-9.//-", "type": "NumberArgument"}], "accepts": ["NumberBlock"]}, {"type": "CodeElement", "value": ")"}], "uid": "1.plus.blocks.modk.it", "color": "green", "docs": {"parameters": [{"type": "num", "description": "Type a value or drag in a variable.", "name": "value 1"}, {"type": "num", "description": "Type a value or drag in a variable.", "name": "value 2"}], "description": "Calculates **value 1** plus **value 2**.", "name": "add", "hint": ""}, "extensionOf": "1.number.blocks.modk.it"}, "1.hat.blocks.modk.it": {"stateVars": {"sibling": false, "top": true, "params": false, "subBlocks": false, "left": true}, "elements": [{"assetGlobals": {"color": "color", "statementElements": "elements"}, "assetGlobalsExclude": {"elements": true}, "type": "StatementElement", "block": "null"}, {"elements": [{"assetGlobals": {"color": "color", "sibling": "subBlock"}, "accepts": ["StatementBlock"], "elements": [{"type": "StatementHighlight"}], "type": "BlockHolder", "subBlock": null}], "type": "SiblingElement"}, {"text": "", "type": "CodeElement", "value": "}"}], "type": "HatBlock", "uid": "1.hat.blocks.modk.it", "lineElement": null}, "ui.logoutPopover.modk.it": {"styles": {"normal": {"width": 200, "textAlign": "center", "height": "auto"}}, "stateVars": {"loggedIn": false}, "elements": [{"styles": {"normal": {"float": "none", "height": "inherit", "zIndex": 1, "width": 120, "marginLeft": "auto", "marginRight": "auto", "position": "relative"}}, "name": "SignOutButton", "text": "Sign Out ", "buttonType": "large_button", "onClick": "function(){this.topLevelWidget.container.container.hide(1000);$.ajax({url: '/logout',context: this,cache: false,dataType: 'html',success: function(data){Events.broadcast('SignedInOut', ['signed_out']); Events.broadcast('resetProjectNames',[]);}, error: function(data){console.log('Logout Failure');} }) }", "type": "Button"}], "type": "Container", "uid": "ui.logoutPopover.modk.it"}, "1.vex.iq.turnMotorTo.blocks.modk.it": {"category": "output", "uid": "1.vex.iq.turnMotorTo.blocks.modk.it", "color": "blue", "docs": {"category": "output", "description": "*Spins* the **Motor** to an absolute position. There is no direction because there is only one possible way to go to an absolute position.", "parameters": [{"type": "num", "description": "select a **amount of spin** from the list, type a number, or use a variable (any negative or positive number)", "name": "spin"}], "hint": "", "type": "StatementBlock", "name": "spin to"}, "extensionOf": "1.statement.blocks.modk.it", "statementElements": [{"elements": [{"text": "spin to", "type": "CodeElement", "value": "turnAbsolute("}, {"assetGlobals": {"subBlocks": {"1": "subBlock"}}, "type": "BlockHolder", "elements": [{"elements": [{"feed": "@id@.amounts", "values": ["45", "90", "180", "360", "720"], "type": "DropdownMenu", "autoMinWidth": "true"}], "assetGlobals": {"params": {"1": "value"}}, "maxChars": "32", "color": "blue", "maxDecimals": 3, "allowChars": "0-9.\\-", "type": "NumberArgument"}], "accepts": ["NumberBlock"]}, {"text": "", "type": "CodeElement", "value": ","}, {"assetGlobals": {"params": {"2": "value"}}, "readonly": true, "elements": [{"values": [{"trigger": "Events.broadcast(this.container.container.container.block.id+'.amounts',[[ '45','90','180','360','720' ]]);", "value": "deg"}, {"trigger": "Events.broadcast(this.container.container.container.block.id+'.amounts',[['0.125','0.25','0.5','1.0','2.0']]);", "value": "rev"}], "type": "DropdownMenu", "autoMinWidth": "true"}], "type": "NameArgument", "value": "deg"}, {"text": "", "type": "CodeElement", "value": ");"}], "type": "LineElement"}], "tokens": ["spinMotorTo"], "sibling": null}, "1.vex.iq.touchLedTouched.blocks.modk.it": {"category": "input", "groupElements": [{"assetGlobals": {"localScope": "ignore", "subBlocks": {"0": "subBlock"}}, "ignore": true, "elements": [{"assetGlobals": {"params": {"0": "value"}}, "color": "blue", "readonly": true, "elements": [{"feed": "1.vex.iq.touchLedTouched.blocks.modk.itComponentListChange", "values": [], "type": "DropdownMenu", "autoMinWidth": "true"}], "type": "NameArgument"}], "accepts": ["NoBlock"], "type": "BlockHolder"}, {"assetGlobals": {"localScope": "ignore"}, "ignore": true, "type": "CodeElement", "value": ".", "text": ""}, {"text": "touching", "type": "CodeElement", "value": "touching("}, {"type": "CodeElement", "value": ")"}], "uid": "1.vex.iq.touchLedTouched.blocks.modk.it", "color": "purple", "docs": {"category": "input", "description": "This block is true when the **Touch LED** is touched. The block is false when not touched.", "title": "down", "hint": "", "type": "BooleanBlock", "name": "touching"}, "extensionOf": "1.boolean.blocks.modk.it", "tokens": ["buttonDown"], "stateVars": {"localScope": false, "params": false, "subBlock": false}}, "default.arduino.examples.modk.it": {"hardware": [{"uid": "1.compatible.arduino.hardware.modk.it"}], "type": "EditorState", "uid": "default.arduino.examples.modk.it", "name": "Untitled Project"}, "1.lcd.library.modk.it": {"definitions": "String line;\nbool newLine;\nclass ModkitLCD:public LiquidCrystal\n{\npublic:\nModkitLCD():LiquidCrystal((uint8_t)0,(uint8_t)0,(uint8_t)0,(uint8_t)0,(uint8_t)0,(uint8_t)0,(uint8_t)0){}\nModkitLCD(uint8_t rs,uint8_t en, uint8_t d4, uint8_t d5, uint8_t d6, uint8_t d7):LiquidCrystal(rs,en, d4, d5, d6, d7){line = \"\";\nnewLine = false;\n}\nvoid setup(uint8_t,uint8_t, uint8_t, uint8_t, uint8_t, uint8_t, uint8_t,uint8_t);\n};\n\nvoid ModkitLCD::setup(uint8_t rs,uint8_t en, uint8_t d4, uint8_t d5, uint8_t d6, uint8_t d7, uint8_t rows, uint8_t cols){\ninit(rs, 255, en, 255, d4, d5, d6, d7,NULL);\nbegin(rows,cols);\n}\n//hack - should be defined in componentArray field in lcd.components..\n//but this whole component array of int ids is a hack - need component array of component types\nModkitLCD lcdArray[LCD_LENGTH];\nModkitLCD lcdSetup(ModkitLCD lcd, uint8_t rs,uint8_t en, uint8_t d4, uint8_t d5, uint8_t d6, uint8_t d7,uint8_t rows, uint8_t cols){\nlcd.setup(rs,en,d4,d5,d6,d7,rows,cols);\nreturn(lcd);\n}\nvoid print(ModkitLCD lcd, const char msg[]){\nif(newLine){\nlcd.clear();\nlcd.print(line);\nlcd.setCursor(0,1);\nnewLine = false;\nline=\"\";\n}\nlcd.print(msg);line+=String(msg);if(line.length()>=16){line=line.substring(0,16);}}\nvoid printLine(ModkitLCD lcd, const char msg[]){\nif(newLine){\nlcd.clear();\nlcd.print(line);\nlcd.setCursor(0,1);\nnewLine = false;\nline=\"\";\n}\nlcd.print(msg);line+=String(msg);if(line.length()>=16){line=line.substring(0,16);}\nnewLine = true;\n}\nvoid print(ModkitLCD lcd, const String &msg){\nif(newLine){\nlcd.clear();\nlcd.print(line);\nlcd.setCursor(0,1);\nnewLine = false;\nline=\"\";\n}\nlcd.print(msg);line+=String(msg);if(line.length()>=16){line=line.substring(0,16);}}\nvoid printLine(ModkitLCD lcd, const String &msg){\nif(newLine){\nlcd.clear();\nlcd.print(line);\nlcd.setCursor(0,1);\nnewLine = false;\nline=\"\";\n}\nlcd.print(msg);line+=String(msg);if(line.length()>=16){line=line.substring(0,16);}\nnewLine = true;\n}\nvoid print(ModkitLCD lcd, const char msg){\nif(newLine){\nlcd.clear();\nlcd.print(line);\nlcd.setCursor(0,1);\nnewLine = false;\nline=\"\";\n}\nlcd.print(msg);line+=String(msg);if(line.length()>=16){line=line.substring(0,16);}}\nvoid printLine(ModkitLCD lcd, const char msg){\nif(newLine){\nlcd.clear();\nlcd.print(line);\nlcd.setCursor(0,1);\nnewLine = false;\nline=\"\";\n}\nlcd.print(msg);line+=String(msg);if(line.length()>=16){line=line.substring(0,16);}\nnewLine = true;\n}\nvoid print(ModkitLCD lcd, unsigned char msg){\nif(newLine){\nlcd.clear();\nlcd.print(line);\nlcd.setCursor(0,1);\nnewLine = false;\nline=\"\";\n}\nlcd.print(msg);line+=String(msg);if(line.length()>=16){line=line.substring(0,16);}}\nvoid printLine(ModkitLCD lcd, unsigned char msg){\nif(newLine){\nlcd.clear();\nlcd.print(line);\nlcd.setCursor(0,1);\nnewLine = false;\nline=\"\";\n}\nlcd.print(msg);line+=String(msg);if(line.length()>=16){line=line.substring(0,16);}\nnewLine = true;\n}\nvoid print(ModkitLCD lcd, int msg){\nif(newLine){\nlcd.clear();\nlcd.print(line);\nlcd.setCursor(0,1);\nnewLine = false;\nline=\"\";\n}\nlcd.print(msg);line+=String(msg);if(line.length()>=16){line=line.substring(0,16);}}\nvoid printLine(ModkitLCD lcd, int msg){\nif(newLine){\nlcd.clear();\nlcd.print(line);\nlcd.setCursor(0,1);\nnewLine = false;\nline=\"\";\n}\nlcd.print(msg);line+=String(msg);if(line.length()>=16){line=line.substring(0,16);}\nnewLine = true;\n}\nvoid print(ModkitLCD lcd, unsigned int msg){\nif(newLine){\nlcd.clear();\nlcd.print(line);\nlcd.setCursor(0,1);\nnewLine = false;\nline=\"\";\n}\nlcd.print(msg);line+=String(msg);if(line.length()>=16){line=line.substring(0,16);}}\nvoid printLine(ModkitLCD lcd, unsigned int msg){\nif(newLine){\nlcd.clear();\nlcd.print(line);\nlcd.setCursor(0,1);\nnewLine = false;\nline=\"\";\n}\nlcd.print(msg);line+=String(msg);if(line.length()>=16){line=line.substring(0,16);}\nnewLine = true;\n}\nvoid print(ModkitLCD lcd, long msg){\nif(newLine){\nlcd.clear();\nlcd.print(line);\nlcd.setCursor(0,1);\nnewLine = false;\nline=\"\";\n}\nlcd.print(msg);line+=String(msg);if(line.length()>=16){line=line.substring(0,16);}}\nvoid printLine(ModkitLCD lcd, long msg){\nif(newLine){\nlcd.clear();\nlcd.print(line);\nlcd.setCursor(0,1);\nnewLine = false;\nline=\"\";\n}\nlcd.print(msg);line+=String(msg);if(line.length()>=16){line=line.substring(0,16);}\nnewLine = true;\n}\nvoid print(ModkitLCD lcd, unsigned long msg){\nif(newLine){\nlcd.clear();\nlcd.print(line);\nlcd.setCursor(0,1);\nnewLine = false;\nline=\"\";\n}\nlcd.print(msg);line+=String(msg);if(line.length()>=16){line=line.substring(0,16);}}\nvoid printLine(ModkitLCD lcd, unsigned long msg){\nif(newLine){\nlcd.clear();\nlcd.print(line);\nlcd.setCursor(0,1);\nnewLine = false;\nline=\"\";\n}\nlcd.print(msg);line+=String(msg);if(line.length()>=16){line=line.substring(0,16);}\nnewLine = true;\n}\nvoid print(ModkitLCD lcd, double msg){\nif(newLine){\nlcd.clear();\nlcd.print(line);\nlcd.setCursor(0,1);\nnewLine = false;\nline=\"\";\n}\nlcd.print(msg);line+=String((long)msg);if(line.length()>=16){line=line.substring(0,16);}}\nvoid printLine(ModkitLCD lcd, double msg){\nif(newLine){\nlcd.clear();\nlcd.print(line);\nlcd.setCursor(0,1);\nnewLine = false;\nline=\"\";\n}\nlcd.print(msg);line+=String((long)msg);if(line.length()>=16){line=line.substring(0,16);}\nnewLine = true;\n}\n", "include": "#include ", "type": "ComponentLibrary", "uid": "1.lcd.library.modk.it"}, "1.vex.iq.systemClock.blocks.modk.it": {"category": "input", "groupElements": [{"text": "timer in", "type": "CodeElement", "value": "BRAIN.clock("}, {"assetGlobals": {"params": {"2": "value"}}, "readonly": true, "elements": [{"values": ["sec", "min"], "type": "DropdownMenu", "autoMinWidth": "true"}], "type": "NameArgument", "value": "sec"}, {"type": "CodeElement", "value": ")"}], "uid": "1.vex.iq.systemClock.blocks.modk.it", "color": "purple", "docs": {"category": "input", "description": "Gets the timer in seconds (sec) or minutes (min).", "parameters": [], "hint": "", "type": "NumberBlock", "name": "timer"}, "extensionOf": "1.number.blocks.modk.it", "tokens": ["systemClock"]}, "board_detection.steps.hardware.vex.modk.it": {"onLoad": "Events.register('LinkNotFound', function(){console.debug('Modkit Link not found!', this, this.container.container.container.container); this.wizard.replaceCurrentStep({'uid':'1.vex.wizard.linknotfound.modk.it'}); /*this.container.container.container.container.nextStep();*/ },this); if(navigator.userAgent.toLowerCase().indexOf('macintosh')>-1){this.linkDownload='https://s3.amazonaws.com/modkit/release/vex/Modkit_Link_2013_12_09.dmg';}else{this.linkDownload='https://s3.amazonaws.com/modkit/release/vex/Modkit_Link_2013_12_09.exe'}Events.broadcast(\"registerBoardsChangeEvent\",[function(){this.clearItems();this.data.boardsFound = 0;this.showBoards();},this],false); Events.register('LinkNotFound',function(){ Events.broadcast('WizardAddBoardChooser', []); },this); Events.register('BadLinkFound',function(){ Events.broadcast('WizardAddBoardChooser', []); },this); this.boardChooserCallback = function(){this.addItem(\"images/vex/brain_missing-150x.png\",null,\"Continue without VEX IQ\",\"Click here to load the editor without your VEX IQ hardware connected.\",null, 'this.wizard.unload(); if(Boolean(StateManager.editor)){Events.broadcast(\"ChangeBoard\",[{\"uid\":\"1.vex.iq.hardware.vex.modk.it\",\"port\":null , \"microcontroller\":{\"uuid\":null }}] ); }else{ StateManager.loadState({\"type\":\"EditorState\",\"uid\":\"default.arduino.examples.modk.it\",\"name\":\"Untitled Project\", \"hardware\":[{\"uid\":\"1.vex.iq.hardware.vex.modk.it\",\"port\":null ,\"mcu\":null, \"microcontroller\":{\"uuid\":null } } ]});}' );}; Events.register('WizardAddBoardChooser', this.boardChooserCallback ,this); if(!Boolean(this.data)){this.data={};} this.data.boardsFound = 0; Events.broadcast('DesktopConnectCheck', [3000,function(status){if(status=='GoodConnection'){Events.broadcast('LinkFound',[]); this.$markup.addClass('found');}else if(status=='NotConnected'){Events.broadcast('LinkNotFound',[]); this.$markup.addClass('notfound');} else if(status=='BadConnection'){console.log('bad link');Events.broadcast('BadLinkFound',[],true);} else if(status=='GoodConnectionUpdateAvailable'){console.log('good link w/update');Events.broadcast('NewerLinkFound',[],true);} },this]); this.showBoards=function(){ Events.broadcast('GetBoards',[function(response,boardsLeft){ if(Boolean(response.uid)){this.data.boardsFound+=1;var board=modkitNamespace.AssetFactory.getAssetDef({'uid':response.uid,'port':response.port,'microcontroller':{'uuid':response.microcontroller.uuid,'uid':response.microcontroller.uid}});this.addItem(board.images.small,null,board.name,'Detected on port: '+response.port+'
Click to continue with this board',null, ' this.wizard.unload();if(Boolean(StateManager.editor)){ Events.broadcast(\"ChangeBoard\", [ {\"uid\":\"'+board.uid+'\",\"port\":\"'+board.port+'\" , \"microcontroller\":{\"uuid\":\"'+board.microcontroller.uuid+'\",\"uid\":\"'+board.microcontroller.uid+'\"}}] ); }else{StateManager.loadState({\"type\":\"EditorState\",\"uid\":\"default.arduino.examples.modk.it\",\"name\":\"Untitled Project\", \"hardware\":[{\"uid\":\"'+board.uid+'\",\"port\":\"'+board.port+'\" , \"microcontroller\":{\"uuid\":\"'+board.microcontroller.uuid+'\",\"uid\":\"'+board.microcontroller.uid+'\"} }]});} ');}if(boardsLeft==0){ Events.broadcast('WizardFoundBoards', [this.data.boardsFound]); Events.broadcast('WizardAddBoardChooser', []); }},this]);}; ", "onUnload": " this.clearItems(); Events.unregister('WizardAddBoardChooser',this.boardChooserCallback,this); Events.clearCache('WizardAddBoardChooser');", "uid": "board_detection.steps.hardware.vex.modk.it", "title": "Detect Hardware", "_onLoad": "if(navigator.userAgent.toLowerCase().indexOf('macintosh')>-1){this.linkDownload='https://s3.amazonaws.com/modkit/prerelease/vex/Modkit_Link_2014_10_03.dmg';}else{this.linkDownload='https://s3.amazonaws.com/modkit/prerelease/vex/Modkit_Link_2014_10_03.exe'}Events.broadcast(\"registerBoardsChangeEvent\",[function(){this.clearItems();this.data.boardsFound = 0;this.showBoards();},this],false); Events.register('LinkNotFound',function(){ Events.broadcast('WizardAddBoardChooser', []); },this); Events.register('BadLinkFound',function(){ Events.broadcast('WizardAddBoardChooser', []); },this); this.boardChooserCallback = function(){this.addItem(\"images/vex/brain_missing-150x.png\",null,\"Continue without VEX IQ\",\"Click here to load the editor without your VEX IQ hardware connected.\",null, 'this.wizard.unload(); if(Boolean(StateManager.editor)){Events.broadcast(\"ChangeBoard\",[{\"uid\":\"1.vex.iq.hardware.vex.modk.it\",\"port\":null , \"microcontroller\":{\"uuid\":null }}] ); }else{ StateManager.loadState({\"type\":\"EditorState\",\"uid\":\"default.arduino.examples.modk.it\",\"name\":\"Untitled Project\", \"hardware\":[{\"uid\":\"1.vex.iq.hardware.vex.modk.it\",\"port\":null ,\"mcu\":null, \"microcontroller\":{\"uuid\":null } } ]});}' );}; Events.register('WizardAddBoardChooser', this.boardChooserCallback ,this); if(!Boolean(this.data)){this.data={};} this.data.boardsFound = 0; Events.broadcast('DesktopConnectCheck', [3000,function(status){if(status=='GoodConnection'){Events.broadcast('LinkFound',[]); this.$markup.addClass('found');}else if(status=='NotConnected'){Events.broadcast('LinkNotFound',[]); this.$markup.addClass('notfound');} else if(status=='BadConnection'){console.log('bad link');Events.broadcast('BadLinkFound',[],true);} else if(status=='GoodConnectionUpdateAvailable'){console.log('good link w/update');Events.broadcast('NewerLinkFound',[],true);} },this]); this.showBoards=function(){ Events.broadcast('GetBoards',[function(response,boardsLeft){ if(Boolean(response.uid)){this.data.boardsFound+=1;var board=modkitNamespace.AssetFactory.getAssetDef({'uid':response.uid,'port':response.port,'microcontroller':{'uuid':response.microcontroller.uuid,'uid':response.microcontroller.uid}});this.addItem(board.images.small,null,board.name,'Detected on port: '+response.port+'
Click to continue with this board',null, ' this.wizard.unload();if(Boolean(StateManager.editor)){ Events.broadcast(\"ChangeBoard\", [ {\"uid\":\"'+board.uid+'\",\"port\":\"'+board.port+'\" , \"microcontroller\":{\"uuid\":\"'+board.microcontroller.uuid+'\",\"uid\":\"'+board.microcontroller.uid+'\"}}] ); }else{StateManager.loadState({\"type\":\"EditorState\",\"uid\":\"default.arduino.examples.modk.it\",\"name\":\"Untitled Project\", \"hardware\":[{\"uid\":\"'+board.uid+'\",\"port\":\"'+board.port+'\" , \"microcontroller\":{\"uuid\":\"'+board.microcontroller.uuid+'\",\"uid\":\"'+board.microcontroller.uid+'\"} }]});} ');}if(boardsLeft==0){ Events.broadcast('WizardFoundBoards', [this.data.boardsFound]); Events.broadcast('WizardAddBoardChooser', []); }},this]);}; ", "type": "WizardListStep"}, "1.vex.iq.setRotatorPower.blocks.modk.it": {"category": "setup", "uid": "1.vex.iq.setRotatorPower.blocks.modk.it", "color": "darkblue", "docs": {"parameters": [{"range": "0-100%", "options": ["0", "25", "50", "75", "100"], "type": "num", "description": "select a power from the list, type a number, or use a variable (power ranges from 0 to 100 percent)", "name": "power"}], "type": "StatementBlock", "description": "*Set max power* sets the maximum output power of the **Rotator**. Power is set as a percent of maximum power.", "name": "set max power", "hint": "Setting max power to 25% will help a claw not crush an object."}, "extensionOf": "1.statement.blocks.modk.it", "statementElements": [{"elements": [{"text": "set max power to", "type": "CodeElement", "value": "setMaxPower("}, {"assetGlobals": {"subBlocks": {"0": "subBlock"}}, "type": "BlockHolder", "elements": [{"elements": [{"values": ["25", "50", "75", "100"], "type": "DropdownMenu", "autoMinWidth": "true"}], "assetGlobals": {"params": {"0": "value"}}, "maxChars": "32", "color": "darkblue", "readonly": false, "rangeMin": 0, "allowChars": "0-9.", "rangeMax": 100, "type": "NumberArgument"}], "accepts": ["NumberBlock"]}, {"elements": [{"values": ["%"], "type": "DropdownMenu", "autoMinWidth": "true"}], "assetGlobals": {"params": {"1": "value"}}, "value": "%", "readonly": true, "hideCodeView": true, "type": "NameArgument"}, {"text": "", "type": "CodeElement", "value": ");"}], "type": "LineElement"}], "tokens": ["setRotatorPower"]}, "1.vex.iq.rotation.blocks.modk.it": {"category": "input", "groupElements": [{"assetGlobals": {"localScope": "ignore", "subBlocks": {"0": "subBlock"}}, "ignore": true, "elements": [{"assetGlobals": {"params": {"0": "value"}}, "color": "blue", "readonly": true, "elements": [{"feed": "1.vex.iq.rotation.blocks.modk.itComponentListChange", "values": [], "type": "DropdownMenu", "autoMinWidth": "true"}], "type": "NameArgument"}], "accepts": ["NoBlock"], "type": "BlockHolder"}, {"assetGlobals": {"localScope": "ignore"}, "ignore": true, "type": "CodeElement", "value": ".", "text": ""}, {"text": "rotation in", "type": "CodeElement", "value": "rotation("}, {"assetGlobals": {"params": {"1": "value"}}, "readonly": true, "elements": [{"values": ["deg", "rev"], "type": "DropdownMenu", "autoMinWidth": "true"}], "type": "NameArgument", "value": "deg"}, {"type": "CodeElement", "value": ")"}], "uid": "1.vex.iq.rotation.blocks.modk.it", "color": "purple", "docs": {"category": "input", "type": "NumberBlock", "description": "Gets the *rotation* of the __COMPONENT__ in degrees (deg) or revolutions (rev).", "name": "rotation", "hint": ""}, "extensionOf": "1.number.blocks.modk.it", "tokens": ["currentMotorEncoder"], "stateVars": {"localScope": false, "params": false, "subBlocks": false}}, "1.vex.iq.setMotorPower.blocks.modk.it": {"category": "setup", "uid": "1.vex.iq.setMotorPower.blocks.modk.it", "color": "darkblue", "docs": {"parameters": [{"range": "0-100%", "options": ["0", "25", "50", "75", "100"], "type": "num", "description": "Select from the list, type a number, or use a variable. Power ranges from 0 to 100 percent.", "name": "power"}], "type": "StatementBlock", "description": "Sets the maximum output power of the __COMPONENT__. Power is set as a percent of maximum power.", "name": "set max power", "hint": "Setting max power to 25% will help a claw not crush an object."}, "extensionOf": "1.statement.blocks.modk.it", "statementElements": [{"elements": [{"text": "set max power to", "type": "CodeElement", "value": "setMaxPower("}, {"assetGlobals": {"subBlocks": {"0": "subBlock"}}, "type": "BlockHolder", "elements": [{"elements": [{"values": ["25", "50", "75", "100"], "type": "DropdownMenu", "autoMinWidth": "true"}], "assetGlobals": {"params": {"0": "value"}}, "maxChars": "32", "color": "darkblue", "readonly": false, "rangeMin": 0, "allowChars": "0-9", "rangeMax": 100, "type": "NumberArgument"}], "accepts": ["NumberBlock"]}, {"elements": [{"values": ["%"], "type": "DropdownMenu", "autoMinWidth": "true"}], "assetGlobals": {"params": {"1": "value"}}, "value": "%", "readonly": true, "hideCodeView": true, "type": "NameArgument"}, {"text": "", "type": "CodeElement", "value": ");"}], "type": "LineElement"}], "tokens": ["setMotorSpeed"]}, "1.vex.iq.settingsRotator.mechanism.modk.it": {"styles": {"normal": {"width": "300px", "height": "auto"}}, "elements": [{"text": "Rotator Settings", "uid": "1.vex.iq.settingsHeading.modk.it"}, {"uid": "buttonClose.modk.it", "onClick": "function(){ this.container.container.container.saveAndHide(); }"}, {"styles": {"normal": {"position": "relative", "marginTop": "3px", "marginBottom": "2px", "width": "100%", "height": "auto"}}, "type": "HorizontalRule"}, {"styles": {"normal": {"position": "relative", "marginRight": "10px", "width": "140px", "height": 50}}, "onLoad": "this.prevNameHack = this.topLevelWidget.getState().componentName;", "onKeypress": "this.value = this.value.toUpperCase();", "assetGlobals": {"componentName": "value", "inputs": {"0": "this"}}, "maxChars": 12, "value": "", "label": "Name", "readonly": false, "key": "componentName", "allowChars": "A-Za-z0-9 _", "validate": "this.value=this.value.replace(' ','_').replace(' ','_'); if(this.value==this.prevNameHack){this.hideError();}else{ if(this.value==''){this.showError('Please choose a valid name.'); }else{var used = Identifiers.used(this.value); if(!used){this.hideError();}else{this.showError('The name \"'+this.value+'\" cannot be used because it '+used+'.
Please choose another name.'); /*this.$input.focus();*/}}}", "type": "Input", "inputType": "text"}, {"styles": {"hover": {"color": "#24a0ff"}, "focus": {"color": "#24a0ff"}, "normal": {"position": "relative", "marginRight": 0, "width": 140, "height": 50}}, "assetGlobals": {"motorLayout": "value"}, "text": "Left Motor", "value": "1Left", "label": "Motor Layout", "values": [{"name": "Left Motor", "value": "1Left"}, {"name": "Right Motor", "value": "1Right"}, {"name": "2 Motors", "value": "2"}], "key": "motorLayout", "onChange": "this.container[this.key] = this.value; Events.broadcast('rotator.LimitSwitchChange', [], true);", "type": "Input", "inputType": "select"}, {"styles": {"hover": {"color": "#24a0ff"}, "focus": {"color": "#24a0ff"}, "normal": {"position": "relative", "marginRight": 10, "width": 140, "height": "auto"}}, "assetGlobals": {"limitSwitches": "value"}, "text": "None", "value": "none", "label": "Limit Switches", "values": [{"name": "None", "value": "none"}, {"name": "Forward Limit", "value": "1Front"}, {"name": "Reverse Limit", "value": "1Rear"}, {"name": "Both Limits", "value": "2"}], "key": "limitSwitches", "onChange": "this.container[this.key] = this.value; Events.broadcast('rotator.LimitSwitchesChange', [], true);", "type": "Input", "inputType": "select"}, {"styles": {"normal": {"position": "relative", "text-align": "right", "width": "30px", "height": 50}}, "assetGlobals": {"ratioIn": "value"}, "maxChars": "3", "value": "1", "label": "Gear Ratio", "key": "ratioIn", "allowChars": "0-9", "onChange": "this.container[this.key] = this.value;", "type": "Input", "inputType": "text"}, {"styles": {"normal": {"width": "18", "marginBottom": "2px", "height": "auto", "fontFamily": "Helvetica, Arial, sans-serif", "fontSize": "12px", "position": "relative", "marginTop": "24px", "textAlign": "left"}}, "text": "  : ", "type": "FrameworkText"}, {"styles": {"normal": {"position": "relative", "text-align": "right", "width": "30px", "height": "auto"}}, "assetGlobals": {"ratioOut": "value"}, "maxChars": "3", "value": "1", "label": "", "key": "ratioOut", "allowChars": "0-9", "onChange": "this.container[this.key] = this.value;", "type": "Input", "inputType": "text"}, {"styles": {"show": {"styleCondition": "this.container.motorLayout == '1Left' || this.container.motorLayout == '2'", "display": "block", "visibility": "visible"}, "normal": {"position": "relative", "width": "140px", "display": "none", "visibility": "hidden", "height": "auto"}}, "onLoad": "this.testStyleConditions(); Events.register('SettingsUpdate', function(){ $.later( 10, this, 'testStyleConditions'); }, this);", "assetGlobals": {"leftReverseDirection": "checked"}, "label": "left motor reversed", "_onChange": "this.container.container.leftReverseDirection = this.checked;", "type": "Input", "inputType": "checkbox"}, {"styles": {"show": {"styleCondition": "this.container.motorLayout == '1Right' || this.container.motorLayout == '2'", "display": "block", "visibility": "visible"}, "normal": {"position": "relative", "width": "140px", "display": "none", "visibility": "hidden", "height": "auto"}}, "onLoad": " this.testStyleConditions(); Events.register('SettingsUpdate', function(){ $.later( 10, this, 'testStyleConditions'); }, this);", "assetGlobals": {"rightReverseDirection": "checked"}, "label": "right motor reversed", "_onChange": "this.container.container.rightReverseDirection = this.checked;", "type": "Input", "inputType": "checkbox"}], "uid": "1.vex.iq.settingsRotator.mechanism.modk.it", "onUpdate": "this.container.container.save();", "stateVars": {"componentName": true, "motorLayout": true, "leftReverseDirection": true, "ratioOut": true, "ratioIn": true, "rightReverseDirection": true, "limitSwitches": true}, "type": "Container"}, "1.vex.iq.controllerButtonUp.blocks.modk.it": {"category": "input", "groupElements": [{"assetGlobals": {"localScope": "ignore", "subBlocks": {"0": "subBlock"}}, "ignore": true, "elements": [{"assetGlobals": {"params": {"0": "value"}}, "color": "blue", "readonly": true, "elements": [{"feed": "1.vex.iq.controllerButtonDown.blocks.modk.itComponentListChange", "values": [], "type": "DropdownMenu", "autoMinWidth": "true"}], "type": "NameArgument"}], "accepts": ["NoBlock"], "type": "BlockHolder"}, {"assetGlobals": {"localScope": "ignore"}, "ignore": true, "type": "CodeElement", "value": ".", "text": ""}, {"text": "", "type": "CodeElement", "value": "controllerButtonUp("}, {"assetGlobals": {"subBlocks": {"1": "subBlock"}}, "type": "BlockHolder", "elements": [{"elements": [{"feed": "BUTTONComponentListChange", "values": ["E_UP", "E_DWN", "F_UP", "F_DWN", "L_UP", "L_DWN", "R_UP", "R_DWN"], "type": "DropdownMenu", "autoMinWidth": "true"}], "assetGlobals": {"params": {"0": "value"}}, "value": "E_UP", "color": "purple", "readonly": true, "type": "NumberArgument"}], "accepts": ["NumberBlock"]}, {"text": " up", "type": "CodeElement", "value": ")"}], "uid": "1.vex.iq.controllerButtonUp.blocks.modk.it", "color": "purple", "docs": {"category": "input", "description": "The up command is true if the selected button on the __COMPONENT__ is up.", "parameters": [{"type": "num", "description": "The _Button_ to test.", "name": "pin"}], "hint": "", "type": "BooleanBlock", "name": "up"}, "extensionOf": "1.boolean.blocks.modk.it", "tokens": ["buttonPressed"], "stateVars": {"localScope": false, "params": false, "subBlocks": false}}, "1.math.blocks.modk.it": {"category": "operators", "groupElements": [{"enumIcon": "images/vex/enum_icons/rotation-black.png", "elements": [{"values": ["abs", "sqrt", "sin", "cos", "tan", "asin", "acos", "atan", "ln", "log"], "type": "DropdownMenu", "autoMinWidth": "true"}], "assetGlobals": {"params": {"0": "value"}}, "value": "sqrt", "readonly": true, "type": "NameArgument"}, {"text": "of", "type": "CodeElement", "value": "("}, {"assetGlobals": {"subBlocks": {"1": "subBlock"}}, "type": "BlockHolder", "elements": [{"assetGlobals": {"params": {"1": "value"}}, "maxChars": "32", "readonly": false, "maxDecimals": 3, "allowChars": "0-9.//-", "type": "NumberArgument"}], "accepts": ["NumberBlock"]}, {"type": "CodeElement", "value": ")"}], "uid": "1.math.blocks.modk.it", "color": "green", "docs": {"parameters": [{"type": "name", "description": "Select from the list.", "name": "operation"}, {"type": "num", "description": "Type a value or drag in a variable.", "name": "value"}], "description": "*sqrt* calculates the square root of the **value**. *abs* calculates the absolute value of the **value**. *sin* calculates the sine of the **value**. *cos* calculates the cosine of the **value**. *tan* calculates the tangent of the **value**. *asin* calculates the arcsine of the **value**. *acos* calculates the arccosine of the **value**. *atan* calculates the arctangent of the **value**. *ln* calculates the natural logarithm of the **value**. *log* calculates the logarithm of the **value**.", "name": "math", "hint": ""}, "extensionOf": "1.number.blocks.modk.it"}, "1.vex.iq.ui.downloadPlayStop.modk.it": {"styles": {"normal": {"width": 115, "marginLeft": 16, "height": 60}}, "elements": [{"styles": {"active": {"backgroundPosition": "-4px -120px"}, "hover": {"backgroundPosition": "-4px -60px"}, "normal": {"backgroundRepeat": "no-repeat", "top": 0, "height": 40, "cursor": "pointer", "width": 38, "backgroundImage": "url(images/vex/play_download_stop_slots_sprite.png)", "backgroundPosition": "-4px 0px", "left": 0}}, "_onEnter": "function(){var active_block = $('#blocks_pad .block.active').first(); active_block.append('
');}", "_onLeave": "function(){$('.active_indicator').remove();}", "title": "Save to Robot Brain", "onMousedown": "console.debug('mousedown');", "onClick": "function(){CommunicationManager.saveToSlot(); return false;}", "type": "Container", "name": "save_to_robot_brain_button"}, {"styles": {"active": {"backgroundPosition": "-42px -120px"}, "hover": {"backgroundPosition": "-42px -60px"}, "normal": {"backgroundRepeat": "no-repeat", "top": 0, "height": 40, "cursor": "pointer", "width": 39, "backgroundImage": "url(images/vex/play_download_stop_slots_sprite.png)", "backgroundPosition": "-42px 0px", "left": 38}}, "_onEnter": "function(){var active_block = $('#blocks_pad .block.active').first(); active_block.append('
');}", "_onLeave": "function(){$('.active_indicator').remove();}", "title": "Play Program", "onClick": "function(){CommunicationManager.play(); return false;}", "type": "Container", "name": "play_button"}, {"styles": {"active": {"backgroundPosition": "-81px -120px"}, "hover": {"backgroundPosition": "-81px -60px"}, "normal": {"backgroundRepeat": "no-repeat", "top": 0, "height": 40, "cursor": "pointer", "width": 38, "backgroundImage": "url(images/vex/play_download_stop_slots_sprite.png)", "backgroundPosition": "-81px 0px", "left": 77}}, "type": "Container", "name": "stop_button", "onClick": "function(){CommunicationManager.stop(); return false;}", "title": "Stop Program"}, {"styles": {"active": {"backgroundPosition": "-4px -160px"}, "hover": {"backgroundPosition": "-4px -100px"}, "normal": {"backgroundRepeat": "no-repeat", "top": 40, "height": 19, "cursor": "pointer", "width": 115, "backgroundImage": "url(images/vex/play_download_stop_slots_sprite.png)", "backgroundPosition": "-4px -40px", "left": 0}}, "elements": [{"styles": {"normal": {"color": "#2c3d57", "height": "auto", "width": 95, "fontSize": 10, "marginTop": 1, "textAlign": "center", "textShadow": "0 1px 0 rgba(255,255,255,0.7)"}}, "text": "Select a Slot", "type": "FrameworkText", "onLoad": "Events.register('UpdateProgrammingSlot',function(slot){if(slot!=undefined){this.setText('Slot '+slot);}else{ this.setText('Select a Slot'); } },this);"}], "name": "SlotDropdown", "onClick": "function(){Events.register('UpdateProgrammingSlot',function(slot){this.slots={};if(slot!=undefined){this.slots[slot]=true;}},this); Events.broadcast('component.popoverShowContent', [this, {uid:'ui.saveToSlot.modk.it', modal:true, cancelable:true, saveButtonText:'OK', slots:this.slots, positions: ['bottom','left','right','top'] }, function(obj){Events.broadcast('UpdateProgrammingSlot',[obj.slot]); }, this]); }", "type": "Container", "id": "slot_dropdown"}], "type": "Container", "uid": "1.vex.iq.ui.downloadPlayStop.modk.it"}, "1.vex.iq.playTone.blocks.modk.it": {"category": "output", "uid": "1.vex.iq.playTone.blocks.modk.it", "color": "blue", "docs": {"category": "output", "description": "Plays a note for the selected duration. The duration can be a QUARTER, HALF, or WHOLE note.", "parameters": [{"type": "name", "description": "select a **note** from the list", "name": "note"}, {"type": "name", "description": "select a **duration** from the list", "name": "duration"}], "hint": "", "type": "StatementBlock", "name": "play note"}, "extensionOf": "1.statement.blocks.modk.it", "statementElements": [{"elements": [{"text": "play note", "type": "CodeElement", "value": "BRAIN.playTone("}, {"assetGlobals": {"subBlocks": {"1": "subBlock"}}, "type": "BlockHolder", "elements": [{"assetGlobals": {"params": {"1": "value"}}, "color": "blue", "elements": [{"values": ["C1", "D1", "E1", "F1", "G1", "A1", "B1", "C2", "D2", "E2", "F2", "G2", "A2", "B2", "C3", "D3", "E3", "F3", "G3", "A3", "B3", "C4", "D4", "E4", "F4", "G4", "A4", "B4", "C5", "D5", "E5", "F5", "G5", "A5", "B5", "C6", "D6", "E6", "F6", "G6", "A6", "B6", "C7", "D7", "E7", "F7", "G7", "A7", "B7", "C8", "D8", "E8", "F8", "G8", "A8", "B8"], "type": "DropdownMenu", "autoMinWidth": "true"}], "type": "NameArgument", "value": "C1"}], "accepts": []}, {"text": "", "type": "CodeElement", "value": ","}, {"assetGlobals": {"subBlocks": {"2": "subBlock"}}, "type": "BlockHolder", "elements": [{"assetGlobals": {"params": {"2": "value"}}, "color": "blue", "elements": [{"feed": "@id@.amounts", "values": ["QUARTER", "HALF", "WHOLE"], "type": "DropdownMenu", "autoMinWidth": "true"}], "type": "NameArgument", "value": "HALF"}], "accepts": []}, {"text": "", "type": "CodeElement", "value": ");"}], "type": "LineElement"}], "tokens": ["playNote"], "sibling": null}, "1.motorOff.blocks.modk.it": {"category": "output", "uid": "1.motorOff.blocks.modk.it", "color": "blue", "docs": {"parameters": [{"type": "num", "description": "determines which _Motor_ you are controlling", "name": "motor"}], "type": "StatementBlock", "description": "The motorOff command turns off a motor.", "name": "motorOff", "hint": ""}, "extensionOf": "1.statement.blocks.modk.it", "statementElements": [{"elements": [{"text": "motorOff", "type": "CodeElement", "value": "motorOff("}, {"assetGlobals": {"subBlocks": {"0": "subBlock"}}, "type": "BlockHolder", "elements": [{"elements": [{"feed": "MOTORComponentListChange", "values": [], "type": "DropdownMenu", "autoMinWidth": "true"}], "assetGlobals": {"params": {"0": "value"}}, "value": "", "color": "blue", "readonly": true, "type": "NumberArgument"}], "accepts": ["NumberBlock"]}, {"type": "CodeElement", "value": ");"}], "type": "LineElement"}], "tokens": ["motorOff"], "sibling": null, "params": ["MOTOR1"]}, "1.vex.iq.drivetrainTurnDirection.blocks.modk.it": {"category": "input", "enumIcon": "images/vex/enum_icons/rotation-white.png", "extensionOf": "1.enum.blocks.modk.it", "groupElements": [{"assetGlobals": {"localScope": "ignore", "subBlocks": {"0": "subBlock"}}, "ignore": true, "elements": [{"assetGlobals": {"params": {"0": "value"}}, "color": "blue", "readonly": true, "elements": [{"feed": "1.vex.iq.drivetrainTurnDirection.blocks.modk.itComponentListChange", "values": [], "type": "DropdownMenu", "autoMinWidth": "true"}], "type": "NameArgument"}], "accepts": ["NoBlock"], "type": "BlockHolder"}, {"assetGlobals": {"localScope": "ignore"}, "ignore": true, "type": "CodeElement", "value": ".", "text": ""}, {"text": "turn direction", "type": "CodeElement", "value": "turnDirection("}, {"type": "CodeElement", "value": ")"}], "color": "purple", "docs": {"category": "input", "type": "EnumBlock", "description": "Gets the *direction* the **Drivetrain** is turning.", "name": "direction", "hint": ""}, "enumValues": ["RIGHT", "LEFT", "NONE"], "tokens": ["drivetrainTurnDirection"], "stateVars": {"instance": false, "params": false, "subBlocks": false, "localScope": false}, "enumFeed": "@name@.inTurnDirection.values", "uid": "1.vex.iq.drivetrainTurnDirection.blocks.modk.it"}, "1.vex.iq.common.blocks.modk.it": {"blocks": [{"uid": "1.when.blocks.modk.it"}, {"uid": "1.broadcast.blocks.modk.it"}, {"uid": "1.forever.blocks.modk.it"}, {"uid": "1.repeat.blocks.modk.it"}, {"uid": "1.if.blocks.modk.it"}, {"uid": "1.if_else.blocks.modk.it"}, {"uid": "1.while.blocks.modk.it"}, {"uid": "1.wait.blocks.modk.it"}, {"uid": "1.break.blocks.modk.it"}, {"uid": "1.plus.blocks.modk.it"}, {"uid": "1.minus.blocks.modk.it"}, {"uid": "1.multiply.blocks.modk.it"}, {"uid": "1.divide.blocks.modk.it"}, {"uid": "1.greater.blocks.modk.it"}, {"uid": "1.lesser.blocks.modk.it"}, {"uid": "1.equals.blocks.modk.it"}, {"uid": "1.not.blocks.modk.it"}, {"uid": "1.and.blocks.modk.it"}, {"uid": "1.or.blocks.modk.it"}, {"uid": "1.math.blocks.modk.it"}, {"uid": "1.comment.blocks.modk.it"}], "excluded_blocks": [{"uid": "1.randomNumber.blocks.modk.it"}], "uid": "1.vex.iq.common.blocks.modk.it"}, "1.wait.blocks.modk.it": {"category": "control", "uid": "1.wait.blocks.modk.it", "color": "orange", "docs": {"category": "control", "description": "*Waits* for a set amount of *time* (in seconds) before the blocks below run.", "parameters": [{"type": "num", "description": "Type a number, or use a variable. Time can be any positive number.", "name": "time"}], "hint": "Numbers with decimals are allowed. The smallest amount of time is 0.001 seconds.", "type": "StatementBlock", "name": "wait"}, "extensionOf": "1.statement.blocks.modk.it", "statementElements": [{"elements": [{"text": "wait", "type": "CodeElement", "value": "wait("}, {"assetGlobals": {"subBlocks": {"0": "subBlock"}}, "type": "BlockHolder", "elements": [{"assetGlobals": {"params": {"0": "value"}}, "maxChars": "32", "editable": true, "value": "1", "color": "orange", "maxDecimals": 3, "allowChars": "0-9.", "validate": "if(this.value.split('.').length > 2){var newValue = this.value.split('.'); this.value = newValue.shift()+'.'+newValue.shift()+newValue; }", "type": "NumberArgument"}], "accepts": ["NumberBlock"]}, {"text": "", "type": "CodeElement", "value": ","}, {"assetGlobals": {"params": {"1": "value"}}, "readonly": true, "elements": [{"values": ["sec"], "type": "DropdownMenu", "autoMinWidth": "true"}], "type": "NameArgument", "value": "sec"}, {"text": "", "type": "CodeElement", "value": ");"}], "type": "LineElement"}], "tokens": ["delay"], "sibling": null}, "1.not.blocks.modk.it": {"category": "operators", "groupElements": [{"text": "not", "type": "CodeElement", "value": "not("}, {"assetGlobals": {"subBlocks": {"0": "subBlock"}}, "type": "BlockHolder", "elements": [{"assetGlobals": {"params": {"0": "value"}}, "color": "orange", "type": "BooleanArgument"}], "accepts": ["BooleanBlock"]}, {"type": "CodeElement", "value": ")"}], "uid": "1.not.blocks.modk.it", "color": "green", "docs": {"parameters": [{"type": "bool", "description": "Drag in an operator >, <, =, not, and, or.", "name": "condition"}], "description": "This block is true when the **condition** is false, and this block is false if the **condition** is true.", "name": "not", "hint": ""}, "extensionOf": "1.boolean.blocks.modk.it", "tokens": ["not"]}, "1.knob.crimpcards.hardware.modk.it": {"elements": [{"src": "images/hardware/knobcard_wires.png", "layer": "wires", "type": "SimpleImage", "top": "126px", "left": "386px"}, {"src": "images/hardware/knobcard_hardware_block.png", "layer": "base", "type": "SimpleImage", "top": "480px", "left": "325px"}], "uid": "1.knob.crimpcards.hardware.modk.it", "stateVars": {"draggable": true, "wires": true}, "hardwareComponents": [{"assetGlobals": {"wires": {"0": "wire"}}, "isInstance": true, "uid": "1.led.components.modk.it", "name": "LED1"}, {"assetGlobals": {"wires": {"1": "wire"}}, "isInstance": true, "uid": "1.led.components.modk.it", "name": "LED2"}, {"assetGlobals": {"wires": {"2": "wire"}}, "isInstance": true, "uid": "1.led.components.modk.it", "name": "LED3"}, {"assetGlobals": {"wires": {"3": "wire"}}, "isInstance": true, "uid": "1.knob.components.modk.it", "name": "KNOB1"}], "type": "GenericHardware", "thumbnail": "images/hardware/knobcard-tiny.png", "name": "Modkit KnobCard"}, "1.vibe.lilypad.components.modk.it": {"elements": [{"assetGlobals": {"componentImage": {"src": "src", "top": "top", "left": "left"}}, "position": "relative", "type": "SimpleImage"}, {"color": "blue", "top": "34px", "right": "-22px", "type": "ComponentWire", "elements": [{"feed": "digitalOutPinsListChange", "layer": "pins", "angle": 0, "assetGlobals": {"wire": "name"}, "top": "-3px", "values": [], "mode": "OUTPUT_COMPONENT", "type": "DigitalPin", "left": "15px"}]}, {"color": "black", "top": "60px", "right": "-22px", "type": "ComponentWire", "elements": [{"layer": "pins", "angle": 0, "name": "GND", "top": "-3px", "mode": "GROUND_COMPONENT", "type": "DigitalPin", "left": "15px"}]}], "blocks": [{"uid": "1.setVibration.blocks.modk.it"}], "uid": "1.vibe.lilypad.components.modk.it", "library": "1.vibe.library.modk.it", "hideBorder": true, "defaultName": "VIBE", "componentImage": {"src": "images/hardware/lilypad/lilypad_vibe_board.png", "top": "1px", "left": "1px"}, "stateVars": {"top": true, "wire": false, "name": true, "left": true}, "componentArray": "int vibeArray", "configuration": [{"type": "text", "value": "vibeSetup("}, {"type": "objectVar", "value": "name"}, {"type": "text", "value": ","}, {"type": "objectVar", "value": "wire"}, {"type": "text", "value": ");"}], "type": "GenericComponent"}, "1.vex.iq.print.blocks.modk.it": {"category": "output", "uid": "1.vex.iq.print.blocks.modk.it", "settings": {"widthAuto": true, "width": "5", "justification": "LEFT_JUSTIFIED", "plus": "NO_PLUS_SIGN", "decimals": "3"}, "color": "blue", "docs": {"category": "output", "description": "*Print* letters and numbers on the **Brain's LCD** screen. ", "parameters": [{"type": "num bool enum string", "description": "Type a message or drag in a variable.", "name": "message"}], "hint": "The *print* command moves the text entry point to the end of whatever was printed, just like when you are typing in a word processor.", "type": "StatementBlock", "name": "print"}, "extensionOf": "1.statement.blocks.modk.it", "statementElements": [{"elements": [{"text": "print ", "type": "CodeElement", "value": "BRAIN.print("}, {"onAddSubBlock": "if(this.subBlock.type=='NumberBlock'){this.topLevelWidget.showConfigButton=true; Events.broadcast(this.topLevelWidget.id+'.changeConfigButton',[]); }", "onLoad": "if(Boolean(this.subBlock)){if(this.subBlock.type=='NumberBlock'){this.topLevelWidget.showConfigButton=true; Events.broadcast(this.topLevelWidget.id+'.changeConfigButton',[]);}}", "elements": [{"assetGlobals": {"params": {"0": "value"}}, "maxChars": 30, "value": "Hello", "color": "blue", "allowChars": "A-Za-z0-9 _\\.\\-\\(\\)\\*&\\^%\\$\\#\\@\\!\\+\\=\\:\\;\\,\\<\\>\\?\\/\\{\\}\\[\\]\\|\\`\\~", "type": "StringArgument"}], "assetGlobals": {"subBlocks": {"1": "subBlock"}}, "accepts": ["NumberBlock", "BooleanBlock", "EnumBlock.rotaryDirection", "EnumBlock.color"], "onRemoveSubBlock": "this.topLevelWidget.showConfigButton=false; Events.broadcast(this.topLevelWidget.id+'.changeConfigButton',[]); ", "type": "BlockHolder"}, {"styles": {"shown": {"styleCondition": "this.topLevelWidget.showConfigButton == true", "display": "block", "visibility": "visible"}, "normal": {"bottom": 0, "visibility": "hidden", "height": 21, "width": 25, "marginLeft": 6, "marginRight": 1, "position": "relative", "display": "none", "left": 0}}, "onLoad": " Events.register(this.topLevelWidget.id+'.changeConfigButton',function(){this.testStyleConditions();},this); this.getCode=function(){var settings = this.settingsPopover.settings; var width=settings.width; if(Boolean(settings.widthAuto)){width='0';} return ','+settings.justification+','+width+','+settings.plus+','+settings.decimals;};if(Boolean(this.topLevelWidget.settings)){this.settingsPopover = modkitNamespace.AssetFactory.loadAsset({'type':'SettingsPopover','settings':{'uid':'1.vex.iq.settingsPrint.blocks.modk.it','justification':this.topLevelWidget.settings.justification, 'width':this.topLevelWidget.settings.width, 'widthAuto':this.topLevelWidget.settings.widthAuto,'plus':this.topLevelWidget.settings.plus, 'decimals':this.topLevelWidget.settings.decimals}});}else{ this.settingsPopover = modkitNamespace.AssetFactory.loadAsset({'type':'SettingsPopover','settings':{'uid':'1.vex.iq.settingsPrint.blocks.modk.it'}}); } this.topLevelWidget.settingsPopover = this.settingsPopover; this.settingsPopover.callback = function(oldSettings,newSettings,isHidden){if(this.topLevelWidget.settings==undefined){this.topLevelWidget.settings={};} for(var setting in newSettings){if (setting!='uid'){ this.topLevelWidget.settings[setting]=newSettings[setting];} } if (Boolean(this.$markup.parents('.block').last().get(0).blockObject)) { if (Boolean(this.$markup.parents('.block').last().get(0).blockObject.container)) {this.$markup.parents('.block').last().get(0).blockObject.container.codeUpdate();}}}; this.settingsPopover.context = this;this.testStyleConditions();", "elements": [], "name": "TestConfigButton", "type": "ConfigButton", "onClick": "function(){ this.settingsPopover.showPopover(this);}", "htmlClass": "print_settings_button"}, {"type": "CodeElement", "value": ");"}], "type": "LineElement"}], "tokens": ["print"], "sibling": null, "params": ["HELLO"], "stateVars": {"settings": true, "top": true, "subBlocks": false, "sibling": false, "params": false, "left": true}}, "1.vex.iq.setMotorSpeed.blocks.modk.it": {"category": "setup", "uid": "1.vex.iq.setMotorSpeed.blocks.modk.it", "color": "darkblue", "docs": {"parameters": [{"range": "0-150 rpm", "type": "num", "description": "Select from the list, type a number, or use a variable. Speed ranges from +100% to -100%, and from +120 to -120 RPM.", "name": "speed"}], "type": "StatementBlock", "description": "*Set velocity* sets the velocity of the __COMPONENT__ in percent or revolutions per minute (RPM). Velocity has both speed and direction. The number entered is the speed. The positive (+) or negative (-) sign sets direction. You can ignore the sign and just enter posative numbers, then set the direction as needed.", "name": "set velocity", "hint": "Negative **speed** will go in the opposite direction that is selected. Numbers with decimals are allowed."}, "extensionOf": "1.statement.blocks.modk.it", "statementElements": [{"elements": [{"text": "set velocity to", "type": "CodeElement", "value": "setSpeed("}, {"assetGlobals": {"subBlocks": {"0": "subBlock"}}, "type": "BlockHolder", "elements": [{"onLoad": "Events.register(this.block.id+'_rangeMinMax',function(min,max){this.rangeMin=min;this.rangeMax=max;this.testAllowChars();},this);", "elements": [{"feed": "@id@.speeds", "values": ["0", "25", "50", "75", "100"], "type": "DropdownMenu", "autoMinWidth": "true"}], "assetGlobals": {"params": {"0": "value"}}, "maxChars": "32", "value": "50", "color": "darkblue", "readonly": false, "rangeMin": -100, "type": "NumberArgument", "allowChars": "0-9\\-", "rangeMax": 100, "_onBlur": "console.log(this.value);"}], "accepts": ["NumberBlock"]}, {"text": "", "type": "CodeElement", "value": ","}, {"_hideCodeView": true, "code": "SPEED_PERCENT", "assetGlobals": {"params": {"1": "value"}}, "value": "%", "readonly": true, "elements": [{"values": [{"trigger": "Events.broadcast(this.container.container.container.block.id+'_rangeMinMax',[-100,100]); Events.broadcast(this.container.container.container.block.id+'.speeds',[['0','25','50','75','100']]);", "code": "SPEED_PERCENT", "name": "%", "value": "%"}, {"trigger": "Events.broadcast(this.container.container.container.block.id+'_rangeMinMax',[-120,120]);Events.broadcast(this.container.container.container.block.id+'.speeds',[['0','25','50','80','100','120']]);", "code": "RPM", "name": "RPM", "value": "RPM"}], "type": "DropdownMenu", "autoMinWidth": "true"}], "type": "NameArgument"}, {"text": "", "type": "CodeElement", "value": ");"}], "type": "LineElement"}], "tokens": ["setMotorSpeed"]}, "ui.login.modk.it": {"styles": {"hide": {"styleCondition": "pyInterface =='cfe'", "display": "none", "visibility": "hidden"}, "normal": {"_width": "110px", "height": 46, "width": 46, "boxFloat": "right", "marginRight": "10px", "position": "relative", "marginTop": "8px"}}, "onLoad": "this.testStyleConditions(); Events.register('SignedInOut', function(status,email){ if(status=='signed_in'){ this.signedIn = true; this.$markup.find('.user_name').html(((email.length > 20) ? email.split('@')[0] : email) + '
'); this.$markup.attr('title', email);} if(status=='signed_out'){ this.signedIn = false; this.$markup.find('.user_name').html('Sign In'); } },this);", "uid": "ui.login.modk.it", "type": "HTMLContainer", "html": "
Sign In

Sign in with:

\"Sign \"Sign
", "onClick": "function(){ if(this.signedIn == true){Events.broadcast('component.popoverShowContent', [this, {uid:'ui.logoutPopover.modk.it', modal:false, cancelable:true, loggedIn:false, positions: ['bottom','left','right','top'] }, this]); }else{ Events.broadcast('component.popoverShowContent', [this, {uid:'ui.loginPopover.modk.it', modal:false, cancelable:true, loggedIn:false, positions: ['bottom','left','right','top'] }, this]);}}", "htmlClass": "user overflow_visible", "name": "LoaderLogin"}, "ui.projectListing.modk.it": {"styles": {"selected": {"zIndex": 998}, "hover": {"zIndex": 999}, "push_left": {"styleCondition": "(this.number%2 == 1 && this.$markup.hasClass('selected'))", "_left": -100}, "normal": {"zIndex": "auto", "float": "left", "transition": "left 300ms ease-in-out", "borderRadius": 3, "marginBottom": 8, "height": 134, "cursor": "pointer", "width": 335, "marginLeft": 8, "background": "transparent", "marginRight": 8, "position": "relative", "marginTop": 8, "border": "3px solid transparent", "left": 0}}, "onLoad": "Events.register('SelectProjectToLoad', function(projectID){ if(projectID==this.id){ this.elements[0].$markup.addClass('selected'); this.$markup.addClass('selected'); }else{ this.elements[0].$markup.removeClass('selected'); this.$markup.removeClass('selected'); }; this.testStyleConditions(); }, this);", "elements": [{"styles": {"hover": {"opacity": "1", "styleCondition": "container.hover", "display": "block", "visibility": "visible"}, "selected": {"opacity": "1", "_border": "3px solid rgba(35, 124, 245, 0.4)", "_backgroundColor": "rgba(141,206,252,0.3)", "visibility": "visible", "backgroundColor": "rgb(214, 233, 247)", "border": "3px solid rgb(161, 196, 245)", "display": "block"}, "normal": {"opacity": "0", "_border": "3px solid rgba(35, 124, 245, .7)", "_backgroundColor": "rgba(141,206,252,0.4)", "top": -3, "transition": "all 300ms ease-in-out", "visibility": "hidden", "height": "134px !important", "padding": 0, "width": "340px !important", "backgroundColor": "rgb(203, 229, 248)", "position": "absolute", "border": "3px solid rgb(97, 160, 245)", "display": "none", "borderRadius": 3, "left": -3}}, "htmlClass": "selection_box", "elements": [{"styles": {"selected": {"opacity": 1, "styleCondition": "container.selected", "display": "block", "visibility": "visible"}, "normal": {"transition": "opacity 300ms ease-in-out", "opacity": 0, "right": 10, "fontWeight": "bold", "top": 55, "float": "left", "visibility": "hidden", "height": "auto", "width": 90, "fontSize": 15, "position": "absolute", "display": "none"}}, "name": "ProjectOpenButton", "text": " open  ", "onClick": "function(evt){StateManager.doLoad({'UserID': this.topLevelWidget.userID,'ProjectID': this.topLevelWidget.projectID}); }", "_onClick": "function(evt){console.debug('open project', this.container.id)}", "type": "FrameworkButton"}, {"styles": {"selected": {"opacity": 1, "styleCondition": "container.selected", "display": "block", "visibility": "visible"}, "normal": {"transition": "opacity 300ms ease-in-out", "opacity": 0, "right": 10, "fontWeight": "bold", "top": 90, "float": "left", "visibility": "hidden", "height": "auto", "width": 90, "fontSize": 15, "position": "absolute", "display": "none"}}, "name": "ProjectDeleteButton", "text": " delete", "onClick": "function(evt){ this.setText('deleting...');this.container.elements[0].hide(); StateManager.doDelete({'UserID': this.topLevelWidget.userID,'ProjectID': this.topLevelWidget.projectID},function(project){this.topLevelWidget.remove(500);},this );}", "_onClick": "function(evt){console.debug('delete project', this.container.id)}", "type": "FrameworkButton"}], "type": "Container", "onLoad": "Events.register('SelectProjectToLoad', function(projectID){});"}, {"styles": {"normal": {"top": 0, "left": 0}}, "src": "images/vex/project_default-128x128.jpg", "type": "Image"}, {"assetGlobals": {"projectName": "text"}, "text": "Project Name", "styles": {"normal": {"comment": ".9 below is somehow necessary to avoid text from being rendered invisible on safari", "opacity": 0.9, "whiteSpace": "nowrap", "top": 16, "transition": "all 300ms ease-in-out", "fontWeight": "bold", "fontSize": 20, "max-width": 195, "overflow": "hidden", "left": 140}}, "type": "FrameworkText"}, {"assetGlobals": {"projectDate": "text"}, "text": "date", "styles": {"normal": {"top": 40, "fontSize": 12, "whiteSpace": "nowrap", "left": 140}}, "type": "FrameworkText"}, {"styles": {"normal": {"top": 60, "left": 140}}, "src": "images/indicator_code-30x22.png", "type": "Image"}, {"assetGlobals": {"projectCodeCount": "text"}, "text": "", "styles": {"normal": {"fontWeight": "bold", "top": 60, "fontSize": 12, "whiteSpace": "nowrap", "left": 170}}, "type": "FrameworkText"}, {"styles": {"normal": {"top": 84, "left": 140}}, "src": "images/vex/indicator_parts-27x19.png", "type": "Image"}, {"assetGlobals": {"projectPartCount": "text"}, "text": "", "styles": {"normal": {"fontWeight": "bold", "top": 87, "fontSize": 12, "whiteSpace": "nowrap", "left": 170}}, "type": "FrameworkText"}, {"assetGlobals": {"projectTags": "text"}, "text": "Tags", "hidden": true, "type": "FrameworkText", "styles": {"normal": {"whiteSpace": "nowrap", "fontWeight": "bold", "top": 100, "visible": "hidden", "fontSize": 12, "display": "none", "left": 140}}}], "uid": "ui.projectListing.modk.it", "_onMouseover": "this.elements[0].$markup.addClass('hover');", "_onMouseout": "this.elements[0].$markup.removeClass('hover');", "number": 0, "stateVars": {"projectID": true, "projectName": true, "projectTags": true, "userID": true, "projectCodeCount": true, "projectDate": true, "projectPartCount": true}, "onClick": "function(evt){Events.broadcast('SelectProjectToLoad', [this.id]);}", "_onClick": "function(evt){ for(var pr in this.container.elements){ console.debug(pr); pr.testStyleConditions();} this.$markup.add('selected'); pr.testStyleConditions();}", "type": "Container"}, "1.vex.iq.drivetrainDriveDirection.blocks.modk.it": {"category": "input", "enumIcon": "images/vex/enum_icons/direction-white.png", "extensionOf": "1.enum.blocks.modk.it", "groupElements": [{"assetGlobals": {"localScope": "ignore", "subBlocks": {"0": "subBlock"}}, "ignore": true, "elements": [{"assetGlobals": {"params": {"0": "value"}}, "color": "blue", "readonly": true, "elements": [{"feed": "1.vex.iq.drivetrainDriveDirection.blocks.modk.itComponentListChange", "values": [], "type": "DropdownMenu", "autoMinWidth": "true"}], "type": "NameArgument"}], "accepts": ["NoBlock"], "type": "BlockHolder"}, {"assetGlobals": {"localScope": "ignore"}, "ignore": true, "type": "CodeElement", "value": ".", "text": ""}, {"text": "drive direction", "type": "CodeElement", "value": "driveDirection("}, {"type": "CodeElement", "value": ")"}], "color": "purple", "docs": {"category": "input", "type": "EnumBlock", "description": "Gets the *direction* the **Drivetrain** is driving.", "name": "direction", "hint": ""}, "enumValues": ["FWD", "REV", "NONE"], "tokens": ["drivetrainDriveDirection"], "stateVars": {"instance": false, "params": false, "subBlocks": false, "localScope": false}, "enumFeed": "@name@.inDriveDirection.values", "uid": "1.vex.iq.drivetrainDriveDirection.blocks.modk.it"}, "1.vex.iq.rotatorCurrent.blocks.modk.it": {"category": "input", "groupElements": [{"assetGlobals": {"localScope": "ignore", "subBlocks": {"0": "subBlock"}}, "ignore": true, "elements": [{"assetGlobals": {"params": {"0": "value"}}, "color": "blue", "readonly": true, "elements": [{"feed": "1.vex.iq.rotatorCurrent.blocks.modk.itComponentListChange", "values": [], "type": "DropdownMenu", "autoMinWidth": "true"}], "type": "NameArgument"}], "accepts": ["NoBlock"], "type": "BlockHolder"}, {"assetGlobals": {"localScope": "ignore"}, "ignore": true, "type": "CodeElement", "value": ".", "text": ""}, {"text": "current in", "type": "CodeElement", "value": "current("}, {"elements": [{"values": ["amps"], "type": "DropdownMenu", "autoMinWidth": "true"}], "assetGlobals": {"params": {"1": "value"}}, "value": "amps", "readonly": true, "hideCodeView": true, "type": "NameArgument"}, {"type": "CodeElement", "value": ")"}], "uid": "1.vex.iq.rotatorCurrent.blocks.modk.it", "color": "purple", "docs": {"category": "input", "type": "NumberBlock", "description": "Gets the *current* the **Rotator** is drawing in amps.", "name": "current ", "hint": ""}, "extensionOf": "1.number.blocks.modk.it", "tokens": ["currentRotatorEncoder"], "stateVars": {"localScope": false, "params": false, "subBlocks": false}}, "1.vex.iq.motorCurrent.blocks.modk.it": {"category": "input", "groupElements": [{"assetGlobals": {"localScope": "ignore", "subBlocks": {"0": "subBlock"}}, "ignore": true, "elements": [{"assetGlobals": {"params": {"0": "value"}}, "color": "blue", "readonly": true, "elements": [{"feed": "1.vex.iq.motorCurrent.blocks.modk.itComponentListChange", "values": [], "type": "DropdownMenu", "autoMinWidth": "true"}], "type": "NameArgument"}], "accepts": ["NoBlock"], "type": "BlockHolder"}, {"assetGlobals": {"localScope": "ignore"}, "ignore": true, "type": "CodeElement", "value": ".", "text": ""}, {"text": "current in", "type": "CodeElement", "value": "current("}, {"elements": [{"values": ["amps"], "type": "DropdownMenu", "autoMinWidth": "true"}], "assetGlobals": {"params": {"1": "value"}}, "value": "amps", "readonly": true, "hideCodeView": true, "type": "NameArgument"}, {"type": "CodeElement", "value": ")"}], "uid": "1.vex.iq.motorCurrent.blocks.modk.it", "color": "purple", "docs": {"category": "input", "type": "NumberBlock", "description": "Gets the *current* the __COMPONENT__ is drawing in amps.", "name": "current ", "hint": ""}, "extensionOf": "1.number.blocks.modk.it", "tokens": ["currentMotorEncoder"], "stateVars": {"localScope": false, "params": false, "subBlocks": false}}, "1.vex.iq.turnMotorFor.blocks.modk.it": {"category": "output", "uid": "1.vex.iq.turnMotorFor.blocks.modk.it", "color": "blue", "docs": {"category": "output", "description": "*Turns* the **Motor** a selected direction for an amount of time. The *direction* is either FWD or REV. The *time* is in seconds (sec).", "parameters": [{"options": ["FWD", "REV"], "type": "rotation", "description": "Select from the list.", "name": "direction"}, {"type": "num", "description": "Type a number, or use a variable. Time can be any positive number.", "name": "time"}], "hint": "Numbers with decimals are allowed.", "type": "StatementBlock", "name": "turn for"}, "extensionOf": "1.statement.blocks.modk.it", "statementElements": [{"elements": [{"text": "turn  ", "type": "CodeElement", "value": "turnSeconds("}, {"assetGlobals": {"subBlocks": {"0": "subBlock"}}, "type": "BlockHolder", "elements": [{"elements": [{"feed": "@name@.outDirection.values", "values": ["FWD", "REV"], "type": "DropdownMenu", "autoMinWidth": "true"}], "assetGlobals": {"params": {"0": "value"}}, "value": "", "color": "blue", "readonly": true, "type": "NumberArgument"}], "accepts": ["NumberBlock"]}, {"text": "for", "type": "CodeElement", "value": ","}, {"assetGlobals": {"subBlocks": {"1": "subBlock"}}, "type": "BlockHolder", "elements": [{"elements": [{"values": ["1", "5", "10", "60"], "type": "DropdownMenu", "autoMinWidth": "true"}], "assetGlobals": {"params": {"1": "value"}}, "maxChars": "32", "color": "blue", "allowChars": "0-9.", "type": "NumberArgument"}], "accepts": ["NumberBlock"]}, {"elements": [{"values": ["sec"], "type": "DropdownMenu", "autoMinWidth": "true"}], "assetGlobals": {"params": {"2": "value"}}, "value": "sec", "readonly": true, "hideCodeView": true, "type": "NameArgument"}, {"text": "", "type": "CodeElement", "value": ");"}], "type": "LineElement"}], "tokens": ["turnMotorFor"], "sibling": null}, "1.vex.iq.setI2CRegister.blocks.modk.it": {"category": "output", "uid": "1.vex.iq.setI2CRegister.blocks.modk.it", "color": "blue", "docs": {"category": "output", "description": "The digitalWrite command sets the value of a digital pin.", "parameters": [{"type": "num", "description": "determines which pin you are setting", "name": "pin"}, {"type": "num", "description": "determines whether the pin will be HIGH or LOW", "name": "state"}], "hint": "", "type": "StatementBlock", "name": "set I2C register"}, "extensionOf": "1.statement.blocks.modk.it", "statementElements": [{"elements": [{"text": "send i2c register", "type": "CodeElement", "value": "vexPtr->WriteI2CDeviceRegister("}, {"assetGlobals": {"subBlocks": {"0": "subBlock"}}, "type": "BlockHolder", "elements": [{"assetGlobals": {"params": {"0": "value"}}, "color": "blue", "elements": [{"feed": "digitalOutPinsListChange", "readonly": false, "values": [], "autoMinWidth": "true", "type": "DropdownMenu", "block": null}], "type": "NumberArgument", "block": null}], "accepts": ["NumberBlock"], "block": null}, {"type": "CodeElement", "value": ","}, {"assetGlobals": {"subBlocks": {"1": "subBlock"}}, "type": "BlockHolder", "elements": [{"assetGlobals": {"params": {"1": "value"}}, "color": "blue", "readonly": true, "type": "NumberArgument", "value": "0x00"}], "accepts": ["NumberBlock"], "block": null}, {"type": "CodeElement", "value": ","}, {"assetGlobals": {"subBlocks": {"2": "subBlock"}}, "type": "BlockHolder", "elements": [{"assetGlobals": {"params": {"2": "value"}}, "color": "blue", "readonly": true, "type": "NumberArgument", "value": "0"}], "accepts": ["NumberBlock"], "block": null}, {"type": "CodeElement", "value": ");"}], "type": "LineElement"}], "tokens": ["digitalWrite"]}, "1.break.blocks.modk.it": {"category": "control", "uid": "1.break.blocks.modk.it", "color": "orange", "docs": {"category": "control", "description": "Exits loop blocks *forever, repeat, and while*. The program moves on to the next block in the stack below the current loop block. If not within loop block, break exits the *when* event handler altogether.", "parameters": [], "hint": "", "type": "StatementBlock", "name": "break"}, "extensionOf": "1.statement.blocks.modk.it", "statementElements": [{"elements": [{"text": "break", "type": "CodeElement", "value": "break;"}], "type": "LineElement"}], "tokens": ["break"], "sibling": null}, "1.vex.iq.drivetrain.controllerActions.components.modk.it": {"uid": "1.vex.iq.drivetrain.controllerActions.components.modk.it", "extensionOf": "1.vex.iq.controllerActions.components.modk.it", "controllerEvents": {"REV_DIGITAL": {"RELEASED": "stop();", "PRESSED": "setDriveSpeed(100);drive(REV);"}, "LEFT_DIGITAL": {"RELEASED": "stop();", "PRESSED": "setTurnSpeed(100);turn(LEFT);"}, "FWD_REV_ANALOG": {"CHANGED": "int speed = CONTROLLER.@joystick@.position()*1.2; updateFwdReverse(speed);"}, "RIGHT_DIGITAL": {"RELEASED": "stop();", "PRESSED": "setTurnSpeed(100);turn(RIGHT);"}, "FWD_DIGITAL": {"RELEASED": "stop();", "PRESSED": "setDriveSpeed(100);drive(FWD);"}, "TANK_RIGHT_ANALOG": {"CHANGED": "int speed = CONTROLLER.@joystick@.position()*1.2; tankRight(speed);"}, "RIGHT_LEFT_ANALOG": {"CHANGED": "int speed = 0.0 - (CONTROLLER.@joystick@.position()*1.2); updateLeftRight(speed);"}, "REV_FWD_ANALOG": {"CHANGED": "int speed = 0.0 - (CONTROLLER.@joystick@.position()*1.2); updateFwdReverse(speed);"}, "TANK_LEFT_ANALOG": {"CHANGED": "int speed = CONTROLLER.@joystick@.position()*1.2; tankLeft(speed);"}, "LEFT_RIGHT_ANALOG": {"CHANGED": "int speed = CONTROLLER.@joystick@.position()*1.2; updateLeftRight(speed);"}}, "analogControllerValuesY": [{"name": "None", "value": "none"}, {"name": "Drive ▲/▼", "value": "FWD_REV_ANALOG"}, {"name": "Turn ◄/►", "value": "LEFT_RIGHT_ANALOG"}, {"name": "L-Drive ▲/▼", "value": "TANK_LEFT_ANALOG"}, {"name": "R-Drive ▲/▼", "value": "TANK_RIGHT_ANALOG"}], "analogControllerValuesX": [{"name": "None", "value": "none"}, {"name": "Drive ▲/▼", "value": "REV_FWD_ANALOG"}, {"name": "Turn ◄/►", "value": "LEFT_RIGHT_ANALOG"}, {"name": "L-Drive ▲/▼", "value": "TANK_RIGHT_ANALOG"}, {"name": "R-Drive ▲/▼", "value": "TANK_LEFT_ANALOG"}], "digitalControllerValues": [{"name": "None", "value": "NONE"}, {"name": "Drive ▲", "value": "FWD_DIGITAL"}, {"name": "Drive ▼", "value": "REV_DIGITAL"}, {"name": "Turn ◄", "value": "LEFT_DIGITAL"}, {"name": "Turn ►", "value": "RIGHT_DIGITAL"}]}, "1.led.library.modk.it": {"definitions": "#define ON HIGH\n#define OFF LOW\nvoid setupLED(int ledNum,int pinNum){ledNum-=LED_OFFSET;\nledArray[ledNum]=pinNum;\npinMode(ledArray[ledNum],OUTPUT);}\nvoid setLED(int ledNum,int value){ledNum-=LED_OFFSET;\ndigitalWrite(ledArray[ledNum],value);}", "componentArray": "ledArray", "type": "ComponentLibrary", "uid": "1.led.library.modk.it"}, "1.vex.wizard.linknotcurrent.modk.it": {"extensionOf": "wizard.modk.it", "uid": "1.vex.wizard.linknotcurrent.modk.it", "currentStep": {"uid": "1.vex.wizard.linknotcurrent.steps.modk.it"}}, "ui.dropdownMenuItem.modk.it": {"styles": {"mouseover": {"backgroundColor": "#cccccc"}, "normal": {"float": "left", "min-width": "100%", "height": 24, "padding": "5px 20px 5px 20px", "width": "auto", "position": "relative"}}, "onLoad": "this.getSubMenu=function(){if(Boolean(this.elements[1])){ if(Boolean(this.elements[1].elements[0])) return this.elements[1].elements[0]; }};", "elements": [{"assetGlobals": {"name": "text"}, "text": "item", "styles": {"normal": {"fontFamily": "Helvetica, Arial, sans-serif", "height": "auto", "width": "auto", "fontSize": "12px", "position": "relative", "textAlign": "left"}}, "type": "FrameworkText"}, {"styles": {"normal": {"width": 10, "position": "absolute", "right": "2px", "height": 10}}, "htmlClass": "submenu_holder", "type": "Container", "assetGlobals": {"RightElements": "elements"}, "onLoad": "this.setValue = function(v){ this.container.container.container.container.setValue(v); this.container.container.container.remove()};"}], "uid": "ui.dropdownMenuItem.modk.it", "type": "Container", "value": "value", "htmlClass": "dropdownItem"}, "1.motorOn.blocks.modk.it": {"category": "output", "uid": "1.motorOn.blocks.modk.it", "color": "blue", "docs": {"category": "output", "description": "The motorOn command turns on a _Motor_ and sets its direction.", "parameters": [{"type": "num", "description": "determines which _Motor_ you are controlling", "name": "motor"}, {"type": "num", "description": "sets the direction the _Motor_ will move", "name": "direction"}], "hint": "", "type": "StatementBlock", "name": "motorOn"}, "extensionOf": "1.statement.blocks.modk.it", "statementElements": [{"elements": [{"text": "motorOn", "type": "CodeElement", "value": "motorOn("}, {"assetGlobals": {"subBlocks": {"0": "subBlock"}}, "type": "BlockHolder", "elements": [{"elements": [{"feed": "MOTORComponentListChange", "values": [], "type": "DropdownMenu", "autoMinWidth": "true"}], "assetGlobals": {"params": {"0": "value"}}, "value": "", "color": "blue", "readonly": true, "type": "NumberArgument"}], "accepts": ["NumberBlock"]}, {"type": "CodeElement", "value": ","}, {"assetGlobals": {"subBlocks": {"1": "subBlock"}}, "type": "BlockHolder", "elements": [{"assetGlobals": {"params": {"1": "value"}}, "color": "blue", "elements": [{"values": ["FWD", "REV"], "type": "DropdownMenu", "autoMinWidth": "true"}], "type": "NumberArgument", "value": "FWD"}], "accepts": ["NumberBlock"]}, {"type": "CodeElement", "value": ");"}], "type": "LineElement"}], "tokens": ["motorOn"], "sibling": null, "params": ["MOTOR1", "FWD"]}, "1.repeat.blocks.modk.it": {"category": "control", "uid": "1.repeat.blocks.modk.it", "color": "orange", "docs": {"parameters": [{"type": "num", "description": "Type a value or drag in a variable.", "name": "count"}], "description": "Blocks placed inside the *repeat* loop will be run **count** times.", "name": "repeat", "hint": "**Count** can be any whole number 1 or greater. Numbers with decimals will be rounded down to a whole number."}, "extensionOf": "1.c.autoyield.blocks.modk.it", "statementElements": [{"elements": [{"text": "repeat", "type": "CodeElement", "value": "repeat("}, {"assetGlobals": {"subBlocks": {"0": "subBlock"}}, "type": "BlockHolder", "elements": [{"assetGlobals": {"params": {"0": "value"}}, "maxChars": "10", "value": "10", "color": "orange", "allowChars": "0-9", "type": "NumberArgument"}], "accepts": ["NumberBlock"]}, {"type": "CodeElement", "value": "){"}], "type": "LineElement"}], "includes": ["1.modkit.h.code.modk.it"], "tokens": ["repeat"]}, "1.vex.iq.stopMotor.blocks.modk.it": {"category": "output", "uid": "1.vex.iq.stopMotor.blocks.modk.it", "color": "blue", "docs": {"category": "output", "description": "*Stops* the __COMPONENT__ from turning.", "title": "stop motor", "hint": "", "type": "StatementBlock", "name": "stop"}, "extensionOf": "1.statement.blocks.modk.it", "statementElements": [{"elements": [{"text": "stop  ", "type": "CodeElement", "value": "stop();"}], "type": "LineElement"}], "tokens": ["goMotor"], "sibling": null}, "1.vex.iq.setSoundEffect.blocks.modk.it": {"category": "setup", "uid": "1.vex.iq.setSoundEffect.blocks.modk.it", "color": "darkblue", "docs": {"category": "setup", "description": "Plays a tone.", "parameters": [{"type": "name", "description": "sets the **sound effect** from the list", "name": "effect"}], "hint": "", "type": "StatementBlock", "name": "play tone"}, "extensionOf": "1.statement.blocks.modk.it", "statementElements": [{"elements": [{"text": "set sound effect to", "type": "CodeElement", "value": "BRAIN.setSoundEffect("}, {"assetGlobals": {"subBlocks": {"1": "subBlock"}}, "type": "BlockHolder", "elements": [{"assetGlobals": {"params": {"1": "value"}}, "color": "darkblue", "elements": [{"feed": "@id@.amounts", "values": ["0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12", "13", "14", "15"], "type": "DropdownMenu", "autoMinWidth": "true"}], "type": "NameArgument", "maxChars": "32"}], "accepts": []}, {"text": "", "type": "CodeElement", "value": ");"}], "type": "LineElement"}], "tokens": ["setSoundEffect"], "sibling": null}, "1.vex.iq.drivetrain.components.modk.it": {"uid": "1.vex.iq.drivetrain.components.modk.it", "library": "1.motor.library.modk.it", "maxComponents": 1, "_elements": [{"styles": {"normal": {"borderRadius": "15px", "top": -50, "height": 350, "width": 480, "backgroundColor": "", "position": "absolute", "border": "4px solid rgba(18, 52, 86, 0.4)", "display": "none", "left": 10}}, "htmlClass": "vex_component_wrapper", "elements": [{"styles": {"normal": {"opacity": 0.6, "top": 32, "left": 330}}, "src": "images/vex/drivetrain/compass_rotate_iso.png", "type": "Image"}, {"styles": {"normal": {"right": 5, "bottom": 5, "height": 20, "zIndex": 1, "width": 20, "position": "absolute", "left": "auto"}}, "elements": [], "name": "DrivetrainConfigButton", "type": "ConfigButton", "onClick": "function(){this.container.container.showComponentSettings(this);}", "htmlClass": "hardware_settings_button"}, {"uid": "ui.button.controllerConfig.modk.it"}], "type": "Container", "name": "Wrapper"}, {"styles": {"placed": {"top": 0, "left": 0}, "normal": {"width": "auto", "top": 45, "height": "42px", "_opacity": 0.5, "left": 60}}, "htmlClass": "vex_component_label vex_component_drivetrain clearfix", "elements": [{"styles": {"placed": {"marginLeft": "10px"}, "normal": {"width": "auto", "color": "#2a323d", "marginBottom": "auto", "height": "auto", "fontWeight": "bold", "_opacity": 0.5, "marginLeft": 92, "fontSize": "20px", "marginRight": "10px", "position": "relative", "marginTop": "10px", "textShadow": "0px 1px 0 #C4C4C4"}}, "text": "Drivetrain", "type": "FrameworkText", "htmlClass": "vex_component_label_name"}], "type": "Container"}, {"styles": {"normal": {"position": "absolute"}}, "htmlClass": "vex_component_drawer_image", "type": "Image", "src": "images/vex/components/standard_drivetrain-150x.png"}, {"styles": {"normal": {"top": -20, "_transform": "scale(0.8, 0.8)", "height": "275px", "width": "388px", "_-ms-transform": "scale(0.8, 0.8)", "position": "absolute", "_-webkit-transform": "scale(0.8, 0.8)", "left": 16}}, "htmlClass": "isometric_drivetrain vex_component_pad_image", "elements": [{"styles": {"normal": {"position": "absolute"}}, "htmlClass": "iso_drivetrain_shadow", "type": "Image", "src": "images/vex/drivetrain/drivetrain_shadow.png"}, {"styles": {"travel160": {"backgroundImage": "url(images/vex/drivetrain/wheel_left-160mm.png)", "styleCondition": "this.container.container.settingsPopover.settings.frontWheelType == 'FRONT_160_TRACTION'"}, "omni": {"backgroundImage": "url(images/vex/drivetrain/wheel_left-omni.png)", "styleCondition": "this.container.container.settingsPopover.settings.frontWheelType == 'FRONT_200_OMNI'"}, "travel250": {"backgroundImage": "url(images/vex/drivetrain/wheel_left-250mm.png)", "top": -8, "styleCondition": "this.container.container.settingsPopover.settings.frontWheelType == 'FRONT_250_TRACTION'", "left": 83}, "normal": {"top": -3, "height": 202, "width": 195, "background": "transparent url(images/vex/drivetrain/wheel_left-200mm.png) no-repeat", "position": "absolute", "left": 92}}, "htmlClass": "iso_left_front_wheel", "type": "Container", "onLoad": "Events.register('SettingsUpdate', function(){ this.testStyleConditions();}, this);"}, {"styles": {"travel160": {"backgroundImage": "url(images/vex/drivetrain/wheel_left-160mm.png)", "styleCondition": "this.container.container.settingsPopover.settings.rearWheelType == 'REAR_160_TRACTION'"}, "travel250_position": {"top": 47, "styleCondition": "this.container.container.settingsPopover.settings.rearWheelType == 'REAR_250_TRACTION' && this.container.container.settingsPopover.settings.frontWheelType != 'FRONT_250_TRACTION'", "left": -11}, "omni": {"backgroundImage": "url(images/vex/drivetrain/wheel_left-omni.png)", "styleCondition": "this.container.container.settingsPopover.settings.rearWheelType == 'REAR_200_OMNI'"}, "normal": {"top": 49, "height": 202, "width": 195, "background": "transparent url(images/vex/drivetrain/wheel_left-200mm.png) no-repeat", "position": "absolute", "left": 2}, "LWB": {"top": 63, "styleCondition": "this.container.container.settingsPopover.settings.frontWheelType == 'FRONT_250_TRACTION' && this.container.container.settingsPopover.settings.rearWheelType == 'REAR_250_TRACTION'", "left": -38}, "travel250": {"backgroundImage": "url(images/vex/drivetrain/wheel_left-250mm.png)", "styleCondition": "this.container.container.settingsPopover.settings.rearWheelType == 'REAR_250_TRACTION'"}}, "htmlClass": "iso_left_rear_wheel", "type": "Container", "onLoad": "Events.register('SettingsUpdate', function(){ this.testStyleConditions();}, this);"}, {"styles": {"ganged": {"backgroundImage": "url(images/vex/drivetrain/chassis_left-ganged.png)", "styleCondition": "this.container.container.settingsPopover.settings.wheelGrouping == 'WHEELS_COUPLED'"}, "LWB": {"backgroundImage": "url(images/vex/drivetrain/chassis_left-LWB.png)", "styleCondition": "this.container.container.settingsPopover.settings.frontWheelType == 'FRONT_250_TRACTION' && this.container.container.settingsPopover.settings.rearWheelType == 'REAR_250_TRACTION'"}, "LWB_ganged": {"backgroundImage": "url(images/vex/drivetrain/chassis_left-ganged-LWB.png)", "styleCondition": "this.container.container.settingsPopover.settings.frontWheelType == 'FRONT_250_TRACTION' && this.container.container.settingsPopover.settings.rearWheelType == 'REAR_250_TRACTION' && this.container.container.settingsPopover.settings.wheelGrouping == 'WHEELS_COUPLED'"}, "normal": {"top": 12, "height": 198, "width": 432, "background": "transparent url(images/vex/drivetrain/chassis_left.png) no-repeat", "position": "absolute", "left": 18}}, "htmlClass": "iso_chassis_left", "type": "Container", "onLoad": "Events.register('SettingsUpdate', function(){ this.testStyleConditions();}, this);"}, {"styles": {"show": {"styleCondition": "this.container.container.settingsPopover.settings.motorLayout == 'TWO_FRONT_MOTORS' || this.container.container.settingsPopover.settings.motorLayout == 'FOUR_MOTORS' ", "display": "block", "visibility": "visible"}, "selected": {"backgroundImage": "url(images/vex/components/motor_back_flipped-selected.png)", "backgroundPosition": "0 2px"}, "normal": {"top": 58, "visibility": "hidden", "height": 103, "width": 129, "background": "transparent url(images/vex/components/motor_back_flipped.png) no-repeat", "position": "absolute", "display": "none", "left": 174}}, "htmlClass": "left_front_motor", "elements": [{"wireIndex": 0, "componentPath": "this.container.container.container", "_disabled": true, "y": -8, "x": 103, "side": "back", "uid": "1.vex.iq.ui.wire.modk.it"}], "type": "Container", "onLoad": "Events.register('drivetrain.leftFrontMotorOver', function(){this.select();}, this); Events.register('drivetrain.leftFrontMotorOut', function(){this.deselect();}, this); Events.register('SettingsUpdate', function(){ this.testStyleConditions();}, this);"}, {"styles": {"selected": {"backgroundImage": "url(images/vex/components/motor_back-selected.png)"}, "hide": {"styleCondition": "(this.container.container.settingsPopover.settings.motorLayout == 'TWO_FRONT_MOTORS')", "display": "none", "visibility": "hidden"}, "normal": {"top": 97, "height": 103, "width": 129, "background": "transparent url(images/vex/components/motor_back.png) no-repeat", "position": "absolute", "left": 106}}, "htmlClass": "left_rear_motor", "elements": [{"wireIndex": 2, "angle": 270, "componentPath": "this.container.container.container", "_disabled": true, "y": 72, "x": -17, "uid": "1.vex.iq.ui.wire.modk.it"}], "type": "Container", "onLoad": "Events.register('drivetrain.leftRearMotorOver', function(){this.select();}, this); Events.register('drivetrain.leftRearMotorOut', function(){this.deselect();}, this); Events.register('SettingsUpdate', function(){ this.testStyleConditions();}, this);"}, {"styles": {"show": {"styleCondition": "this.container.container.settingsPopover.settings.motorLayout == 'TWO_FRONT_MOTORS' || this.container.container.settingsPopover.settings.motorLayout == 'FOUR_MOTORS' ", "display": "block", "visibility": "visible"}, "selected": {"backgroundImage": "url(images/vex/components/motor_flipped-selected.png)", "backgroundPosition": "5px 0"}, "normal": {"top": 96, "visibility": "hidden", "height": 115, "width": 134, "background": "transparent url(images/vex/components/motor_flipped.png) no-repeat", "position": "absolute", "backgroundPosition": "0 0", "display": "none", "left": 231}}, "htmlClass": "right_front_motor", "elements": [{"wireIndex": 1, "componentPath": "this.container.container.container", "_disabled": true, "y": -28, "x": 78, "side": "back", "uid": "1.vex.iq.ui.wire.modk.it"}], "type": "Container", "onLoad": "Events.register('drivetrain.rightFrontMotorOver', function(){this.select();}, this); Events.register('drivetrain.rightFrontMotorOut', function(){this.deselect();}, this); Events.register('SettingsUpdate', function(){ this.testStyleConditions();}, this);"}, {"styles": {"selected": {"backgroundImage": "url(images/vex/components/motor-selected.png)", "backgroundPosition": "5px 0"}, "hide": {"styleCondition": "(this.container.container.settingsPopover.settings.motorLayout == 'TWO_FRONT_MOTORS')", "display": "none", "visibility": "hidden"}, "normal": {"top": 135, "height": 115, "width": 134, "background": "transparent url(images/vex/components/motor.png) no-repeat", "position": "absolute", "backgroundPosition": "0 0", "left": 163}}, "htmlClass": "right_rear_motor", "elements": [{"wireIndex": 3, "angle": 90, "componentPath": "this.container.container.container", "_disabled": true, "y": 50, "x": -42, "uid": "1.vex.iq.ui.wire.modk.it"}], "type": "Container", "onLoad": "Events.register('drivetrain.rightRearMotorOver', function(){this.select();}, this); Events.register('drivetrain.rightRearMotorOut', function(){this.deselect();}, this); Events.register('SettingsUpdate', function(){ this.testStyleConditions();}, this);"}, {"styles": {"ganged": {"backgroundImage": "url(images/vex/drivetrain/chassis_right-ganged.png)", "styleCondition": "this.container.container.settingsPopover.settings.wheelGrouping == 'WHEELS_COUPLED'"}, "LWB": {"backgroundImage": "url(images/vex/drivetrain/chassis_right-LWB.png)", "styleCondition": "this.container.container.settingsPopover.settings.frontWheelType == 'FRONT_250_TRACTION' && this.container.container.settingsPopover.settings.rearWheelType == 'REAR_250_TRACTION'"}, "LWB_ganged": {"backgroundImage": "url(images/vex/drivetrain/chassis_right-ganged-LWB.png)", "styleCondition": "this.container.container.settingsPopover.settings.frontWheelType == 'FRONT_250_TRACTION' && this.container.container.settingsPopover.settings.rearWheelType == 'REAR_250_TRACTION' && this.container.container.settingsPopover.settings.wheelGrouping == 'WHEELS_COUPLED'"}, "normal": {"top": 121, "height": 168, "width": 353, "background": "transparent url(images/vex/drivetrain/chassis_right.png) no-repeat", "position": "absolute", "left": 97}}, "htmlClass": "iso_chassis_right", "type": "Container", "onLoad": "Events.register('SettingsUpdate', function(){ this.testStyleConditions();}, this);"}, {"styles": {"travel160": {"backgroundImage": "url(images/vex/drivetrain/wheel_right-160mm.png)", "styleCondition": "this.container.container.settingsPopover.settings.frontWheelType == 'FRONT_160_TRACTION'"}, "omni": {"backgroundImage": "url(images/vex/drivetrain/wheel_right-omni.png)", "styleCondition": "this.container.container.settingsPopover.settings.frontWheelType == 'FRONT_200_OMNI'"}, "travel250": {"backgroundImage": "url(images/vex/drivetrain/wheel_right-250mm.png)", "styleCondition": "this.container.container.settingsPopover.settings.frontWheelType == 'FRONT_250_TRACTION'"}, "normal": {"top": 108, "height": 202, "width": 195, "background": "transparent url(images/vex/drivetrain/wheel_right-200mm.png) no-repeat", "position": "absolute", "left": 294}}, "htmlClass": "iso_right_front_wheel", "type": "Container", "onLoad": "Events.register('SettingsUpdate', function(){ this.testStyleConditions();}, this);"}, {"styles": {"LWB": {"top": 174, "styleCondition": "this.container.container.settingsPopover.settings.frontWheelType == 'FRONT_250_TRACTION' && this.container.container.settingsPopover.settings.rearWheelType == 'REAR_250_TRACTION'", "left": 179}, "travel160": {"backgroundImage": "url(images/vex/drivetrain/wheel_right-160mm.png)", "styleCondition": "this.container.container.settingsPopover.settings.rearWheelType == 'REAR_160_TRACTION'"}, "omni": {"backgroundImage": "url(images/vex/drivetrain/wheel_right-omni.png)", "styleCondition": "this.container.container.settingsPopover.settings.rearWheelType == 'REAR_200_OMNI'"}, "travel250": {"backgroundImage": "url(images/vex/drivetrain/wheel_right-250mm.png)", "styleCondition": "this.container.container.settingsPopover.settings.rearWheelType == 'REAR_250_TRACTION'"}, "normal": {"top": 160, "height": 202, "width": 195, "background": "transparent url(images/vex/drivetrain/wheel_right-200mm.png) no-repeat", "position": "absolute", "left": 205}}, "htmlClass": "iso_right_rear_wheel", "type": "Container", "onLoad": "Events.register('SettingsUpdate', function(){ this.testStyleConditions();}, this);"}], "type": "Container", "name": "Isomentric_drivetrain"}, {"styles": {"normal": {"maxWidth": 320, "bottom": -196, "minHeight": 60, "height": "auto", "zIndex": 2, "width": 226, "background": "rgba(18, 52, 86, 0.4);", "position": "absolute", "left": 14}}, "htmlClass": "vex_component_pins clearfix", "type": "HorizontalContainer"}, {"feed": "digitalOutPinsListChange", "styles": {"show": {"styleCondition": "this.container.settingsPopover.settings.motorLayout == 'TWO_FRONT_MOTORS' || this.container.settingsPopover.settings.motorLayout == 'FOUR_MOTORS'", "display": "inline-block", "visibility": "visible"}, "normal": {"width": "90px", "display": "none", "visibility": "hidden"}}, "layer": "pins", "angle": 0, "onMouseout": "Events.broadcast('drivetrain.leftFrontMotorOut', []);", "onLoad": "Events.register('SettingsUpdate', function(){ this.testStyleConditions();}, this);", "assetGlobals": {"pins": {"0": "this"}, "wires": {"0": "name"}}, "label": "LEFT FRONT", "values": [], "mode": "OUTPUT_COMPONENT", "type": "VexPin", "onMouseover": "Events.broadcast('drivetrain.leftFrontMotorOver', []);"}, {"feed": "digitalOutPinsListChange", "styles": {"show": {"styleCondition": "this.container.settingsPopover.settings.motorLayout == 'TWO_FRONT_MOTORS' || this.container.settingsPopover.settings.motorLayout == 'FOUR_MOTORS'", "display": "inline-block", "visibility": "visible"}, "normal": {"width": "95px", "display": "none", "visibility": "hidden"}}, "layer": "pins", "angle": 0, "onMouseout": "Events.broadcast('drivetrain.rightFrontMotorOut', []);", "onLoad": "Events.register('SettingsUpdate', function(){ this.testStyleConditions();}, this);", "assetGlobals": {"pins": {"1": "this"}, "wires": {"1": "name"}}, "label": "RIGHT FRONT", "values": [], "mode": "OUTPUT_COMPONENT", "type": "VexPin", "onMouseover": "Events.broadcast('drivetrain.rightFrontMotorOver', []);"}, {"feed": "digitalOutPinsListChange", "styles": {"hide": {"styleCondition": "this.container.settingsPopover.settings.motorLayout == 'TWO_FRONT_MOTORS'", "display": "none", "visibility": "hidden"}, "normal": {"width": "90px", "display": "inline-block", "visibility": "visible"}}, "layer": "pins", "angle": 0, "onMouseout": "Events.broadcast('drivetrain.leftRearMotorOut', []);", "onLoad": "Events.register('SettingsUpdate', function(){ this.testStyleConditions();}, this);", "assetGlobals": {"pins": {"2": "this"}, "wires": {"2": "name"}}, "label": "LEFT REAR", "values": [], "mode": "OUTPUT_COMPONENT", "type": "VexPin", "onMouseover": "Events.broadcast('drivetrain.leftRearMotorOver', []);"}, {"feed": "digitalOutPinsListChange", "styles": {"hide": {"styleCondition": "this.container.settingsPopover.settings.motorLayout == 'TWO_FRONT_MOTORS'", "display": "none", "visibility": "hidden"}, "normal": {"width": "95px", "display": "inline-block", "visibility": "visible"}}, "layer": "pins", "angle": 0, "onMouseout": "Events.broadcast('drivetrain.rightRearMotorOut', []);", "onLoad": "Events.register('SettingsUpdate', function(){ this.testStyleConditions();}, this);", "assetGlobals": {"pins": {"3": "this"}, "wires": {"3": "name"}}, "label": "RIGHT REAR", "values": [], "mode": "OUTPUT_COMPONENT", "type": "VexPin", "onMouseover": "Events.broadcast('drivetrain.rightRearMotorOver', []);"}], "_excluded_blocks": [{"uid": "1.vex.iq.goMotor.blocks.modk.it"}, {"uid": "1.vex.iq.goMotorBy.blocks.modk.it"}, {"uid": "1.vex.iq.goMotorFor.blocks.modk.it"}, {"uid": "1.vex.iq.turnMotor.blocks.modk.it"}, {"uid": "1.vex.iq.stopMotor.blocks.modk.it"}, {"uid": "1.vex.iq.turnMotorFor.blocks.modk.it"}, {"uid": "1.vex.iq.turnMotorRevolutions.blocks.modk.it"}, {"uid": "1.vex.iq.motorDirection.blocks.modk.it"}, {"uid": "1.vex.iq.motorSpeed.blocks.modk.it"}, {"uid": "1.vex.iq.motorDirection.blocks.modk.it"}, {"uid": "1.vex.iq.speed.blocks.modk.it"}, {"uid": "1.vex.iq.setDrivetrainPower.blocks.modk.it"}, {"uid": "1.vex.iq.driveDrivetrainRelative.blocks.modk.it"}, {"uid": "1.vex.iq.turnDrivetrainRelative.blocks.modk.it"}, {"uid": "1.vex.iq.drivetrainTurnDirection.blocks.modk.it"}, {"uid": "1.vex.iq.drivetrainDriveDirection.blocks.modk.it"}, {"uid": "1.vex.iq.drivetrainTurnSpeed.blocks.modk.it"}, {"uid": "1.vex.iq.drivetrainDriveSpeed.blocks.modk.it"}, {"uid": "1.vex.iq.drivetrainCurrent.blocks.modk.it"}], "componentImage": {"src": "images/hardware/lilypad/lilypad_rgb_led.png", "top": "1px", "left": "1px"}, "otherBlocksCategory": "Drivetrain", "onSettingsHide": "if(this.settingsPopover.settings.motorLayout == 'TWO_FRONT_MOTORS'){ this.pins[3].resetValue(); this.pins[2].resetValue(); } if(this.settingsPopover.settings.motorLayout == 'TWO_REAR_MOTORS'){ this.pins[0].resetValue(); this.pins[1].resetValue(); }", "type": "VexComponent", "styles": {"normal": {"width": "170px", "height": "100px"}}, "onLoad": "this.renameHelper=function(name){this.$markup.find('.vex_component_label_name').get(0).blockObject.setText(name);};", "elements": [{"styles": {"normal": {"borderRadius": "15px", "top": -50, "height": 350, "width": 480, "backgroundColor": "", "position": "absolute", "border": "4px solid rgba(18, 52, 86, 0.4)", "display": "none", "left": 10}}, "htmlClass": "vex_component_wrapper", "elements": [{"styles": {"normal": {"opacity": 0.6, "top": 32, "left": 330}}, "src": "images/vex/drivetrain/compass_rotate_iso.png", "type": "Image"}, {"styles": {"normal": {"right": 5, "bottom": 5, "height": 20, "zIndex": 1, "width": 20, "position": "absolute", "left": "auto"}}, "elements": [], "name": "DrivetrainConfigButton", "type": "ConfigButton", "onClick": "function(){this.container.container.showComponentSettings(this);}", "htmlClass": "hardware_settings_button"}, {"uid": "ui.button.controllerConfig.modk.it"}], "type": "Container", "name": "Wrapper"}, {"styles": {"placed": {"top": 0, "left": 0}, "normal": {"width": "auto", "top": 45, "height": "42px", "_opacity": 0.5, "left": 60}}, "htmlClass": "vex_component_label vex_component_drivetrain clearfix", "elements": [{"styles": {"placed": {"marginLeft": "10px"}, "normal": {"width": "auto", "color": "#2a323d", "marginBottom": "auto", "height": "auto", "fontWeight": "bold", "_opacity": 0.5, "marginLeft": 92, "fontSize": "20px", "marginRight": "10px", "position": "relative", "marginTop": "10px", "textShadow": "0px 1px 0 #C4C4C4"}}, "text": "Drivetrain", "type": "FrameworkText", "htmlClass": "vex_component_label_name"}], "type": "Container"}, {"styles": {"normal": {"position": "absolute"}}, "htmlClass": "vex_component_drawer_image", "type": "Image", "src": "images/vex/components/standard_drivetrain-150x.png"}, {"styles": {"normal": {"top": -20, "_transform": "scale(0.8, 0.8)", "height": "275px", "width": "388px", "_-ms-transform": "scale(0.8, 0.8)", "position": "absolute", "_-webkit-transform": "scale(0.8, 0.8)", "left": 16}}, "htmlClass": "isometric_drivetrain vex_component_pad_image", "elements": [{"styles": {"normal": {"position": "absolute"}}, "htmlClass": "iso_drivetrain_shadow", "type": "Image", "src": "images/vex/drivetrain/drivetrain_shadow.png"}, {"styles": {"travel160": {"backgroundImage": "url(images/vex/drivetrain/wheel_left-160mm.png)", "styleCondition": "this.container.container.settingsPopover.settings.frontWheelType == 'FRONT_160_TRACTION'"}, "omni": {"backgroundImage": "url(images/vex/drivetrain/wheel_left-omni.png)", "styleCondition": "this.container.container.settingsPopover.settings.frontWheelType == 'FRONT_200_OMNI'"}, "travel250": {"backgroundImage": "url(images/vex/drivetrain/wheel_left-250mm.png)", "top": -8, "styleCondition": "this.container.container.settingsPopover.settings.frontWheelType == 'FRONT_250_TRACTION'", "left": 83}, "normal": {"top": -3, "height": 202, "width": 195, "background": "transparent url(images/vex/drivetrain/wheel_left-200mm.png) no-repeat", "position": "absolute", "left": 92}}, "htmlClass": "iso_left_front_wheel", "type": "Container", "onLoad": "Events.register('SettingsUpdate', function(){ this.testStyleConditions();}, this);"}, {"styles": {"travel160": {"backgroundImage": "url(images/vex/drivetrain/wheel_left-160mm.png)", "styleCondition": "this.container.container.settingsPopover.settings.rearWheelType == 'REAR_160_TRACTION'"}, "travel250_position": {"top": 47, "styleCondition": "this.container.container.settingsPopover.settings.rearWheelType == 'REAR_250_TRACTION' && this.container.container.settingsPopover.settings.frontWheelType != 'FRONT_250_TRACTION'", "left": -11}, "omni": {"backgroundImage": "url(images/vex/drivetrain/wheel_left-omni.png)", "styleCondition": "this.container.container.settingsPopover.settings.rearWheelType == 'REAR_200_OMNI'"}, "normal": {"top": 49, "height": 202, "width": 195, "background": "transparent url(images/vex/drivetrain/wheel_left-200mm.png) no-repeat", "position": "absolute", "left": 2}, "LWB": {"top": 63, "styleCondition": "this.container.container.settingsPopover.settings.frontWheelType == 'FRONT_250_TRACTION' && this.container.container.settingsPopover.settings.rearWheelType == 'REAR_250_TRACTION'", "left": -38}, "travel250": {"backgroundImage": "url(images/vex/drivetrain/wheel_left-250mm.png)", "styleCondition": "this.container.container.settingsPopover.settings.rearWheelType == 'REAR_250_TRACTION'"}}, "htmlClass": "iso_left_rear_wheel", "type": "Container", "onLoad": "Events.register('SettingsUpdate', function(){ this.testStyleConditions();}, this);"}, {"styles": {"ganged": {"backgroundImage": "url(images/vex/drivetrain/chassis_left-ganged.png)", "styleCondition": "this.container.container.settingsPopover.settings.wheelGrouping == 'WHEELS_COUPLED'"}, "LWB": {"backgroundImage": "url(images/vex/drivetrain/chassis_left-LWB.png)", "styleCondition": "this.container.container.settingsPopover.settings.frontWheelType == 'FRONT_250_TRACTION' && this.container.container.settingsPopover.settings.rearWheelType == 'REAR_250_TRACTION'"}, "LWB_ganged": {"backgroundImage": "url(images/vex/drivetrain/chassis_left-ganged-LWB.png)", "styleCondition": "this.container.container.settingsPopover.settings.frontWheelType == 'FRONT_250_TRACTION' && this.container.container.settingsPopover.settings.rearWheelType == 'REAR_250_TRACTION' && this.container.container.settingsPopover.settings.wheelGrouping == 'WHEELS_COUPLED'"}, "normal": {"top": 12, "height": 198, "width": 432, "background": "transparent url(images/vex/drivetrain/chassis_left.png) no-repeat", "position": "absolute", "left": 18}}, "htmlClass": "iso_chassis_left", "type": "Container", "onLoad": "Events.register('SettingsUpdate', function(){ this.testStyleConditions();}, this);"}, {"styles": {"show": {"styleCondition": "this.container.container.settingsPopover.settings.motorLayout == 'TWO_FRONT_MOTORS' || this.container.container.settingsPopover.settings.motorLayout == 'FOUR_MOTORS' ", "display": "block", "visibility": "visible"}, "selected": {"backgroundImage": "url(images/vex/components/motor_back_flipped-selected.png)", "backgroundPosition": "0 2px"}, "normal": {"top": 58, "visibility": "hidden", "height": 103, "width": 129, "background": "transparent url(images/vex/components/motor_back_flipped.png) no-repeat", "position": "absolute", "display": "none", "left": 174}}, "htmlClass": "left_front_motor", "elements": [{"wireIndex": 0, "componentPath": "this.container.container.container", "_disabled": true, "y": -8, "x": 103, "side": "back", "uid": "1.vex.iq.ui.wire.modk.it"}], "type": "Container", "onLoad": "Events.register('drivetrain.leftFrontMotorOver', function(){this.select();}, this); Events.register('drivetrain.leftFrontMotorOut', function(){this.deselect();}, this); Events.register('SettingsUpdate', function(){ this.testStyleConditions();}, this);"}, {"styles": {"selected": {"backgroundImage": "url(images/vex/components/motor_back-selected.png)"}, "hide": {"styleCondition": "(this.container.container.settingsPopover.settings.motorLayout == 'TWO_FRONT_MOTORS')", "display": "none", "visibility": "hidden"}, "normal": {"top": 97, "height": 103, "width": 129, "background": "transparent url(images/vex/components/motor_back.png) no-repeat", "position": "absolute", "left": 106}}, "htmlClass": "left_rear_motor", "elements": [{"wireIndex": 2, "angle": 270, "componentPath": "this.container.container.container", "_disabled": true, "y": 72, "x": -17, "uid": "1.vex.iq.ui.wire.modk.it"}], "type": "Container", "onLoad": "Events.register('drivetrain.leftRearMotorOver', function(){this.select();}, this); Events.register('drivetrain.leftRearMotorOut', function(){this.deselect();}, this); Events.register('SettingsUpdate', function(){ this.testStyleConditions();}, this);"}, {"styles": {"show": {"styleCondition": "this.container.container.settingsPopover.settings.motorLayout == 'TWO_FRONT_MOTORS' || this.container.container.settingsPopover.settings.motorLayout == 'FOUR_MOTORS' ", "display": "block", "visibility": "visible"}, "selected": {"backgroundImage": "url(images/vex/components/motor_flipped-selected.png)", "backgroundPosition": "5px 0"}, "normal": {"top": 96, "visibility": "hidden", "height": 115, "width": 134, "background": "transparent url(images/vex/components/motor_flipped.png) no-repeat", "position": "absolute", "backgroundPosition": "0 0", "display": "none", "left": 231}}, "htmlClass": "right_front_motor", "elements": [{"wireIndex": 1, "componentPath": "this.container.container.container", "_disabled": true, "y": -28, "x": 78, "side": "back", "uid": "1.vex.iq.ui.wire.modk.it"}], "type": "Container", "onLoad": "Events.register('drivetrain.rightFrontMotorOver', function(){this.select();}, this); Events.register('drivetrain.rightFrontMotorOut', function(){this.deselect();}, this); Events.register('SettingsUpdate', function(){ this.testStyleConditions();}, this);"}, {"styles": {"selected": {"backgroundImage": "url(images/vex/components/motor-selected.png)", "backgroundPosition": "5px 0"}, "hide": {"styleCondition": "(this.container.container.settingsPopover.settings.motorLayout == 'TWO_FRONT_MOTORS')", "display": "none", "visibility": "hidden"}, "normal": {"top": 135, "height": 115, "width": 134, "background": "transparent url(images/vex/components/motor.png) no-repeat", "position": "absolute", "backgroundPosition": "0 0", "left": 163}}, "htmlClass": "right_rear_motor", "elements": [{"wireIndex": 3, "angle": 90, "componentPath": "this.container.container.container", "_disabled": true, "y": 50, "x": -42, "uid": "1.vex.iq.ui.wire.modk.it"}], "type": "Container", "onLoad": "Events.register('drivetrain.rightRearMotorOver', function(){this.select();}, this); Events.register('drivetrain.rightRearMotorOut', function(){this.deselect();}, this); Events.register('SettingsUpdate', function(){ this.testStyleConditions();}, this);"}, {"styles": {"ganged": {"backgroundImage": "url(images/vex/drivetrain/chassis_right-ganged.png)", "styleCondition": "this.container.container.settingsPopover.settings.wheelGrouping == 'WHEELS_COUPLED'"}, "LWB": {"backgroundImage": "url(images/vex/drivetrain/chassis_right-LWB.png)", "styleCondition": "this.container.container.settingsPopover.settings.frontWheelType == 'FRONT_250_TRACTION' && this.container.container.settingsPopover.settings.rearWheelType == 'REAR_250_TRACTION'"}, "LWB_ganged": {"backgroundImage": "url(images/vex/drivetrain/chassis_right-ganged-LWB.png)", "styleCondition": "this.container.container.settingsPopover.settings.frontWheelType == 'FRONT_250_TRACTION' && this.container.container.settingsPopover.settings.rearWheelType == 'REAR_250_TRACTION' && this.container.container.settingsPopover.settings.wheelGrouping == 'WHEELS_COUPLED'"}, "normal": {"top": 121, "height": 168, "width": 353, "background": "transparent url(images/vex/drivetrain/chassis_right.png) no-repeat", "position": "absolute", "left": 97}}, "htmlClass": "iso_chassis_right", "type": "Container", "onLoad": "Events.register('SettingsUpdate', function(){ this.testStyleConditions();}, this);"}, {"styles": {"travel160": {"backgroundImage": "url(images/vex/drivetrain/wheel_right-160mm.png)", "styleCondition": "this.container.container.settingsPopover.settings.frontWheelType == 'FRONT_160_TRACTION'"}, "omni": {"backgroundImage": "url(images/vex/drivetrain/wheel_right-omni.png)", "styleCondition": "this.container.container.settingsPopover.settings.frontWheelType == 'FRONT_200_OMNI'"}, "travel250": {"backgroundImage": "url(images/vex/drivetrain/wheel_right-250mm.png)", "styleCondition": "this.container.container.settingsPopover.settings.frontWheelType == 'FRONT_250_TRACTION'"}, "normal": {"top": 108, "height": 202, "width": 195, "background": "transparent url(images/vex/drivetrain/wheel_right-200mm.png) no-repeat", "position": "absolute", "left": 294}}, "htmlClass": "iso_right_front_wheel", "type": "Container", "onLoad": "Events.register('SettingsUpdate', function(){ this.testStyleConditions();}, this);"}, {"styles": {"LWB": {"top": 174, "styleCondition": "this.container.container.settingsPopover.settings.frontWheelType == 'FRONT_250_TRACTION' && this.container.container.settingsPopover.settings.rearWheelType == 'REAR_250_TRACTION'", "left": 179}, "travel160": {"backgroundImage": "url(images/vex/drivetrain/wheel_right-160mm.png)", "styleCondition": "this.container.container.settingsPopover.settings.rearWheelType == 'REAR_160_TRACTION'"}, "omni": {"backgroundImage": "url(images/vex/drivetrain/wheel_right-omni.png)", "styleCondition": "this.container.container.settingsPopover.settings.rearWheelType == 'REAR_200_OMNI'"}, "travel250": {"backgroundImage": "url(images/vex/drivetrain/wheel_right-250mm.png)", "styleCondition": "this.container.container.settingsPopover.settings.rearWheelType == 'REAR_250_TRACTION'"}, "normal": {"top": 160, "height": 202, "width": 195, "background": "transparent url(images/vex/drivetrain/wheel_right-200mm.png) no-repeat", "position": "absolute", "left": 205}}, "htmlClass": "iso_right_rear_wheel", "type": "Container", "onLoad": "Events.register('SettingsUpdate', function(){ this.testStyleConditions();}, this);"}], "type": "Container", "name": "Isomentric_drivetrain"}, {"styles": {"normal": {"maxWidth": 320, "bottom": -196, "minHeight": 60, "height": "auto", "zIndex": 2, "width": 226, "background": "rgba(18, 52, 86, 0.4);", "position": "absolute", "left": 14}}, "htmlClass": "vex_component_pins clearfix", "type": "HorizontalContainer"}, {"feed": "digitalOutPinsListChange", "styles": {"show": {"styleCondition": "this.container.settingsPopover.settings.motorLayout == 'TWO_FRONT_MOTORS' || this.container.settingsPopover.settings.motorLayout == 'FOUR_MOTORS'", "display": "inline-block", "visibility": "visible"}, "normal": {"width": "90px", "display": "none", "visibility": "hidden"}}, "layer": "pins", "angle": 0, "onMouseout": "Events.broadcast('drivetrain.leftFrontMotorOut', []);", "onLoad": "Events.register('SettingsUpdate', function(){ this.testStyleConditions();}, this);", "assetGlobals": {"pins": {"0": "this"}, "wires": {"0": "name"}}, "label": "LEFT FRONT", "values": [], "mode": "OUTPUT_COMPONENT", "type": "VexPin", "onMouseover": "Events.broadcast('drivetrain.leftFrontMotorOver', []);"}, {"feed": "digitalOutPinsListChange", "styles": {"show": {"styleCondition": "this.container.settingsPopover.settings.motorLayout == 'TWO_FRONT_MOTORS' || this.container.settingsPopover.settings.motorLayout == 'FOUR_MOTORS'", "display": "inline-block", "visibility": "visible"}, "normal": {"width": "95px", "display": "none", "visibility": "hidden"}}, "layer": "pins", "angle": 0, "onMouseout": "Events.broadcast('drivetrain.rightFrontMotorOut', []);", "onLoad": "Events.register('SettingsUpdate', function(){ this.testStyleConditions();}, this);", "assetGlobals": {"pins": {"1": "this"}, "wires": {"1": "name"}}, "label": "RIGHT FRONT", "values": [], "mode": "OUTPUT_COMPONENT", "type": "VexPin", "onMouseover": "Events.broadcast('drivetrain.rightFrontMotorOver', []);"}, {"feed": "digitalOutPinsListChange", "styles": {"hide": {"styleCondition": "this.container.settingsPopover.settings.motorLayout == 'TWO_FRONT_MOTORS'", "display": "none", "visibility": "hidden"}, "normal": {"width": "90px", "display": "inline-block", "visibility": "visible"}}, "layer": "pins", "angle": 0, "onMouseout": "Events.broadcast('drivetrain.leftRearMotorOut', []);", "onLoad": "Events.register('SettingsUpdate', function(){ this.testStyleConditions();}, this);", "assetGlobals": {"pins": {"2": "this"}, "wires": {"2": "name"}}, "label": "LEFT REAR", "values": [], "mode": "OUTPUT_COMPONENT", "type": "VexPin", "onMouseover": "Events.broadcast('drivetrain.leftRearMotorOver', []);"}, {"feed": "digitalOutPinsListChange", "styles": {"hide": {"styleCondition": "this.container.settingsPopover.settings.motorLayout == 'TWO_FRONT_MOTORS'", "display": "none", "visibility": "hidden"}, "normal": {"width": "95px", "display": "inline-block", "visibility": "visible"}}, "layer": "pins", "angle": 0, "onMouseout": "Events.broadcast('drivetrain.rightRearMotorOut', []);", "onLoad": "Events.register('SettingsUpdate', function(){ this.testStyleConditions();}, this);", "assetGlobals": {"pins": {"3": "this"}, "wires": {"3": "name"}}, "label": "RIGHT REAR", "values": [], "mode": "OUTPUT_COMPONENT", "type": "VexPin", "onMouseover": "Events.broadcast('drivetrain.rightRearMotorOver', []);"}], "blocks": [{"uid": "1.vex.iq.setDrivetrainTurnSpeed.blocks.modk.it"}, {"uid": "1.vex.iq.setDrivetrainDriveSpeed.blocks.modk.it"}, {"uid": "1.vex.iq.setMotorTimeout.blocks.modk.it"}, {"uid": "1.vex.iq.setDrivetrainHolding.blocks.modk.it"}, {"uid": "1.vex.iq.turnDrivetrain.blocks.modk.it"}, {"uid": "1.vex.iq.driveDrivetrain.blocks.modk.it"}, {"uid": "1.vex.iq.driveDrivetrainRelative.blocks.modk.it"}, {"uid": "1.vex.iq.turnDrivetrainRelative.blocks.modk.it"}, {"uid": "1.vex.iq.stopMotor.blocks.modk.it"}], "docs": {"type": "VexComponent", "description": "The drivetrain component configures two regular DC motor. You can control the motor's speed and direction.", "title": "Motor"}, "classBased": true, "defaultName": "DRIVETRAIN", "componentArray": "int motorArray[3]", "configuration": [{"type": "text", "value": "#define Untitled INVALID_PORT\n"}, {"type": "text", "value": "VexMotor "}, {"type": "objectVar", "value": "name"}, {"type": "text", "value": "_l1 = VexMotor("}, {"index": 0, "type": "objectArray", "value": "wires"}, {"type": "text", "value": ","}, {"index": "reverseFrontLeft", "type": "objectArray", "value": "settings"}, {"type": "text", "value": ",true);\n"}, {"type": "text", "value": "VexMotor "}, {"type": "objectVar", "value": "name"}, {"type": "text", "value": "_r1 = VexMotor("}, {"index": 1, "type": "objectArray", "value": "wires"}, {"type": "text", "value": ","}, {"index": "reverseFrontRight", "type": "objectArray", "value": "settings"}, {"type": "text", "value": ",true);\n"}, {"type": "text", "value": "VexMotor "}, {"type": "objectVar", "value": "name"}, {"type": "text", "value": "_l2 = VexMotor("}, {"index": 2, "type": "objectArray", "value": "wires"}, {"type": "text", "value": ","}, {"index": "reverseRearLeft", "type": "objectArray", "value": "settings"}, {"type": "text", "value": ",true);\n"}, {"type": "text", "value": "VexMotor "}, {"type": "objectVar", "value": "name"}, {"type": "text", "value": "_r2 = VexMotor("}, {"index": 3, "type": "objectArray", "value": "wires"}, {"type": "text", "value": ","}, {"index": "reverseRearRight", "type": "objectArray", "value": "settings"}, {"type": "text", "value": ",true);\n"}, {"type": "text", "value": "VexDriveTrain "}, {"type": "objectVar", "value": "name"}, {"type": "text", "value": " = VexDriveTrain("}, {"type": "objectVar", "value": "name"}, {"type": "text", "value": "_l1, "}, {"type": "objectVar", "value": "name"}, {"type": "text", "value": "_r1, "}, {"type": "objectVar", "value": "name"}, {"type": "text", "value": "_l2, "}, {"type": "objectVar", "value": "name"}, {"type": "text", "value": "_r2, "}, {"index": "wheelGrouping", "type": "objectArray", "value": "settings"}, {"type": "text", "value": ","}, {"index": "frontWheelType", "type": "objectArray", "value": "settings"}, {"type": "text", "value": "_"}, {"index": "rearWheelType", "type": "objectArray", "value": "settings"}, {"type": "text", "value": ","}, {"index": "motorLayout", "type": "objectArray", "value": "settings"}, {"type": "text", "value": ","}, {"index": "track", "type": "objectArray", "value": "settings"}, {"type": "text", "value": ","}, {"index": "wheelbase", "type": "objectArray", "value": "settings"}, {"type": "text", "value": ","}, {"_comment": "was offsetX", "type": "text", "value": "0"}, {"type": "text", "value": ","}, {"index": "offsetY", "type": "objectArray", "value": "settings"}, {"type": "text", "value": ","}, {"index": "ratioFront", "type": "objectArray", "value": "settings"}, {"type": "text", "value": ","}, {"index": "ratioRear", "type": "objectArray", "value": "settings"}, {"type": "text", "value": ","}, {"index": "cosTheta", "type": "objectArray", "value": "settings"}, {"type": "text", "value": ");"}, {"type": "text", "value": "Scope("}, {"type": "objectVar", "value": "name"}, {"type": "text", "value": ",VexDriveTrain);"}, {"type": "text", "value": "\n#endif //ifndef IQ_GET_JUMPTABLE_DEFINE_MODKIT_VEX\n\n#ifdef IQ_GET_JUMPTABLE_DEFINE_MODKIT_VEX\n#define IQ_"}, {"index": 0, "type": "objectArray", "value": "wires"}, {"type": "text", "value": "_DEVICE_ID_STR IQ_MOTOR_SENSOR_STR//set device id\n#endif //IQ_GET_JUMPTABLE_DEFINE_MODKIT_VEX\n\n#ifndef IQ_GET_JUMPTABLE_DEFINE_MODKIT_VEX\n"}, {"type": "text", "value": "\n#endif //ifndef IQ_GET_JUMPTABLE_DEFINE_MODKIT_VEX\n\n#ifdef IQ_GET_JUMPTABLE_DEFINE_MODKIT_VEX\n#define IQ_"}, {"index": 1, "type": "objectArray", "value": "wires"}, {"type": "text", "value": "_DEVICE_ID_STR IQ_MOTOR_SENSOR_STR//set device id\n#endif //IQ_GET_JUMPTABLE_DEFINE_MODKIT_VEX\n\n#ifndef IQ_GET_JUMPTABLE_DEFINE_MODKIT_VEX\n"}, {"type": "text", "value": "\n#endif //ifndef IQ_GET_JUMPTABLE_DEFINE_MODKIT_VEX\n\n#ifdef IQ_GET_JUMPTABLE_DEFINE_MODKIT_VEX\n#define IQ_"}, {"index": 2, "type": "objectArray", "value": "wires"}, {"type": "text", "value": "_DEVICE_ID_STR IQ_MOTOR_SENSOR_STR//set device id\n#endif //IQ_GET_JUMPTABLE_DEFINE_MODKIT_VEX\n\n#ifndef IQ_GET_JUMPTABLE_DEFINE_MODKIT_VEX\n"}, {"type": "text", "value": "\n#endif //ifndef IQ_GET_JUMPTABLE_DEFINE_MODKIT_VEX\n\n#ifdef IQ_GET_JUMPTABLE_DEFINE_MODKIT_VEX\n#define IQ_"}, {"index": 3, "type": "objectArray", "value": "wires"}, {"type": "text", "value": "_DEVICE_ID_STR IQ_MOTOR_SENSOR_STR//set device id\n#endif //IQ_GET_JUMPTABLE_DEFINE_MODKIT_VEX\n\n#ifndef IQ_GET_JUMPTABLE_DEFINE_MODKIT_VEX\n"}], "icon": "images/vex/components/drawer_icons/standard_drivetrain2.png", "displayName": "Drivetrain", "onStartDrag": "if(Boolean(modkitNamespace.GenericComponent.managers[this.uid]) && modkitNamespace.GenericComponent.managers[this.uid].count >= this.maxComponents || this.maxComponents == 0 || this.maxComponents == 0){ if(!Boolean(this.container) || this.container.id != 'hardware_pad'){ this.$markup.removeClass('myAcceptableClass');}}", "onConfigOverride": "var wheelbaseX = this.settingsPopover.settings.track/2; var wheelbaseY = this.settingsPopover.settings.wheelbase/2; wheelbaseY -= this.settingsPopover.settings.offsetY; var theta = Math.atan(wheelbaseY / wheelbaseX); var cosTheta = Math.cos(theta); var wheelGrouping = this.settingsPopover.settings.wheelGrouping; var motorLayout = this.settingsPopover.settings.motorLayout; this.configOverrides={'wires':this.getFullState()['wires'],'settings':this.getFullState()['settings'] }; this.configOverrides['settings']['cosTheta']=cosTheta; this.configOverrides['settings']['reverseFrontLeft'] = ' '+Boolean(this.settingsPopover.settings.reverseDirectionFrontLeft); this.configOverrides['settings']['reverseFrontRight'] = ' '+Boolean(this.settingsPopover.settings.reverseDirectionFrontRight); this.configOverrides['settings']['reverseRearLeft'] = ' '+Boolean(this.settingsPopover.settings.reverseDirectionRearLeft); this.configOverrides['settings']['reverseRearRight'] = ' '+Boolean(this.settingsPopover.settings.reverseDirectionRearRight); if(motorLayout == 'TWO_FRONT_MOTORS' || motorLayout == 'TWO_REAR_MOTORS' || wheelGrouping == 'WHEELS_COUPLED'){ this.configOverrides['settings']['ratioInRear'] = this.settingsPopover.settings.ratioIn; this.configOverrides['settings']['ratioOutRear'] = this.settingsPopover.settings.ratioOut; this.configOverrides['settings']['ratioInFront'] = this.settingsPopover.settings.ratioIn; this.configOverrides['settings']['ratioOutFront'] = this.settingsPopover.settings.ratioOut; } this.configOverrides['settings']['ratioFront'] = ''+ parseFloat(this.configOverrides['settings']['ratioInFront'])/parseFloat(this.configOverrides['settings']['ratioOutFront']); this.configOverrides['settings']['ratioRear'] = ''+ parseFloat(this.configOverrides['settings']['ratioOutRear'])/parseFloat(this.configOverrides['settings']['ratioInRear']); if(motorLayout=='TWO_FRONT_MOTORS'){this.configOverrides['wires'][2]='INVALID_PORT';this.configOverrides['wires'][3]='INVALID_PORT'; } if(motorLayout=='TWO_REAR_MOTORS'){this.configOverrides['wires'][0]='INVALID_PORT';this.configOverrides['wires'][1]='INVALID_PORT';}", "stateVars": {"top": true, "wires": true, "name": true, "left": true}, "settingsPopover": {"type": "SettingsPopover", "settings": {"uid": "1.vex.iq.settingsDrivetrain.components.modk.it"}}, "controllerActionsPopover": {"type": "ControllerActionsPopover", "settings": {"uid": "1.vex.iq.drivetrain.controllerActions.components.modk.it"}}, "hack_to_disabled_dropping": false, "otherBlocks": []}, "ui.saveToSlot.modk.it": {"styles": {"normal": {"width": 350, "height": "auto"}}, "elements": [{"styles": {"normal": {"fontFamily": "Helvetica, Arial, sans-serif", "height": "auto", "width": "100%", "fontSize": "18px", "position": "relative", "textAlign": "left"}}, "text": "Select a Program Slot…", "type": "FrameworkText"}, {"styles": {"normal": {"position": "relative", "marginTop": "15px", "marginBottom": "15px", "width": "100%", "height": "auto"}}, "type": "HorizontalRule"}, {"styles": {"normal": {"width": "100%", "color": "#333", "height": "auto", "fontFamily": "Helvetica, Arial, sans-serif", "fontSize": "13px", "position": "relative", "textAlign": "left"}}, "text": "Please pick a slot where programs will be downloaded.", "type": "FrameworkText"}, {"styles": {"normal": {"position": "relative", "marginTop": "15px", "marginBottom": "15px", "width": "100%", "height": "auto"}}, "type": "HorizontalRule"}, {"styles": {"normal": {"marginBottom": 15, "height": "auto", "width": "82px", "marginLeft": "7px", "marginRight": "5px", "position": "relative"}}, "assetGlobals": {"slots": {"1": "checked"}}, "value": "1", "label": "Slot 1", "key": "slot", "onChange": "this.container[this.key] = this.value; /*Events.broadcast('ComponentNameChange', [], true);*/", "type": "Input", "inputType": "radio"}, {"styles": {"normal": {"position": "relative", "marginRight": "5px", "width": "82px", "marginBottom": 15, "height": "auto"}}, "assetGlobals": {"slots": {"2": "checked"}}, "value": "2", "label": "Slot 2", "key": "slot", "onChange": "this.container[this.key] = this.value; /*Events.broadcast('ComponentNameChange', [], true);*/", "type": "Input", "inputType": "radio"}, {"styles": {"normal": {"position": "relative", "marginRight": "5px", "width": "82px", "height": "auto"}}, "assetGlobals": {"slots": {"3": "checked"}}, "value": "3", "label": "Slot 3", "key": "slot", "onChange": "this.container[this.key] = this.value; /*Events.broadcast('ComponentNameChange', [], true);*/", "type": "Input", "inputType": "radio"}, {"styles": {"normal": {"position": "relative", "width": "82px", "height": "auto"}}, "assetGlobals": {"slots": {"4": "checked"}}, "value": "4", "label": "Slot 4", "key": "slot", "onChange": "this.container[this.key] = this.value; /*Events.broadcast('ComponentNameChange', [], true);*/", "type": "Input", "inputType": "radio"}], "uid": "ui.saveToSlot.modk.it", "stateVars": {"slot": false}, "type": "Container", "id": "select_slot_dialog"}, "1.vex.iq.turnDrivetrain.blocks.modk.it": {"category": "output", "uid": "1.vex.iq.turnDrivetrain.blocks.modk.it", "color": "blue", "docs": {"category": "output", "description": "*Turns* the **Drivetrain** in the selected direction until it is stopped. The direction is either LEFT or RIGHT.", "parameters": [{"options": ["LEFT", "RIGHT"], "type": "rotation", "description": "Sets the direction to turn.", "name": "direction"}], "hint": "", "type": "StatementBlock", "name": "turn drivetrain"}, "extensionOf": "1.statement.blocks.modk.it", "statementElements": [{"elements": [{"text": "turn  ", "type": "CodeElement", "value": "turn("}, {"assetGlobals": {"subBlocks": {"0": "subBlock"}}, "type": "BlockHolder", "elements": [{"elements": [{"values": ["LEFT", "RIGHT"], "type": "DropdownMenu", "autoMinWidth": "true"}], "assetGlobals": {"params": {"0": "value"}}, "value": "", "color": "blue", "readonly": true, "type": "NumberArgument"}], "accepts": ["NumberBlock"]}, {"type": "CodeElement", "value": ");"}], "type": "LineElement"}], "tokens": ["turnMotor"], "sibling": null}, "1.knob.library.modk.it": {"definitions": "#ifndef FRAMEWORK_ENERGIA\nvoid setupKnob(int knobNum,int pinNum){knobNum-=KNOB_OFFSET;\nknobArray[knobNum]=pinNum;\npinMode(knobArray[knobNum],INPUT);}\nint readKnob(int knobNum){\nknobNum-=KNOB_OFFSET;\n//hack for analog FIXME\nreturn map(analogRead(knobArray[knobNum]-14),0,1023,0,100);\n}\n#else\nvoid setupKnob(int knobNum,int pinNum){knobNum-=KNOB_OFFSET;\nknobArray[knobNum]=pinNum;\npinMode(knobArray[knobNum],INPUT);}\nint readKnob(int knobNum){\nknobNum-=KNOB_OFFSET;\n//hack for analog FIXME\nreturn map(analogRead(knobArray[knobNum]-2),0,1023,0,100);\n}\n#endif\n", "componentArray": "knobArray", "type": "ComponentLibrary", "uid": "1.knob.library.modk.it"}, "1.vex.iq.setMaxRangefinderDistance.blocks.modk.it": {"category": "setup", "uid": "1.vex.iq.setMaxRangefinderDistance.blocks.modk.it", "color": "darkblue", "docs": {"parameters": [{"range": "0-?", "options": ["250", "500", "1000", "2000", "4000"], "type": "num", "description": "Select from the list, type a number, or use a variable. Distances range from 75 to 4,000 mm.", "name": "distance"}], "type": "StatementBlock", "description": "Sets the maximum distance the **Distance Sensor** looks for objects. The **distance** is in millimeters (mm).", "name": "set max distance", "hint": "The lower the value, the better results you will get."}, "extensionOf": "1.statement.blocks.modk.it", "statementElements": [{"elements": [{"text": "set max distance to", "type": "CodeElement", "value": "setMaxDistance("}, {"assetGlobals": {"subBlocks": {"0": "subBlock"}}, "type": "BlockHolder", "elements": [{"elements": [{"values": ["250", "500", "1000", "2000", "4000"], "type": "DropdownMenu", "autoMinWidth": "true"}], "assetGlobals": {"params": {"0": "value"}}, "maxChars": "32", "value": "500", "color": "darkblue", "readonly": false, "rangeMin": 100, "allowChars": "0-9", "rangeMax": 4000, "type": "NumberArgument"}], "accepts": ["NumberBlock"]}, {"elements": [{"values": ["mm"], "type": "DropdownMenu", "autoMinWidth": "true"}], "assetGlobals": {"params": {"1": "value"}}, "value": "mm", "readonly": true, "hideCodeView": true, "type": "NameArgument"}, {"text": "", "type": "CodeElement", "value": ");"}], "type": "LineElement"}], "tokens": ["setMotorSpeed"]}};