Compare commits
49 Commits
Author | SHA1 | Date | |
---|---|---|---|
eb7cd5d97c | |||
a4a9af28a4 | |||
6c253182e4 | |||
0198be6dda | |||
57ab6d153d | |||
fd0bd4ef39 | |||
8b2ae10980 | |||
4627328bcd | |||
80989cf4c9 | |||
00b193b126 | |||
e65db0b756 | |||
8f211a5c19 | |||
379a6a26be | |||
8398c8efdb | |||
f41310e879 | |||
82198020de | |||
09d6b728b0 | |||
9147cb98c2 | |||
6d29cd40cb | |||
d5b4ec5255 | |||
b8286ab0b9 | |||
ac1380ec92 | |||
a433988929 | |||
d837a515dc | |||
4be657e84d | |||
c90f00f6d0 | |||
ecc880cf8d | |||
fbb3280bc8 | |||
29f081eb03 | |||
49ab5ec099 | |||
5277cc847c | |||
e11b11d19c | |||
57c1ae0f99 | |||
2129601e6a | |||
e1727dc917 | |||
ecc9319334 | |||
81758f2555 | |||
7825bd1579 | |||
ac81067f82 | |||
b1958d77e7 | |||
232744520b | |||
ac9ebf6776 | |||
c97098b99e | |||
b39a7f3484 | |||
806f60a419 | |||
0bb7295d86 | |||
60bf3df1d8 | |||
b8a3fa345f | |||
ec1ceea138 |
16
docfiles/footer.html
Normal file
@ -0,0 +1,16 @@
|
||||
<footer class="ui inverted accent vertical footer segment hideprint" aria-hidden="false">
|
||||
<div class="ui center aligned container">
|
||||
<div class="ui container horizontal inverted small divided link list">
|
||||
<!-- <a class="item" href="https://makecode.com/contact" target="_blank" rel="noopener">Contact Us</a> -->
|
||||
<a class="item" href="https://makecode.com/privacy" target="_blank" rel="noopener">Privacy & Cookies</a>
|
||||
<a class="item" href="https://makecode.com/termsofuse" target="_blank" rel="noopener"> Terms Of Use</a>
|
||||
<a class="item" href="https://makecode.com/trademarks" target="_blank" rel="noopener">Trademarks</a>
|
||||
<div class="item">© 2018 Microsoft</div>
|
||||
<!-- we need to force the browser to load this font -->
|
||||
<div style='font-family: Icons; color: #010101;' aria-hidden="true">.</div>
|
||||
</div>
|
||||
<div class="ui container horizontal inverted small divided link list">
|
||||
<a class="ui centered item" href="https://makecode.com/" title="Microsoft MakeCode" target="_blank" rel="noopener">Powered by Microsoft MakeCode</a>
|
||||
</div>
|
||||
</div>
|
||||
</footer>
|
@ -1,11 +1,31 @@
|
||||
# @extends
|
||||
|
||||
## Support #support
|
||||
|
||||
* [Troubleshoot](/troubleshoot)
|
||||
* [LEGO Support](http://service.lego.com/)
|
||||
* [EV3 Manager](https://ev3manager.education.lego.com/)
|
||||
|
||||
## Projects #projects
|
||||
|
||||
* [Getting Started](/getting-started)
|
||||
* [Try](/getting-started/try)
|
||||
* [Use](/getting-started/use)
|
||||
|
||||
* [Tutorials](/tutorials)
|
||||
* [Wake Up!](/tutorials/wake-up)
|
||||
* [Make An Animation](/tutorials/make-an-animation)
|
||||
* [What Animal Am I?](/tutorials/what-animal-am-i)
|
||||
* [Music Brick](/tutorials/mindstorms-music)
|
||||
* [Run Motors](/tutorials/run-motors)
|
||||
* [Touch to Run](/tutorials/touch-to-run)
|
||||
* [Touch Sensor Values](/tutorials/touch-sensor-values)
|
||||
* [What Color?](/tutorials/what-color)
|
||||
* [Line Following](/tutorials/line-following)
|
||||
* [Red Light, Green Light](/tutorials/redlight-greenlight)
|
||||
* [Object Near?](/tutorials/object-near)
|
||||
* [Intruder Alert](/tutorials/intruder-alert)
|
||||
|
||||
* [Coding](/coding)
|
||||
* [Autonomous Parking](/coding/autonomous-parking)
|
||||
* [Object Detection](/coding/object-detection)
|
||||
@ -20,29 +40,6 @@
|
||||
* [Make a Sound Machine](/maker/sound-machine)
|
||||
* [Make a Security Gadget](/maker/security-gadget)
|
||||
|
||||
* [Examples](/examples)
|
||||
* [Intruder detector](/maker/intruder-detector)
|
||||
* [Puppet](/maker/puppet)
|
||||
* [Three Point Turn 1](/coding/three-point-turn-1)
|
||||
* [Three Point Turn 2](/coding/three-point-turn-2)
|
||||
* [Three Point Turn 3](/coding/three-point-turn-3)
|
||||
* [Reversing the robot 1](/coding/reversing-the-robot-1)
|
||||
* [Reversing the robot 2](/coding/reversing-the-robot-2)
|
||||
* [Reversing the robot 3](/coding/reversing-the-robot-3)
|
||||
* [Light the way 1](/coding/light-the-way-1)
|
||||
* [Light the way 2](/coding/light-the-way-2)
|
||||
* [Light the way 3](/coding/light-the-way-3)
|
||||
* [Traffic Lights 1](/coding/traffic-lights-1)
|
||||
* [Traffic Lights 2](/coding/traffic-lights-2)
|
||||
* [Traffic Lights 3](/coding/traffic-lights-3)
|
||||
* [Reverse Beeper 1](/coding/reverse-beeper-1)
|
||||
* [Reverse Beeper 2](/coding/reverse-beeper-2)
|
||||
* [Reverse Beeper 3](/coding/reverse-beeper-3)
|
||||
* [Ignition](/coding/ignition)
|
||||
* [Cruise Control](/coding/cruise-control)
|
||||
* [Roaming 1](/coding/roaming-1)
|
||||
* [Roaming 2](/coding/roaming-2)
|
||||
|
||||
## Reference #reference
|
||||
|
||||
* [Reference](/reference)
|
||||
@ -100,8 +97,8 @@
|
||||
* [Color](/reference/sensors/color-sensor)
|
||||
* [on color detected](/reference/sensors/color-sensor/on-color-detected)
|
||||
* [pause until color detected](/reference/sensors/color-sensor/pause-until-color-detected)
|
||||
* [on-light-condition-detected](/reference/sensors/color-sensor/on-light-condition-detected)
|
||||
* [pause until light condition detected](/reference/sensors/color-sensor/pause-until-light-condition-detected)
|
||||
* [on light detected](/reference/sensors/color-sensor/on-light-detected)
|
||||
* [pause until light condition detected](/reference/sensors/color-sensor/pause-until-light-detected)
|
||||
* [color](/reference/sensors/color-sensor/color)
|
||||
* [light](/reference/sensors/color-sensor/ambient-light)
|
||||
* [Music](/reference/music)
|
||||
|
@ -1,7 +1,7 @@
|
||||
# Light the way Activity 1
|
||||
|
||||
```blocks
|
||||
sensors.color3.onLightConditionDetected(LightIntensityMode.Ambient, LightCondition.Dark, function () {
|
||||
sensors.color3.onLightDetected(LightIntensityMode.Ambient, Light.Dark, function () {
|
||||
brick.showImage(images.objectsLightOn)
|
||||
pause(5000)
|
||||
brick.clearScreen()
|
||||
|
@ -1,10 +1,10 @@
|
||||
# Light the way Activity 2
|
||||
|
||||
```blocks
|
||||
sensors.color3.onLightConditionDetected(LightIntensityMode.Ambient, LightCondition.Bright, function () {
|
||||
sensors.color3.onLightDetected(LightIntensityMode.Ambient, Light.Bright, function () {
|
||||
brick.clearScreen()
|
||||
})
|
||||
sensors.color3.onLightConditionDetected(LightIntensityMode.Ambient, LightCondition.Dark, function () {
|
||||
sensors.color3.onLightDetected(LightIntensityMode.Ambient, Light.Dark, function () {
|
||||
brick.showImage(images.objectsLightOn)
|
||||
})
|
||||
```
|
@ -1,10 +1,10 @@
|
||||
# Light the way Activity 3
|
||||
|
||||
```blocks
|
||||
sensors.color3.onLightConditionDetected(LightIntensityMode.Ambient, LightCondition.Bright, function () {
|
||||
sensors.color3.onLightDetected(LightIntensityMode.Ambient, Light.Bright, function () {
|
||||
brick.clearScreen()
|
||||
})
|
||||
sensors.color3.onLightConditionDetected(LightIntensityMode.Ambient, LightCondition.Dark, function () {
|
||||
sensors.color3.onLightDetected(LightIntensityMode.Ambient, Light.Dark, function () {
|
||||
brick.showImage(images.objectsLightOn)
|
||||
})
|
||||
sensors.touch1.onEvent(ButtonEvent.Pressed, function () {
|
||||
|
@ -6,7 +6,7 @@
|
||||
|
||||
Design, build and program a robot that can move itself using no wheels for locomotion.
|
||||
|
||||

|
||||

|
||||
|
||||
Your robot will:
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
# Lessons
|
||||
|
||||
Learning activities for LEGO Mindstorms with MakeCode.
|
||||
Learning activities for @boardname@ with MakeCode.
|
||||
|
||||
## Motors and motion
|
||||
|
||||
|
@ -213,12 +213,12 @@ music.playSoundEffect(sounds.systemGeneralAlert)
|
||||
}
|
||||
while (true) {
|
||||
while (true) {
|
||||
sensors.color3.pauseUntilLightConditionDetected(LightIntensityMode.Reflected, LightCondition.Bright)
|
||||
sensors.color3.pauseUntilLightDetected(LightIntensityMode.Reflected, Light.Bright)
|
||||
motors.largeB.run(10)
|
||||
motors.largeC.run(-10)
|
||||
}
|
||||
while (true) {
|
||||
sensors.color3.pauseUntilLightConditionDetected(LightIntensityMode.Reflected, LightCondition.Bright)
|
||||
sensors.color3.pauseUntilLightDetected(LightIntensityMode.Reflected, Light.Bright)
|
||||
motors.largeA.run(-10)
|
||||
motors.largeA.run(10)
|
||||
}
|
||||
@ -236,12 +236,12 @@ You will need to constantly debug your program in order to make your robot trave
|
||||
```blocks
|
||||
while (true) {
|
||||
while (true) {
|
||||
sensors.color3.pauseUntilLightDetected(LightIntensityMode.Reflected, LightCondition.Bright)
|
||||
sensors.color3.pauseUntilLightDetected(LightIntensityMode.Reflected, Light.Bright)
|
||||
motors.largeB.run(10)
|
||||
motors.largeC.run(-10)
|
||||
}
|
||||
while (true) {
|
||||
sensors.color3.pauseUntilLightDetected(LightIntensityMode.Reflected, LightCondition.Bright)
|
||||
sensors.color3.pauseUntilLightDetected(LightIntensityMode.Reflected, Light.Bright)
|
||||
motors.largeB.run(-10)
|
||||
motors.largeC.run(10)
|
||||
}
|
||||
|
@ -10,7 +10,7 @@ Your robot will:
|
||||
* Use at least one motor
|
||||
* Use NO wheels for locomotion
|
||||
|
||||

|
||||

|
||||
|
||||
|
||||
## Construct @unplugged
|
||||
@ -25,7 +25,7 @@ The legs in the Walker Bot are designed to show how to change the rotary motion
|
||||
|
||||
Start by reading [these](https://le-www-live-s.legocdn.com/sc/media/lessons/mindstorms-ev3/ev3-dep/building%20instructions/walker-bot-bi-180fc24f9298e1dd6201099627d43903.pdf) instructions first.
|
||||
|
||||

|
||||

|
||||
|
||||
|
||||
## Program 1 @fullscreen
|
||||
|
@ -10,7 +10,7 @@ Your robot will:
|
||||
* Use at least one motor
|
||||
* Use NO wheels for locomotion
|
||||
|
||||

|
||||

|
||||
|
||||
## Construct
|
||||
|
||||
@ -24,7 +24,7 @@ The legs in the Walker Bot are designed to show how to change the rotary motion
|
||||
|
||||
Start by reading [these](https://le-www-live-s.legocdn.com/sc/media/lessons/mindstorms-ev3/ev3-dep/building%20instructions/walker-bot-bi-180fc24f9298e1dd6201099627d43903.pdf) instructions first.
|
||||
|
||||

|
||||

|
||||
|
||||
|
||||
## Program
|
||||
|
@ -4,8 +4,8 @@
|
||||
|
||||
```cards
|
||||
sensors.color1.onColorDetected(ColorSensorColor.Blue, function () {})
|
||||
sensors.color1.onLightConditionDetected(LightIntensityMode.Reflected, LightCondition.Dark, function () {})
|
||||
sensors.color1.pauseUntilLightConditionDetected(LightIntensityMode.Reflected, LightCondition.Dark)
|
||||
sensors.color1.onLightDetected(LightIntensityMode.Reflected, Light.Dark, function () {})
|
||||
sensors.color1.pauseUntilLightDetected(LightIntensityMode.Reflected, Light.Dark)
|
||||
sensors.color1.pauseUntilColorDetected(ColorSensorColor.Blue)
|
||||
sensors.color1.color();
|
||||
sensors.color1.light(LightIntensityMode.Ambient)
|
||||
|
Before Width: | Height: | Size: 49 KiB |
BIN
docs/static/lessons/make-it-move/make-it-move-without-wheels.png
vendored
Normal file
After Width: | Height: | Size: 115 KiB |
BIN
docs/static/setup/ev3-drive-windows.png
vendored
Normal file
After Width: | Height: | Size: 68 KiB |
BIN
docs/static/tutorials/intruder-alert.png
vendored
Normal file
After Width: | Height: | Size: 18 KiB |
BIN
docs/static/tutorials/intruder-alert/detect-method-dropdown.png
vendored
Normal file
After Width: | Height: | Size: 4.1 KiB |
BIN
docs/static/tutorials/intruder-alert/intruder-alert.gif
vendored
Normal file
After Width: | Height: | Size: 199 KiB |
BIN
docs/static/tutorials/intruder-alert/play-sound-effect-dropdown.png
vendored
Normal file
After Width: | Height: | Size: 22 KiB |
BIN
docs/static/tutorials/intruder-alert/set-status-light-dropdown.png
vendored
Normal file
After Width: | Height: | Size: 11 KiB |
BIN
docs/static/tutorials/intruder-alert/show-image-dropdown.png
vendored
Normal file
After Width: | Height: | Size: 35 KiB |
BIN
docs/static/tutorials/line-following.png
vendored
Normal file
After Width: | Height: | Size: 21 KiB |
BIN
docs/static/tutorials/line-following/if-then-else-dropdown.png
vendored
Normal file
After Width: | Height: | Size: 9.8 KiB |
BIN
docs/static/tutorials/line-following/line-following.gif
vendored
Normal file
After Width: | Height: | Size: 723 KiB |
BIN
docs/static/tutorials/make-an-animation.png
vendored
Normal file
After Width: | Height: | Size: 68 KiB |
BIN
docs/static/tutorials/make-an-animation/button-pressed.gif
vendored
Normal file
After Width: | Height: | Size: 82 KiB |
BIN
docs/static/tutorials/mindstorms-music.png
vendored
Normal file
After Width: | Height: | Size: 10 KiB |
BIN
docs/static/tutorials/mindstorms-music/play-tone-dropdown.png
vendored
Normal file
After Width: | Height: | Size: 13 KiB |
BIN
docs/static/tutorials/mindstorms-music/press-my-buttons.png
vendored
Normal file
After Width: | Height: | Size: 13 KiB |
BIN
docs/static/tutorials/object-near.png
vendored
Normal file
After Width: | Height: | Size: 30 KiB |
BIN
docs/static/tutorials/object-near/play-sound-effect-dropdown.png
vendored
Normal file
After Width: | Height: | Size: 12 KiB |
BIN
docs/static/tutorials/object-near/ultrasonic-near.gif
vendored
Normal file
After Width: | Height: | Size: 141 KiB |
BIN
docs/static/tutorials/redlight-greenlight.png
vendored
Normal file
After Width: | Height: | Size: 21 KiB |
BIN
docs/static/tutorials/redlight-greenlight/pause-color-sensor-dropdown.PNG
vendored
Normal file
After Width: | Height: | Size: 9.8 KiB |
BIN
docs/static/tutorials/redlight-greenlight/redlight-greenlight.gif
vendored
Normal file
After Width: | Height: | Size: 477 KiB |
BIN
docs/static/tutorials/run-motors.png
vendored
Normal file
After Width: | Height: | Size: 34 KiB |
BIN
docs/static/tutorials/run-motors/on-button-dropdown.png
vendored
Normal file
After Width: | Height: | Size: 8.8 KiB |
BIN
docs/static/tutorials/run-motors/run-motor-dropdown.png
vendored
Normal file
After Width: | Height: | Size: 10 KiB |
BIN
docs/static/tutorials/run-motors/run-motors.gif
vendored
Normal file
After Width: | Height: | Size: 509 KiB |
BIN
docs/static/tutorials/run-motors/run-speed-field.png
vendored
Normal file
After Width: | Height: | Size: 11 KiB |
BIN
docs/static/tutorials/touch-sensor-values.png
vendored
Normal file
After Width: | Height: | Size: 18 KiB |
BIN
docs/static/tutorials/touch-sensor-values/touch-to-stop.gif
vendored
Normal file
After Width: | Height: | Size: 240 KiB |
BIN
docs/static/tutorials/touch-to-run.png
vendored
Normal file
After Width: | Height: | Size: 25 KiB |
BIN
docs/static/tutorials/touch-to-run/on-touch-dropdown.png
vendored
Normal file
After Width: | Height: | Size: 5.6 KiB |
BIN
docs/static/tutorials/touch-to-run/touch-to-run.gif
vendored
Normal file
After Width: | Height: | Size: 169 KiB |
BIN
docs/static/tutorials/wake-up.png
vendored
Normal file
After Width: | Height: | Size: 80 KiB |
BIN
docs/static/tutorials/wake-up/show-mood-dropdown-1.png
vendored
Normal file
After Width: | Height: | Size: 32 KiB |
BIN
docs/static/tutorials/wake-up/show-mood-dropdown-2.png
vendored
Normal file
After Width: | Height: | Size: 34 KiB |
BIN
docs/static/tutorials/wake-up/show-mood.gif
vendored
Normal file
After Width: | Height: | Size: 234 KiB |
BIN
docs/static/tutorials/what-animal-am-i.png
vendored
Normal file
After Width: | Height: | Size: 85 KiB |
BIN
docs/static/tutorials/what-animal-am-i/guess-animal.gif
vendored
Normal file
After Width: | Height: | Size: 207 KiB |
BIN
docs/static/tutorials/what-animal-am-i/on-button-dropdown.png
vendored
Normal file
After Width: | Height: | Size: 6.7 KiB |
BIN
docs/static/tutorials/what-animal-am-i/play-sound-effect-dropdown.png
vendored
Normal file
After Width: | Height: | Size: 16 KiB |
BIN
docs/static/tutorials/what-animal-am-i/show-image-dropdown.PNG
vendored
Normal file
After Width: | Height: | Size: 59 KiB |
BIN
docs/static/tutorials/what-color.png
vendored
Normal file
After Width: | Height: | Size: 29 KiB |
BIN
docs/static/tutorials/what-color/color-detector.gif
vendored
Normal file
After Width: | Height: | Size: 74 KiB |
56
docs/troubleshoot.md
Normal file
@ -0,0 +1,56 @@
|
||||
# Troubleshooting download problems
|
||||
|
||||
If your're having trouble getting your code onto the @boardname@, try these steps to see if you can fix the problem.
|
||||
|
||||
## Can I see the LEGO drive on my computer?
|
||||
|
||||
When your @boardname@ is connected to your computer, you should see a new drive called **@drivename@** attached.
|
||||
|
||||
On Windows, it looks like this in Explorer:
|
||||
|
||||

|
||||
|
||||
If you don't see the **@drivename@** drive, make sure your brick is powered on and check that your USB connection is good.
|
||||
|
||||
## Is my brick charged and powered on?
|
||||
|
||||
Make sure your brick is charged and powered on. If your brick doesn't turn on, find the charger and plug it into wall power, then connect it to your brick. Does it turn on and start up?
|
||||
|
||||
## Is my USB connection good?
|
||||
|
||||
Make sure that one end of your USB cable is firmly inserted into the port on the computer and the other end is connected to the brick. If you still can't see the **@drivename@** drive, try a different port on the computer. If that doesn't work then maybe your cable is bad or you need to reset the brick.
|
||||
|
||||
## How do I reset my brick?
|
||||
|
||||
If you think your USB connection is good and you still can't see your **@drivename@** drive, try giving the brick a reset. You can follow these steps to reset:
|
||||
|
||||
1. Using a finger from one hand, press the **Back** button. Keep holding it.
|
||||
2. With your other hand, use two fingers to hold down both the **Left** button and the **Enter** button. You hold these at the same time while your still pressing the **Back** button.
|
||||
3. Now, release your finger from the **Back** button.
|
||||
4. When the brick says "Starting..." you can let go of the **Left** and **Enter** buttons.
|
||||
|
||||
You can also watch this [How to Reset](https://www.lego.com/en-us/videos/themes/mindstorms/how-to-reset-the-ev3-p-brick-fbcbdbed398e4e12a7ce30fa662c54be) video to see how to do a reset.
|
||||
|
||||
If you try a reset and the **@drivename@** drive still doesn't appear, or you attempted a download and it didn't copy to the brick, you might need a firmware update.
|
||||
|
||||
## What's a firmware update and how do I get one?
|
||||
|
||||
Firmware is the software that runs all the basic operations on your brick. Your programs run with the firmware to make the @boardname@ do all the things you want it to do. Your brick comes with the firmware already installed. You could have a brick with an older version of firmware that needs updating in order for it to work properly with MakeCode.
|
||||
|
||||
To update your firmware, follow these instructions: [Updating and Resetting Firmware](https://www.lego.com/en-us/service/help/products/themes-sets/mindstorms/updating-and-resetting-lego-mindstorms-ev3-firmware-408100000007884).
|
||||
|
||||
### ~hint
|
||||
|
||||
**Offline firmware update**
|
||||
|
||||
If your @boardname@ isn't connected to the internet through a computer, or with some other mobile device, you'll need to do a manual update of the firmware. You need to have the firmware file already downloaded and available on the computer connected to the brick.
|
||||
|
||||
To do this, read the instructions in the **Manual Firmware Update** section of the [Firmware Update](https://education.lego.com/en-us/support/mindstorms-ev3/firmware-update) support page.
|
||||
|
||||
### ~
|
||||
|
||||
## LEGO Support
|
||||
|
||||
If you've checked everything here and can't get the **@drivename@** drive to show up on your computer, you can't make the brick reset, or your program just won't download, then try the [Troubleshooting Walkthrough](https://www.lego.com/en-us/service/help/products/themes-sets/mindstorms/lego-mindstorms-ev3-troubleshooting-walkthrough-408100000009798).
|
||||
|
||||
You can also find more help at [LEGO Support](https://www.lego.com/en-us/mindstorms/support).
|
112
docs/tutorials.md
Normal file
@ -0,0 +1,112 @@
|
||||
# Tutorials
|
||||
|
||||
Step by step guides to coding your @boardname@.
|
||||
|
||||
## Brick
|
||||
|
||||
```codecard
|
||||
[{
|
||||
"name": "Wake Up!",
|
||||
"description": "Show different moods on the screen. Is it tired, sleepy, or awake?",
|
||||
"cardType": "tutorial",
|
||||
"url":"/tutorials/wake-up",
|
||||
"imageUrl":"/static/tutorials/wake-up.png"
|
||||
}, {
|
||||
"name": "Make An Animation",
|
||||
"description": "Create a custom animation on your brick screen.",
|
||||
"cardType": "tutorial",
|
||||
"url":"/tutorials/make-an-animation",
|
||||
"imageUrl":"/static/tutorials/make-an-animation.png"
|
||||
}, {
|
||||
"name": "What Animal Am I?",
|
||||
"description": "Create different animal sounds and have someone guess the what the animal is.",
|
||||
"cardType": "tutorial",
|
||||
"url":"/tutorials/what-animal-am-i",
|
||||
"imageUrl":"/static/tutorials/what-animal-am-i.png"
|
||||
}, {
|
||||
"name": "Music Brick",
|
||||
"description": "Transform the brick into a musical instrument!",
|
||||
"cardType": "tutorial",
|
||||
"url":"/tutorials/mindstorms-music",
|
||||
"imageUrl":"/static/tutorials/mindstorms-music.png"
|
||||
}]
|
||||
```
|
||||
|
||||
## Motors
|
||||
|
||||
```codecard
|
||||
[{
|
||||
"name": "Run Motors",
|
||||
"description": "Use the buttons to start and stop the large and medium motors.",
|
||||
"cardType": "tutorial",
|
||||
"url":"/tutorials/run-motors",
|
||||
"imageUrl":"/static/tutorials/run-motors.png"
|
||||
}]
|
||||
```
|
||||
|
||||
## Touch Sensor
|
||||
|
||||
```codecard
|
||||
[{
|
||||
"name": "Touch to Run",
|
||||
"description": "Press the Touch sensor and run a motor.",
|
||||
"cardType": "tutorial",
|
||||
"url":"/tutorials/touch-to-run",
|
||||
"imageUrl":"/static/tutorials/touch-to-run.png"
|
||||
}, {
|
||||
"name": "Touch Sensor Values",
|
||||
"description": "Check the value of a Touch sensor and stop a motor if pressed.",
|
||||
"cardType": "tutorial",
|
||||
"url":"/tutorials/touch-sensor-values",
|
||||
"imageUrl":"/static/tutorials/touch-sensor-values.png"
|
||||
}]
|
||||
```
|
||||
|
||||
## Color Sensor
|
||||
|
||||
```codecard
|
||||
[{
|
||||
"name": "What Color?",
|
||||
"description": "Use the Color sensor to detect different colors.",
|
||||
"cardType": "tutorial",
|
||||
"url":"/tutorials/what-color",
|
||||
"imageUrl":"/static/tutorials/what-color.png"
|
||||
}, {
|
||||
"name": "Line Following",
|
||||
"description": "Use the Color sensor to make a robot follow a line.",
|
||||
"cardType": "tutorial",
|
||||
"url":"/tutorials/line-following",
|
||||
"imageUrl":"/static/tutorials/line-following.png"
|
||||
}, {
|
||||
"name": "Red Light, Green Light",
|
||||
"description": "Play Red Light, Green Light using the Color sensor and the robot.",
|
||||
"cardType": "tutorial",
|
||||
"url":"/tutorials/redlight-greenlight",
|
||||
"imageUrl":"/static/tutorials/redlight-greenlight.png"
|
||||
}]
|
||||
```
|
||||
|
||||
## Ultrasonic Sensor
|
||||
|
||||
```codecard
|
||||
[{
|
||||
"name": "Object Near?",
|
||||
"description": "Build a program that will detect when an object is nearby.",
|
||||
"cardType": "tutorial",
|
||||
"url":"/tutorials/object-near",
|
||||
"imageUrl":"/static/tutorials/object-near.png"
|
||||
}]
|
||||
```
|
||||
|
||||
## Infrared Sensor
|
||||
|
||||
```codecard
|
||||
[{
|
||||
"name": "Intruder Alert",
|
||||
"description": "Build an intruder alert using the infrared sensor.",
|
||||
"cardType": "tutorial",
|
||||
"url":"/tutorials/intruder-alert",
|
||||
"imageUrl":"/static/tutorials/intruder-alert.png"
|
||||
}]
|
||||
```
|
||||
|
105
docs/tutorials/intruder-alert.md
Normal file
@ -0,0 +1,105 @@
|
||||
# Intruder Alert
|
||||
|
||||
## Introduction @fullscreen
|
||||
|
||||
The Infrared Sensor uses infrared light waves to detect proximity to the robot. Build an intruder alert using the infrared sensor.
|
||||
|
||||

|
||||
|
||||
## Step 1
|
||||
|
||||
Open the ``||sensors:Sensors||`` Toolbox drawer. Drag out an ``||sensors:on infrared||`` block onto the Workspace (you can place this anywhere). Use the second drop-down menu to select ``detected``.
|
||||
|
||||

|
||||
|
||||
```blocks
|
||||
sensors.infrared1.onEvent(InfraredSensorEvent.ObjectDetected, function () {
|
||||
|
||||
})
|
||||
```
|
||||
|
||||
## Step 2
|
||||
|
||||
Open the ``||brick:Brick||`` Toolbox drawer. From the **Screen** section, drag out a ``||brick:show image||`` block onto the Workspace, and drop it into the ``||sensors:on infrared||`` block.
|
||||
|
||||
```blocks
|
||||
sensors.infrared1.onEvent(InfraredSensorEvent.ObjectDetected, function () {
|
||||
brick.showImage(images.expressionsBigSmile)
|
||||
})
|
||||
```
|
||||
|
||||
## Step 3
|
||||
|
||||
In the ``||brick:show image||`` block, use the drop-down menu to select the **STOP** sign image.
|
||||
|
||||

|
||||
|
||||
```blocks
|
||||
sensors.infrared1.onEvent(InfraredSensorEvent.ObjectDetected, function () {
|
||||
brick.showImage(images.informationStop1)
|
||||
})
|
||||
```
|
||||
|
||||
## Step 4
|
||||
|
||||
Open the ``||brick:Brick||`` Toolbox drawer. From the **Buttons** section, drag out a ``||brick:set status light||`` block onto the Workspace, and drop it after the ``||brick:show image||`` block.
|
||||
|
||||
```blocks
|
||||
sensors.infrared1.onEvent(InfraredSensorEvent.ObjectDetected, function () {
|
||||
brick.showImage(images.informationStop1)
|
||||
brick.setStatusLight(StatusLight.Orange)
|
||||
})
|
||||
```
|
||||
|
||||
## Step 5
|
||||
|
||||
In the ``||brick:set status light||`` block, use the drop-down menu to select the ``red flash`` light
|
||||
|
||||

|
||||
|
||||
```blocks
|
||||
sensors.infrared1.onEvent(InfraredSensorEvent.ObjectDetected, function () {
|
||||
brick.showImage(images.informationStop1)
|
||||
brick.setStatusLight(StatusLight.RedFlash)
|
||||
})
|
||||
```
|
||||
|
||||
## Step 6
|
||||
|
||||
Open the ``||loops:Loops||`` Toolbox drawer. Drag a ``||loops:repeat||`` loop onto the Workspace, and drop it after the ``||brick:set status light||`` block.
|
||||
|
||||
```blocks
|
||||
sensors.infrared1.onEvent(InfraredSensorEvent.ObjectDetected, function () {
|
||||
brick.showImage(images.informationStop1)
|
||||
brick.setStatusLight(StatusLight.RedFlash)
|
||||
for (let i = 0; i < 4; i++) {
|
||||
|
||||
}
|
||||
})
|
||||
```
|
||||
|
||||
## Step 7
|
||||
|
||||
Open the ``||music:Music||`` Toolbox drawer. Drag a ``||music:play sound effect until done||`` block onto the Workspace, and drop it into the ``||loops:repeat||`` loop.
|
||||
|
||||
```blocks
|
||||
sensors.infrared1.onEvent(InfraredSensorEvent.ObjectDetected, function () {
|
||||
brick.showImage(images.informationStop1)
|
||||
brick.setStatusLight(StatusLight.RedFlash)
|
||||
for (let i = 0; i < 4; i++) {
|
||||
music.playSoundEffectUntilDone(sounds.animalsCatPurr)
|
||||
}
|
||||
})
|
||||
```
|
||||
|
||||
## Step 8
|
||||
|
||||
In the ``||music:play sound effect until done||`` block, use the drop-down menu to select ``information error alarm`` sound effect.
|
||||
|
||||

|
||||
|
||||
## Step 9
|
||||
|
||||
Now, plug your @boardname@ into the computer with the USB cable, and click the **Download** button at the bottom of your screen. Follow the directions to save your program to the brick.
|
||||
|
||||
Attach an Infrared Sensor to Port 1 of your brick. Test your program by putting an object increasingly closer to the Infrared Sensor – your Intruder Alert should trigger when you get too close!
|
111
docs/tutorials/line-following.md
Normal file
@ -0,0 +1,111 @@
|
||||
# Line Following
|
||||
|
||||
## Introduction @fullscreen
|
||||
|
||||
Make a program to follow a line using the Color sensor and reflected light. Let's test reflected light to see if it's white or black (on the line), and drive our robot accordingly.
|
||||
|
||||

|
||||
|
||||
## Step 1
|
||||
|
||||
In the ``||logic:Logic||`` Toolbox drawer under the **Conditionals** section, drag out an ``||logic:If then else||`` block onto the Workspace, and drop it into the ``||loops:forever||`` loop.
|
||||
|
||||
```blocks
|
||||
forever(function () {
|
||||
if (true) {
|
||||
|
||||
} else {
|
||||
|
||||
}
|
||||
})
|
||||
```
|
||||
|
||||
## Step 2
|
||||
|
||||
Open the ``||logic:Logic||`` Toolbox drawer again. From the **Comparison** section, drag out ``||logic:0 < 0||`` comparison block and drop it into the ``||logic:if then else||`` block, replacing ``true``.
|
||||
|
||||
```blocks
|
||||
forever(function () {
|
||||
if (0 < 0) {
|
||||
|
||||
} else {
|
||||
|
||||
}
|
||||
})
|
||||
```
|
||||
|
||||
## Step 3
|
||||
|
||||
Open the ``||sensors:Sensors||`` Toolbox drawer. From the **Color Sensor** section, drag out a ``||sensors:color sensor light||`` value block and drop it into the second slot of the ``||logic:0 < 0||`` comparison block, replacing the `0`.
|
||||
|
||||
```blocks
|
||||
forever(function () {
|
||||
if (0 < sensors.color3.light(LightIntensityMode.Reflected)) {
|
||||
|
||||
} else {
|
||||
|
||||
}
|
||||
})
|
||||
```
|
||||
|
||||
## Step 4
|
||||
|
||||
If the value of the reflected light is greater than 40% (white or very light), our robot is outside the line, so steer to the left. In the ``||logic:0 < 0||`` comparison block change the compared value to `40` replacing `0`.
|
||||
|
||||
```blocks
|
||||
forever(function () {
|
||||
if (40 < sensors.color3.light(LightIntensityMode.Reflected)) {
|
||||
|
||||
} else {
|
||||
|
||||
}
|
||||
})
|
||||
```
|
||||
|
||||
## Step 5
|
||||
|
||||
Open the ``||motors:Motors||`` Toolbox drawer. Drag out **2** ``||motors:tank large motors||`` blocks and drop one of them into the ``||logic:if||`` part, and the other into the ``||logic:else||`` part of the ``||logic:if then else||`` block.
|
||||
|
||||
```blocks
|
||||
forever(function () {
|
||||
if (40 < sensors.color3.light(LightIntensityMode.Reflected)) {
|
||||
motors.largeBC.tank(50, 50)
|
||||
} else {
|
||||
motors.largeBC.tank(50, 50)
|
||||
}
|
||||
})
|
||||
```
|
||||
|
||||
## Step 6
|
||||
|
||||
In the first ``||motors:tank large motors||`` block in the ``||logic:if||`` clause, change the speed values of the motors from ``50%``, ``50%`` to ``5%``, ``15%``. This slows down the robot, and steers it to the left (because the **C** motor is driving faster than the **B** motor).
|
||||
|
||||
```blocks
|
||||
forever(function () {
|
||||
if (40 < sensors.color3.light(LightIntensityMode.Reflected)) {
|
||||
motors.largeBC.tank(5, 15)
|
||||
} else {
|
||||
motors.largeBC.tank(50, 50)
|
||||
}
|
||||
})
|
||||
```
|
||||
|
||||
# Step 7
|
||||
|
||||
In the second ``||motors:tank large motors||`` block in the ``||logic:else||`` clause, change the speed values of the motors from ``50%``, ``50%`` to ``15%``, ``5%``. This slows down the robot, and steers it to the right (because the **B** motor is driving faster than the **C** motor).
|
||||
|
||||
```blocks
|
||||
forever(function () {
|
||||
if (40 < sensors.color3.light(LightIntensityMode.Reflected)) {
|
||||
motors.largeBC.tank(5, 15)
|
||||
} else {
|
||||
motors.largeBC.tank(15, 5)
|
||||
}
|
||||
})
|
||||
```
|
||||
|
||||
## Step 8
|
||||
|
||||
Now, plug your @boardname@ into the computer with the USB cable, and click the **Download** button at the bottom of your screen. Follow the directions to save your program to the brick.
|
||||
|
||||
Attach a Color Sensor to Port 3 of your brick, and attach your brick to a driving base with large motors attached to Ports B and C. See the instructions for building a _Driving Base with Color Sensor Down_. Test your program by positioning your robot to the right of a dark, thick line and then let it drive!
|
61
docs/tutorials/make-an-animation.md
Normal file
@ -0,0 +1,61 @@
|
||||
# Make a custom animation
|
||||
|
||||
## Introduction @fullscreen
|
||||
|
||||
Create a custom animation for your @boardname@.
|
||||
|
||||

|
||||
|
||||
## Step 1
|
||||
|
||||
Open the ``||brick:Brick||`` Toolbox drawer. Drag out a ``||brick:show string||`` block onto the Workspace, and drop it into the ``||loops:on Start||`` block. You should hear and see the block click into place.
|
||||
|
||||
```block
|
||||
brick.showString("Hello world", 1)
|
||||
```
|
||||
|
||||
## Step 2
|
||||
|
||||
In the ``||brick:show string||`` block, type the text ``"Press my button"`` to replace ``"Hello world"``.
|
||||
|
||||
```blocks
|
||||
brick.showString("Press my button!", 1)
|
||||
```
|
||||
|
||||
## Step 3
|
||||
|
||||
Open the ``||brick:Brick||`` Toolbox drawer. Drag out an ``||brick:on button||`` block onto anyplace in the Workspace.
|
||||
|
||||
```blocks
|
||||
brick.buttonEnter.onEvent(ButtonEvent.Pressed, function () {
|
||||
|
||||
})
|
||||
brick.showString("Press my button!", 1)
|
||||
```
|
||||
|
||||
## Step 4
|
||||
|
||||
Open the ``||brick:Brick||`` Toolbox drawer. Drag out a ``||brick:show image||`` block onto the Workspace, and drop it into the ``||brick:on button||`` block.
|
||||
|
||||
```blocks
|
||||
brick.buttonEnter.onEvent(ButtonEvent.Pressed, function () {
|
||||
brick.showImage(images.expressionsBigSmile)
|
||||
})
|
||||
brick.showString("Press my button!", 1)
|
||||
```
|
||||
|
||||
## Step 5
|
||||
|
||||
Open the ``||brick:Brick||`` Toolbox drawer. Drag out a ``||brick:set status light||`` block onto the Workspace, and drop it into the ``||brick:on button||`` block after the ``||brick:show image||`` block.
|
||||
|
||||
```blocks
|
||||
brick.buttonEnter.onEvent(ButtonEvent.Pressed, function () {
|
||||
brick.showImage(images.expressionsBigSmile)
|
||||
brick.setStatusLight(StatusLight.Orange)
|
||||
})
|
||||
brick.showString("Press my button!", 1)
|
||||
```
|
||||
|
||||
## Step 6
|
||||
|
||||
Now, plug your @boardname@ into the computer with the USB cable, and click the **Download** button at the bottom of your screen. Follow the directions to save your program to the brick.
|
74
docs/tutorials/mindstorms-music.md
Normal file
@ -0,0 +1,74 @@
|
||||
# Music Brick
|
||||
|
||||
## Introduction @fullscreen
|
||||
|
||||
Transform your @boardname@ into a musical instrument!
|
||||
|
||||

|
||||
|
||||
|
||||
## Step 1
|
||||
|
||||
Open the ``||brick:Brick||`` Toolbox drawer. From the **Screen** section, drag out a ``||brick:show string||`` block onto the Workspace, and drop it into the ``||loops:on start||`` block. You should hear and see the block click into place.
|
||||
|
||||
```blocks
|
||||
brick.showString("Hello world", 1)
|
||||
```
|
||||
|
||||
## Step 2
|
||||
|
||||
In the ``||brick:show string||`` block, type the text ``"Press my buttons to make music!"`` to replace ``"Hello world"``.
|
||||
|
||||
```blocks
|
||||
brick.showString("Press my buttons to make music!", 1)
|
||||
```
|
||||
|
||||
## Step 3
|
||||
|
||||
Open the ``||brick:Brick||`` Toolbox drawer. From the **Buttons** section, drag out an ``||brick:on button||`` block onto the Workspace (you can put it anywhere).
|
||||
|
||||
```blocks
|
||||
brick.buttonEnter.onEvent(ButtonEvent.Pressed, function () {
|
||||
|
||||
})
|
||||
brick.showString("Press my buttons to make music!", 1)
|
||||
```
|
||||
|
||||
## Step 4
|
||||
|
||||
Open the ``||music:Music||`` Toolbox drawer. Drag out **5** ``||music:play tone||`` blocks onto the Workspace, and drop them into the ``||brick:on button||`` block. **Note:** you can also right-click on a block and select "Duplicate" to copy blocks.
|
||||
|
||||
```blocks
|
||||
brick.buttonEnter.onEvent(ButtonEvent.Pressed, function () {
|
||||
music.playTone(0, music.beat(BeatFraction.Half))
|
||||
music.playTone(0, music.beat(BeatFraction.Half))
|
||||
music.playTone(0, music.beat(BeatFraction.Half))
|
||||
music.playTone(0, music.beat(BeatFraction.Half))
|
||||
music.playTone(0, music.beat(BeatFraction.Half))
|
||||
})
|
||||
brick.showString("Press my buttons to make music!", 1)
|
||||
```
|
||||
|
||||
## Step 5
|
||||
|
||||
In the ``||music:play tone||`` blocks, use the drop-down menu to select a note to play for each block. You can also set the duration to play each note for.
|
||||
|
||||

|
||||
|
||||
```blocks
|
||||
brick.buttonEnter.onEvent(ButtonEvent.Pressed, function () {
|
||||
music.playTone(440, music.beat(BeatFraction.Half))
|
||||
music.playTone(494, music.beat(BeatFraction.Half))
|
||||
music.playTone(392, music.beat(BeatFraction.Half))
|
||||
music.playTone(196, music.beat(BeatFraction.Half))
|
||||
music.playTone(294, music.beat(BeatFraction.Whole))
|
||||
})
|
||||
brick.showString("Press my buttons to make music!", 1)
|
||||
```
|
||||
|
||||
## Step 6
|
||||
|
||||
Now, plug your @boardname@ into the computer with the USB cable, and click the **Download** button at the bottom of your screen. Follow the directions to save your program to the brick.
|
||||
|
||||
You can add more ``||brick:on button||`` blocks to the Workspace and create other ``||music:play tone||`` melodies when different buttons are pressed to transform your brick into a musical instrument!
|
||||
|
139
docs/tutorials/object-near.md
Normal file
@ -0,0 +1,139 @@
|
||||
# Object Near?
|
||||
|
||||
## Introduction @fullscreen
|
||||
|
||||
The digital Ultrasonic Sensor generates sound waves and reads their echoes to detect and measure distance from objects in centimeters. Build a program that will detect when an object is nearby.
|
||||
|
||||

|
||||
|
||||
## Step 1
|
||||
|
||||
Open the ``||variables:Variables||`` Toolbox drawer. Pull a ``||variables:set item to||`` block onto the Workspace and place it into the ``||loops:forever||`` block.
|
||||
|
||||
```blocks
|
||||
let item = 0
|
||||
forever(function () {
|
||||
item = 0
|
||||
})
|
||||
```
|
||||
|
||||
## Step 2
|
||||
|
||||
Go to the ``||variables:set item to||`` block and click the variable name dropdown and select "Rename variable...". In the window that pops up, rename the variable to ``nearness`` and click **Ok**.
|
||||
|
||||
```blocks
|
||||
let nearness = 0
|
||||
forever(function () {
|
||||
nearness = 0
|
||||
})
|
||||
```
|
||||
|
||||
## Step 3
|
||||
|
||||
Open the ``||sensors:Sensors||`` Toolbox drawer. Drag the ``||sensors:ultrasonic distance||`` out and use it to replace the `0` in the ``||variables:set nearness to||`` block.
|
||||
|
||||
```blocks
|
||||
let nearness = 0
|
||||
forever(function () {
|
||||
nearness = sensors.ultrasonic4.distance()
|
||||
})
|
||||
```
|
||||
|
||||
## Step 4
|
||||
|
||||
Get an ``||logic:if then||`` block from the ``||logic:Logic||`` drawer and place it below ``||variables:set nearness to||``. Find the ``||logic:0 < 0||`` conditional block and replace the ``true`` value of the ``||logic:if then||`` condition with it.
|
||||
|
||||
```blocks
|
||||
let nearness = 0
|
||||
forever(function () {
|
||||
nearness = sensors.ultrasonic4.distance()
|
||||
if (0 < 0) {
|
||||
|
||||
}
|
||||
})
|
||||
```
|
||||
|
||||
## Step 5
|
||||
|
||||
In the ``||logic:0 < 0||`` conditional, put the ``||variables:nearness||`` variable from the ``||variables:Variables||`` drawer in the first slot. Change the value of `0` in the second slot to `50`. This sets our range for a near object.
|
||||
|
||||
```blocks
|
||||
let nearness = 0
|
||||
forever(function () {
|
||||
nearness = sensors.ultrasonic4.distance()
|
||||
if (nearness < 50) {
|
||||
|
||||
}
|
||||
})
|
||||
```
|
||||
|
||||
## Step 6
|
||||
|
||||
Go get a ``||brick:show value||`` block from the ``||brick:Brick||`` Toolbox drawer and put it inside the ``||logic:if then||``. Set the string in the first slot to `"Distance (cm)"`. Get another ``||variables:nearness||`` and drop it into the second slot.
|
||||
|
||||
```blocks
|
||||
let nearness = 0
|
||||
forever(function () {
|
||||
nearness = sensors.ultrasonic4.distance()
|
||||
if (nearness < 50) {
|
||||
brick.showValue("Distnace (cm)", nearness, 1)
|
||||
}
|
||||
})
|
||||
```
|
||||
|
||||
## Step 7
|
||||
|
||||
Now, let's add a sound as an alert when something is near. In the ``||music:Music||`` drawer, get the ``||music:play sound effect||`` and put it just below the ``||brick:show value||``.
|
||||
|
||||
```blocks
|
||||
let nearness = 0
|
||||
forever(function () {
|
||||
nearness = sensors.ultrasonic4.distance()
|
||||
if (nearness < 50) {
|
||||
brick.showValue("Distnace (cm)", nearness, 1)
|
||||
music.playSoundEffect(sounds.animalsCatPurr)
|
||||
}
|
||||
})
|
||||
```
|
||||
|
||||
## Step 8
|
||||
|
||||
In the ``||music:play sound effect||`` block, use the drop-down menu to select the ``information detected`` sound effect.
|
||||
|
||||

|
||||
|
||||
When an object is near, our brick will display the distance away that the object is detected in centimeters and then say `"detected"`.
|
||||
|
||||
```blocks
|
||||
let nearness = 0
|
||||
forever(function () {
|
||||
nearness = sensors.ultrasonic4.distance()
|
||||
if (nearness < 50) {
|
||||
brick.showValue("Distnace (cm)", nearness, 1)
|
||||
music.playSoundEffect(sounds.informationDetected)
|
||||
}
|
||||
})
|
||||
```
|
||||
|
||||
## Step 9
|
||||
|
||||
To give a little time to see the message, put a ``||loops:pause||`` after the ``||music:play sound effect||`` block. Change the time from `100` to `1500` milliseconds. Pull out a ``||brick:clear screen||`` and put it after the ``||loops:pause||``.
|
||||
|
||||
```blocks
|
||||
let nearness = 0
|
||||
forever(function () {
|
||||
nearness = sensors.ultrasonic4.distance()
|
||||
if (nearness < 50) {
|
||||
brick.showValue("Distnace (cm)", nearness, 1)
|
||||
music.playSoundEffect(sounds.informationDetected)
|
||||
pause(1500)
|
||||
brick.clearScreen()
|
||||
}
|
||||
})
|
||||
```
|
||||
|
||||
## Step 10
|
||||
|
||||
Now, plug your @boardname@ into the computer with the USB cable, and click the **Download** button at the bottom of your screen. Follow the directions to save your program to the brick.
|
||||
|
||||
Attach an Ultrasonic Sensor to Port 4 of your brick. Test your program by putting an object at different distances in front of the Ultrasonic Sensor – an object 50 centimeters or closer should be detected.
|
62
docs/tutorials/redlight-greenlight.md
Normal file
@ -0,0 +1,62 @@
|
||||
# Red Light, Green Light
|
||||
|
||||
## Introduction @fullscreen
|
||||
|
||||
Use the ``||sensors:pause color sensor||`` block to play Red Light, Green Light with your @boardname@ robot!
|
||||
|
||||

|
||||
|
||||
## Step 1
|
||||
|
||||
Open the ``||sensors:Sensors||`` Toolbox drawer. Drag out **2** ``||sensors:pause color sensor||`` blocks onto the Workspace, and drop them into the ``||loops:forever||`` loop.
|
||||
|
||||
```blocks
|
||||
forever(function () {
|
||||
sensors.color3.pauseUntilColorDetected(ColorSensorColor.Blue)
|
||||
sensors.color3.pauseUntilColorDetected(ColorSensorColor.Blue)
|
||||
})
|
||||
```
|
||||
|
||||
## Step 2
|
||||
|
||||
In the first ``||sensors:pause color sensor||`` block, use the second drop-down menu to select the "Green" color. In the second ``||sensors:pause color sensor||`` block, use the second drop-down menu to select the "Red" color.
|
||||
|
||||

|
||||
|
||||
```blocks
|
||||
forever(function () {
|
||||
sensors.color3.pauseUntilColorDetected(ColorSensorColor.Green)
|
||||
sensors.color3.pauseUntilColorDetected(ColorSensorColor.Red)
|
||||
})
|
||||
```
|
||||
|
||||
## Step 3
|
||||
|
||||
Open the ``||motors:Motors||`` Toolbox drawer. Drag out a ``||motors:tank large motors||`` block onto the Workspace, and drop in between the ``||sensors:pause color sensor||`` blocks.
|
||||
|
||||
```blocks
|
||||
forever(function () {
|
||||
sensors.color3.pauseUntilColorDetected(ColorSensorColor.Green)
|
||||
motors.largeBC.tank(50, 50)
|
||||
sensors.color3.pauseUntilColorDetected(ColorSensorColor.Red)
|
||||
})
|
||||
```
|
||||
|
||||
## Step 4
|
||||
|
||||
Open the ``||motors:Motors||`` Toolbox drawer. Drag out a ``||motors:stop all motors||`` block onto the Workspace, and drop it in after the second ``||sensors:pause color sensor||`` block in the ``||loops:forever||`` loop.
|
||||
|
||||
```blocks
|
||||
forever(function () {
|
||||
sensors.color3.pauseUntilColorDetected(ColorSensorColor.Green)
|
||||
motors.largeBC.tank(50, 50)
|
||||
sensors.color3.pauseUntilColorDetected(ColorSensorColor.Red)
|
||||
motors.stopAll()
|
||||
})
|
||||
```
|
||||
|
||||
## Step 5
|
||||
|
||||
Now, plug your @boardname@ into the computer with the USB cable, and click the **Download** button at the bottom of your screen. Follow the directions to save your program to the brick.
|
||||
|
||||
Attach a Color Sensor to Port 3 of your brick, and attach your brick to a driving base with large motors attached to Ports B and C. See the building instructions for: _Driving Base with Color Sensor Forward_. Test your program by putting a green or red piece of paper or LEGO brick in front of the color sensor.
|
232
docs/tutorials/run-motors.md
Normal file
@ -0,0 +1,232 @@
|
||||
# Run motors
|
||||
|
||||
## Introduction @fullscreen
|
||||
|
||||
Use the buttons to start and stop the large and medium motors.
|
||||
|
||||

|
||||
|
||||
## Step 1
|
||||
|
||||
Open the ``||brick:Brick||`` Toolbox drawer. Drag out **2** ``||brick:on button||`` blocks onto the Workspace (you can place these anywhere on the Workspace).
|
||||
|
||||
```blocks
|
||||
brick.buttonEnter.onEvent(ButtonEvent.Pressed, function () {
|
||||
|
||||
})
|
||||
brick.buttonEnter.onEvent(ButtonEvent.Pressed, function () {
|
||||
|
||||
})
|
||||
```
|
||||
|
||||
## Step 2
|
||||
|
||||
In the ``||brick:on button||`` blocks, use the drop-down menu to select the ``up`` and ``down`` buttons.
|
||||
|
||||

|
||||
|
||||
```blocks
|
||||
brick.buttonUp.onEvent(ButtonEvent.Pressed, function () {
|
||||
|
||||
})
|
||||
brick.buttonDown.onEvent(ButtonEvent.Pressed, function () {
|
||||
|
||||
})
|
||||
```
|
||||
|
||||
## Step 3
|
||||
|
||||
Open the ``||motors:Motors||`` Toolbox drawer. Drag out **2** ``||motors:run||`` blocks onto the Workspace, and drop one of them each into the ``||brick:on button||`` blocks.
|
||||
|
||||
```blocks
|
||||
brick.buttonUp.onEvent(ButtonEvent.Pressed, function () {
|
||||
motors.largeA.run(50)
|
||||
})
|
||||
brick.buttonDown.onEvent(ButtonEvent.Pressed, function () {
|
||||
motors.largeA.run(50)
|
||||
})
|
||||
```
|
||||
|
||||
## Step 4
|
||||
|
||||
The ``||motors:run||`` blocks specify which type of motor to run (Large or Medium), and which port the motor is attached to (Ports A, B, C, or D). The default setting is to run the large motor attached to port A at 50% speed.
|
||||
|
||||
When we press the Down button, we want our motor to run in the reverse direction. In the ``||motors:run||`` block that is in the ``||brick:on button down pressed||`` block, change the speed value from ``50%`` to ``-50%``.
|
||||
|
||||

|
||||
|
||||
```blocks
|
||||
brick.buttonUp.onEvent(ButtonEvent.Pressed, function () {
|
||||
motors.largeA.run(50)
|
||||
})
|
||||
brick.buttonDown.onEvent(ButtonEvent.Pressed, function () {
|
||||
motors.largeA.run(-50)
|
||||
})
|
||||
```
|
||||
|
||||
## Step 5
|
||||
|
||||
Now, let’s add a Medium motor, and tell it how many rotations we want it to run for.
|
||||
Open the ``||brick:Brick||`` Toolbox drawer. Drag out **2** ``|brick:on button||`` blocks. In the ``||brick:on button||`` blocks, use the drop-down menu to select the ``left`` and ``right`` buttons.
|
||||
|
||||
```blocks
|
||||
brick.buttonUp.onEvent(ButtonEvent.Pressed, function () {
|
||||
motors.largeA.run(50)
|
||||
})
|
||||
brick.buttonDown.onEvent(ButtonEvent.Pressed, function () {
|
||||
motors.largeA.run(-50)
|
||||
})
|
||||
brick.buttonLeft.onEvent(ButtonEvent.Pressed, function () {
|
||||
|
||||
})
|
||||
brick.buttonRight.onEvent(ButtonEvent.Pressed, function () {
|
||||
|
||||
})
|
||||
```
|
||||
|
||||
## Step 6
|
||||
|
||||
Open the ``||motors:Motors||`` Toolbox drawer. Drag out **2** ``||motors:run||`` blocks onto the Workspace, and drop one of them each into the ``||brick:on button left||`` and ``||brick:on button right||`` blocks.
|
||||
|
||||
```blocks
|
||||
brick.buttonUp.onEvent(ButtonEvent.Pressed, function () {
|
||||
motors.largeA.run(50)
|
||||
})
|
||||
brick.buttonDown.onEvent(ButtonEvent.Pressed, function () {
|
||||
motors.largeA.run(-50)
|
||||
})
|
||||
brick.buttonLeft.onEvent(ButtonEvent.Pressed, function () {
|
||||
motors.largeA.run(50)
|
||||
})
|
||||
brick.buttonRight.onEvent(ButtonEvent.Pressed, function () {
|
||||
motors.largeA.run(50)
|
||||
})
|
||||
```
|
||||
|
||||
## Step 7
|
||||
|
||||
For the ``||motors:run||`` blocks that are in the ``||brick:on button left||`` and ``||brick:on button right||`` blocks, use the drop-down menu to select ``medium motor D``.
|
||||
|
||||

|
||||
|
||||
```blocks
|
||||
brick.buttonUp.onEvent(ButtonEvent.Pressed, function () {
|
||||
motors.largeA.run(50)
|
||||
})
|
||||
brick.buttonDown.onEvent(ButtonEvent.Pressed, function () {
|
||||
motors.largeA.run(-50)
|
||||
})
|
||||
brick.buttonLeft.onEvent(ButtonEvent.Pressed, function () {
|
||||
motors.mediumD.run(50)
|
||||
})
|
||||
brick.buttonRight.onEvent(ButtonEvent.Pressed, function () {
|
||||
motors.mediumD.run(50)
|
||||
})
|
||||
```
|
||||
|
||||
## Step 8
|
||||
|
||||
In the ``||motors:run medium motor||`` blocks, click on the plus icon **(+)** to expand the blocks. Change the number of rotations from `0` to `5`.
|
||||
|
||||
```blocks
|
||||
brick.buttonUp.onEvent(ButtonEvent.Pressed, function () {
|
||||
motors.largeA.run(50)
|
||||
})
|
||||
brick.buttonDown.onEvent(ButtonEvent.Pressed, function () {
|
||||
motors.largeA.run(-50)
|
||||
})
|
||||
brick.buttonLeft.onEvent(ButtonEvent.Pressed, function () {
|
||||
motors.mediumD.run(50, 5, MoveUnit.Rotations)
|
||||
})
|
||||
brick.buttonRight.onEvent(ButtonEvent.Pressed, function () {
|
||||
motors.mediumD.run(50, 5, MoveUnit.Rotations)
|
||||
})
|
||||
```
|
||||
|
||||
## Step 9
|
||||
|
||||
Let’s also change the speed that our Medium motors are running at. In the ``||motors:run medium motor||`` block that is in the ``||brick:on button left||`` block, change the speed from ``50%`` to ``10%``.
|
||||
|
||||
```blocks
|
||||
brick.buttonUp.onEvent(ButtonEvent.Pressed, function () {
|
||||
motors.largeA.run(50)
|
||||
})
|
||||
brick.buttonDown.onEvent(ButtonEvent.Pressed, function () {
|
||||
motors.largeA.run(-50)
|
||||
})
|
||||
brick.buttonLeft.onEvent(ButtonEvent.Pressed, function () {
|
||||
motors.mediumD.run(10, 5, MoveUnit.Rotations)
|
||||
})
|
||||
brick.buttonRight.onEvent(ButtonEvent.Pressed, function () {
|
||||
motors.mediumD.run(50, 5, MoveUnit.Rotations)
|
||||
})
|
||||
```
|
||||
|
||||
## Step 10
|
||||
|
||||
In the ``||motors:run medium motor||`` block that is in the ``||brick:on button right||`` block, change the speed from ``50%`` to ``100%``.
|
||||
|
||||
```blocks
|
||||
brick.buttonUp.onEvent(ButtonEvent.Pressed, function () {
|
||||
motors.largeA.run(50)
|
||||
})
|
||||
brick.buttonDown.onEvent(ButtonEvent.Pressed, function () {
|
||||
motors.largeA.run(-50)
|
||||
})
|
||||
brick.buttonLeft.onEvent(ButtonEvent.Pressed, function () {
|
||||
motors.mediumD.run(10, 5, MoveUnit.Rotations)
|
||||
})
|
||||
brick.buttonRight.onEvent(ButtonEvent.Pressed, function () {
|
||||
motors.mediumD.run(100, 5, MoveUnit.Rotations)
|
||||
})
|
||||
```
|
||||
|
||||
## Step 11
|
||||
|
||||
Finally, let’s add a way to stop all our motors from running. Open the ``||brick:Brick||`` Toolbox drawer. Drag out an ``||brick:on button||`` block onto the Workspace.
|
||||
|
||||
```blocks
|
||||
brick.buttonUp.onEvent(ButtonEvent.Pressed, function () {
|
||||
motors.largeA.run(50)
|
||||
})
|
||||
brick.buttonDown.onEvent(ButtonEvent.Pressed, function () {
|
||||
motors.largeA.run(-50)
|
||||
})
|
||||
brick.buttonLeft.onEvent(ButtonEvent.Pressed, function () {
|
||||
motors.mediumD.run(10, 5, MoveUnit.Rotations)
|
||||
})
|
||||
brick.buttonRight.onEvent(ButtonEvent.Pressed, function () {
|
||||
motors.mediumD.run(100, 5, MoveUnit.Rotations)
|
||||
})
|
||||
brick.buttonEnter.onEvent(ButtonEvent.Pressed, function () {
|
||||
|
||||
})
|
||||
```
|
||||
|
||||
# Step 12
|
||||
|
||||
Open the ``||motors:Motors||`` Toolbox drawer. Drag out a ``||motors:stop all motors||`` block onto the Workspace, and drop into the ``||brick:on button||`` enter block.
|
||||
|
||||
```blocks
|
||||
brick.buttonUp.onEvent(ButtonEvent.Pressed, function () {
|
||||
motors.largeA.run(50)
|
||||
})
|
||||
brick.buttonDown.onEvent(ButtonEvent.Pressed, function () {
|
||||
motors.largeA.run(-50)
|
||||
})
|
||||
brick.buttonLeft.onEvent(ButtonEvent.Pressed, function () {
|
||||
motors.mediumD.run(10, 5, MoveUnit.Rotations)
|
||||
})
|
||||
brick.buttonRight.onEvent(ButtonEvent.Pressed, function () {
|
||||
motors.mediumD.run(100, 5, MoveUnit.Rotations)
|
||||
})
|
||||
brick.buttonEnter.onEvent(ButtonEvent.Pressed, function () {
|
||||
motors.stopAll()
|
||||
})
|
||||
```
|
||||
|
||||
## Step 13
|
||||
|
||||
Now, plug your @boardname@ into the computer with the USB cable, and click the **Download** button at the bottom of your screen. Follow the directions to save your program to the brick.
|
||||
|
||||
Attach a Large motor to Port A, and a Medium motor to Port D. Test your program by pressing the different buttons to see whether the correct motors are running as expected.
|
94
docs/tutorials/touch-sensor-values.md
Normal file
@ -0,0 +1,94 @@
|
||||
# Using Touch Sensor Values
|
||||
|
||||
## Introduction @fullscreen
|
||||
|
||||
Use the Touch sensor value to stop a running motor.
|
||||
|
||||

|
||||
|
||||
## Step 1
|
||||
|
||||
Open the ``||brick:Brick||`` Toolbox drawer. Drag an ``||brick:on button||`` block onto the Workspace, and place it anywhere on the Workspace.
|
||||
|
||||
```blocks
|
||||
brick.buttonEnter.onEvent(ButtonEvent.Pressed, function () {
|
||||
|
||||
})
|
||||
```
|
||||
|
||||
## Step 2
|
||||
|
||||
Open the ``||motors:Motors||`` Toolbox drawer. Drag out a ``||motors:run||`` block onto the Workspace, and drop it into the ``||brick:on button||`` block.
|
||||
|
||||
```blocks
|
||||
brick.buttonEnter.onEvent(ButtonEvent.Pressed, function () {
|
||||
motors.largeA.run(50)
|
||||
})
|
||||
```
|
||||
|
||||
## Step 3
|
||||
|
||||
Open the ``||logic:Logic||`` Toolbox drawer. Drag out an ``||logic:if then||`` block onto the Workspace, and drop it into the ``||loops:forever||`` block.
|
||||
|
||||
```blocks
|
||||
forever(function () {
|
||||
if (true) {
|
||||
|
||||
}
|
||||
})
|
||||
```
|
||||
|
||||
## Step 4
|
||||
|
||||
Open the ``||sensors:Sensors||`` Toolbox drawer. Drag out a ``||sensors:touch is pressed||`` block onto the Workspace, and drop it in the ``||logic:if then||`` block replacing ``true``.
|
||||
|
||||
```blocks
|
||||
forever(function () {
|
||||
if (sensors.touch1.isPressed()) {
|
||||
|
||||
}
|
||||
})
|
||||
```
|
||||
|
||||
## Step 5
|
||||
|
||||
Open the ``||music:Music||`` Toolbox drawer. Drag out a ``||music:play sound effect||`` block onto the Workspace, and drop it under the ``||logic:if then||`` block.
|
||||
|
||||
```blocks
|
||||
forever(function () {
|
||||
if (sensors.touch1.isPressed()) {
|
||||
music.playSoundEffect(sounds.animalsCatPurr)
|
||||
}
|
||||
})
|
||||
```
|
||||
|
||||
## Step 6
|
||||
|
||||
In the ``||music:play sound effect||`` block, use the drop-down menu to select the ``information touch`` sound effect.
|
||||
|
||||
```blocks
|
||||
forever(function () {
|
||||
if (sensors.touch1.isPressed()) {
|
||||
music.playSoundEffect(sounds.informationTouch)
|
||||
}
|
||||
})
|
||||
```
|
||||
|
||||
## Step 7
|
||||
|
||||
Open the ``||motors:Motors||`` Toolbox drawer. Drag out a ``||motors:stop||`` block onto the Workspace, and drop it in after the ``||music:play sound effect||`` block.
|
||||
|
||||
```blocks
|
||||
forever(function () {
|
||||
if (sensors.touch1.isPressed()) {
|
||||
music.playSoundEffect(sounds.informationTouch)
|
||||
motors.largeA.stop()
|
||||
}
|
||||
})
|
||||
```
|
||||
|
||||
## Step 8
|
||||
|
||||
Now, plug your @boardname@ into the computer with the USB cable, and click the **Download** button at the bottom of your screen. Follow the directions to save your program to the brick.
|
||||
|
||||
Attach a Large motor to Port A, and a Touch sensor to Port 1 on your brick. Test your program by pressing the ENTER button. When the motor starts, press the touch sensor. Does the motor stop as expected?
|
67
docs/tutorials/touch-to-run.md
Normal file
@ -0,0 +1,67 @@
|
||||
# Touch to Run
|
||||
|
||||
## Introduction @fullscreen
|
||||
|
||||
Use the Touch sensor to run a motor.
|
||||
|
||||

|
||||
|
||||
## Step 1
|
||||
|
||||
Open the ``||sensors:Sensors||`` Toolbox drawer. Drag out **2** ``||sensors:on touch||`` blocks onto the Workspace (you can place these anywhere).
|
||||
|
||||
```blocks
|
||||
sensors.touch1.onEvent(ButtonEvent.Pressed, function () {
|
||||
|
||||
})
|
||||
sensors.touch1.onEvent(ButtonEvent.Pressed, function () {
|
||||
|
||||
})
|
||||
```
|
||||
|
||||
## Step 2
|
||||
|
||||
In one of the ``||sensors:on touch||`` blocks, use the second drop-down menu to change from ``pressed`` to ``released``.
|
||||
|
||||

|
||||
|
||||
```blocks
|
||||
sensors.touch1.onEvent(ButtonEvent.Pressed, function () {
|
||||
|
||||
})
|
||||
sensors.touch1.onEvent(ButtonEvent.Released, function () {
|
||||
|
||||
})
|
||||
```
|
||||
|
||||
## Step 3
|
||||
|
||||
Open the ``||motors:Motors||`` Toolbox drawer. Drag out a ``||motors:run||`` block onto the Workspace, and drop it into the ``||sensors:on touch pressed||`` block.
|
||||
|
||||
```blocks
|
||||
sensors.touch1.onEvent(ButtonEvent.Pressed, function () {
|
||||
motors.largeA.run(50)
|
||||
})
|
||||
sensors.touch1.onEvent(ButtonEvent.Released, function () {
|
||||
|
||||
})
|
||||
```
|
||||
|
||||
## Step 4
|
||||
|
||||
Open the ``||motors:Motors||`` Toolbox drawer. Drag out a ``||motors:stop||`` block onto the Workspace, and drop it into the ``||sensors:on touch released||`` block.
|
||||
|
||||
```blocks
|
||||
sensors.touch1.onEvent(ButtonEvent.Pressed, function () {
|
||||
motors.largeA.run(50)
|
||||
})
|
||||
sensors.touch1.onEvent(ButtonEvent.Released, function () {
|
||||
motors.largeA.stop()
|
||||
})
|
||||
```
|
||||
|
||||
## Step 5
|
||||
|
||||
Now, plug your @boardname@ into the computer with the USB cable, and click the **Download** button at the bottom of your screen. Follow the directions to save your program to the brick.
|
||||
|
||||
Attach a Large motor to Port A, and a Touch sensor to Port 1 on your brick. Test your program by pressing and releasing the touch sensor – does the motor start and stop as expected?
|
54
docs/tutorials/wake-up.md
Normal file
@ -0,0 +1,54 @@
|
||||
# Wake Up!
|
||||
|
||||
## Introduction @fullscreen
|
||||
|
||||
Show different moods on your @boardname@.
|
||||
|
||||

|
||||
|
||||
## Step 1
|
||||
|
||||
Open the ``||brick:Brick||`` Toolbox drawer. Drag out a ``||brick:show mood||`` block onto the Workspace, and place it into the ``||loops:on start||`` block. You should hear and see the block click into place.
|
||||
|
||||
```blocks
|
||||
brick.showMood(moods.sleeping)
|
||||
```
|
||||
|
||||
## Step 2
|
||||
|
||||
Notice your brick is snoring with eyes closed in the simulator! Let’s wake her up. Open the ``||brick:Brick||`` Toolbox drawer again. Drag out **2** more ``||brick:show mood||`` blocks and drop them into the ``||brick:on start||`` block also.
|
||||
|
||||
```blocks
|
||||
brick.showMood(moods.sleeping)
|
||||
brick.showMood(moods.sleeping)
|
||||
brick.showMood(moods.sleeping)
|
||||
```
|
||||
|
||||
## Step 3
|
||||
|
||||
In the second ``||brick:show mood||`` block, click on the drop-down menu to select the tired mood.
|
||||
|
||||

|
||||
|
||||
```blocks
|
||||
brick.showMood(moods.sleeping)
|
||||
brick.showMood(moods.tired)
|
||||
brick.showMood(moods.sleeping)
|
||||
```
|
||||
|
||||
## Step 4
|
||||
|
||||
In the third ``||brick:show mood||`` block, click on the drop-down menu to select the love mood.
|
||||
|
||||

|
||||
|
||||
```blocks
|
||||
brick.showMood(moods.sleeping)
|
||||
brick.showMood(moods.tired)
|
||||
brick.showMood(moods.love)
|
||||
```
|
||||
|
||||
## Step 5
|
||||
|
||||
Now, plug your @boardname@ into the computer with the USB cable, and click the **Download** button at the bottom of your screen. Follow the directions to save your program to the brick.
|
||||
|
165
docs/tutorials/what-animal-am-i.md
Normal file
@ -0,0 +1,165 @@
|
||||
# What Animal Am I?
|
||||
|
||||
## Introduction @fullscreen
|
||||
|
||||
Create different animal effects with your @boardname@.
|
||||
|
||||

|
||||
|
||||
## Step 1
|
||||
|
||||
Open the ``||brick:Brick||`` Toolbox drawer. Drag out a ``||brick:show string||`` block from the **Screen** section onto the Workspace, and drop it into the ``||loops:on start||`` block. You should hear and see the block click into place.
|
||||
|
||||
```block
|
||||
brick.showString("Hello world", 1)
|
||||
```
|
||||
|
||||
## Step 2
|
||||
|
||||
In the ``||brick:show string||`` block, type the text ``"Guess what animal?"`` to replace ``"Hello world"``.
|
||||
|
||||
```blocks
|
||||
brick.showString("Guess what animal?", 1)
|
||||
```
|
||||
|
||||
## Step 3
|
||||
|
||||
Open the ``||brick:Brick||`` Toolbox drawer. From the **Buttons** section, drag out an ``||brick:on button||`` block and put it anywhere in the Workspace.
|
||||
|
||||
```blocks
|
||||
brick.buttonEnter.onEvent(ButtonEvent.Pressed, function () {
|
||||
|
||||
})
|
||||
brick.showString("Guess what animal?", 1)
|
||||
```
|
||||
|
||||
## Step 4
|
||||
|
||||
In the ``||brick:on button||`` block, use the drop-down menu to select the ``left`` button.
|
||||
|
||||

|
||||
|
||||
```blocks
|
||||
brick.buttonLeft.onEvent(ButtonEvent.Pressed, function () {
|
||||
|
||||
})
|
||||
brick.showString("Guess what animal?", 1)
|
||||
```
|
||||
|
||||
## Step 5
|
||||
|
||||
Open the ``||brick:Brick||`` Toolbox drawer. In the **Buttons** section, drag out **3** more ``||brick:on button||`` blocks. Using the drop-down menu, select the ``right``, ``up``, and ``down`` buttons for these 3 blocks.
|
||||
|
||||
```blocks
|
||||
brick.buttonLeft.onEvent(ButtonEvent.Pressed, function () {
|
||||
|
||||
})
|
||||
brick.buttonRight.onEvent(ButtonEvent.Pressed, function () {
|
||||
|
||||
})
|
||||
brick.buttonUp.onEvent(ButtonEvent.Pressed, function () {
|
||||
|
||||
})
|
||||
brick.buttonDown.onEvent(ButtonEvent.Pressed, function () {
|
||||
|
||||
})
|
||||
brick.showString("Guess what animal?", 1)
|
||||
```
|
||||
|
||||
## Step 6
|
||||
|
||||
Open the ``||brick:Brick||`` Toolbox drawer. Drag out **4** ``||brick:show image||`` blocks onto the Workspace, and drop one of them into each of the ``||brick:on button||`` blocks.
|
||||
|
||||
```blocks
|
||||
brick.buttonLeft.onEvent(ButtonEvent.Pressed, function () {
|
||||
brick.showImage(images.expressionsBigSmile)
|
||||
})
|
||||
brick.buttonRight.onEvent(ButtonEvent.Pressed, function () {
|
||||
brick.showImage(images.expressionsBigSmile)
|
||||
})
|
||||
brick.buttonUp.onEvent(ButtonEvent.Pressed, function () {
|
||||
brick.showImage(images.expressionsBigSmile)
|
||||
})
|
||||
brick.buttonDown.onEvent(ButtonEvent.Pressed, function () {
|
||||
brick.showImage(images.expressionsBigSmile)
|
||||
})
|
||||
brick.showString("Guess what animal?", 0)
|
||||
```
|
||||
|
||||
## Step 7
|
||||
|
||||
In the ``||brick:show image||`` blocks, use the drop-down menu to select a different image to show for each block.
|
||||
|
||||

|
||||
|
||||
```blocks
|
||||
brick.buttonLeft.onEvent(ButtonEvent.Pressed, function () {
|
||||
brick.showImage(images.expressionsMouth2shut)
|
||||
})
|
||||
brick.buttonRight.onEvent(ButtonEvent.Pressed, function () {
|
||||
brick.showImage(images.expressionsMouth1open)
|
||||
})
|
||||
brick.buttonUp.onEvent(ButtonEvent.Pressed, function () {
|
||||
brick.showImage(images.objectsBoom)
|
||||
})
|
||||
brick.buttonDown.onEvent(ButtonEvent.Pressed, function () {
|
||||
brick.showImage(images.objectsPirate)
|
||||
})
|
||||
brick.showString("Guess what animal?", 0)
|
||||
```
|
||||
|
||||
## Step 8
|
||||
|
||||
Open the ``||music:Music||`` Toolbox drawer. Drag out **4** ``||music:play sound effect||`` block and drop one of them into each of the ``||brick:on button||`` blocks, just after the ``||brick:show image||`` block.
|
||||
|
||||
```blocks
|
||||
brick.buttonLeft.onEvent(ButtonEvent.Pressed, function () {
|
||||
brick.showImage(images.expressionsMouth2shut)
|
||||
music.playSoundEffect(sounds.animalsCatPurr)
|
||||
})
|
||||
brick.buttonRight.onEvent(ButtonEvent.Pressed, function () {
|
||||
brick.showImage(images.expressionsMouth1open)
|
||||
music.playSoundEffect(sounds.animalsCatPurr)
|
||||
})
|
||||
brick.buttonUp.onEvent(ButtonEvent.Pressed, function () {
|
||||
brick.showImage(images.objectsBoom)
|
||||
music.playSoundEffect(sounds.animalsCatPurr)
|
||||
})
|
||||
brick.buttonDown.onEvent(ButtonEvent.Pressed, function () {
|
||||
brick.showImage(images.objectsPirate)
|
||||
music.playSoundEffect(sounds.animalsCatPurr)
|
||||
})
|
||||
brick.showString("Guess what animal?", 0)
|
||||
```
|
||||
|
||||
## Step 9
|
||||
|
||||
In each ``||music:play sound effect||`` block, use the drop-down menu to select a different animal sound to play.
|
||||
|
||||

|
||||
|
||||
```blocks
|
||||
brick.buttonLeft.onEvent(ButtonEvent.Pressed, function () {
|
||||
brick.showImage(images.expressionsMouth2shut)
|
||||
music.playSoundEffect(sounds.animalsCatPurr)
|
||||
})
|
||||
brick.buttonRight.onEvent(ButtonEvent.Pressed, function () {
|
||||
brick.showImage(images.expressionsMouth1open)
|
||||
music.playSoundEffect(sounds.animalsDogBark1)
|
||||
})
|
||||
brick.buttonUp.onEvent(ButtonEvent.Pressed, function () {
|
||||
brick.showImage(images.objectsBoom)
|
||||
music.playSoundEffect(sounds.animalsElephantCall)
|
||||
})
|
||||
brick.buttonDown.onEvent(ButtonEvent.Pressed, function () {
|
||||
brick.showImage(images.objectsPirate)
|
||||
music.playSoundEffect(sounds.animalsSnakeHiss)
|
||||
})
|
||||
brick.showString("Guess what animal?", 0)
|
||||
```
|
||||
|
||||
## Step 10
|
||||
|
||||
Now, plug your @boardname@ into the computer with the USB cable, and click the **Download** button at the bottom of your screen. Follow the directions to save your program to the brick.
|
||||
|
||||
Test your program with a friend by pressing the right, left, up, and down buttons on your brick. Have your friend guess what animal it is!
|
136
docs/tutorials/what-color.md
Normal file
@ -0,0 +1,136 @@
|
||||
# What Color is it?
|
||||
|
||||
## Introduction @fullscreen
|
||||
|
||||
Use the Color sensor to detect different colors.
|
||||
|
||||

|
||||
|
||||
## Step 1
|
||||
|
||||
Open the ``||brick:Brick||`` Toolbox drawer. From the **Screen** section, drag out a ``||brick:show string||`` block onto the Workspace, and drop it into the ``||loops:on start||`` block.
|
||||
|
||||
```blocks
|
||||
brick.showString("Hello world", 1)
|
||||
```
|
||||
|
||||
## Step 2
|
||||
|
||||
In the ``||brick:show string||`` block, type the text ``"What color?"`` replacing ``"Hello World"``.
|
||||
|
||||
```blocks
|
||||
brick.showString("What color?", 1)
|
||||
```
|
||||
|
||||
## Step 3
|
||||
|
||||
Open the ``||sensors:Sensors||`` Toolbox drawer. Drag out **3** ``||sensors:on color sensor detected||`` blocks onto the Workspace (you can place these anywhere).
|
||||
|
||||
```blocks
|
||||
sensors.color3.onColorDetected(ColorSensorColor.Blue, function () {
|
||||
|
||||
})
|
||||
sensors.color3.onColorDetected(ColorSensorColor.Blue, function () {
|
||||
|
||||
})
|
||||
sensors.color3.onColorDetected(ColorSensorColor.Blue, function () {
|
||||
|
||||
})
|
||||
```
|
||||
|
||||
## Step 4
|
||||
|
||||
In the ``||sensors:on color sensor detected||`` blocks, use the second drop-down menu to select Red, Green, and Yellow colors.
|
||||
|
||||
```blocks
|
||||
sensors.color3.onColorDetected(ColorSensorColor.Red, function () {
|
||||
|
||||
})
|
||||
sensors.color3.onColorDetected(ColorSensorColor.Green, function () {
|
||||
|
||||
})
|
||||
sensors.color3.onColorDetected(ColorSensorColor.Yellow, function () {
|
||||
|
||||
})
|
||||
brick.showString("What color?", 1)
|
||||
```
|
||||
|
||||
## Step 5
|
||||
|
||||
Open the ``||brick:Brick||`` Toolbox drawer. From the **Buttons** section, drag out a **3** ``||brick:set status light||`` blocks and drop one of them each into the ``||sensors:on color detected||`` blocks.
|
||||
|
||||
```blocks
|
||||
sensors.color3.onColorDetected(ColorSensorColor.Red, function () {
|
||||
brick.setStatusLight(StatusLight.Orange)
|
||||
})
|
||||
sensors.color3.onColorDetected(ColorSensorColor.Green, function () {
|
||||
brick.setStatusLight(StatusLight.Orange)
|
||||
})
|
||||
sensors.color3.onColorDetected(ColorSensorColor.Yellow, function () {
|
||||
brick.setStatusLight(StatusLight.Orange)
|
||||
})
|
||||
brick.showString("What color?", 1)
|
||||
```
|
||||
|
||||
## Step 6
|
||||
|
||||
In the ``||brick:set status light||`` blocks, use the drop-down menu to change the lights to Red, Green, and Orange corresponding to the different colors detected. There is no Yellow status light, so we’ll use Orange instead.
|
||||
|
||||
```blocks
|
||||
sensors.color3.onColorDetected(ColorSensorColor.Red, function () {
|
||||
brick.setStatusLight(StatusLight.Red)
|
||||
})
|
||||
sensors.color3.onColorDetected(ColorSensorColor.Green, function () {
|
||||
brick.setStatusLight(StatusLight.Green)
|
||||
})
|
||||
sensors.color3.onColorDetected(ColorSensorColor.Yellow, function () {
|
||||
brick.setStatusLight(StatusLight.Orange)
|
||||
})
|
||||
brick.showString("What color?", 1)
|
||||
```
|
||||
|
||||
## Step 7
|
||||
|
||||
Open the ``||music:Music||`` Toolbox drawer. Drag out **3** ``||music:play sound effect||`` blocks and drop one of them each into the ``||sensors:on color detected||`` blocks after the ``||brick:set status light||`` block.
|
||||
|
||||
```blocks
|
||||
sensors.color3.onColorDetected(ColorSensorColor.Red, function () {
|
||||
brick.setStatusLight(StatusLight.Red)
|
||||
music.playSoundEffect(sounds.animalsCatPurr)
|
||||
})
|
||||
sensors.color3.onColorDetected(ColorSensorColor.Green, function () {
|
||||
brick.setStatusLight(StatusLight.Green)
|
||||
music.playSoundEffect(sounds.animalsCatPurr)
|
||||
})
|
||||
sensors.color3.onColorDetected(ColorSensorColor.Yellow, function () {
|
||||
brick.setStatusLight(StatusLight.Orange)
|
||||
music.playSoundEffect(sounds.animalsCatPurr)
|
||||
})
|
||||
brick.showString("What color?", 1)
|
||||
```
|
||||
|
||||
## Step 8
|
||||
|
||||
In the ``||music::play sound effect||`` blocks, use the drop-down menu to select the ``colors red``, ``colors green``, and ``colors yellow`` sound effects corresponding to the different colors detected.
|
||||
|
||||
```blocks
|
||||
sensors.color3.onColorDetected(ColorSensorColor.Red, function () {
|
||||
brick.setStatusLight(StatusLight.Red)
|
||||
music.playSoundEffect(sounds.colorsRed)
|
||||
})
|
||||
sensors.color3.onColorDetected(ColorSensorColor.Green, function () {
|
||||
brick.setStatusLight(StatusLight.Green)
|
||||
music.playSoundEffect(sounds.colorsGreen)
|
||||
})
|
||||
sensors.color3.onColorDetected(ColorSensorColor.Yellow, function () {
|
||||
brick.setStatusLight(StatusLight.Orange)
|
||||
music.playSoundEffect(sounds.colorsYellow)
|
||||
})
|
||||
brick.showString("What color?", 1)
|
||||
```
|
||||
|
||||
## Step 9
|
||||
|
||||
Now, plug your @boardname@ into the computer with the USB cable, and click the **Download** button at the bottom of your screen. Follow the directions to save your program to the brick.
|
||||
|
||||
Attach a Color Sensor to Port 3 of your brick. Test your program by flashing Red, Green and Yellow colored paper or use LEGO bricks in front of the Color Sensor.
|
@ -3,7 +3,7 @@
|
||||
|
||||
import { deployCoreAsync, initAsync } from "./deploy";
|
||||
import { FieldPorts } from "./field_ports";
|
||||
import { FieldImages } from "./field_images";
|
||||
import { FieldMotors } from "./field_motors";
|
||||
import { FieldSpeed } from "./field_speed";
|
||||
import { FieldBrickButtons } from "./field_brickbuttons";
|
||||
import { FieldTurnRatio } from "./field_turnratio";
|
||||
@ -17,8 +17,8 @@ pxt.editor.initExtensionsAsync = function (opts: pxt.editor.ExtensionOptions): P
|
||||
selector: "ports",
|
||||
editor: FieldPorts
|
||||
}, {
|
||||
selector: "images",
|
||||
editor: FieldImages
|
||||
selector: "motors",
|
||||
editor: FieldMotors
|
||||
}, {
|
||||
selector: "speed",
|
||||
editor: FieldSpeed
|
||||
@ -51,7 +51,7 @@ pxt.editor.initExtensionsAsync = function (opts: pxt.editor.ExtensionOptions): P
|
||||
const saveAs = pxt.BrowserUtils.hasSaveAs();
|
||||
|
||||
const htmlBody = `
|
||||
<div class="ui three column grid stackable">
|
||||
<div class="ui two column grid stackable">
|
||||
<div class="column">
|
||||
<div class="ui">
|
||||
<div class="image">
|
||||
@ -67,21 +67,6 @@ pxt.editor.initExtensionsAsync = function (opts: pxt.editor.ExtensionOptions): P
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="column">
|
||||
<div class="ui">
|
||||
<div class="image">
|
||||
<img class="ui medium rounded image" src="./static/download/firmware.svg" style="height:109px;width:261px;margin-bottom:1rem;">
|
||||
</div>
|
||||
<div class="content">
|
||||
<div class="description">
|
||||
<span class="ui blue circular label">2</span>
|
||||
<strong>${lf("Make sure you have the latest EV3 firmware")}</strong>
|
||||
<br/>
|
||||
<a href="https://ev3manager.education.lego.com/" target="_blank">${lf("Click here to update to latest firmware")}</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="column">
|
||||
<div class="ui">
|
||||
<div class="image">
|
||||
@ -89,9 +74,7 @@ pxt.editor.initExtensionsAsync = function (opts: pxt.editor.ExtensionOptions): P
|
||||
</div>
|
||||
<div class="content">
|
||||
<div class="description">
|
||||
<span class="ui blue circular label">3</span>
|
||||
${lf("Move the .uf2 file to EV3 brick")}
|
||||
<br/>
|
||||
<span class="ui blue circular label">2</span>
|
||||
${lf("Locate the downloaded .uf2 file and drag it to the EV3 drive")}
|
||||
</div>
|
||||
</div>
|
||||
@ -106,7 +89,11 @@ pxt.editor.initExtensionsAsync = function (opts: pxt.editor.ExtensionOptions): P
|
||||
hideCancel: true,
|
||||
hideAgree: false,
|
||||
agreeLbl: lf("I got it"),
|
||||
buttons: [downloadAgain ? {
|
||||
buttons: [{
|
||||
label: lf("I don't see the EV3 drive"),
|
||||
url: '/troubleshoot',
|
||||
class: 'troubleshoot left floated'
|
||||
}, downloadAgain ? {
|
||||
label: fn,
|
||||
icon: "download",
|
||||
class: "lightgrey focused",
|
||||
|
@ -155,5 +155,6 @@ export class FieldBrickButtons extends Blockly.FieldDropdown implements Blockly.
|
||||
Blockly.DropDownDiv.content_.removeAttribute('role');
|
||||
Blockly.DropDownDiv.content_.removeAttribute('aria-haspopup');
|
||||
Blockly.DropDownDiv.content_.removeAttribute('aria-activedescendant');
|
||||
Blockly.DropDownDiv.getContentDiv().style.width = '';
|
||||
};
|
||||
}
|
@ -1,114 +0,0 @@
|
||||
/// <reference path="../node_modules/pxt-core/localtypings/blockly.d.ts"/>
|
||||
/// <reference path="../node_modules/pxt-core/built/pxtblocks.d.ts"/>
|
||||
/// <reference path="../node_modules/pxt-core/built/pxtsim.d.ts"/>
|
||||
|
||||
export interface FieldImagesOptions extends pxtblockly.FieldImageDropdownOptions {
|
||||
}
|
||||
|
||||
export class FieldImages extends pxtblockly.FieldImageDropdown implements Blockly.FieldCustom {
|
||||
public isFieldCustom_ = true;
|
||||
|
||||
constructor(text: string, options: FieldImagesOptions, validator?: Function) {
|
||||
super(text, options, validator);
|
||||
}
|
||||
|
||||
/**
|
||||
* Create a dropdown menu under the text.
|
||||
* @private
|
||||
*/
|
||||
public showEditor_() {
|
||||
// If there is an existing drop-down we own, this is a request to hide the drop-down.
|
||||
if (Blockly.DropDownDiv.hideIfOwner(this)) {
|
||||
return;
|
||||
}
|
||||
// If there is an existing drop-down someone else owns, hide it immediately and clear it.
|
||||
Blockly.DropDownDiv.hideWithoutAnimation();
|
||||
Blockly.DropDownDiv.clearContent();
|
||||
// Populate the drop-down with the icons for this field.
|
||||
let dropdownDiv = Blockly.DropDownDiv.getContentDiv();
|
||||
let contentDiv = document.createElement('div');
|
||||
// Accessibility properties
|
||||
contentDiv.setAttribute('role', 'menu');
|
||||
contentDiv.setAttribute('aria-haspopup', 'true');
|
||||
const options = this.getOptions();
|
||||
for (let i = 0, option: any; option = options[i]; i++) {
|
||||
let content = (options[i] as any)[0]; // Human-readable text or image.
|
||||
const value = (options[i] as any)[1]; // Language-neutral value.
|
||||
// Icons with the type property placeholder take up space but don't have any functionality
|
||||
// Use for special-case layouts
|
||||
if (content.type == 'placeholder') {
|
||||
let placeholder = document.createElement('span');
|
||||
placeholder.setAttribute('class', 'blocklyDropDownPlaceholder');
|
||||
placeholder.style.width = content.width + 'px';
|
||||
placeholder.style.height = content.height + 'px';
|
||||
contentDiv.appendChild(placeholder);
|
||||
continue;
|
||||
}
|
||||
let button = document.createElement('button');
|
||||
button.setAttribute('id', ':' + i); // For aria-activedescendant
|
||||
button.setAttribute('role', 'menuitem');
|
||||
button.setAttribute('class', 'blocklyDropDownButton');
|
||||
button.title = content.alt;
|
||||
if ((this as any).columns_) {
|
||||
button.style.width = (((this as any).width_ / (this as any).columns_) - 8) + 'px';
|
||||
//button.style.height = ((this.width_ / this.columns_) - 8) + 'px';
|
||||
} else {
|
||||
button.style.width = content.width + 'px';
|
||||
button.style.height = content.height + 'px';
|
||||
}
|
||||
let backgroundColor = this.sourceBlock_.getColour();
|
||||
if (value == this.getValue()) {
|
||||
// This icon is selected, show it in a different colour
|
||||
backgroundColor = this.sourceBlock_.getColourTertiary();
|
||||
button.setAttribute('aria-selected', 'true');
|
||||
}
|
||||
button.style.backgroundColor = backgroundColor;
|
||||
button.style.borderColor = this.sourceBlock_.getColourTertiary();
|
||||
Blockly.bindEvent_(button, 'click', this, (this as any).buttonClick_);
|
||||
Blockly.bindEvent_(button, 'mouseup', this, (this as any).buttonClick_);
|
||||
// These are applied manually instead of using the :hover pseudoclass
|
||||
// because Android has a bad long press "helper" menu and green highlight
|
||||
// that we must prevent with ontouchstart preventDefault
|
||||
Blockly.bindEvent_(button, 'mousedown', button, function (e) {
|
||||
this.setAttribute('class', 'blocklyDropDownButton blocklyDropDownButtonHover');
|
||||
e.preventDefault();
|
||||
});
|
||||
Blockly.bindEvent_(button, 'mouseover', button, function () {
|
||||
this.setAttribute('class', 'blocklyDropDownButton blocklyDropDownButtonHover');
|
||||
contentDiv.setAttribute('aria-activedescendant', this.id);
|
||||
});
|
||||
Blockly.bindEvent_(button, 'mouseout', button, function () {
|
||||
this.setAttribute('class', 'blocklyDropDownButton');
|
||||
contentDiv.removeAttribute('aria-activedescendant');
|
||||
});
|
||||
let buttonImg = document.createElement('img');
|
||||
buttonImg.src = content.src;
|
||||
//buttonImg.alt = icon.alt;
|
||||
// Upon click/touch, we will be able to get the clicked element as e.target
|
||||
// Store a data attribute on all possible click targets so we can match it to the icon.
|
||||
button.setAttribute('data-value', value);
|
||||
buttonImg.setAttribute('data-value', value);
|
||||
button.appendChild(buttonImg);
|
||||
contentDiv.appendChild(button);
|
||||
}
|
||||
contentDiv.style.width = (this as any).width_ + 'px';
|
||||
dropdownDiv.appendChild(contentDiv);
|
||||
|
||||
Blockly.DropDownDiv.setColour(this.sourceBlock_.getColour(), this.sourceBlock_.getColourTertiary());
|
||||
|
||||
// Calculate positioning based on the field position.
|
||||
var scale = this.sourceBlock_.workspace.scale;
|
||||
var bBox = { width: this.size_.width, height: this.size_.height };
|
||||
bBox.width *= scale;
|
||||
bBox.height *= scale;
|
||||
var position = this.fieldGroup_.getBoundingClientRect();
|
||||
var primaryX = position.left + bBox.width / 2;
|
||||
var primaryY = position.top + bBox.height;
|
||||
var secondaryX = primaryX;
|
||||
var secondaryY = position.top;
|
||||
// Set bounds to workspace; show the drop-down.
|
||||
(Blockly.DropDownDiv as any).setBoundsElement(this.sourceBlock_.workspace.getParentSvg().parentNode);
|
||||
(Blockly.DropDownDiv as any).show(this, primaryX, primaryY, secondaryX, secondaryY,
|
||||
(this as any).onHide_.bind(this));
|
||||
}
|
||||
}
|
565
editor/field_motors.ts
Normal file
@ -1,151 +1,32 @@
|
||||
/// <reference path="../node_modules/pxt-core/localtypings/blockly.d.ts"/>
|
||||
/// <reference path="../node_modules/pxt-core/built/pxtblocks.d.ts"/>
|
||||
/// <reference path="../node_modules/pxt-core/built/pxtsim.d.ts"/>
|
||||
|
||||
export interface FieldPortsOptions extends Blockly.FieldCustomDropdownOptions {
|
||||
export interface FieldPortsOptions extends pxtblockly.FieldImagesOptions {
|
||||
columns?: string;
|
||||
width?: string;
|
||||
}
|
||||
|
||||
export class FieldPorts extends Blockly.FieldDropdown implements Blockly.FieldCustom {
|
||||
export class FieldPorts extends pxtblockly.FieldImages implements Blockly.FieldCustom {
|
||||
public isFieldCustom_ = true;
|
||||
|
||||
// Width in pixels
|
||||
private width_: number;
|
||||
|
||||
// Columns in grid
|
||||
private columns_: number;
|
||||
|
||||
private savedPrimary_: string;
|
||||
|
||||
constructor(text: string, options: FieldPortsOptions, validator?: Function) {
|
||||
super(options.data);
|
||||
super(text, { sort: true, data: options.data }, validator);
|
||||
|
||||
this.columns_ = parseInt(options.columns) || 4;
|
||||
this.width_ = parseInt(options.width) || 300;
|
||||
|
||||
this.setText = Blockly.FieldDropdown.prototype.setText;
|
||||
this.updateWidth = (Blockly.Field as any).prototype.updateWidth;
|
||||
this.updateTextNode_ = Blockly.Field.prototype.updateTextNode_;
|
||||
}
|
||||
|
||||
trimOptions_() {
|
||||
}
|
||||
|
||||
/**
|
||||
* Create a dropdown menu under the text.
|
||||
* @private
|
||||
*/
|
||||
public showEditor_() {
|
||||
// If there is an existing drop-down we own, this is a request to hide the drop-down.
|
||||
if (Blockly.DropDownDiv.hideIfOwner(this)) {
|
||||
return;
|
||||
}
|
||||
// If there is an existing drop-down someone else owns, hide it immediately and clear it.
|
||||
Blockly.DropDownDiv.hideWithoutAnimation();
|
||||
Blockly.DropDownDiv.clearContent();
|
||||
// Populate the drop-down with the icons for this field.
|
||||
let dropdownDiv = Blockly.DropDownDiv.getContentDiv();
|
||||
let contentDiv = document.createElement('div');
|
||||
// Accessibility properties
|
||||
contentDiv.setAttribute('role', 'menu');
|
||||
contentDiv.setAttribute('aria-haspopup', 'true');
|
||||
let options = this.getOptions();
|
||||
options = options.sort();
|
||||
for (let i = 0, option: any; option = options[i]; i++) {
|
||||
let content = (options[i] as any)[0]; // Human-readable text or image.
|
||||
const value = (options[i] as any)[1]; // Language-neutral value.
|
||||
// Icons with the type property placeholder take up space but don't have any functionality
|
||||
// Use for special-case layouts
|
||||
if (content.type == 'placeholder') {
|
||||
let placeholder = document.createElement('span');
|
||||
placeholder.setAttribute('class', 'blocklyDropDownPlaceholder');
|
||||
placeholder.style.width = content.width + 'px';
|
||||
placeholder.style.height = content.height + 'px';
|
||||
contentDiv.appendChild(placeholder);
|
||||
continue;
|
||||
}
|
||||
let button = document.createElement('button');
|
||||
button.setAttribute('id', ':' + i); // For aria-activedescendant
|
||||
button.setAttribute('role', 'menuitem');
|
||||
button.setAttribute('class', 'blocklyDropDownButton');
|
||||
button.title = content.alt;
|
||||
if (this.columns_) {
|
||||
button.style.width = ((this.width_ / this.columns_) - 8) + 'px';
|
||||
button.style.height = ((this.width_ / this.columns_) - 8) + 'px';
|
||||
} else {
|
||||
button.style.width = content.width + 'px';
|
||||
button.style.height = content.height + 'px';
|
||||
}
|
||||
let backgroundColor = this.sourceBlock_.getColour();
|
||||
if (value == this.getValue()) {
|
||||
// This icon is selected, show it in a different colour
|
||||
backgroundColor = this.sourceBlock_.getColourTertiary();
|
||||
button.setAttribute('aria-selected', 'true');
|
||||
}
|
||||
button.style.backgroundColor = backgroundColor;
|
||||
button.style.borderColor = this.sourceBlock_.getColourTertiary();
|
||||
Blockly.bindEvent_(button, 'click', this, this.buttonClick_);
|
||||
Blockly.bindEvent_(button, 'mouseup', this, this.buttonClick_);
|
||||
// These are applied manually instead of using the :hover pseudoclass
|
||||
// because Android has a bad long press "helper" menu and green highlight
|
||||
// that we must prevent with ontouchstart preventDefault
|
||||
Blockly.bindEvent_(button, 'mousedown', button, function (e) {
|
||||
this.setAttribute('class', 'blocklyDropDownButton blocklyDropDownButtonHover');
|
||||
e.preventDefault();
|
||||
});
|
||||
Blockly.bindEvent_(button, 'mouseover', button, function () {
|
||||
this.setAttribute('class', 'blocklyDropDownButton blocklyDropDownButtonHover');
|
||||
contentDiv.setAttribute('aria-activedescendant', this.id);
|
||||
});
|
||||
Blockly.bindEvent_(button, 'mouseout', button, function () {
|
||||
this.setAttribute('class', 'blocklyDropDownButton');
|
||||
contentDiv.removeAttribute('aria-activedescendant');
|
||||
});
|
||||
let buttonImg = document.createElement('img');
|
||||
buttonImg.src = content.src;
|
||||
//buttonImg.alt = icon.alt;
|
||||
// Upon click/touch, we will be able to get the clicked element as e.target
|
||||
// Store a data attribute on all possible click targets so we can match it to the icon.
|
||||
button.setAttribute('data-value', value);
|
||||
buttonImg.setAttribute('data-value', value);
|
||||
button.appendChild(buttonImg);
|
||||
contentDiv.appendChild(button);
|
||||
}
|
||||
contentDiv.style.width = this.width_ + 'px';
|
||||
dropdownDiv.appendChild(contentDiv);
|
||||
|
||||
Blockly.DropDownDiv.setColour(this.sourceBlock_.getColour(), this.sourceBlock_.getColourTertiary());
|
||||
|
||||
// Calculate positioning based on the field position.
|
||||
var scale = this.sourceBlock_.workspace.scale;
|
||||
var bBox = { width: this.size_.width, height: this.size_.height };
|
||||
bBox.width *= scale;
|
||||
bBox.height *= scale;
|
||||
var position = this.fieldGroup_.getBoundingClientRect();
|
||||
var primaryX = position.left + bBox.width / 2;
|
||||
var primaryY = position.top + bBox.height;
|
||||
var secondaryX = primaryX;
|
||||
var secondaryY = position.top;
|
||||
// Set bounds to workspace; show the drop-down.
|
||||
(Blockly.DropDownDiv as any).setBoundsElement(this.sourceBlock_.workspace.getParentSvg().parentNode);
|
||||
(Blockly.DropDownDiv as any).show(this, primaryX, primaryY, secondaryX, secondaryY,
|
||||
this.onHide_.bind(this));
|
||||
}
|
||||
|
||||
/**
|
||||
* Callback for when a button is clicked inside the drop-down.
|
||||
* Should be bound to the FieldIconMenu.
|
||||
* @param {Event} e DOM event for the click/touch
|
||||
* @private
|
||||
*/
|
||||
private buttonClick_ = function (e: any) {
|
||||
protected buttonClick_ = function (e: any) {
|
||||
let value = e.target.getAttribute('data-value');
|
||||
this.setValue(value);
|
||||
Blockly.DropDownDiv.hide();
|
||||
};
|
||||
|
||||
/**
|
||||
* Callback for when the drop-down is hidden.
|
||||
*/
|
||||
private onHide_ = function () {
|
||||
Blockly.DropDownDiv.content_.removeAttribute('role');
|
||||
Blockly.DropDownDiv.content_.removeAttribute('aria-haspopup');
|
||||
Blockly.DropDownDiv.content_.removeAttribute('aria-activedescendant');
|
||||
};
|
||||
}
|
@ -13,7 +13,7 @@
|
||||
sodipodi:docname="Large Motor.svg"
|
||||
width="153.634"
|
||||
height="153.634"
|
||||
inkscape:version="0.92.1 r15371"
|
||||
inkscape:version="0.91 r13725"
|
||||
inkscape:export-filename="C:\gh\pxt-ev3\libs\core\jres\icons\motorLarge-icon.png"
|
||||
inkscape:export-xdpi="74.983398"
|
||||
inkscape:export-ydpi="74.983398">
|
||||
@ -25,7 +25,7 @@
|
||||
<dc:format>image/svg+xml</dc:format>
|
||||
<dc:type
|
||||
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
|
||||
<dc:title></dc:title>
|
||||
<dc:title />
|
||||
</cc:Work>
|
||||
</rdf:RDF>
|
||||
</metadata>
|
||||
@ -38,15 +38,15 @@
|
||||
guidetolerance="10"
|
||||
inkscape:pageopacity="0"
|
||||
inkscape:pageshadow="2"
|
||||
inkscape:window-width="1600"
|
||||
inkscape:window-height="837"
|
||||
inkscape:window-width="2560"
|
||||
inkscape:window-height="1395"
|
||||
id="namedview7026"
|
||||
showgrid="false"
|
||||
inkscape:zoom="1.5361183"
|
||||
inkscape:cx="39.260502"
|
||||
inkscape:cy="76.817001"
|
||||
inkscape:window-x="-8"
|
||||
inkscape:window-y="-8"
|
||||
inkscape:zoom="3.0722366"
|
||||
inkscape:cx="-73.361033"
|
||||
inkscape:cy="76.817002"
|
||||
inkscape:window-x="0"
|
||||
inkscape:window-y="1"
|
||||
inkscape:window-maximized="1"
|
||||
inkscape:current-layer="svg7024" />
|
||||
<defs
|
||||
@ -317,7 +317,7 @@
|
||||
<g
|
||||
id="Large_Motor"
|
||||
data-name="Large Motor"
|
||||
transform="translate(1383.553,5554.0014)">
|
||||
transform="matrix(-1,0,0,-1,3003.735,6879.9214)">
|
||||
<g
|
||||
id="Mask_Group_6"
|
||||
data-name="Mask Group 6"
|
||||
@ -327,12 +327,12 @@
|
||||
<g
|
||||
id="Large_motor-2"
|
||||
data-name="Large motor"
|
||||
transform="translate(-1.623)">
|
||||
transform="translate(-1.623,0)">
|
||||
<path
|
||||
id="Path_45"
|
||||
data-name="Path 45"
|
||||
class="cls-1"
|
||||
d="m 5.461,0 h 5.612 a 5.461,5.461 0 0 1 5.461,5.461 v 22.9 a 5.461,5.461 0 0 1 -5.461,5.461 H 5.461 A 5.461,5.461 0 0 1 0,28.365 V 5.461 A 5.461,5.461 0 0 1 5.461,0 Z"
|
||||
d="m 5.461,0 5.612,0 a 5.461,5.461 0 0 1 5.461,5.461 l 0,22.9 a 5.461,5.461 0 0 1 -5.461,5.461 l -5.612,0 A 5.461,5.461 0 0 1 0,28.365 L 0,5.461 A 5.461,5.461 0 0 1 5.461,0 Z"
|
||||
transform="translate(42.123,84.012)"
|
||||
inkscape:connector-curvature="0"
|
||||
style="fill:#a8a9a8" />
|
||||
@ -358,8 +358,8 @@
|
||||
id="Path_36"
|
||||
data-name="Path 36"
|
||||
class="cls-1"
|
||||
d="m 0.607,0 h 26.262 a 0.607,0.607 0 0 1 0.607,0.607 V 5.9 A 0.607,0.607 0 0 1 26.869,6.507 H 0.607 A 0.607,0.607 0 0 1 0,5.9 V 0.607 A 0.607,0.607 0 0 1 0.607,0 Z"
|
||||
transform="translate(41.1)"
|
||||
d="m 0.607,0 26.262,0 a 0.607,0.607 0 0 1 0.607,0.607 l 0,5.293 a 0.607,0.607 0 0 1 -0.607,0.607 l -26.262,0 A 0.607,0.607 0 0 1 0,5.9 L 0,0.607 A 0.607,0.607 0 0 1 0.607,0 Z"
|
||||
transform="translate(41.1,0)"
|
||||
inkscape:connector-curvature="0"
|
||||
style="fill:#a8a9a8" />
|
||||
<g
|
||||
@ -371,7 +371,7 @@
|
||||
id="Path_34-2"
|
||||
data-name="Path 34"
|
||||
class="cls-1"
|
||||
d="M 0.607,0 H 31.93 a 0.607,0.607 0 0 1 0.607,0.607 V 15.3 A 0.607,0.607 0 0 1 31.93,15.907 H 0.607 A 0.607,0.607 0 0 1 0,15.3 V 0.607 A 0.607,0.607 0 0 1 0.607,0 Z"
|
||||
d="M 0.607,0 31.93,0 a 0.607,0.607 0 0 1 0.607,0.607 l 0,14.693 a 0.607,0.607 0 0 1 -0.607,0.607 l -31.323,0 A 0.607,0.607 0 0 1 0,15.3 L 0,0.607 A 0.607,0.607 0 0 1 0.607,0 Z"
|
||||
transform="translate(2171.89,6141.59)"
|
||||
inkscape:connector-curvature="0"
|
||||
style="fill:#a8a9a8" />
|
||||
@ -380,7 +380,7 @@
|
||||
id="Path_2-2"
|
||||
data-name="Path 2"
|
||||
class="cls-3"
|
||||
d="m 5610.158,939.234 a 4.151,4.151 0 0 1 -2.342,0.705 5.131,5.131 0 0 1 -2.988,-0.705 c -1.257,-0.931 -1.229,0.1 -1.229,0.1 v 1.8 c 0,0.45 0.553,0.846 1.229,0.459 0.676,-0.387 1,-0.581 1,-0.581 0,0 0.361,-0.184 0.361,0.335 v 2.62 c 0,0 0.021,0.786 -0.73,0.768 -0.751,-0.018 -1.38,0 -1.38,0 0,0 -0.293,0.248 -0.293,1.385 0,1.137 0.293,1.322 0.293,1.322 h 1.38 c 0,0 0.73,-0.024 0.73,0.649 v 1.3 c 0,0 0.227,0.359 1.169,0.306 a 3.6,3.6 0 0 0 1.4,-0.306 v -1.3 a 0.67,0.67 0 0 1 0.66,-0.649 c 0.631,-0.01 1.257,0 1.257,0 0,0 0.252,-0.191 0.287,-1.322 0.035,-1.131 -0.287,-1.385 -0.287,-1.385 h -1.257 c 0,0 -0.805,-0.052 -0.817,-0.768 -0.012,-0.716 0,-2.62 0,-2.62 0,0 -0.047,-0.515 0.332,-0.335 0.379,0.18 1.215,0.581 1.215,0.581 0,0 0.83,0.407 0.814,-0.459 -0.016,-0.866 0,-1.8 0,-1.8 0,0 -0.072,-0.534 -0.804,-0.1 z"
|
||||
d="m 5610.158,939.234 a 4.151,4.151 0 0 1 -2.342,0.705 5.131,5.131 0 0 1 -2.988,-0.705 c -1.257,-0.931 -1.229,0.1 -1.229,0.1 l 0,1.8 c 0,0.45 0.553,0.846 1.229,0.459 0.676,-0.387 1,-0.581 1,-0.581 0,0 0.361,-0.184 0.361,0.335 l 0,2.62 c 0,0 0.021,0.786 -0.73,0.768 -0.751,-0.018 -1.38,0 -1.38,0 0,0 -0.293,0.248 -0.293,1.385 0,1.137 0.293,1.322 0.293,1.322 l 1.38,0 c 0,0 0.73,-0.024 0.73,0.649 l 0,1.3 c 0,0 0.227,0.359 1.169,0.306 a 3.6,3.6 0 0 0 1.4,-0.306 l 0,-1.3 a 0.67,0.67 0 0 1 0.66,-0.649 c 0.631,-0.01 1.257,0 1.257,0 0,0 0.252,-0.191 0.287,-1.322 0.035,-1.131 -0.287,-1.385 -0.287,-1.385 l -1.257,0 c 0,0 -0.805,-0.052 -0.817,-0.768 -0.012,-0.716 0,-2.62 0,-2.62 0,0 -0.047,-0.515 0.332,-0.335 0.379,0.18 1.215,0.581 1.215,0.581 0,0 0.83,0.407 0.814,-0.459 -0.016,-0.866 0,-1.8 0,-1.8 0,0 -0.072,-0.534 -0.804,-0.1 z"
|
||||
transform="translate(-5553.893,-845.301)"
|
||||
inkscape:connector-curvature="0"
|
||||
style="fill:#ffffff" />
|
||||
@ -388,7 +388,7 @@
|
||||
id="Path_3"
|
||||
data-name="Path 3"
|
||||
class="cls-3"
|
||||
d="m 5601.9,1015.336 a 0.83,0.83 0 0 1 1.2,-0.594 6.516,6.516 0 0 0 2.85,0.772 5.05,5.05 0 0 0 2.768,-0.772 c 0.829,-0.4 1.067,0.594 1.067,0.594 v 1.76 a 0.71,0.71 0 0 1 -1.067,0.561 5.791,5.791 0 0 0 -2.768,-0.837 7.06,7.06 0 0 0 -2.85,0.837 c 0,0 -1.178,0.239 -1.2,-0.561 -0.022,-0.8 0,-1.76 0,-1.76 z"
|
||||
d="m 5601.9,1015.336 a 0.83,0.83 0 0 1 1.2,-0.594 6.516,6.516 0 0 0 2.85,0.772 5.05,5.05 0 0 0 2.768,-0.772 c 0.829,-0.4 1.067,0.594 1.067,0.594 l 0,1.76 a 0.71,0.71 0 0 1 -1.067,0.561 5.791,5.791 0 0 0 -2.768,-0.837 7.06,7.06 0 0 0 -2.85,0.837 c 0,0 -1.178,0.239 -1.2,-0.561 -0.022,-0.8 0,-1.76 0,-1.76 z"
|
||||
transform="translate(-5552.485,-909.604)"
|
||||
inkscape:connector-curvature="0"
|
||||
style="fill:#ffffff" />
|
||||
@ -415,7 +415,7 @@
|
||||
id="Path_2-3"
|
||||
data-name="Path 2"
|
||||
class="cls-1"
|
||||
d="m 1484.037,521.285 v 17.253 c 0,0 0.019,0.845 0.3,1.121 0.281,0.276 3.516,3.626 3.516,3.626 a 1.566,1.566 0 0 0 1.157,0.4 c 0.758,-0.025 11.627,0 11.627,0 l 4.429,-4.7 v -7.963 l -10.662,-0.567 z"
|
||||
d="m 1484.037,521.285 0,17.253 c 0,0 0.019,0.845 0.3,1.121 0.281,0.276 3.516,3.626 3.516,3.626 a 1.566,1.566 0 0 0 1.157,0.4 c 0.758,-0.025 11.627,0 11.627,0 l 4.429,-4.7 0,-7.963 -10.662,-0.567 z"
|
||||
transform="translate(676.31,5680.52)"
|
||||
inkscape:connector-curvature="0"
|
||||
style="fill:#a8a9a8" />
|
||||
@ -428,7 +428,7 @@
|
||||
id="Path_44"
|
||||
data-name="Path 44"
|
||||
class="cls-1"
|
||||
d="m 5.461,0 h 5.612 a 5.461,5.461 0 0 1 5.461,5.461 v 22.9 a 5.461,5.461 0 0 1 -5.461,5.461 H 5.461 A 5.461,5.461 0 0 1 0,28.365 V 5.461 A 5.461,5.461 0 0 1 5.461,0 Z"
|
||||
d="m 5.461,0 5.612,0 a 5.461,5.461 0 0 1 5.461,5.461 l 0,22.9 a 5.461,5.461 0 0 1 -5.461,5.461 l -5.612,0 A 5.461,5.461 0 0 1 0,28.365 L 0,5.461 A 5.461,5.461 0 0 1 5.461,0 Z"
|
||||
inkscape:connector-curvature="0"
|
||||
style="fill:#a8a9a8" />
|
||||
<circle
|
||||
@ -453,7 +453,7 @@
|
||||
id="Path_5"
|
||||
data-name="Path 5"
|
||||
class="cls-3"
|
||||
d="m 5610.158,939.234 a 4.151,4.151 0 0 1 -2.342,0.705 5.131,5.131 0 0 1 -2.988,-0.705 c -1.257,-0.931 -1.229,0.1 -1.229,0.1 v 1.8 c 0,0.45 0.553,0.846 1.229,0.459 0.676,-0.387 1,-0.581 1,-0.581 0,0 0.361,-0.184 0.361,0.335 v 2.62 c 0,0 0.021,0.786 -0.73,0.768 -0.751,-0.018 -1.38,0 -1.38,0 0,0 -0.293,0.248 -0.293,1.385 0,1.137 0.293,1.322 0.293,1.322 h 1.38 c 0,0 0.73,-0.024 0.73,0.649 v 1.3 c 0,0 0.227,0.359 1.169,0.306 a 3.6,3.6 0 0 0 1.4,-0.306 v -1.3 a 0.67,0.67 0 0 1 0.66,-0.649 c 0.631,-0.01 1.257,0 1.257,0 0,0 0.252,-0.191 0.287,-1.322 0.035,-1.131 -0.287,-1.385 -0.287,-1.385 h -1.257 c 0,0 -0.805,-0.052 -0.817,-0.768 -0.012,-0.716 0,-2.62 0,-2.62 0,0 -0.047,-0.515 0.332,-0.335 0.379,0.18 1.215,0.581 1.215,0.581 0,0 0.83,0.407 0.814,-0.459 -0.016,-0.866 0,-1.8 0,-1.8 0,0 -0.072,-0.534 -0.804,-0.1 z"
|
||||
d="m 5610.158,939.234 a 4.151,4.151 0 0 1 -2.342,0.705 5.131,5.131 0 0 1 -2.988,-0.705 c -1.257,-0.931 -1.229,0.1 -1.229,0.1 l 0,1.8 c 0,0.45 0.553,0.846 1.229,0.459 0.676,-0.387 1,-0.581 1,-0.581 0,0 0.361,-0.184 0.361,0.335 l 0,2.62 c 0,0 0.021,0.786 -0.73,0.768 -0.751,-0.018 -1.38,0 -1.38,0 0,0 -0.293,0.248 -0.293,1.385 0,1.137 0.293,1.322 0.293,1.322 l 1.38,0 c 0,0 0.73,-0.024 0.73,0.649 l 0,1.3 c 0,0 0.227,0.359 1.169,0.306 a 3.6,3.6 0 0 0 1.4,-0.306 l 0,-1.3 a 0.67,0.67 0 0 1 0.66,-0.649 c 0.631,-0.01 1.257,0 1.257,0 0,0 0.252,-0.191 0.287,-1.322 0.035,-1.131 -0.287,-1.385 -0.287,-1.385 l -1.257,0 c 0,0 -0.805,-0.052 -0.817,-0.768 -0.012,-0.716 0,-2.62 0,-2.62 0,0 -0.047,-0.515 0.332,-0.335 0.379,0.18 1.215,0.581 1.215,0.581 0,0 0.83,0.407 0.814,-0.459 -0.016,-0.866 0,-1.8 0,-1.8 0,0 -0.072,-0.534 -0.804,-0.1 z"
|
||||
transform="translate(-5602.386,-929.312)"
|
||||
inkscape:connector-curvature="0"
|
||||
style="fill:#ffffff" />
|
||||
@ -461,7 +461,7 @@
|
||||
id="Path_6"
|
||||
data-name="Path 6"
|
||||
class="cls-3"
|
||||
d="m 5601.9,1015.336 a 0.83,0.83 0 0 1 1.2,-0.594 6.516,6.516 0 0 0 2.85,0.772 5.05,5.05 0 0 0 2.768,-0.772 c 0.829,-0.4 1.067,0.594 1.067,0.594 v 1.76 a 0.71,0.71 0 0 1 -1.067,0.561 5.791,5.791 0 0 0 -2.768,-0.837 7.06,7.06 0 0 0 -2.85,0.837 c 0,0 -1.178,0.239 -1.2,-0.561 -0.022,-0.8 0,-1.76 0,-1.76 z"
|
||||
d="m 5601.9,1015.336 a 0.83,0.83 0 0 1 1.2,-0.594 6.516,6.516 0 0 0 2.85,0.772 5.05,5.05 0 0 0 2.768,-0.772 c 0.829,-0.4 1.067,0.594 1.067,0.594 l 0,1.76 a 0.71,0.71 0 0 1 -1.067,0.561 5.791,5.791 0 0 0 -2.768,-0.837 7.06,7.06 0 0 0 -2.85,0.837 c 0,0 -1.178,0.239 -1.2,-0.561 -0.022,-0.8 0,-1.76 0,-1.76 z"
|
||||
transform="translate(-5600.979,-993.616)"
|
||||
inkscape:connector-curvature="0"
|
||||
style="fill:#ffffff" />
|
||||
@ -475,7 +475,7 @@
|
||||
id="Path_1-4"
|
||||
data-name="Path 1"
|
||||
class="cls-1"
|
||||
d="m 5.784,0 h 42.66 a 5.784,5.784 0 0 1 5.784,5.784 v 29.64 C 43.86,49.487 36.1,59.29 36.1,59.29 h -0.595 c 0,0 -19.462,-0.147 -23.864,-0.147 A 2.28,2.28 0 0 1 9.263,58.158 L 0,48.582 V 5.784 A 5.784,5.784 0 0 1 5.784,0 Z"
|
||||
d="m 5.784,0 42.66,0 a 5.784,5.784 0 0 1 5.784,5.784 l 0,29.64 C 43.86,49.487 36.1,59.29 36.1,59.29 l -0.595,0 c 0,0 -19.462,-0.147 -23.864,-0.147 A 2.28,2.28 0 0 1 9.263,58.158 L 0,48.582 0,5.784 A 5.784,5.784 0 0 1 5.784,0 Z"
|
||||
transform="translate(2159.6,6153.16)"
|
||||
inkscape:connector-curvature="0"
|
||||
style="fill:#a8a9a8" />
|
||||
@ -492,7 +492,7 @@
|
||||
id="hvid-2"
|
||||
data-name="hvid"
|
||||
class="cls-5"
|
||||
d="m 1498.578,449.051 7.155,7.37 23.789,31.08 v 14.857 l 13.063,-16.131 v -31.221 l -0.993,-7.691 z"
|
||||
d="m 1498.578,449.051 7.155,7.37 23.789,31.08 0,14.857 13.063,-16.131 0,-31.221 -0.993,-7.691 z"
|
||||
transform="translate(-1487.315,-449.455)"
|
||||
inkscape:connector-curvature="0"
|
||||
style="fill:#f2f2f2" />
|
||||
@ -507,7 +507,7 @@
|
||||
id="Path_4-2"
|
||||
data-name="Path 4"
|
||||
class="cls-1"
|
||||
d="M 5.784,0 H 36.875 A 5.784,5.784 0 0 1 42.66,5.784 V 28.032 C 34.013,39.3 27.1,48.444 27.1,48.444 H 5.784 A 5.784,5.784 0 0 1 0,42.66 V 5.784 A 5.784,5.784 0 0 1 5.784,0 Z"
|
||||
d="m 5.784,0 31.091,0 a 5.784,5.784 0 0 1 5.785,5.784 l 0,22.248 C 34.013,39.3 27.1,48.444 27.1,48.444 l -21.316,0 A 5.784,5.784 0 0 1 0,42.66 L 0,5.784 A 5.784,5.784 0 0 1 5.784,0 Z"
|
||||
transform="translate(2165.38,6158.22)"
|
||||
inkscape:connector-curvature="0"
|
||||
style="fill:#a8a9a8" />
|
||||
@ -525,7 +525,7 @@
|
||||
id="Union_1"
|
||||
data-name="Union 1"
|
||||
class="cls-7"
|
||||
d="M 14.461,28.56 V 1.085 a 1.085,1.085 0 1 1 2.169,0 V 28.56 a 1.085,1.085 0 1 1 -2.169,0 z m -3.615,0 V 1.085 a 1.085,1.085 0 1 1 2.169,0 V 28.56 a 1.085,1.085 0 1 1 -2.169,0 z m -3.615,0 V 1.085 a 1.085,1.085 0 1 1 2.169,0 V 28.56 a 1.085,1.085 0 1 1 -2.169,0 z m -3.615,0 V 1.085 a 1.085,1.085 0 1 1 2.169,0 V 28.56 a 1.085,1.085 0 1 1 -2.169,0 z M 0,28.56 V 1.085 a 1.085,1.085 0 1 1 2.169,0 V 28.56 A 1.085,1.085 0 1 1 0,28.56 Z"
|
||||
d="m 14.461,28.56 0,-27.475 a 1.085,1.085 0 1 1 2.169,0 l 0,27.475 a 1.085,1.085 0 1 1 -2.169,0 z m -3.615,0 0,-27.475 a 1.085,1.085 0 1 1 2.169,0 l 0,27.475 a 1.085,1.085 0 1 1 -2.169,0 z m -3.615,0 0,-27.475 a 1.085,1.085 0 1 1 2.169,0 l 0,27.475 a 1.085,1.085 0 1 1 -2.169,0 z m -3.615,0 0,-27.475 a 1.085,1.085 0 1 1 2.169,0 l 0,27.475 a 1.085,1.085 0 1 1 -2.169,0 z M 0,28.56 0,1.085 a 1.085,1.085 0 1 1 2.169,0 l 0,27.475 A 1.085,1.085 0 1 1 0,28.56 Z"
|
||||
transform="translate(15.907,-5.365)"
|
||||
inkscape:connector-curvature="0"
|
||||
style="fill:#6a6a6a" />
|
||||
@ -573,7 +573,7 @@
|
||||
class="cls-10"
|
||||
cx="3.7920001"
|
||||
cy="3.7920001"
|
||||
transform="translate(11.528)"
|
||||
transform="translate(11.528,0)"
|
||||
r="3.7920001"
|
||||
style="fill:#3c3c3c" />
|
||||
<circle
|
||||
@ -607,15 +607,15 @@
|
||||
id="Path_4-3"
|
||||
data-name="Path 4"
|
||||
class="cls-11"
|
||||
d="m 2.4,1.566 c 0,0 0.021,0.786 -0.73,0.768 -0.751,-0.018 -1.38,0 -1.38,0 0,0 -0.29,0.248 -0.29,1.385 0,1.137 0.294,1.322 0.294,1.322 h 1.38 c 0,0 0.73,-0.024 0.73,0.649 0,0.673 0,1.3 0,1.3 0,0 0.227,0.359 1.17,0.306 a 3.594,3.594 0 0 0 1.4,-0.306 v -1.3 a 0.67,0.67 0 0 1 0.66,-0.649 c 0.631,-0.01 1.257,0 1.257,0 0,0 0.253,-0.191 0.287,-1.322 C 7.212,2.588 6.891,2.333 6.891,2.333 H 5.638 c 0,0 -0.806,-0.052 -0.818,-0.768 A 12.478,12.478 0 0 1 4.884,0.305 2.9,2.9 0 0 0 2.529,0.213 C 2.45,0.819 2.4,1.566 2.4,1.566 Z"
|
||||
transform="rotate(-90,15.2715,3.5915)"
|
||||
d="m 2.4,1.566 c 0,0 0.021,0.786 -0.73,0.768 -0.751,-0.018 -1.38,0 -1.38,0 0,0 -0.29,0.248 -0.29,1.385 0,1.137 0.294,1.322 0.294,1.322 l 1.38,0 c 0,0 0.73,-0.024 0.73,0.649 0,0.673 0,1.3 0,1.3 0,0 0.227,0.359 1.17,0.306 a 3.594,3.594 0 0 0 1.4,-0.306 l 0,-1.3 a 0.67,0.67 0 0 1 0.66,-0.649 c 0.631,-0.01 1.257,0 1.257,0 0,0 0.253,-0.191 0.287,-1.322 C 7.212,2.588 6.891,2.333 6.891,2.333 l -1.253,0 c 0,0 -0.806,-0.052 -0.818,-0.768 A 12.478,12.478 0 0 1 4.884,0.305 2.9,2.9 0 0 0 2.529,0.213 C 2.45,0.819 2.4,1.566 2.4,1.566 Z"
|
||||
transform="matrix(0,-1,1,0,11.68,18.863)"
|
||||
inkscape:connector-curvature="0"
|
||||
style="fill:#242424" />
|
||||
<path
|
||||
id="Path_5-2"
|
||||
data-name="Path 5"
|
||||
class="cls-10"
|
||||
d="M 0.455,0.155 2.016,0 3.64,0.155 A 0.455,0.455 0 0 1 4.1,0.61 V 2.734 A 0.455,0.455 0 0 1 3.645,3.189 L 2.094,2.979 0.46,3.189 A 0.455,0.455 0 0 1 0,2.734 V 0.61 A 0.455,0.455 0 0 1 0.455,0.155 Z"
|
||||
d="M 0.455,0.155 2.016,0 3.64,0.155 A 0.455,0.455 0 0 1 4.1,0.61 l 0,2.124 A 0.455,0.455 0 0 1 3.645,3.189 L 2.094,2.979 0.46,3.189 A 0.455,0.455 0 0 1 0,2.734 L 0,0.61 A 0.455,0.455 0 0 1 0.455,0.155 Z"
|
||||
transform="translate(13.241,8.084)"
|
||||
inkscape:connector-curvature="0"
|
||||
style="fill:#3c3c3c" />
|
||||
@ -623,28 +623,361 @@
|
||||
id="Path_7"
|
||||
data-name="Path 7"
|
||||
class="cls-10"
|
||||
d="M 0.455,0.155 2.016,0 3.64,0.155 A 0.455,0.455 0 0 1 4.1,0.61 V 2.734 A 0.455,0.455 0 0 1 3.645,3.189 L 2.094,2.979 0.46,3.189 A 0.455,0.455 0 0 1 0,2.734 V 0.61 A 0.455,0.455 0 0 1 0.455,0.155 Z"
|
||||
transform="rotate(-90,12.71,4.628)"
|
||||
d="M 0.455,0.155 2.016,0 3.64,0.155 A 0.455,0.455 0 0 1 4.1,0.61 l 0,2.124 A 0.455,0.455 0 0 1 3.645,3.189 L 2.094,2.979 0.46,3.189 A 0.455,0.455 0 0 1 0,2.734 L 0,0.61 A 0.455,0.455 0 0 1 0.455,0.155 Z"
|
||||
transform="matrix(0,-1,1,0,8.082,17.338)"
|
||||
inkscape:connector-curvature="0"
|
||||
style="fill:#3c3c3c" />
|
||||
<path
|
||||
id="Path_6-2"
|
||||
data-name="Path 6"
|
||||
class="cls-10"
|
||||
d="M 0.455,0.155 2.016,0 3.64,0.155 A 0.455,0.455 0 0 1 4.1,0.61 V 2.734 A 0.455,0.455 0 0 1 3.645,3.189 L 2.094,2.979 0.46,3.189 A 0.455,0.455 0 0 1 0,2.734 V 0.61 A 0.455,0.455 0 0 1 0.455,0.155 Z"
|
||||
transform="rotate(180,8.668,11.2485)"
|
||||
d="M 0.455,0.155 2.016,0 3.64,0.155 A 0.455,0.455 0 0 1 4.1,0.61 l 0,2.124 A 0.455,0.455 0 0 1 3.645,3.189 L 2.094,2.979 0.46,3.189 A 0.455,0.455 0 0 1 0,2.734 L 0,0.61 A 0.455,0.455 0 0 1 0.455,0.155 Z"
|
||||
transform="matrix(-1,0,0,-1,17.336,22.497)"
|
||||
inkscape:connector-curvature="0"
|
||||
style="fill:#3c3c3c" />
|
||||
<path
|
||||
id="Path_8"
|
||||
data-name="Path 8"
|
||||
class="cls-10"
|
||||
d="M 0.455,0.155 2.016,0 3.64,0.155 A 0.455,0.455 0 0 1 4.1,0.61 V 2.734 A 0.455,0.455 0 0 1 3.645,3.189 L 2.094,2.979 0.46,3.189 A 0.455,0.455 0 0 1 0,2.734 V 0.61 A 0.455,0.455 0 0 1 0.455,0.155 Z"
|
||||
transform="rotate(90,4.6265,17.8685)"
|
||||
d="M 0.455,0.155 2.016,0 3.64,0.155 A 0.455,0.455 0 0 1 4.1,0.61 l 0,2.124 A 0.455,0.455 0 0 1 3.645,3.189 L 2.094,2.979 0.46,3.189 A 0.455,0.455 0 0 1 0,2.734 L 0,0.61 A 0.455,0.455 0 0 1 0.455,0.155 Z"
|
||||
transform="matrix(0,1,-1,0,22.495,13.242)"
|
||||
inkscape:connector-curvature="0"
|
||||
style="fill:#3c3c3c" />
|
||||
</g>
|
||||
</g>
|
||||
</g>
|
||||
</g>
|
||||
<g
|
||||
transform="matrix(-1,0,0,-1,3078.599,6880.5724)"
|
||||
data-name="Large Motor"
|
||||
id="g4220">
|
||||
<g
|
||||
clip-path="url(#clip-path)"
|
||||
transform="translate(789.306,586.141)"
|
||||
class="cls-2"
|
||||
data-name="Mask Group 6"
|
||||
id="g4222">
|
||||
<g
|
||||
transform="translate(-1.623,0)"
|
||||
data-name="Large motor"
|
||||
id="g4224">
|
||||
<path
|
||||
style="fill:#a8a9a8"
|
||||
inkscape:connector-curvature="0"
|
||||
transform="translate(42.123,84.012)"
|
||||
d="m 5.461,0 5.612,0 a 5.461,5.461 0 0 1 5.461,5.461 l 0,22.9 a 5.461,5.461 0 0 1 -5.461,5.461 l -5.612,0 A 5.461,5.461 0 0 1 0,28.365 L 0,5.461 A 5.461,5.461 0 0 1 5.461,0 Z"
|
||||
class="cls-1"
|
||||
data-name="Path 45"
|
||||
id="path4226" />
|
||||
<circle
|
||||
style="fill:#ffffff"
|
||||
r="3.7920001"
|
||||
transform="translate(49.555,85.528)"
|
||||
cy="3.7920001"
|
||||
cx="3.7920001"
|
||||
class="cls-3"
|
||||
data-name="Ellipse 2"
|
||||
id="circle4228" />
|
||||
<circle
|
||||
style="fill:#ffffff"
|
||||
r="3.7920001"
|
||||
transform="translate(49.555,108.736)"
|
||||
cy="3.7920001"
|
||||
cx="3.7920001"
|
||||
class="cls-3"
|
||||
data-name="Ellipse 1"
|
||||
id="circle4230" />
|
||||
<path
|
||||
style="fill:#a8a9a8"
|
||||
inkscape:connector-curvature="0"
|
||||
transform="translate(41.1,0)"
|
||||
d="m 0.607,0 26.262,0 a 0.607,0.607 0 0 1 0.607,0.607 l 0,5.293 a 0.607,0.607 0 0 1 -0.607,0.607 l -26.262,0 A 0.607,0.607 0 0 1 0,5.9 L 0,0.607 A 0.607,0.607 0 0 1 0.607,0 Z"
|
||||
class="cls-1"
|
||||
data-name="Path 36"
|
||||
id="path4232" />
|
||||
<g
|
||||
style="filter:url(#Path_34)"
|
||||
id="g4234"
|
||||
transform="translate(-2133.68,-6140.14)"
|
||||
class="cls-17">
|
||||
<path
|
||||
style="fill:#a8a9a8"
|
||||
inkscape:connector-curvature="0"
|
||||
transform="translate(2171.89,6141.59)"
|
||||
d="M 0.607,0 31.93,0 a 0.607,0.607 0 0 1 0.607,0.607 l 0,14.693 a 0.607,0.607 0 0 1 -0.607,0.607 l -31.323,0 A 0.607,0.607 0 0 1 0,15.3 L 0,0.607 A 0.607,0.607 0 0 1 0.607,0 Z"
|
||||
class="cls-1"
|
||||
data-name="Path 34"
|
||||
id="path4236" />
|
||||
</g>
|
||||
<path
|
||||
style="fill:#ffffff"
|
||||
inkscape:connector-curvature="0"
|
||||
transform="translate(-5553.893,-845.301)"
|
||||
d="m 5610.158,939.234 a 4.151,4.151 0 0 1 -2.342,0.705 5.131,5.131 0 0 1 -2.988,-0.705 c -1.257,-0.931 -1.229,0.1 -1.229,0.1 l 0,1.8 c 0,0.45 0.553,0.846 1.229,0.459 0.676,-0.387 1,-0.581 1,-0.581 0,0 0.361,-0.184 0.361,0.335 l 0,2.62 c 0,0 0.021,0.786 -0.73,0.768 -0.751,-0.018 -1.38,0 -1.38,0 0,0 -0.293,0.248 -0.293,1.385 0,1.137 0.293,1.322 0.293,1.322 l 1.38,0 c 0,0 0.73,-0.024 0.73,0.649 l 0,1.3 c 0,0 0.227,0.359 1.169,0.306 a 3.6,3.6 0 0 0 1.4,-0.306 l 0,-1.3 a 0.67,0.67 0 0 1 0.66,-0.649 c 0.631,-0.01 1.257,0 1.257,0 0,0 0.252,-0.191 0.287,-1.322 0.035,-1.131 -0.287,-1.385 -0.287,-1.385 l -1.257,0 c 0,0 -0.805,-0.052 -0.817,-0.768 -0.012,-0.716 0,-2.62 0,-2.62 0,0 -0.047,-0.515 0.332,-0.335 0.379,0.18 1.215,0.581 1.215,0.581 0,0 0.83,0.407 0.814,-0.459 -0.016,-0.866 0,-1.8 0,-1.8 0,0 -0.072,-0.534 -0.804,-0.1 z"
|
||||
class="cls-3"
|
||||
data-name="Path 2"
|
||||
id="path4238" />
|
||||
<path
|
||||
style="fill:#ffffff"
|
||||
inkscape:connector-curvature="0"
|
||||
transform="translate(-5552.485,-909.604)"
|
||||
d="m 5601.9,1015.336 a 0.83,0.83 0 0 1 1.2,-0.594 6.516,6.516 0 0 0 2.85,0.772 5.05,5.05 0 0 0 2.768,-0.772 c 0.829,-0.4 1.067,0.594 1.067,0.594 l 0,1.76 a 0.71,0.71 0 0 1 -1.067,0.561 5.791,5.791 0 0 0 -2.768,-0.837 7.06,7.06 0 0 0 -2.85,0.837 c 0,0 -1.178,0.239 -1.2,-0.561 -0.022,-0.8 0,-1.76 0,-1.76 z"
|
||||
class="cls-3"
|
||||
data-name="Path 3"
|
||||
id="path4240" />
|
||||
<g
|
||||
style="filter:url(#Path_1)"
|
||||
id="g4242"
|
||||
transform="translate(-2133.68,-6140.14)"
|
||||
class="cls-16">
|
||||
<path
|
||||
style="fill:#a8a9a8"
|
||||
inkscape:connector-curvature="0"
|
||||
transform="translate(2149.43,6214.55)"
|
||||
d="M 0.016,8.513 13.42,-4.416 31.991,-3.746 32.162,55.2 c 0,0.838 -0.155,0.838 -0.462,1.137 l -10.416,10.096 -0.212,0.19 c -0.584,0.4 -1.987,-0.115 -1.987,-0.952 L -0.364,44.961 -0.375,9.187 c 0,-0.419 0.142,-0.402 0.391,-0.674 z"
|
||||
class="cls-1"
|
||||
data-name="Path 1"
|
||||
id="path4244" />
|
||||
</g>
|
||||
<g
|
||||
style="filter:url(#Path_2)"
|
||||
id="g4246"
|
||||
transform="translate(-2133.68,-6140.14)"
|
||||
class="cls-15">
|
||||
<path
|
||||
style="fill:#a8a9a8"
|
||||
inkscape:connector-curvature="0"
|
||||
transform="translate(676.31,5680.52)"
|
||||
d="m 1484.037,521.285 0,17.253 c 0,0 0.019,0.845 0.3,1.121 0.281,0.276 3.516,3.626 3.516,3.626 a 1.566,1.566 0 0 0 1.157,0.4 c 0.758,-0.025 11.627,0 11.627,0 l 4.429,-4.7 0,-7.963 -10.662,-0.567 z"
|
||||
class="cls-1"
|
||||
data-name="Path 2"
|
||||
id="path4248" />
|
||||
</g>
|
||||
<g
|
||||
transform="translate(15.123,26.978)"
|
||||
data-name="Group 4"
|
||||
id="g4250">
|
||||
<path
|
||||
style="fill:#a8a9a8"
|
||||
inkscape:connector-curvature="0"
|
||||
d="m 5.461,0 5.612,0 a 5.461,5.461 0 0 1 5.461,5.461 l 0,22.9 a 5.461,5.461 0 0 1 -5.461,5.461 l -5.612,0 A 5.461,5.461 0 0 1 0,28.365 L 0,5.461 A 5.461,5.461 0 0 1 5.461,0 Z"
|
||||
class="cls-1"
|
||||
data-name="Path 44"
|
||||
id="path4252" />
|
||||
<circle
|
||||
style="fill:#ffffff"
|
||||
r="3.7920001"
|
||||
transform="translate(1.062,1.517)"
|
||||
cy="3.7920001"
|
||||
cx="3.7920001"
|
||||
class="cls-3"
|
||||
data-name="Ellipse 3"
|
||||
id="circle4254" />
|
||||
<circle
|
||||
style="fill:#ffffff"
|
||||
r="3.7920001"
|
||||
transform="translate(1.062,24.725)"
|
||||
cy="3.7920001"
|
||||
cx="3.7920001"
|
||||
class="cls-3"
|
||||
data-name="Ellipse 4"
|
||||
id="circle4256" />
|
||||
<path
|
||||
style="fill:#ffffff"
|
||||
inkscape:connector-curvature="0"
|
||||
transform="translate(-5602.386,-929.312)"
|
||||
d="m 5610.158,939.234 a 4.151,4.151 0 0 1 -2.342,0.705 5.131,5.131 0 0 1 -2.988,-0.705 c -1.257,-0.931 -1.229,0.1 -1.229,0.1 l 0,1.8 c 0,0.45 0.553,0.846 1.229,0.459 0.676,-0.387 1,-0.581 1,-0.581 0,0 0.361,-0.184 0.361,0.335 l 0,2.62 c 0,0 0.021,0.786 -0.73,0.768 -0.751,-0.018 -1.38,0 -1.38,0 0,0 -0.293,0.248 -0.293,1.385 0,1.137 0.293,1.322 0.293,1.322 l 1.38,0 c 0,0 0.73,-0.024 0.73,0.649 l 0,1.3 c 0,0 0.227,0.359 1.169,0.306 a 3.6,3.6 0 0 0 1.4,-0.306 l 0,-1.3 a 0.67,0.67 0 0 1 0.66,-0.649 c 0.631,-0.01 1.257,0 1.257,0 0,0 0.252,-0.191 0.287,-1.322 0.035,-1.131 -0.287,-1.385 -0.287,-1.385 l -1.257,0 c 0,0 -0.805,-0.052 -0.817,-0.768 -0.012,-0.716 0,-2.62 0,-2.62 0,0 -0.047,-0.515 0.332,-0.335 0.379,0.18 1.215,0.581 1.215,0.581 0,0 0.83,0.407 0.814,-0.459 -0.016,-0.866 0,-1.8 0,-1.8 0,0 -0.072,-0.534 -0.804,-0.1 z"
|
||||
class="cls-3"
|
||||
data-name="Path 5"
|
||||
id="path4258" />
|
||||
<path
|
||||
style="fill:#ffffff"
|
||||
inkscape:connector-curvature="0"
|
||||
transform="translate(-5600.979,-993.616)"
|
||||
d="m 5601.9,1015.336 a 0.83,0.83 0 0 1 1.2,-0.594 6.516,6.516 0 0 0 2.85,0.772 5.05,5.05 0 0 0 2.768,-0.772 c 0.829,-0.4 1.067,0.594 1.067,0.594 l 0,1.76 a 0.71,0.71 0 0 1 -1.067,0.561 5.791,5.791 0 0 0 -2.768,-0.837 7.06,7.06 0 0 0 -2.85,0.837 c 0,0 -1.178,0.239 -1.2,-0.561 -0.022,-0.8 0,-1.76 0,-1.76 z"
|
||||
class="cls-3"
|
||||
data-name="Path 6"
|
||||
id="path4260" />
|
||||
</g>
|
||||
<g
|
||||
style="filter:url(#Path_1-2)"
|
||||
id="g4262"
|
||||
transform="translate(-2133.68,-6140.14)"
|
||||
class="cls-14">
|
||||
<path
|
||||
style="fill:#a8a9a8"
|
||||
inkscape:connector-curvature="0"
|
||||
transform="translate(2159.6,6153.16)"
|
||||
d="m 5.784,0 42.66,0 a 5.784,5.784 0 0 1 5.784,5.784 l 0,29.64 C 43.86,49.487 36.1,59.29 36.1,59.29 l -0.595,0 c 0,0 -19.462,-0.147 -23.864,-0.147 A 2.28,2.28 0 0 1 9.263,58.158 L 0,48.582 0,5.784 A 5.784,5.784 0 0 1 5.784,0 Z"
|
||||
class="cls-1"
|
||||
data-name="Path 1"
|
||||
id="path4264" />
|
||||
</g>
|
||||
<g
|
||||
transform="translate(25.916,13.015)"
|
||||
id="g4266">
|
||||
<g
|
||||
clip-path="url(#clip-path-2)"
|
||||
class="cls-4"
|
||||
data-name="Mask Group 1"
|
||||
id="g4268">
|
||||
<path
|
||||
style="fill:#f2f2f2"
|
||||
inkscape:connector-curvature="0"
|
||||
transform="translate(-1487.315,-449.455)"
|
||||
d="m 1498.578,449.051 7.155,7.37 23.789,31.08 0,14.857 13.063,-16.131 0,-31.221 -0.993,-7.691 z"
|
||||
class="cls-5"
|
||||
data-name="hvid"
|
||||
id="path4270" />
|
||||
</g>
|
||||
</g>
|
||||
<g
|
||||
style="filter:url(#Path_4)"
|
||||
id="g4272"
|
||||
transform="translate(-2133.68,-6140.14)"
|
||||
class="cls-13">
|
||||
<path
|
||||
style="fill:#a8a9a8"
|
||||
inkscape:connector-curvature="0"
|
||||
transform="translate(2165.38,6158.22)"
|
||||
d="m 5.784,0 31.091,0 a 5.784,5.784 0 0 1 5.785,5.784 l 0,22.248 C 34.013,39.3 27.1,48.444 27.1,48.444 l -21.316,0 A 5.784,5.784 0 0 1 0,42.66 L 0,5.784 A 5.784,5.784 0 0 1 5.784,0 Z"
|
||||
class="cls-1"
|
||||
data-name="Path 4"
|
||||
id="path4274" />
|
||||
</g>
|
||||
<g
|
||||
transform="translate(31.7,18.38)"
|
||||
data-name="Group 3"
|
||||
id="g4276">
|
||||
<g
|
||||
clip-path="url(#clip-path-3)"
|
||||
class="cls-6"
|
||||
data-name="Mask Group 2"
|
||||
id="g4278">
|
||||
<path
|
||||
style="fill:#6a6a6a"
|
||||
inkscape:connector-curvature="0"
|
||||
transform="translate(15.907,-5.365)"
|
||||
d="m 14.461,28.56 0,-27.475 a 1.085,1.085 0 1 1 2.169,0 l 0,27.475 a 1.085,1.085 0 1 1 -2.169,0 z m -3.615,0 0,-27.475 a 1.085,1.085 0 1 1 2.169,0 l 0,27.475 a 1.085,1.085 0 1 1 -2.169,0 z m -3.615,0 0,-27.475 a 1.085,1.085 0 1 1 2.169,0 l 0,27.475 a 1.085,1.085 0 1 1 -2.169,0 z m -3.615,0 0,-27.475 a 1.085,1.085 0 1 1 2.169,0 l 0,27.475 a 1.085,1.085 0 1 1 -2.169,0 z M 0,28.56 0,1.085 a 1.085,1.085 0 1 1 2.169,0 l 0,27.475 A 1.085,1.085 0 1 1 0,28.56 Z"
|
||||
class="cls-7"
|
||||
data-name="Union 1"
|
||||
id="path4280" />
|
||||
</g>
|
||||
</g>
|
||||
<circle
|
||||
style="fill:#9a9a9a"
|
||||
r="2.2449999"
|
||||
transform="translate(29.076,16.175)"
|
||||
cy="2.2449999"
|
||||
cx="2.2449999"
|
||||
class="cls-8"
|
||||
data-name="Ellipse 1"
|
||||
id="circle4282" />
|
||||
<circle
|
||||
style="fill:#9a9a9a"
|
||||
r="2.2449999"
|
||||
transform="translate(57.744,66.686)"
|
||||
cy="2.2449999"
|
||||
cx="2.2449999"
|
||||
class="cls-8"
|
||||
data-name="Ellipse 2"
|
||||
id="circle4284" />
|
||||
<g
|
||||
id="g4286"
|
||||
transform="translate(-2133.68,-6140.14)"
|
||||
class="cls-12">
|
||||
<circle
|
||||
style="fill:#b72b1c"
|
||||
r="17.063999"
|
||||
transform="translate(2135.31,6259.65)"
|
||||
cy="17.063999"
|
||||
cx="17.063999"
|
||||
class="cls-9"
|
||||
data-name="rød"
|
||||
id="circle4288" />
|
||||
</g>
|
||||
<g
|
||||
transform="matrix(0.966,0.259,-0.259,0.966,7.93,117.883)"
|
||||
data-name="Group 2"
|
||||
id="g4290">
|
||||
<circle
|
||||
style="fill:#3c3c3c"
|
||||
r="3.7920001"
|
||||
transform="translate(11.528,0)"
|
||||
cy="3.7920001"
|
||||
cx="3.7920001"
|
||||
class="cls-10"
|
||||
data-name="Ellipse 4"
|
||||
id="circle4292" />
|
||||
<circle
|
||||
style="fill:#3c3c3c"
|
||||
r="3.7920001"
|
||||
transform="translate(23.056,11.528)"
|
||||
cy="3.7920001"
|
||||
cx="3.7920001"
|
||||
class="cls-10"
|
||||
data-name="Ellipse 7"
|
||||
id="circle4294" />
|
||||
<circle
|
||||
style="fill:#3c3c3c"
|
||||
r="3.7920001"
|
||||
transform="translate(11.528,23.056)"
|
||||
cy="3.7920001"
|
||||
cx="3.7920001"
|
||||
class="cls-10"
|
||||
data-name="Ellipse 5"
|
||||
id="circle4296" />
|
||||
<circle
|
||||
style="fill:#3c3c3c"
|
||||
r="3.7920001"
|
||||
transform="translate(0,11.528)"
|
||||
cy="3.7920001"
|
||||
cx="3.7920001"
|
||||
class="cls-10"
|
||||
data-name="Ellipse 6"
|
||||
id="circle4298" />
|
||||
<path
|
||||
style="fill:#242424"
|
||||
inkscape:connector-curvature="0"
|
||||
transform="matrix(0,-1,1,0,11.68,18.863)"
|
||||
d="m 2.4,1.566 c 0,0 0.021,0.786 -0.73,0.768 -0.751,-0.018 -1.38,0 -1.38,0 0,0 -0.29,0.248 -0.29,1.385 0,1.137 0.294,1.322 0.294,1.322 l 1.38,0 c 0,0 0.73,-0.024 0.73,0.649 0,0.673 0,1.3 0,1.3 0,0 0.227,0.359 1.17,0.306 a 3.594,3.594 0 0 0 1.4,-0.306 l 0,-1.3 a 0.67,0.67 0 0 1 0.66,-0.649 c 0.631,-0.01 1.257,0 1.257,0 0,0 0.253,-0.191 0.287,-1.322 C 7.212,2.588 6.891,2.333 6.891,2.333 l -1.253,0 c 0,0 -0.806,-0.052 -0.818,-0.768 A 12.478,12.478 0 0 1 4.884,0.305 2.9,2.9 0 0 0 2.529,0.213 C 2.45,0.819 2.4,1.566 2.4,1.566 Z"
|
||||
class="cls-11"
|
||||
data-name="Path 4"
|
||||
id="path4300" />
|
||||
<path
|
||||
style="fill:#3c3c3c"
|
||||
inkscape:connector-curvature="0"
|
||||
transform="translate(13.241,8.084)"
|
||||
d="M 0.455,0.155 2.016,0 3.64,0.155 A 0.455,0.455 0 0 1 4.1,0.61 l 0,2.124 A 0.455,0.455 0 0 1 3.645,3.189 L 2.094,2.979 0.46,3.189 A 0.455,0.455 0 0 1 0,2.734 L 0,0.61 A 0.455,0.455 0 0 1 0.455,0.155 Z"
|
||||
class="cls-10"
|
||||
data-name="Path 5"
|
||||
id="path4302" />
|
||||
<path
|
||||
style="fill:#3c3c3c"
|
||||
inkscape:connector-curvature="0"
|
||||
transform="matrix(0,-1,1,0,8.082,17.338)"
|
||||
d="M 0.455,0.155 2.016,0 3.64,0.155 A 0.455,0.455 0 0 1 4.1,0.61 l 0,2.124 A 0.455,0.455 0 0 1 3.645,3.189 L 2.094,2.979 0.46,3.189 A 0.455,0.455 0 0 1 0,2.734 L 0,0.61 A 0.455,0.455 0 0 1 0.455,0.155 Z"
|
||||
class="cls-10"
|
||||
data-name="Path 7"
|
||||
id="path4304" />
|
||||
<path
|
||||
style="fill:#3c3c3c"
|
||||
inkscape:connector-curvature="0"
|
||||
transform="matrix(-1,0,0,-1,17.336,22.497)"
|
||||
d="M 0.455,0.155 2.016,0 3.64,0.155 A 0.455,0.455 0 0 1 4.1,0.61 l 0,2.124 A 0.455,0.455 0 0 1 3.645,3.189 L 2.094,2.979 0.46,3.189 A 0.455,0.455 0 0 1 0,2.734 L 0,0.61 A 0.455,0.455 0 0 1 0.455,0.155 Z"
|
||||
class="cls-10"
|
||||
data-name="Path 6"
|
||||
id="path4306" />
|
||||
<path
|
||||
style="fill:#3c3c3c"
|
||||
inkscape:connector-curvature="0"
|
||||
transform="matrix(0,1,-1,0,22.495,13.242)"
|
||||
d="M 0.455,0.155 2.016,0 3.64,0.155 A 0.455,0.455 0 0 1 4.1,0.61 l 0,2.124 A 0.455,0.455 0 0 1 3.645,3.189 L 2.094,2.979 0.46,3.189 A 0.455,0.455 0 0 1 0,2.734 L 0,0.61 A 0.455,0.455 0 0 1 0.455,0.155 Z"
|
||||
class="cls-10"
|
||||
data-name="Path 8"
|
||||
id="path4308" />
|
||||
</g>
|
||||
</g>
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
||||
|
Before Width: | Height: | Size: 23 KiB After Width: | Height: | Size: 39 KiB |
983
legoresources/SVGassets/Large Motors.svg
Normal file
@ -0,0 +1,983 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<svg
|
||||
xmlns:dc="http://purl.org/dc/elements/1.1/"
|
||||
xmlns:cc="http://creativecommons.org/ns#"
|
||||
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||
xmlns:svg="http://www.w3.org/2000/svg"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||
viewBox="2135.306 6140.141 153.634 153.634"
|
||||
version="1.1"
|
||||
id="svg7024"
|
||||
sodipodi:docname="Large Motors.svg"
|
||||
width="153.634"
|
||||
height="153.634"
|
||||
inkscape:version="0.91 r13725"
|
||||
inkscape:export-filename="/Users/sam/pxt-ev3/libs/core/jres/icons/dualMotorLarge-icon.png"
|
||||
inkscape:export-xdpi="74.983398"
|
||||
inkscape:export-ydpi="74.983398">
|
||||
<metadata
|
||||
id="metadata7028">
|
||||
<rdf:RDF>
|
||||
<cc:Work
|
||||
rdf:about="">
|
||||
<dc:format>image/svg+xml</dc:format>
|
||||
<dc:type
|
||||
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
|
||||
<dc:title></dc:title>
|
||||
</cc:Work>
|
||||
</rdf:RDF>
|
||||
</metadata>
|
||||
<sodipodi:namedview
|
||||
pagecolor="#ffffff"
|
||||
bordercolor="#666666"
|
||||
borderopacity="1"
|
||||
objecttolerance="10"
|
||||
gridtolerance="10"
|
||||
guidetolerance="10"
|
||||
inkscape:pageopacity="0"
|
||||
inkscape:pageshadow="2"
|
||||
inkscape:window-width="2560"
|
||||
inkscape:window-height="1395"
|
||||
id="namedview7026"
|
||||
showgrid="false"
|
||||
inkscape:zoom="3.0722366"
|
||||
inkscape:cx="-73.361033"
|
||||
inkscape:cy="76.817002"
|
||||
inkscape:window-x="0"
|
||||
inkscape:window-y="1"
|
||||
inkscape:window-maximized="1"
|
||||
inkscape:current-layer="svg7024" />
|
||||
<defs
|
||||
id="defs6971">
|
||||
<style
|
||||
id="style6897">
|
||||
.cls-1 {
|
||||
fill: #a8a9a8;
|
||||
}
|
||||
|
||||
.cls-2 {
|
||||
clip-path: url(#clip-path);
|
||||
}
|
||||
|
||||
.cls-3 {
|
||||
fill: #fff;
|
||||
}
|
||||
|
||||
.cls-4 {
|
||||
clip-path: url(#clip-path-2);
|
||||
}
|
||||
|
||||
.cls-5 {
|
||||
fill: #f2f2f2;
|
||||
}
|
||||
|
||||
.cls-6 {
|
||||
clip-path: url(#clip-path-3);
|
||||
}
|
||||
|
||||
.cls-7 {
|
||||
fill: #6a6a6a;
|
||||
}
|
||||
|
||||
.cls-8 {
|
||||
fill: #9a9a9a;
|
||||
}
|
||||
|
||||
.cls-9 {
|
||||
fill: #b72b1c;
|
||||
}
|
||||
|
||||
.cls-10 {
|
||||
fill: #3c3c3c;
|
||||
}
|
||||
|
||||
.cls-11 {
|
||||
fill: #242424;
|
||||
}
|
||||
|
||||
.cls-12 {
|
||||
filter: url(#rød);
|
||||
}
|
||||
|
||||
.cls-13 {
|
||||
filter: url(#Path_4);
|
||||
}
|
||||
|
||||
.cls-14 {
|
||||
filter: url(#Path_1-2);
|
||||
}
|
||||
|
||||
.cls-15 {
|
||||
filter: url(#Path_2);
|
||||
}
|
||||
|
||||
.cls-16 {
|
||||
filter: url(#Path_1);
|
||||
}
|
||||
|
||||
.cls-17 {
|
||||
filter: url(#Path_34);
|
||||
}
|
||||
</style>
|
||||
<clipPath
|
||||
id="clip-path">
|
||||
<path
|
||||
id="Union_6"
|
||||
data-name="Union 6"
|
||||
class="cls-1"
|
||||
d="M 0,136.571 A 17.07,17.07 0 0 1 14.122,119.759 L 13.757,119.371 13.747,83.6 c 0,-0.419 0.142,-0.4 0.392,-0.673 L 25.043,72.4 V 62.372 l -0.75,-0.775 V 60.8 H 17.5 a 4,4 0 0 1 -4,-4 V 30.978 a 4,4 0 0 1 4,-4 h 6.793 V 18.8 a 5.784,5.784 0 0 1 5.784,-5.784 h 6.508 V 5.446 A 4,4 0 0 1 39.477,1.6 v -1 A 0.607,0.607 0 0 1 40.084,0 h 26.262 a 0.607,0.607 0 0 1 0.607,0.607 v 1.282 a 4,4 0 0 1 2.169,3.557 v 7.569 h 3.615 A 5.784,5.784 0 0 1 78.521,18.8 V 48.44 C 68.153,62.5 60.394,72.305 60.394,72.305 H 59.8 c 0,0 -7.092,-0.053 -13.682,-0.1 l 0.034,11.8 h 6.882 a 4,4 0 0 1 4,4 v 25.826 a 4,4 0 0 1 -4,4 h -6.785 l 0.034,11.775 c 0,0.838 -0.155,0.838 -0.462,1.137 l -10.415,10.099 -0.212,0.191 A 1.518,1.518 0 0 1 33.6,140.8 17.067,17.067 0 0 1 0,136.571 Z"
|
||||
inkscape:connector-curvature="0"
|
||||
style="fill:#a8a9a8" />
|
||||
</clipPath>
|
||||
<filter
|
||||
id="Path_34"
|
||||
x="2168.8911"
|
||||
y="6138.5869"
|
||||
width="38.536999"
|
||||
height="21.907"
|
||||
filterUnits="userSpaceOnUse">
|
||||
<feOffset
|
||||
input="SourceAlpha"
|
||||
id="feOffset6901" />
|
||||
<feGaussianBlur
|
||||
stdDeviation="1"
|
||||
result="blur"
|
||||
id="feGaussianBlur6903" />
|
||||
<feFlood
|
||||
flood-opacity="0.502"
|
||||
id="feFlood6905" />
|
||||
<feComposite
|
||||
operator="in"
|
||||
in2="blur"
|
||||
id="feComposite6907"
|
||||
result="result1" />
|
||||
<feComposite
|
||||
in="SourceGraphic"
|
||||
in2="result1"
|
||||
id="feComposite6909" />
|
||||
</filter>
|
||||
<filter
|
||||
id="Path_1"
|
||||
x="2146.053"
|
||||
y="6207.1338"
|
||||
width="38.536999"
|
||||
height="77.177002"
|
||||
filterUnits="userSpaceOnUse">
|
||||
<feOffset
|
||||
input="SourceAlpha"
|
||||
id="feOffset6912" />
|
||||
<feGaussianBlur
|
||||
stdDeviation="1"
|
||||
result="blur-2"
|
||||
id="feGaussianBlur6914" />
|
||||
<feFlood
|
||||
flood-opacity="0.502"
|
||||
id="feFlood6916" />
|
||||
<feComposite
|
||||
operator="in"
|
||||
in2="blur-2"
|
||||
id="feComposite6918"
|
||||
result="result1" />
|
||||
<feComposite
|
||||
in="SourceGraphic"
|
||||
in2="result1"
|
||||
id="feComposite6920" />
|
||||
</filter>
|
||||
<filter
|
||||
id="Path_2"
|
||||
x="2157.3491"
|
||||
y="6198.8062"
|
||||
width="27.028999"
|
||||
height="28.403"
|
||||
filterUnits="userSpaceOnUse">
|
||||
<feOffset
|
||||
input="SourceAlpha"
|
||||
id="feOffset6923" />
|
||||
<feGaussianBlur
|
||||
stdDeviation="1"
|
||||
result="blur-3"
|
||||
id="feGaussianBlur6925" />
|
||||
<feFlood
|
||||
flood-opacity="0.502"
|
||||
id="feFlood6927" />
|
||||
<feComposite
|
||||
operator="in"
|
||||
in2="blur-3"
|
||||
id="feComposite6929"
|
||||
result="result1" />
|
||||
<feComposite
|
||||
in="SourceGraphic"
|
||||
in2="result1"
|
||||
id="feComposite6931" />
|
||||
</filter>
|
||||
<filter
|
||||
id="Path_1-2"
|
||||
x="2156.6001"
|
||||
y="6150.1548"
|
||||
width="60.229"
|
||||
height="65.290001"
|
||||
filterUnits="userSpaceOnUse">
|
||||
<feOffset
|
||||
input="SourceAlpha"
|
||||
id="feOffset6934" />
|
||||
<feGaussianBlur
|
||||
stdDeviation="1"
|
||||
result="blur-4"
|
||||
id="feGaussianBlur6936" />
|
||||
<feFlood
|
||||
flood-opacity="0.502"
|
||||
id="feFlood6938" />
|
||||
<feComposite
|
||||
operator="in"
|
||||
in2="blur-4"
|
||||
id="feComposite6940"
|
||||
result="result1" />
|
||||
<feComposite
|
||||
in="SourceGraphic"
|
||||
in2="result1"
|
||||
id="feComposite6942" />
|
||||
</filter>
|
||||
<clipPath
|
||||
id="clip-path-2">
|
||||
<path
|
||||
id="Path_9"
|
||||
data-name="Path 9"
|
||||
class="cls-1"
|
||||
d="m 5.784,0 h 42.66 a 5.784,5.784 0 0 1 5.784,5.784 v 29.64 C 43.86,49.487 36.1,59.29 36.1,59.29 h -0.595 c 0,0 -19.462,-0.147 -23.864,-0.147 A 2.28,2.28 0 0 1 9.263,58.158 L 0,48.582 V 5.784 A 5.784,5.784 0 0 1 5.784,0 Z"
|
||||
inkscape:connector-curvature="0"
|
||||
style="fill:#a8a9a8" />
|
||||
</clipPath>
|
||||
<filter
|
||||
id="Path_4"
|
||||
x="2162.384"
|
||||
y="6155.2168"
|
||||
width="48.66"
|
||||
height="54.444"
|
||||
filterUnits="userSpaceOnUse">
|
||||
<feOffset
|
||||
input="SourceAlpha"
|
||||
id="feOffset6947" />
|
||||
<feGaussianBlur
|
||||
stdDeviation="1"
|
||||
result="blur-5"
|
||||
id="feGaussianBlur6949" />
|
||||
<feFlood
|
||||
flood-opacity="0.502"
|
||||
id="feFlood6951" />
|
||||
<feComposite
|
||||
operator="in"
|
||||
in2="blur-5"
|
||||
id="feComposite6953"
|
||||
result="result1" />
|
||||
<feComposite
|
||||
in="SourceGraphic"
|
||||
in2="result1"
|
||||
id="feComposite6955" />
|
||||
</filter>
|
||||
<clipPath
|
||||
id="clip-path-3">
|
||||
<path
|
||||
id="Path_10"
|
||||
data-name="Path 10"
|
||||
class="cls-1"
|
||||
d="M 5.784,0 H 36.875 A 5.784,5.784 0 0 1 42.66,5.784 V 28.032 C 34.013,39.3 27.1,48.444 27.1,48.444 H 5.784 A 5.784,5.784 0 0 1 0,42.66 V 5.784 A 5.784,5.784 0 0 1 5.784,0 Z"
|
||||
inkscape:connector-curvature="0"
|
||||
style="fill:#a8a9a8" />
|
||||
</clipPath>
|
||||
<filter
|
||||
id="rød"
|
||||
x="2132.3059"
|
||||
y="6256.646"
|
||||
width="40.129002"
|
||||
height="40.129002"
|
||||
filterUnits="userSpaceOnUse">
|
||||
<feOffset
|
||||
input="SourceAlpha"
|
||||
id="feOffset6960" />
|
||||
<feGaussianBlur
|
||||
stdDeviation="1"
|
||||
result="blur-6"
|
||||
id="feGaussianBlur6962" />
|
||||
<feFlood
|
||||
flood-opacity="0.502"
|
||||
id="feFlood6964" />
|
||||
<feComposite
|
||||
operator="in"
|
||||
in2="blur-6"
|
||||
id="feComposite6966"
|
||||
result="result1" />
|
||||
<feComposite
|
||||
in="SourceGraphic"
|
||||
in2="result1"
|
||||
id="feComposite6968" />
|
||||
</filter>
|
||||
</defs>
|
||||
<g
|
||||
id="Large_Motor"
|
||||
data-name="Large Motor"
|
||||
transform="matrix(-1,0,0,-1,3003.735,6879.9214)">
|
||||
<g
|
||||
id="Mask_Group_6"
|
||||
data-name="Mask Group 6"
|
||||
class="cls-2"
|
||||
transform="translate(789.306,586.141)"
|
||||
clip-path="url(#clip-path)">
|
||||
<g
|
||||
id="Large_motor-2"
|
||||
data-name="Large motor"
|
||||
transform="translate(-1.623,0)">
|
||||
<path
|
||||
id="Path_45"
|
||||
data-name="Path 45"
|
||||
class="cls-1"
|
||||
d="m 5.461,0 5.612,0 a 5.461,5.461 0 0 1 5.461,5.461 l 0,22.9 a 5.461,5.461 0 0 1 -5.461,5.461 l -5.612,0 A 5.461,5.461 0 0 1 0,28.365 L 0,5.461 A 5.461,5.461 0 0 1 5.461,0 Z"
|
||||
transform="translate(42.123,84.012)"
|
||||
inkscape:connector-curvature="0"
|
||||
style="fill:#a8a9a8" />
|
||||
<circle
|
||||
id="Ellipse_2"
|
||||
data-name="Ellipse 2"
|
||||
class="cls-3"
|
||||
cx="3.7920001"
|
||||
cy="3.7920001"
|
||||
transform="translate(49.555,85.528)"
|
||||
r="3.7920001"
|
||||
style="fill:#ffffff" />
|
||||
<circle
|
||||
id="Ellipse_1"
|
||||
data-name="Ellipse 1"
|
||||
class="cls-3"
|
||||
cx="3.7920001"
|
||||
cy="3.7920001"
|
||||
transform="translate(49.555,108.736)"
|
||||
r="3.7920001"
|
||||
style="fill:#ffffff" />
|
||||
<path
|
||||
id="Path_36"
|
||||
data-name="Path 36"
|
||||
class="cls-1"
|
||||
d="m 0.607,0 26.262,0 a 0.607,0.607 0 0 1 0.607,0.607 l 0,5.293 a 0.607,0.607 0 0 1 -0.607,0.607 l -26.262,0 A 0.607,0.607 0 0 1 0,5.9 L 0,0.607 A 0.607,0.607 0 0 1 0.607,0 Z"
|
||||
transform="translate(41.1,0)"
|
||||
inkscape:connector-curvature="0"
|
||||
style="fill:#a8a9a8" />
|
||||
<g
|
||||
class="cls-17"
|
||||
transform="translate(-2133.68,-6140.14)"
|
||||
id="g6978"
|
||||
style="filter:url(#Path_34)">
|
||||
<path
|
||||
id="Path_34-2"
|
||||
data-name="Path 34"
|
||||
class="cls-1"
|
||||
d="M 0.607,0 31.93,0 a 0.607,0.607 0 0 1 0.607,0.607 l 0,14.693 a 0.607,0.607 0 0 1 -0.607,0.607 l -31.323,0 A 0.607,0.607 0 0 1 0,15.3 L 0,0.607 A 0.607,0.607 0 0 1 0.607,0 Z"
|
||||
transform="translate(2171.89,6141.59)"
|
||||
inkscape:connector-curvature="0"
|
||||
style="fill:#a8a9a8" />
|
||||
</g>
|
||||
<path
|
||||
id="Path_2-2"
|
||||
data-name="Path 2"
|
||||
class="cls-3"
|
||||
d="m 5610.158,939.234 a 4.151,4.151 0 0 1 -2.342,0.705 5.131,5.131 0 0 1 -2.988,-0.705 c -1.257,-0.931 -1.229,0.1 -1.229,0.1 l 0,1.8 c 0,0.45 0.553,0.846 1.229,0.459 0.676,-0.387 1,-0.581 1,-0.581 0,0 0.361,-0.184 0.361,0.335 l 0,2.62 c 0,0 0.021,0.786 -0.73,0.768 -0.751,-0.018 -1.38,0 -1.38,0 0,0 -0.293,0.248 -0.293,1.385 0,1.137 0.293,1.322 0.293,1.322 l 1.38,0 c 0,0 0.73,-0.024 0.73,0.649 l 0,1.3 c 0,0 0.227,0.359 1.169,0.306 a 3.6,3.6 0 0 0 1.4,-0.306 l 0,-1.3 a 0.67,0.67 0 0 1 0.66,-0.649 c 0.631,-0.01 1.257,0 1.257,0 0,0 0.252,-0.191 0.287,-1.322 0.035,-1.131 -0.287,-1.385 -0.287,-1.385 l -1.257,0 c 0,0 -0.805,-0.052 -0.817,-0.768 -0.012,-0.716 0,-2.62 0,-2.62 0,0 -0.047,-0.515 0.332,-0.335 0.379,0.18 1.215,0.581 1.215,0.581 0,0 0.83,0.407 0.814,-0.459 -0.016,-0.866 0,-1.8 0,-1.8 0,0 -0.072,-0.534 -0.804,-0.1 z"
|
||||
transform="translate(-5553.893,-845.301)"
|
||||
inkscape:connector-curvature="0"
|
||||
style="fill:#ffffff" />
|
||||
<path
|
||||
id="Path_3"
|
||||
data-name="Path 3"
|
||||
class="cls-3"
|
||||
d="m 5601.9,1015.336 a 0.83,0.83 0 0 1 1.2,-0.594 6.516,6.516 0 0 0 2.85,0.772 5.05,5.05 0 0 0 2.768,-0.772 c 0.829,-0.4 1.067,0.594 1.067,0.594 l 0,1.76 a 0.71,0.71 0 0 1 -1.067,0.561 5.791,5.791 0 0 0 -2.768,-0.837 7.06,7.06 0 0 0 -2.85,0.837 c 0,0 -1.178,0.239 -1.2,-0.561 -0.022,-0.8 0,-1.76 0,-1.76 z"
|
||||
transform="translate(-5552.485,-909.604)"
|
||||
inkscape:connector-curvature="0"
|
||||
style="fill:#ffffff" />
|
||||
<g
|
||||
class="cls-16"
|
||||
transform="translate(-2133.68,-6140.14)"
|
||||
id="g6983"
|
||||
style="filter:url(#Path_1)">
|
||||
<path
|
||||
id="Path_1-3"
|
||||
data-name="Path 1"
|
||||
class="cls-1"
|
||||
d="M 0.016,8.513 13.42,-4.416 31.991,-3.746 32.162,55.2 c 0,0.838 -0.155,0.838 -0.462,1.137 l -10.416,10.096 -0.212,0.19 c -0.584,0.4 -1.987,-0.115 -1.987,-0.952 L -0.364,44.961 -0.375,9.187 c 0,-0.419 0.142,-0.402 0.391,-0.674 z"
|
||||
transform="translate(2149.43,6214.55)"
|
||||
inkscape:connector-curvature="0"
|
||||
style="fill:#a8a9a8" />
|
||||
</g>
|
||||
<g
|
||||
class="cls-15"
|
||||
transform="translate(-2133.68,-6140.14)"
|
||||
id="g6986"
|
||||
style="filter:url(#Path_2)">
|
||||
<path
|
||||
id="Path_2-3"
|
||||
data-name="Path 2"
|
||||
class="cls-1"
|
||||
d="m 1484.037,521.285 0,17.253 c 0,0 0.019,0.845 0.3,1.121 0.281,0.276 3.516,3.626 3.516,3.626 a 1.566,1.566 0 0 0 1.157,0.4 c 0.758,-0.025 11.627,0 11.627,0 l 4.429,-4.7 0,-7.963 -10.662,-0.567 z"
|
||||
transform="translate(676.31,5680.52)"
|
||||
inkscape:connector-curvature="0"
|
||||
style="fill:#a8a9a8" />
|
||||
</g>
|
||||
<g
|
||||
id="Group_4"
|
||||
data-name="Group 4"
|
||||
transform="translate(15.123,26.978)">
|
||||
<path
|
||||
id="Path_44"
|
||||
data-name="Path 44"
|
||||
class="cls-1"
|
||||
d="m 5.461,0 5.612,0 a 5.461,5.461 0 0 1 5.461,5.461 l 0,22.9 a 5.461,5.461 0 0 1 -5.461,5.461 l -5.612,0 A 5.461,5.461 0 0 1 0,28.365 L 0,5.461 A 5.461,5.461 0 0 1 5.461,0 Z"
|
||||
inkscape:connector-curvature="0"
|
||||
style="fill:#a8a9a8" />
|
||||
<circle
|
||||
id="Ellipse_3"
|
||||
data-name="Ellipse 3"
|
||||
class="cls-3"
|
||||
cx="3.7920001"
|
||||
cy="3.7920001"
|
||||
transform="translate(1.062,1.517)"
|
||||
r="3.7920001"
|
||||
style="fill:#ffffff" />
|
||||
<circle
|
||||
id="Ellipse_4"
|
||||
data-name="Ellipse 4"
|
||||
class="cls-3"
|
||||
cx="3.7920001"
|
||||
cy="3.7920001"
|
||||
transform="translate(1.062,24.725)"
|
||||
r="3.7920001"
|
||||
style="fill:#ffffff" />
|
||||
<path
|
||||
id="Path_5"
|
||||
data-name="Path 5"
|
||||
class="cls-3"
|
||||
d="m 5610.158,939.234 a 4.151,4.151 0 0 1 -2.342,0.705 5.131,5.131 0 0 1 -2.988,-0.705 c -1.257,-0.931 -1.229,0.1 -1.229,0.1 l 0,1.8 c 0,0.45 0.553,0.846 1.229,0.459 0.676,-0.387 1,-0.581 1,-0.581 0,0 0.361,-0.184 0.361,0.335 l 0,2.62 c 0,0 0.021,0.786 -0.73,0.768 -0.751,-0.018 -1.38,0 -1.38,0 0,0 -0.293,0.248 -0.293,1.385 0,1.137 0.293,1.322 0.293,1.322 l 1.38,0 c 0,0 0.73,-0.024 0.73,0.649 l 0,1.3 c 0,0 0.227,0.359 1.169,0.306 a 3.6,3.6 0 0 0 1.4,-0.306 l 0,-1.3 a 0.67,0.67 0 0 1 0.66,-0.649 c 0.631,-0.01 1.257,0 1.257,0 0,0 0.252,-0.191 0.287,-1.322 0.035,-1.131 -0.287,-1.385 -0.287,-1.385 l -1.257,0 c 0,0 -0.805,-0.052 -0.817,-0.768 -0.012,-0.716 0,-2.62 0,-2.62 0,0 -0.047,-0.515 0.332,-0.335 0.379,0.18 1.215,0.581 1.215,0.581 0,0 0.83,0.407 0.814,-0.459 -0.016,-0.866 0,-1.8 0,-1.8 0,0 -0.072,-0.534 -0.804,-0.1 z"
|
||||
transform="translate(-5602.386,-929.312)"
|
||||
inkscape:connector-curvature="0"
|
||||
style="fill:#ffffff" />
|
||||
<path
|
||||
id="Path_6"
|
||||
data-name="Path 6"
|
||||
class="cls-3"
|
||||
d="m 5601.9,1015.336 a 0.83,0.83 0 0 1 1.2,-0.594 6.516,6.516 0 0 0 2.85,0.772 5.05,5.05 0 0 0 2.768,-0.772 c 0.829,-0.4 1.067,0.594 1.067,0.594 l 0,1.76 a 0.71,0.71 0 0 1 -1.067,0.561 5.791,5.791 0 0 0 -2.768,-0.837 7.06,7.06 0 0 0 -2.85,0.837 c 0,0 -1.178,0.239 -1.2,-0.561 -0.022,-0.8 0,-1.76 0,-1.76 z"
|
||||
transform="translate(-5600.979,-993.616)"
|
||||
inkscape:connector-curvature="0"
|
||||
style="fill:#ffffff" />
|
||||
</g>
|
||||
<g
|
||||
class="cls-14"
|
||||
transform="translate(-2133.68,-6140.14)"
|
||||
id="g6995"
|
||||
style="filter:url(#Path_1-2)">
|
||||
<path
|
||||
id="Path_1-4"
|
||||
data-name="Path 1"
|
||||
class="cls-1"
|
||||
d="m 5.784,0 42.66,0 a 5.784,5.784 0 0 1 5.784,5.784 l 0,29.64 C 43.86,49.487 36.1,59.29 36.1,59.29 l -0.595,0 c 0,0 -19.462,-0.147 -23.864,-0.147 A 2.28,2.28 0 0 1 9.263,58.158 L 0,48.582 0,5.784 A 5.784,5.784 0 0 1 5.784,0 Z"
|
||||
transform="translate(2159.6,6153.16)"
|
||||
inkscape:connector-curvature="0"
|
||||
style="fill:#a8a9a8" />
|
||||
</g>
|
||||
<g
|
||||
id="hvid"
|
||||
transform="translate(25.916,13.015)">
|
||||
<g
|
||||
id="Mask_Group_1"
|
||||
data-name="Mask Group 1"
|
||||
class="cls-4"
|
||||
clip-path="url(#clip-path-2)">
|
||||
<path
|
||||
id="hvid-2"
|
||||
data-name="hvid"
|
||||
class="cls-5"
|
||||
d="m 1498.578,449.051 7.155,7.37 23.789,31.08 0,14.857 13.063,-16.131 0,-31.221 -0.993,-7.691 z"
|
||||
transform="translate(-1487.315,-449.455)"
|
||||
inkscape:connector-curvature="0"
|
||||
style="fill:#f2f2f2" />
|
||||
</g>
|
||||
</g>
|
||||
<g
|
||||
class="cls-13"
|
||||
transform="translate(-2133.68,-6140.14)"
|
||||
id="g7001"
|
||||
style="filter:url(#Path_4)">
|
||||
<path
|
||||
id="Path_4-2"
|
||||
data-name="Path 4"
|
||||
class="cls-1"
|
||||
d="m 5.784,0 31.091,0 a 5.784,5.784 0 0 1 5.785,5.784 l 0,22.248 C 34.013,39.3 27.1,48.444 27.1,48.444 l -21.316,0 A 5.784,5.784 0 0 1 0,42.66 L 0,5.784 A 5.784,5.784 0 0 1 5.784,0 Z"
|
||||
transform="translate(2165.38,6158.22)"
|
||||
inkscape:connector-curvature="0"
|
||||
style="fill:#a8a9a8" />
|
||||
</g>
|
||||
<g
|
||||
id="Group_3"
|
||||
data-name="Group 3"
|
||||
transform="translate(31.7,18.38)">
|
||||
<g
|
||||
id="Mask_Group_2"
|
||||
data-name="Mask Group 2"
|
||||
class="cls-6"
|
||||
clip-path="url(#clip-path-3)">
|
||||
<path
|
||||
id="Union_1"
|
||||
data-name="Union 1"
|
||||
class="cls-7"
|
||||
d="m 14.461,28.56 0,-27.475 a 1.085,1.085 0 1 1 2.169,0 l 0,27.475 a 1.085,1.085 0 1 1 -2.169,0 z m -3.615,0 0,-27.475 a 1.085,1.085 0 1 1 2.169,0 l 0,27.475 a 1.085,1.085 0 1 1 -2.169,0 z m -3.615,0 0,-27.475 a 1.085,1.085 0 1 1 2.169,0 l 0,27.475 a 1.085,1.085 0 1 1 -2.169,0 z m -3.615,0 0,-27.475 a 1.085,1.085 0 1 1 2.169,0 l 0,27.475 a 1.085,1.085 0 1 1 -2.169,0 z M 0,28.56 0,1.085 a 1.085,1.085 0 1 1 2.169,0 l 0,27.475 A 1.085,1.085 0 1 1 0,28.56 Z"
|
||||
transform="translate(15.907,-5.365)"
|
||||
inkscape:connector-curvature="0"
|
||||
style="fill:#6a6a6a" />
|
||||
</g>
|
||||
</g>
|
||||
<circle
|
||||
id="Ellipse_1-2"
|
||||
data-name="Ellipse 1"
|
||||
class="cls-8"
|
||||
cx="2.2449999"
|
||||
cy="2.2449999"
|
||||
transform="translate(29.076,16.175)"
|
||||
r="2.2449999"
|
||||
style="fill:#9a9a9a" />
|
||||
<circle
|
||||
id="Ellipse_2-2"
|
||||
data-name="Ellipse 2"
|
||||
class="cls-8"
|
||||
cx="2.2449999"
|
||||
cy="2.2449999"
|
||||
transform="translate(57.744,66.686)"
|
||||
r="2.2449999"
|
||||
style="fill:#9a9a9a" />
|
||||
<g
|
||||
class="cls-12"
|
||||
transform="translate(-2133.68,-6140.14)"
|
||||
id="g7009">
|
||||
<circle
|
||||
id="rød-2"
|
||||
data-name="rød"
|
||||
class="cls-9"
|
||||
cx="17.063999"
|
||||
cy="17.063999"
|
||||
transform="translate(2135.31,6259.65)"
|
||||
r="17.063999"
|
||||
style="fill:#b72b1c" />
|
||||
</g>
|
||||
<g
|
||||
id="Group_2"
|
||||
data-name="Group 2"
|
||||
transform="matrix(0.966,0.259,-0.259,0.966,7.93,117.883)">
|
||||
<circle
|
||||
id="Ellipse_4-2"
|
||||
data-name="Ellipse 4"
|
||||
class="cls-10"
|
||||
cx="3.7920001"
|
||||
cy="3.7920001"
|
||||
transform="translate(11.528,0)"
|
||||
r="3.7920001"
|
||||
style="fill:#3c3c3c" />
|
||||
<circle
|
||||
id="Ellipse_7"
|
||||
data-name="Ellipse 7"
|
||||
class="cls-10"
|
||||
cx="3.7920001"
|
||||
cy="3.7920001"
|
||||
transform="translate(23.056,11.528)"
|
||||
r="3.7920001"
|
||||
style="fill:#3c3c3c" />
|
||||
<circle
|
||||
id="Ellipse_5"
|
||||
data-name="Ellipse 5"
|
||||
class="cls-10"
|
||||
cx="3.7920001"
|
||||
cy="3.7920001"
|
||||
transform="translate(11.528,23.056)"
|
||||
r="3.7920001"
|
||||
style="fill:#3c3c3c" />
|
||||
<circle
|
||||
id="Ellipse_6"
|
||||
data-name="Ellipse 6"
|
||||
class="cls-10"
|
||||
cx="3.7920001"
|
||||
cy="3.7920001"
|
||||
transform="translate(0,11.528)"
|
||||
r="3.7920001"
|
||||
style="fill:#3c3c3c" />
|
||||
<path
|
||||
id="Path_4-3"
|
||||
data-name="Path 4"
|
||||
class="cls-11"
|
||||
d="m 2.4,1.566 c 0,0 0.021,0.786 -0.73,0.768 -0.751,-0.018 -1.38,0 -1.38,0 0,0 -0.29,0.248 -0.29,1.385 0,1.137 0.294,1.322 0.294,1.322 l 1.38,0 c 0,0 0.73,-0.024 0.73,0.649 0,0.673 0,1.3 0,1.3 0,0 0.227,0.359 1.17,0.306 a 3.594,3.594 0 0 0 1.4,-0.306 l 0,-1.3 a 0.67,0.67 0 0 1 0.66,-0.649 c 0.631,-0.01 1.257,0 1.257,0 0,0 0.253,-0.191 0.287,-1.322 C 7.212,2.588 6.891,2.333 6.891,2.333 l -1.253,0 c 0,0 -0.806,-0.052 -0.818,-0.768 A 12.478,12.478 0 0 1 4.884,0.305 2.9,2.9 0 0 0 2.529,0.213 C 2.45,0.819 2.4,1.566 2.4,1.566 Z"
|
||||
transform="matrix(0,-1,1,0,11.68,18.863)"
|
||||
inkscape:connector-curvature="0"
|
||||
style="fill:#242424" />
|
||||
<path
|
||||
id="Path_5-2"
|
||||
data-name="Path 5"
|
||||
class="cls-10"
|
||||
d="M 0.455,0.155 2.016,0 3.64,0.155 A 0.455,0.455 0 0 1 4.1,0.61 l 0,2.124 A 0.455,0.455 0 0 1 3.645,3.189 L 2.094,2.979 0.46,3.189 A 0.455,0.455 0 0 1 0,2.734 L 0,0.61 A 0.455,0.455 0 0 1 0.455,0.155 Z"
|
||||
transform="translate(13.241,8.084)"
|
||||
inkscape:connector-curvature="0"
|
||||
style="fill:#3c3c3c" />
|
||||
<path
|
||||
id="Path_7"
|
||||
data-name="Path 7"
|
||||
class="cls-10"
|
||||
d="M 0.455,0.155 2.016,0 3.64,0.155 A 0.455,0.455 0 0 1 4.1,0.61 l 0,2.124 A 0.455,0.455 0 0 1 3.645,3.189 L 2.094,2.979 0.46,3.189 A 0.455,0.455 0 0 1 0,2.734 L 0,0.61 A 0.455,0.455 0 0 1 0.455,0.155 Z"
|
||||
transform="matrix(0,-1,1,0,8.082,17.338)"
|
||||
inkscape:connector-curvature="0"
|
||||
style="fill:#3c3c3c" />
|
||||
<path
|
||||
id="Path_6-2"
|
||||
data-name="Path 6"
|
||||
class="cls-10"
|
||||
d="M 0.455,0.155 2.016,0 3.64,0.155 A 0.455,0.455 0 0 1 4.1,0.61 l 0,2.124 A 0.455,0.455 0 0 1 3.645,3.189 L 2.094,2.979 0.46,3.189 A 0.455,0.455 0 0 1 0,2.734 L 0,0.61 A 0.455,0.455 0 0 1 0.455,0.155 Z"
|
||||
transform="matrix(-1,0,0,-1,17.336,22.497)"
|
||||
inkscape:connector-curvature="0"
|
||||
style="fill:#3c3c3c" />
|
||||
<path
|
||||
id="Path_8"
|
||||
data-name="Path 8"
|
||||
class="cls-10"
|
||||
d="M 0.455,0.155 2.016,0 3.64,0.155 A 0.455,0.455 0 0 1 4.1,0.61 l 0,2.124 A 0.455,0.455 0 0 1 3.645,3.189 L 2.094,2.979 0.46,3.189 A 0.455,0.455 0 0 1 0,2.734 L 0,0.61 A 0.455,0.455 0 0 1 0.455,0.155 Z"
|
||||
transform="matrix(0,1,-1,0,22.495,13.242)"
|
||||
inkscape:connector-curvature="0"
|
||||
style="fill:#3c3c3c" />
|
||||
</g>
|
||||
</g>
|
||||
</g>
|
||||
</g>
|
||||
<g
|
||||
transform="matrix(-1,0,0,-1,3078.599,6880.5724)"
|
||||
data-name="Large Motor"
|
||||
id="g4220">
|
||||
<g
|
||||
clip-path="url(#clip-path)"
|
||||
transform="translate(789.306,586.141)"
|
||||
class="cls-2"
|
||||
data-name="Mask Group 6"
|
||||
id="g4222">
|
||||
<g
|
||||
transform="translate(-1.623,0)"
|
||||
data-name="Large motor"
|
||||
id="g4224">
|
||||
<path
|
||||
style="fill:#a8a9a8"
|
||||
inkscape:connector-curvature="0"
|
||||
transform="translate(42.123,84.012)"
|
||||
d="m 5.461,0 5.612,0 a 5.461,5.461 0 0 1 5.461,5.461 l 0,22.9 a 5.461,5.461 0 0 1 -5.461,5.461 l -5.612,0 A 5.461,5.461 0 0 1 0,28.365 L 0,5.461 A 5.461,5.461 0 0 1 5.461,0 Z"
|
||||
class="cls-1"
|
||||
data-name="Path 45"
|
||||
id="path4226" />
|
||||
<circle
|
||||
style="fill:#ffffff"
|
||||
r="3.7920001"
|
||||
transform="translate(49.555,85.528)"
|
||||
cy="3.7920001"
|
||||
cx="3.7920001"
|
||||
class="cls-3"
|
||||
data-name="Ellipse 2"
|
||||
id="circle4228" />
|
||||
<circle
|
||||
style="fill:#ffffff"
|
||||
r="3.7920001"
|
||||
transform="translate(49.555,108.736)"
|
||||
cy="3.7920001"
|
||||
cx="3.7920001"
|
||||
class="cls-3"
|
||||
data-name="Ellipse 1"
|
||||
id="circle4230" />
|
||||
<path
|
||||
style="fill:#a8a9a8"
|
||||
inkscape:connector-curvature="0"
|
||||
transform="translate(41.1,0)"
|
||||
d="m 0.607,0 26.262,0 a 0.607,0.607 0 0 1 0.607,0.607 l 0,5.293 a 0.607,0.607 0 0 1 -0.607,0.607 l -26.262,0 A 0.607,0.607 0 0 1 0,5.9 L 0,0.607 A 0.607,0.607 0 0 1 0.607,0 Z"
|
||||
class="cls-1"
|
||||
data-name="Path 36"
|
||||
id="path4232" />
|
||||
<g
|
||||
style="filter:url(#Path_34)"
|
||||
id="g4234"
|
||||
transform="translate(-2133.68,-6140.14)"
|
||||
class="cls-17">
|
||||
<path
|
||||
style="fill:#a8a9a8"
|
||||
inkscape:connector-curvature="0"
|
||||
transform="translate(2171.89,6141.59)"
|
||||
d="M 0.607,0 31.93,0 a 0.607,0.607 0 0 1 0.607,0.607 l 0,14.693 a 0.607,0.607 0 0 1 -0.607,0.607 l -31.323,0 A 0.607,0.607 0 0 1 0,15.3 L 0,0.607 A 0.607,0.607 0 0 1 0.607,0 Z"
|
||||
class="cls-1"
|
||||
data-name="Path 34"
|
||||
id="path4236" />
|
||||
</g>
|
||||
<path
|
||||
style="fill:#ffffff"
|
||||
inkscape:connector-curvature="0"
|
||||
transform="translate(-5553.893,-845.301)"
|
||||
d="m 5610.158,939.234 a 4.151,4.151 0 0 1 -2.342,0.705 5.131,5.131 0 0 1 -2.988,-0.705 c -1.257,-0.931 -1.229,0.1 -1.229,0.1 l 0,1.8 c 0,0.45 0.553,0.846 1.229,0.459 0.676,-0.387 1,-0.581 1,-0.581 0,0 0.361,-0.184 0.361,0.335 l 0,2.62 c 0,0 0.021,0.786 -0.73,0.768 -0.751,-0.018 -1.38,0 -1.38,0 0,0 -0.293,0.248 -0.293,1.385 0,1.137 0.293,1.322 0.293,1.322 l 1.38,0 c 0,0 0.73,-0.024 0.73,0.649 l 0,1.3 c 0,0 0.227,0.359 1.169,0.306 a 3.6,3.6 0 0 0 1.4,-0.306 l 0,-1.3 a 0.67,0.67 0 0 1 0.66,-0.649 c 0.631,-0.01 1.257,0 1.257,0 0,0 0.252,-0.191 0.287,-1.322 0.035,-1.131 -0.287,-1.385 -0.287,-1.385 l -1.257,0 c 0,0 -0.805,-0.052 -0.817,-0.768 -0.012,-0.716 0,-2.62 0,-2.62 0,0 -0.047,-0.515 0.332,-0.335 0.379,0.18 1.215,0.581 1.215,0.581 0,0 0.83,0.407 0.814,-0.459 -0.016,-0.866 0,-1.8 0,-1.8 0,0 -0.072,-0.534 -0.804,-0.1 z"
|
||||
class="cls-3"
|
||||
data-name="Path 2"
|
||||
id="path4238" />
|
||||
<path
|
||||
style="fill:#ffffff"
|
||||
inkscape:connector-curvature="0"
|
||||
transform="translate(-5552.485,-909.604)"
|
||||
d="m 5601.9,1015.336 a 0.83,0.83 0 0 1 1.2,-0.594 6.516,6.516 0 0 0 2.85,0.772 5.05,5.05 0 0 0 2.768,-0.772 c 0.829,-0.4 1.067,0.594 1.067,0.594 l 0,1.76 a 0.71,0.71 0 0 1 -1.067,0.561 5.791,5.791 0 0 0 -2.768,-0.837 7.06,7.06 0 0 0 -2.85,0.837 c 0,0 -1.178,0.239 -1.2,-0.561 -0.022,-0.8 0,-1.76 0,-1.76 z"
|
||||
class="cls-3"
|
||||
data-name="Path 3"
|
||||
id="path4240" />
|
||||
<g
|
||||
style="filter:url(#Path_1)"
|
||||
id="g4242"
|
||||
transform="translate(-2133.68,-6140.14)"
|
||||
class="cls-16">
|
||||
<path
|
||||
style="fill:#a8a9a8"
|
||||
inkscape:connector-curvature="0"
|
||||
transform="translate(2149.43,6214.55)"
|
||||
d="M 0.016,8.513 13.42,-4.416 31.991,-3.746 32.162,55.2 c 0,0.838 -0.155,0.838 -0.462,1.137 l -10.416,10.096 -0.212,0.19 c -0.584,0.4 -1.987,-0.115 -1.987,-0.952 L -0.364,44.961 -0.375,9.187 c 0,-0.419 0.142,-0.402 0.391,-0.674 z"
|
||||
class="cls-1"
|
||||
data-name="Path 1"
|
||||
id="path4244" />
|
||||
</g>
|
||||
<g
|
||||
style="filter:url(#Path_2)"
|
||||
id="g4246"
|
||||
transform="translate(-2133.68,-6140.14)"
|
||||
class="cls-15">
|
||||
<path
|
||||
style="fill:#a8a9a8"
|
||||
inkscape:connector-curvature="0"
|
||||
transform="translate(676.31,5680.52)"
|
||||
d="m 1484.037,521.285 0,17.253 c 0,0 0.019,0.845 0.3,1.121 0.281,0.276 3.516,3.626 3.516,3.626 a 1.566,1.566 0 0 0 1.157,0.4 c 0.758,-0.025 11.627,0 11.627,0 l 4.429,-4.7 0,-7.963 -10.662,-0.567 z"
|
||||
class="cls-1"
|
||||
data-name="Path 2"
|
||||
id="path4248" />
|
||||
</g>
|
||||
<g
|
||||
transform="translate(15.123,26.978)"
|
||||
data-name="Group 4"
|
||||
id="g4250">
|
||||
<path
|
||||
style="fill:#a8a9a8"
|
||||
inkscape:connector-curvature="0"
|
||||
d="m 5.461,0 5.612,0 a 5.461,5.461 0 0 1 5.461,5.461 l 0,22.9 a 5.461,5.461 0 0 1 -5.461,5.461 l -5.612,0 A 5.461,5.461 0 0 1 0,28.365 L 0,5.461 A 5.461,5.461 0 0 1 5.461,0 Z"
|
||||
class="cls-1"
|
||||
data-name="Path 44"
|
||||
id="path4252" />
|
||||
<circle
|
||||
style="fill:#ffffff"
|
||||
r="3.7920001"
|
||||
transform="translate(1.062,1.517)"
|
||||
cy="3.7920001"
|
||||
cx="3.7920001"
|
||||
class="cls-3"
|
||||
data-name="Ellipse 3"
|
||||
id="circle4254" />
|
||||
<circle
|
||||
style="fill:#ffffff"
|
||||
r="3.7920001"
|
||||
transform="translate(1.062,24.725)"
|
||||
cy="3.7920001"
|
||||
cx="3.7920001"
|
||||
class="cls-3"
|
||||
data-name="Ellipse 4"
|
||||
id="circle4256" />
|
||||
<path
|
||||
style="fill:#ffffff"
|
||||
inkscape:connector-curvature="0"
|
||||
transform="translate(-5602.386,-929.312)"
|
||||
d="m 5610.158,939.234 a 4.151,4.151 0 0 1 -2.342,0.705 5.131,5.131 0 0 1 -2.988,-0.705 c -1.257,-0.931 -1.229,0.1 -1.229,0.1 l 0,1.8 c 0,0.45 0.553,0.846 1.229,0.459 0.676,-0.387 1,-0.581 1,-0.581 0,0 0.361,-0.184 0.361,0.335 l 0,2.62 c 0,0 0.021,0.786 -0.73,0.768 -0.751,-0.018 -1.38,0 -1.38,0 0,0 -0.293,0.248 -0.293,1.385 0,1.137 0.293,1.322 0.293,1.322 l 1.38,0 c 0,0 0.73,-0.024 0.73,0.649 l 0,1.3 c 0,0 0.227,0.359 1.169,0.306 a 3.6,3.6 0 0 0 1.4,-0.306 l 0,-1.3 a 0.67,0.67 0 0 1 0.66,-0.649 c 0.631,-0.01 1.257,0 1.257,0 0,0 0.252,-0.191 0.287,-1.322 0.035,-1.131 -0.287,-1.385 -0.287,-1.385 l -1.257,0 c 0,0 -0.805,-0.052 -0.817,-0.768 -0.012,-0.716 0,-2.62 0,-2.62 0,0 -0.047,-0.515 0.332,-0.335 0.379,0.18 1.215,0.581 1.215,0.581 0,0 0.83,0.407 0.814,-0.459 -0.016,-0.866 0,-1.8 0,-1.8 0,0 -0.072,-0.534 -0.804,-0.1 z"
|
||||
class="cls-3"
|
||||
data-name="Path 5"
|
||||
id="path4258" />
|
||||
<path
|
||||
style="fill:#ffffff"
|
||||
inkscape:connector-curvature="0"
|
||||
transform="translate(-5600.979,-993.616)"
|
||||
d="m 5601.9,1015.336 a 0.83,0.83 0 0 1 1.2,-0.594 6.516,6.516 0 0 0 2.85,0.772 5.05,5.05 0 0 0 2.768,-0.772 c 0.829,-0.4 1.067,0.594 1.067,0.594 l 0,1.76 a 0.71,0.71 0 0 1 -1.067,0.561 5.791,5.791 0 0 0 -2.768,-0.837 7.06,7.06 0 0 0 -2.85,0.837 c 0,0 -1.178,0.239 -1.2,-0.561 -0.022,-0.8 0,-1.76 0,-1.76 z"
|
||||
class="cls-3"
|
||||
data-name="Path 6"
|
||||
id="path4260" />
|
||||
</g>
|
||||
<g
|
||||
style="filter:url(#Path_1-2)"
|
||||
id="g4262"
|
||||
transform="translate(-2133.68,-6140.14)"
|
||||
class="cls-14">
|
||||
<path
|
||||
style="fill:#a8a9a8"
|
||||
inkscape:connector-curvature="0"
|
||||
transform="translate(2159.6,6153.16)"
|
||||
d="m 5.784,0 42.66,0 a 5.784,5.784 0 0 1 5.784,5.784 l 0,29.64 C 43.86,49.487 36.1,59.29 36.1,59.29 l -0.595,0 c 0,0 -19.462,-0.147 -23.864,-0.147 A 2.28,2.28 0 0 1 9.263,58.158 L 0,48.582 0,5.784 A 5.784,5.784 0 0 1 5.784,0 Z"
|
||||
class="cls-1"
|
||||
data-name="Path 1"
|
||||
id="path4264" />
|
||||
</g>
|
||||
<g
|
||||
transform="translate(25.916,13.015)"
|
||||
id="g4266">
|
||||
<g
|
||||
clip-path="url(#clip-path-2)"
|
||||
class="cls-4"
|
||||
data-name="Mask Group 1"
|
||||
id="g4268">
|
||||
<path
|
||||
style="fill:#f2f2f2"
|
||||
inkscape:connector-curvature="0"
|
||||
transform="translate(-1487.315,-449.455)"
|
||||
d="m 1498.578,449.051 7.155,7.37 23.789,31.08 0,14.857 13.063,-16.131 0,-31.221 -0.993,-7.691 z"
|
||||
class="cls-5"
|
||||
data-name="hvid"
|
||||
id="path4270" />
|
||||
</g>
|
||||
</g>
|
||||
<g
|
||||
style="filter:url(#Path_4)"
|
||||
id="g4272"
|
||||
transform="translate(-2133.68,-6140.14)"
|
||||
class="cls-13">
|
||||
<path
|
||||
style="fill:#a8a9a8"
|
||||
inkscape:connector-curvature="0"
|
||||
transform="translate(2165.38,6158.22)"
|
||||
d="m 5.784,0 31.091,0 a 5.784,5.784 0 0 1 5.785,5.784 l 0,22.248 C 34.013,39.3 27.1,48.444 27.1,48.444 l -21.316,0 A 5.784,5.784 0 0 1 0,42.66 L 0,5.784 A 5.784,5.784 0 0 1 5.784,0 Z"
|
||||
class="cls-1"
|
||||
data-name="Path 4"
|
||||
id="path4274" />
|
||||
</g>
|
||||
<g
|
||||
transform="translate(31.7,18.38)"
|
||||
data-name="Group 3"
|
||||
id="g4276">
|
||||
<g
|
||||
clip-path="url(#clip-path-3)"
|
||||
class="cls-6"
|
||||
data-name="Mask Group 2"
|
||||
id="g4278">
|
||||
<path
|
||||
style="fill:#6a6a6a"
|
||||
inkscape:connector-curvature="0"
|
||||
transform="translate(15.907,-5.365)"
|
||||
d="m 14.461,28.56 0,-27.475 a 1.085,1.085 0 1 1 2.169,0 l 0,27.475 a 1.085,1.085 0 1 1 -2.169,0 z m -3.615,0 0,-27.475 a 1.085,1.085 0 1 1 2.169,0 l 0,27.475 a 1.085,1.085 0 1 1 -2.169,0 z m -3.615,0 0,-27.475 a 1.085,1.085 0 1 1 2.169,0 l 0,27.475 a 1.085,1.085 0 1 1 -2.169,0 z m -3.615,0 0,-27.475 a 1.085,1.085 0 1 1 2.169,0 l 0,27.475 a 1.085,1.085 0 1 1 -2.169,0 z M 0,28.56 0,1.085 a 1.085,1.085 0 1 1 2.169,0 l 0,27.475 A 1.085,1.085 0 1 1 0,28.56 Z"
|
||||
class="cls-7"
|
||||
data-name="Union 1"
|
||||
id="path4280" />
|
||||
</g>
|
||||
</g>
|
||||
<circle
|
||||
style="fill:#9a9a9a"
|
||||
r="2.2449999"
|
||||
transform="translate(29.076,16.175)"
|
||||
cy="2.2449999"
|
||||
cx="2.2449999"
|
||||
class="cls-8"
|
||||
data-name="Ellipse 1"
|
||||
id="circle4282" />
|
||||
<circle
|
||||
style="fill:#9a9a9a"
|
||||
r="2.2449999"
|
||||
transform="translate(57.744,66.686)"
|
||||
cy="2.2449999"
|
||||
cx="2.2449999"
|
||||
class="cls-8"
|
||||
data-name="Ellipse 2"
|
||||
id="circle4284" />
|
||||
<g
|
||||
id="g4286"
|
||||
transform="translate(-2133.68,-6140.14)"
|
||||
class="cls-12">
|
||||
<circle
|
||||
style="fill:#b72b1c"
|
||||
r="17.063999"
|
||||
transform="translate(2135.31,6259.65)"
|
||||
cy="17.063999"
|
||||
cx="17.063999"
|
||||
class="cls-9"
|
||||
data-name="rød"
|
||||
id="circle4288" />
|
||||
</g>
|
||||
<g
|
||||
transform="matrix(0.966,0.259,-0.259,0.966,7.93,117.883)"
|
||||
data-name="Group 2"
|
||||
id="g4290">
|
||||
<circle
|
||||
style="fill:#3c3c3c"
|
||||
r="3.7920001"
|
||||
transform="translate(11.528,0)"
|
||||
cy="3.7920001"
|
||||
cx="3.7920001"
|
||||
class="cls-10"
|
||||
data-name="Ellipse 4"
|
||||
id="circle4292" />
|
||||
<circle
|
||||
style="fill:#3c3c3c"
|
||||
r="3.7920001"
|
||||
transform="translate(23.056,11.528)"
|
||||
cy="3.7920001"
|
||||
cx="3.7920001"
|
||||
class="cls-10"
|
||||
data-name="Ellipse 7"
|
||||
id="circle4294" />
|
||||
<circle
|
||||
style="fill:#3c3c3c"
|
||||
r="3.7920001"
|
||||
transform="translate(11.528,23.056)"
|
||||
cy="3.7920001"
|
||||
cx="3.7920001"
|
||||
class="cls-10"
|
||||
data-name="Ellipse 5"
|
||||
id="circle4296" />
|
||||
<circle
|
||||
style="fill:#3c3c3c"
|
||||
r="3.7920001"
|
||||
transform="translate(0,11.528)"
|
||||
cy="3.7920001"
|
||||
cx="3.7920001"
|
||||
class="cls-10"
|
||||
data-name="Ellipse 6"
|
||||
id="circle4298" />
|
||||
<path
|
||||
style="fill:#242424"
|
||||
inkscape:connector-curvature="0"
|
||||
transform="matrix(0,-1,1,0,11.68,18.863)"
|
||||
d="m 2.4,1.566 c 0,0 0.021,0.786 -0.73,0.768 -0.751,-0.018 -1.38,0 -1.38,0 0,0 -0.29,0.248 -0.29,1.385 0,1.137 0.294,1.322 0.294,1.322 l 1.38,0 c 0,0 0.73,-0.024 0.73,0.649 0,0.673 0,1.3 0,1.3 0,0 0.227,0.359 1.17,0.306 a 3.594,3.594 0 0 0 1.4,-0.306 l 0,-1.3 a 0.67,0.67 0 0 1 0.66,-0.649 c 0.631,-0.01 1.257,0 1.257,0 0,0 0.253,-0.191 0.287,-1.322 C 7.212,2.588 6.891,2.333 6.891,2.333 l -1.253,0 c 0,0 -0.806,-0.052 -0.818,-0.768 A 12.478,12.478 0 0 1 4.884,0.305 2.9,2.9 0 0 0 2.529,0.213 C 2.45,0.819 2.4,1.566 2.4,1.566 Z"
|
||||
class="cls-11"
|
||||
data-name="Path 4"
|
||||
id="path4300" />
|
||||
<path
|
||||
style="fill:#3c3c3c"
|
||||
inkscape:connector-curvature="0"
|
||||
transform="translate(13.241,8.084)"
|
||||
d="M 0.455,0.155 2.016,0 3.64,0.155 A 0.455,0.455 0 0 1 4.1,0.61 l 0,2.124 A 0.455,0.455 0 0 1 3.645,3.189 L 2.094,2.979 0.46,3.189 A 0.455,0.455 0 0 1 0,2.734 L 0,0.61 A 0.455,0.455 0 0 1 0.455,0.155 Z"
|
||||
class="cls-10"
|
||||
data-name="Path 5"
|
||||
id="path4302" />
|
||||
<path
|
||||
style="fill:#3c3c3c"
|
||||
inkscape:connector-curvature="0"
|
||||
transform="matrix(0,-1,1,0,8.082,17.338)"
|
||||
d="M 0.455,0.155 2.016,0 3.64,0.155 A 0.455,0.455 0 0 1 4.1,0.61 l 0,2.124 A 0.455,0.455 0 0 1 3.645,3.189 L 2.094,2.979 0.46,3.189 A 0.455,0.455 0 0 1 0,2.734 L 0,0.61 A 0.455,0.455 0 0 1 0.455,0.155 Z"
|
||||
class="cls-10"
|
||||
data-name="Path 7"
|
||||
id="path4304" />
|
||||
<path
|
||||
style="fill:#3c3c3c"
|
||||
inkscape:connector-curvature="0"
|
||||
transform="matrix(-1,0,0,-1,17.336,22.497)"
|
||||
d="M 0.455,0.155 2.016,0 3.64,0.155 A 0.455,0.455 0 0 1 4.1,0.61 l 0,2.124 A 0.455,0.455 0 0 1 3.645,3.189 L 2.094,2.979 0.46,3.189 A 0.455,0.455 0 0 1 0,2.734 L 0,0.61 A 0.455,0.455 0 0 1 0.455,0.155 Z"
|
||||
class="cls-10"
|
||||
data-name="Path 6"
|
||||
id="path4306" />
|
||||
<path
|
||||
style="fill:#3c3c3c"
|
||||
inkscape:connector-curvature="0"
|
||||
transform="matrix(0,1,-1,0,22.495,13.242)"
|
||||
d="M 0.455,0.155 2.016,0 3.64,0.155 A 0.455,0.455 0 0 1 4.1,0.61 l 0,2.124 A 0.455,0.455 0 0 1 3.645,3.189 L 2.094,2.979 0.46,3.189 A 0.455,0.455 0 0 1 0,2.734 L 0,0.61 A 0.455,0.455 0 0 1 0.455,0.155 Z"
|
||||
class="cls-10"
|
||||
data-name="Path 8"
|
||||
id="path4308" />
|
||||
</g>
|
||||
</g>
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
After Width: | Height: | Size: 39 KiB |
@ -13,10 +13,10 @@
|
||||
sodipodi:docname="icn_port.svg"
|
||||
width="58.928001"
|
||||
height="58.928001"
|
||||
inkscape:export-filename="C:\gh\pxt-ev3\libs\core\jres\icons\portB.png"
|
||||
inkscape:export-xdpi="156.39424"
|
||||
inkscape:export-ydpi="156.39424"
|
||||
inkscape:version="0.92.1 r15371">
|
||||
inkscape:export-filename="/Users/sam/pxt-ev3/libs/core/jres/icons/portCD-icon.png"
|
||||
inkscape:export-xdpi="146.62"
|
||||
inkscape:export-ydpi="146.62"
|
||||
inkscape:version="0.91 r13725">
|
||||
<metadata
|
||||
id="metadata6352">
|
||||
<rdf:RDF>
|
||||
@ -25,7 +25,7 @@
|
||||
<dc:format>image/svg+xml</dc:format>
|
||||
<dc:type
|
||||
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
|
||||
<dc:title></dc:title>
|
||||
<dc:title />
|
||||
</cc:Work>
|
||||
</rdf:RDF>
|
||||
</metadata>
|
||||
@ -38,15 +38,15 @@
|
||||
guidetolerance="10"
|
||||
inkscape:pageopacity="0"
|
||||
inkscape:pageshadow="2"
|
||||
inkscape:window-width="1600"
|
||||
inkscape:window-height="837"
|
||||
inkscape:window-width="2560"
|
||||
inkscape:window-height="1395"
|
||||
id="namedview6350"
|
||||
showgrid="false"
|
||||
inkscape:zoom="4.0048872"
|
||||
inkscape:cx="24.98"
|
||||
inkscape:cx="-18.217222"
|
||||
inkscape:cy="29.464001"
|
||||
inkscape:window-x="-8"
|
||||
inkscape:window-y="-8"
|
||||
inkscape:window-x="0"
|
||||
inkscape:window-y="1"
|
||||
inkscape:window-maximized="1"
|
||||
inkscape:current-layer="svg6348" />
|
||||
<defs
|
||||
@ -79,11 +79,15 @@
|
||||
<text
|
||||
xml:space="preserve"
|
||||
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:40px;line-height:1.25;font-family:consolas;-inkscape-font-specification:consolas;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none"
|
||||
x="1475.2291"
|
||||
y="6185.2339"
|
||||
id="text10060"><tspan
|
||||
x="1457.2511"
|
||||
y="6184.4844"
|
||||
id="text10060"
|
||||
inkscape:export-filename="/Users/sam/pxt-ev3/libs/core/jres/icons/portA-icon.png"
|
||||
inkscape:export-xdpi="146.62"
|
||||
inkscape:export-ydpi="146.62"><tspan
|
||||
sodipodi:role="line"
|
||||
id="tspan10058"
|
||||
x="1475.2291"
|
||||
y="6185.2339">B</tspan></text>
|
||||
x="1457.2511"
|
||||
y="6184.4844"
|
||||
style="font-size:27.5px">CD</tspan></text>
|
||||
</svg>
|
||||
|
Before Width: | Height: | Size: 2.9 KiB After Width: | Height: | Size: 3.1 KiB |
@ -37,7 +37,7 @@ const enum ColorSensorColor {
|
||||
Brown
|
||||
}
|
||||
|
||||
enum LightCondition {
|
||||
enum Light {
|
||||
//% block="dark"
|
||||
Dark = sensors.ThresholdState.Low,
|
||||
//% block="bright"
|
||||
@ -184,7 +184,7 @@ namespace sensors {
|
||||
* @param condition the light condition
|
||||
* @param handler the code to run when detected
|
||||
*/
|
||||
//% help=sensors/color-sensor/on-light-condition-detected
|
||||
//% help=sensors/color-sensor/on-light-detected
|
||||
//% block="on **color sensor** %this|detected %mode|%condition"
|
||||
//% blockId=colorOnLightDetected
|
||||
//% parts="colorsensor"
|
||||
@ -192,7 +192,7 @@ namespace sensors {
|
||||
//% this.fieldEditor="ports"
|
||||
//% weight=89 blockGap=12
|
||||
//% group="Color Sensor"
|
||||
onLightConditionDetected(mode: LightIntensityMode, condition: LightCondition, handler: () => void) {
|
||||
onLightDetected(mode: LightIntensityMode, condition: Light, handler: () => void) {
|
||||
this.setMode(<ColorSensorMode><number>mode)
|
||||
control.onEvent(this._id, <number>condition, handler);
|
||||
}
|
||||
@ -201,15 +201,15 @@ namespace sensors {
|
||||
* Wait for the given color to be detected
|
||||
* @param color the color to detect
|
||||
*/
|
||||
//% help=sensors/color-sensor/pause-until-light-condition-detected
|
||||
//% help=sensors/color-sensor/pause-until-light-detected
|
||||
//% block="pause until **color sensor** %this|detected %mode|%condition"
|
||||
//% blockId=colorPauseUntilLightConditionDetected
|
||||
//% blockId=colorPauseUntilLightDetected
|
||||
//% parts="colorsensor"
|
||||
//% blockNamespace=sensors
|
||||
//% this.fieldEditor="ports"
|
||||
//% weight=88 blockGap=8
|
||||
//% group="Color Sensor"
|
||||
pauseUntilLightConditionDetected(mode: LightIntensityMode, condition: LightCondition) {
|
||||
pauseUntilLightDetected(mode: LightIntensityMode, condition: Light) {
|
||||
this.setMode(<ColorSensorMode><number>mode)
|
||||
if (this.thresholdDetector.state != <number>condition)
|
||||
control.waitForEvent(this._id, <number>condition)
|
||||
@ -252,8 +252,13 @@ namespace sensors {
|
||||
//% value.min=0 value.max=100
|
||||
//% this.fieldEditor="ports"
|
||||
//% help=sensors/color-sensor/set-threshold
|
||||
setThreshold(condition: LightCondition, value: number) {
|
||||
if (condition == LightCondition.Dark)
|
||||
setThreshold(condition: Light, value: number) {
|
||||
// threshold is used in ambient or reflected modes
|
||||
if (this.mode != LightIntensityMode.Ambient &&
|
||||
this.mode != LightIntensityMode.Reflected)
|
||||
this.setMode(ColorSensorMode.ReflectedLightIntensity);
|
||||
|
||||
if (condition == Light.Dark)
|
||||
this.thresholdDetector.setLowThreshold(value)
|
||||
else
|
||||
this.thresholdDetector.setHighThreshold(value);
|
||||
@ -267,8 +272,13 @@ namespace sensors {
|
||||
//% group="Threshold" blockGap=8 weight=89
|
||||
//% this.fieldEditor="ports"
|
||||
//% help=sensors/color-sensor/threshold
|
||||
threshold(condition: LightCondition): number {
|
||||
return this.thresholdDetector.threshold(<ThresholdState><number>LightCondition.Dark);
|
||||
threshold(condition: Light): number {
|
||||
// threshold is used in ambient or reflected modes
|
||||
if (this.mode != LightIntensityMode.Ambient &&
|
||||
this.mode != LightIntensityMode.Reflected)
|
||||
this.setMode(ColorSensorMode.ReflectedLightIntensity);
|
||||
|
||||
return this.thresholdDetector.threshold(<ThresholdState><number>condition);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -2,8 +2,8 @@
|
||||
|
||||
```cards
|
||||
sensors.color1.onColorDetected(ColorSensorColor.Blue, function () {})
|
||||
sensors.color1.onLightConditionDetected(LightIntensityMode.Reflected, LightCondition.Dark, function () {})
|
||||
sensors.color1.pauseUntilLightConditionDetected(LightIntensityMode.Reflected, LightCondition.Dark)
|
||||
sensors.color1.onLightDetected(LightIntensityMode.Reflected, Light.Dark, function () {})
|
||||
sensors.color1.pauseUntilLightDetected(LightIntensityMode.Reflected, Light.Dark)
|
||||
sensors.color1.pauseUntilColorDetected(ColorSensorColor.Blue)
|
||||
sensors.color1.color();
|
||||
sensors.color1.light(LightIntensityMode.Ambient)
|
||||
@ -13,7 +13,7 @@ sensors.color1.light(LightIntensityMode.Ambient)
|
||||
|
||||
[on color detected](/reference/sensors/color-sensor/on-color-detected),
|
||||
[pause until color detected](/reference/sensors/color-sensor/pause-until-color-detected),
|
||||
[on light condition detected](/reference/sensors/color-sensor/on-light-condition-detected),
|
||||
[pause until light condition detected](/reference/sensors/color-sensor/pause-until-light-condition-detected),
|
||||
[on light detected](/reference/sensors/color-sensor/on-light-detected),
|
||||
[pause until light detected](/reference/sensors/color-sensor/pause-until-light-detected),
|
||||
[color](/reference/sensors/color-sensor/color),
|
||||
[light](/reference/sensors/color-sensor/ambient-light)
|
||||
|
@ -3,7 +3,7 @@
|
||||
Run some code when the amount of light dectected changes.
|
||||
|
||||
```sig
|
||||
sensors.color1.onLightConditionDetected(LightIntensityMode.Reflected, LightCondition.Dark, function () {
|
||||
sensors.color1.onLightDetected(LightIntensityMode.Reflected, Light.Dark, function () {
|
||||
|
||||
})
|
||||
```
|
||||
@ -21,7 +21,7 @@ You can check for a change in either _ambient_ or _reflected_ light and run some
|
||||
Show a message on the screen when the ambient light goes dark.
|
||||
|
||||
```blocks
|
||||
sensors.color1.onLightConditionDetected(LightIntensityMode.Ambient, LightCondition.Dark, function() {
|
||||
sensors.color1.onLightDetected(LightIntensityMode.Ambient, Light.Dark, function() {
|
||||
brick.clearScreen();
|
||||
brick.showString("It just got dark", 1)
|
||||
brick.showString("Can you see me?", 2)
|
@ -3,7 +3,7 @@
|
||||
Wait until a particular light condition is detected.
|
||||
|
||||
```sig
|
||||
sensors.color1.pauseUntilLightConditionDetected(LightIntensityMode.Reflected, LightCondition.Dark)
|
||||
sensors.color1.pauseUntilLightDetected(LightIntensityMode.Reflected, Light.Dark)
|
||||
```
|
||||
|
||||
You can wait for a change in either _ambient_ or _reflected_ light. This event happens when the sensor detects light going to ``dark`` or to ``bright``. You choose what condition you will wait for.
|
||||
@ -19,11 +19,11 @@ Wait for the ambient light to go dark, then show an expression on the screen.
|
||||
|
||||
```blocks
|
||||
brick.showString("Waiting for dark", 1)
|
||||
sensors.color1.pauseUntilLightConditionDetected(LightIntensityMode.Reflected, LightCondition.Dark)
|
||||
sensors.color1.pauseUntilLightDetected(LightIntensityMode.Reflected, Light.Dark)
|
||||
brick.clearScreen()
|
||||
brick.showImage(images.expressionsSick)
|
||||
```
|
||||
|
||||
## See also
|
||||
|
||||
[on light condition detected](/reference/sensors/color-sensor/on-light-condition-detected)
|
||||
[on light detected](/reference/sensors/color-sensor/on-light-detected)
|
@ -3,7 +3,7 @@
|
||||
Set the threshold value for dark or bright light.
|
||||
|
||||
```sig
|
||||
sensors.color1.setThreshold(LightCondition.Dark, 0)
|
||||
sensors.color1.setThreshold(Light.Dark, 0)
|
||||
```
|
||||
|
||||
Light intensity is measured from `0` (very dark) to `100` (very bright). You can decide what dark and bright mean for your purposes and set a _threshold_ for them. A threshold is a boundary or a limit. If you want a light intensity of `20` mean that it's dark, then you set the sensor threshold for ``dark`` to `20`. Also, if you think that `75` is bright, then you can set the threshold for ``bright`` to that.
|
||||
@ -11,8 +11,8 @@ Light intensity is measured from `0` (very dark) to `100` (very bright). You can
|
||||
After setting a threshold, any event for that light condition won't happen until the amount of light reaches your threshold value:
|
||||
|
||||
```block
|
||||
sensors.color1.setThreshold(LightCondition.Dark, 20)
|
||||
sensors.color1.onLightConditionDetected(LightIntensityMode.Reflected, LightCondition.Dark, function () {
|
||||
sensors.color1.setThreshold(Light.Dark, 20)
|
||||
sensors.color1.onLightDetected(LightIntensityMode.Reflected, Light.Dark, function () {
|
||||
brick.showMood(moods.sleeping)
|
||||
})
|
||||
```
|
||||
@ -27,8 +27,8 @@ sensors.color1.onLightConditionDetected(LightIntensityMode.Reflected, LightCondi
|
||||
Make a daylight alarm. When the ambient light reaches `70` flash the status light and play a sound.
|
||||
|
||||
```blocks
|
||||
sensors.color3.setThreshold(LightCondition.Bright, 70)
|
||||
sensors.color3.onLightConditionDetected(LightIntensityMode.Ambient, LightCondition.Bright, function () {
|
||||
sensors.color3.setThreshold(Light.Bright, 70)
|
||||
sensors.color3.onLightDetected(LightIntensityMode.Ambient, Light.Bright, function () {
|
||||
brick.setStatusLight(StatusLight.GreenFlash)
|
||||
for (let i = 0; i < 5; i++) {
|
||||
music.playSoundEffectUntilDone(sounds.mechanicalBackingAlert)
|
||||
|
@ -3,7 +3,7 @@
|
||||
Get the threshold value for dark or bright light.
|
||||
|
||||
```sig
|
||||
sensors.color1.threshold(LightCondition.Dark)
|
||||
sensors.color1.threshold(Light.Dark)
|
||||
```
|
||||
|
||||
Light intensity is measured from `0` (very dark) to `100` (very bright). A _threshold_ sets what dark and bright mean for your purposes. A threshold is a boundary or a limit. If a light intensity of `20` means that it's dark, then the sensor threshold for ``dark`` is `20`. Also, if `75` means bright, then the threshold value for ``bright`` is `75`.
|
||||
@ -17,8 +17,8 @@ Light intensity is measured from `0` (very dark) to `100` (very bright). A _thre
|
||||
Find out what light level is set as the ``dark`` threshold when a dark light event happens.
|
||||
|
||||
```blocks
|
||||
sensors.color3.onLightConditionDetected(LightIntensityMode.Reflected, LightCondition.Dark, function () {
|
||||
brick.showValue("DarknessThresholdValue", sensors.color3.threshold(LightCondition.Dark), 1)
|
||||
sensors.color3.onLightDetected(LightIntensityMode.Reflected, Light.Dark, function () {
|
||||
brick.showValue("DarknessThresholdValue", sensors.color3.threshold(Light.Dark), 1)
|
||||
})
|
||||
```
|
||||
|
||||
|
@ -9,7 +9,7 @@ namespace sensors {
|
||||
//% blockId=colorEnumPicker block="%color" shim=TD_ID
|
||||
//% weight=0 blockHidden=1 turnRatio.fieldOptions.decompileLiterals=1
|
||||
//% color.fieldEditor="colorenum"
|
||||
//% color.fieldOptions.colours='["#f12a21", "#ffd01b", "#006db3", "#00934b", "#ffffff", "#6c2d00", "#000000"]'
|
||||
//% color.fieldOptions.colours='["#f12a21", "#ffd01b", "#006db3", "#00934b", "#000000", "#6c2d00", "#ffffff"]'
|
||||
//% color.fieldOptions.columns=2 color.fieldOptions.className='legoColorPicker'
|
||||
export function __colorEnumPicker(color: ColorSensorColor): number {
|
||||
return color;
|
||||
|
@ -245,7 +245,7 @@ namespace control {
|
||||
|
||||
namespace brick {
|
||||
// the brick starts with the red color
|
||||
let currPattern: StatusLight = StatusLight.Red;
|
||||
let currPattern: StatusLight = StatusLight.Off;
|
||||
|
||||
/**
|
||||
* Set lights.
|
||||
|
BIN
libs/core/jres/icons/dualMotorLarge-icon.png
Normal file
After Width: | Height: | Size: 9.3 KiB |
Before Width: | Height: | Size: 4.9 KiB After Width: | Height: | Size: 5.6 KiB |
Before Width: | Height: | Size: 1.7 KiB After Width: | Height: | Size: 1.8 KiB |
BIN
libs/core/jres/icons/portAB-icon.png
Normal file
After Width: | Height: | Size: 2.4 KiB |
BIN
libs/core/jres/icons/portAD-icon.png
Normal file
After Width: | Height: | Size: 2.4 KiB |
Before Width: | Height: | Size: 1.7 KiB After Width: | Height: | Size: 1.7 KiB |
BIN
libs/core/jres/icons/portBC-icon.png
Normal file
After Width: | Height: | Size: 2.5 KiB |
Before Width: | Height: | Size: 1.8 KiB After Width: | Height: | Size: 1.9 KiB |
BIN
libs/core/jres/icons/portCD-icon.png
Normal file
After Width: | Height: | Size: 2.4 KiB |
Before Width: | Height: | Size: 1.6 KiB After Width: | Height: | Size: 1.6 KiB |
@ -163,6 +163,7 @@ namespace motors {
|
||||
* @param brake a value indicating if the motor should break when off
|
||||
*/
|
||||
//% blockId=outputMotorSetBrakeMode block="set %motor|brake %brake=toggleOnOff"
|
||||
//% motor.fieldEditor="motors"
|
||||
//% weight=60 blockGap=8
|
||||
//% group="Properties"
|
||||
//% help=motors/motor/set-brake
|
||||
@ -175,6 +176,7 @@ namespace motors {
|
||||
* Inverts the motor polarity
|
||||
*/
|
||||
//% blockId=motorSetInverted block="set %motor|inverted %reversed=toggleOnOff"
|
||||
//% motor.fieldEditor="motors"
|
||||
//% weight=59 blockGap=8
|
||||
//% group="Properties"
|
||||
//% help=motors/motor/set-inverted
|
||||
@ -192,6 +194,7 @@ namespace motors {
|
||||
//% group="Move"
|
||||
//% help=motors/motor/stop
|
||||
//% blockId=motorStop block="stop %motors|"
|
||||
//% motors.fieldEditor="motors"
|
||||
stop() {
|
||||
this.init();
|
||||
stop(this._port, this._brake);
|
||||
@ -212,6 +215,7 @@ namespace motors {
|
||||
//% group="Move"
|
||||
//% help=motors/motor/reset
|
||||
//% blockId=motorReset block="reset %motors|"
|
||||
//% motors.fieldEditor="motors"
|
||||
reset() {
|
||||
this.init();
|
||||
reset(this._port);
|
||||
@ -226,6 +230,7 @@ namespace motors {
|
||||
//% blockId=motorRun block="run %motor at %speed=motorSpeedPicker|\\%||for %value %unit"
|
||||
//% weight=100 blockGap=8
|
||||
//% group="Move"
|
||||
//% motor.fieldEditor="motors"
|
||||
//% expandableArgumentMode=toggle
|
||||
//% help=motors/motor/run
|
||||
run(speed: number, value: number = 0, unit: MoveUnit = MoveUnit.MilliSeconds) {
|
||||
@ -287,11 +292,29 @@ namespace motors {
|
||||
* @param timeOut optional maximum pausing time in milliseconds
|
||||
*/
|
||||
//% blockId=motorPauseUntilRead block="pause until %motor|ready"
|
||||
//% motor.fieldEditor="motors"
|
||||
//% weight=90
|
||||
//% group="Move"
|
||||
pauseUntilReady(timeOut?: number) {
|
||||
pauseUntil(() => this.isReady(), timeOut);
|
||||
}
|
||||
|
||||
protected setOutputType(large: boolean) {
|
||||
/*
|
||||
Instruction opOutput_Set_Type (LAYER, NO, TYPE)
|
||||
Opcode 0xA1 Arguments (Data8) LAYER – Specify chain layer number [0 - 3]
|
||||
(Data8) NO – Port number [0 - 3]
|
||||
(Data8) TYPE – Output device type, (0x07: Large motor, Medium motor = 0x08) Dispatch status Unchanged
|
||||
Description This function enables specifying the output device type
|
||||
*/
|
||||
for (let i = 0; i < DAL.NUM_OUTPUTS; ++i) {
|
||||
if (this._port & (1 << i)) {
|
||||
const b = mkCmd(i, DAL.opOutputSetType, 1)
|
||||
b.setNumber(NumberFormat.Int8LE, 2, large ? 0x07 : 0x08)
|
||||
writePWM(b)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//% fixedInstances
|
||||
@ -310,11 +333,8 @@ namespace motors {
|
||||
motors.__motorUsed(this._port, this._large);
|
||||
}
|
||||
|
||||
private __init() {
|
||||
// specify motor size on this port
|
||||
const b = mkCmd(outOffset(this._port), DAL.opOutputSetType, 1)
|
||||
b.setNumber(NumberFormat.Int8LE, 2, this._large ? 0x07 : 0x08)
|
||||
writePWM(b)
|
||||
private __init() {
|
||||
this.setOutputType(this._large);
|
||||
}
|
||||
|
||||
private __setSpeed(speed: number) {
|
||||
@ -343,6 +363,7 @@ namespace motors {
|
||||
* @param value true for regulated motor
|
||||
*/
|
||||
//% blockId=outputMotorSetRegulated block="set %motor|regulated %value=toggleOnOff"
|
||||
//% motor.fieldEditor="motors"
|
||||
//% weight=58
|
||||
//% group="Properties"
|
||||
//% help=motors/motor/set-regulated
|
||||
@ -355,6 +376,7 @@ namespace motors {
|
||||
* @param motor the port which connects to the motor
|
||||
*/
|
||||
//% blockId=motorSpeed block="%motor|speed"
|
||||
//% motor.fieldEditor="motors"
|
||||
//% weight=72
|
||||
//% blockGap=8
|
||||
//% group="Counters"
|
||||
@ -369,6 +391,7 @@ namespace motors {
|
||||
* @param motor the port which connects to the motor
|
||||
*/
|
||||
//% blockId=motorAngle block="%motor|angle"
|
||||
//% motor.fieldEditor="motors"
|
||||
//% weight=70
|
||||
//% blockGap=8
|
||||
//% group="Counters"
|
||||
@ -382,6 +405,7 @@ namespace motors {
|
||||
* Clears the motor count
|
||||
*/
|
||||
//% blockId=motorClearCount block="clear %motor|counters"
|
||||
//% motor.fieldEditor="motors"
|
||||
//% weight=68
|
||||
//% blockGap=8
|
||||
//% group="Counters"
|
||||
@ -406,28 +430,28 @@ namespace motors {
|
||||
}
|
||||
}
|
||||
|
||||
//% whenUsed fixedInstance block="large motor A"
|
||||
//% whenUsed fixedInstance block="large motor A" jres=icons.portA
|
||||
export const largeA = new Motor(Output.A, true);
|
||||
|
||||
//% whenUsed fixedInstance block="large motor B"
|
||||
//% whenUsed fixedInstance block="large motor B" jres=icons.portB
|
||||
export const largeB = new Motor(Output.B, true);
|
||||
|
||||
//% whenUsed fixedInstance block="large motor C"
|
||||
//% whenUsed fixedInstance block="large motor C" jres=icons.portC
|
||||
export const largeC = new Motor(Output.C, true);
|
||||
|
||||
//% whenUsed fixedInstance block="large motor D"
|
||||
//% whenUsed fixedInstance block="large motor D" jres=icons.portD
|
||||
export const largeD = new Motor(Output.D, true);
|
||||
|
||||
//% whenUsed fixedInstance block="medium motor A"
|
||||
//% whenUsed fixedInstance block="medium motor A" jres=icons.portA
|
||||
export const mediumA = new Motor(Output.A, false);
|
||||
|
||||
//% whenUsed fixedInstance block="medium motor B"
|
||||
//% whenUsed fixedInstance block="medium motor B" jres=icons.portB
|
||||
export const mediumB = new Motor(Output.B, false);
|
||||
|
||||
//% whenUsed fixedInstance block="medium motor C"
|
||||
//% whenUsed fixedInstance block="medium motor C" jres=icons.portC
|
||||
export const mediumC = new Motor(Output.C, false);
|
||||
|
||||
//% whenUsed fixedInstance block="medium motor D"
|
||||
//% whenUsed fixedInstance block="medium motor D" jres=icons.portD
|
||||
export const mediumD = new Motor(Output.D, false);
|
||||
|
||||
//% fixedInstances
|
||||
@ -443,13 +467,7 @@ namespace motors {
|
||||
}
|
||||
|
||||
private __init() {
|
||||
for (let i = 0; i < DAL.NUM_OUTPUTS; ++i) {
|
||||
if (this._port & (1 << i)) {
|
||||
const b = mkCmd(outOffset(1 << i), DAL.opOutputSetType, 1)
|
||||
b.setNumber(NumberFormat.Int8LE, 2, 0x07) // large motor
|
||||
writePWM(b)
|
||||
}
|
||||
}
|
||||
this.setOutputType(true);
|
||||
}
|
||||
|
||||
private __setSpeed(speed: number) {
|
||||
@ -481,7 +499,8 @@ namespace motors {
|
||||
* @param value (optional) move duration or rotation
|
||||
* @param unit (optional) unit of the value
|
||||
*/
|
||||
//% blockId=motorPairTank block="tank %motors %speedLeft=motorSpeedPicker|\\% %speedRight=motorSpeedPicker|\\%||for %value %unit"
|
||||
//% blockId=motorPairTank block="tank **motors** %motors %speedLeft=motorSpeedPicker|\\% %speedRight=motorSpeedPicker|\\%||for %value %unit"
|
||||
//% motors.fieldEditor="ports"
|
||||
//% weight=96 blockGap=8
|
||||
//% inlineInputMode=inline
|
||||
//% group="Move"
|
||||
@ -508,7 +527,8 @@ namespace motors {
|
||||
* @param value (optional) move duration or rotation
|
||||
* @param unit (optional) unit of the value
|
||||
*/
|
||||
//% blockId=motorPairSteer block="steer %chassis turn ratio %turnRatio=motorTurnRatioPicker speed %speed=motorSpeedPicker|\\%||for %value %unit"
|
||||
//% blockId=motorPairSteer block="steer **motors** %chassis turn ratio %turnRatio=motorTurnRatioPicker speed %speed=motorSpeedPicker|\\%||for %value %unit"
|
||||
//% chassis.fieldEditor="ports"
|
||||
//% weight=95
|
||||
//% turnRatio.min=-200 turnRatio=200
|
||||
//% inlineInputMode=inline
|
||||
@ -571,16 +591,16 @@ namespace motors {
|
||||
}
|
||||
}
|
||||
|
||||
//% whenUsed fixedInstance block="large motors B+C"
|
||||
//% whenUsed fixedInstance block="B+C" jres=icons.portBC
|
||||
export const largeBC = new SynchedMotorPair(Output.BC);
|
||||
|
||||
//% whenUsed fixedInstance block="large motors A+D"
|
||||
//% whenUsed fixedInstance block="A+D" jres=icons.portAD
|
||||
export const largeAD = new SynchedMotorPair(Output.AD);
|
||||
|
||||
//% whenUsed fixedInstance block="large motors A+B"
|
||||
//% whenUsed fixedInstance block="A+B" jres=icons.portAB
|
||||
export const largeAB = new SynchedMotorPair(Output.AB);
|
||||
|
||||
//% whenUsed fixedInstance block="large motors C+D"
|
||||
//% whenUsed fixedInstance block="C+D" jres=icons.portCD
|
||||
export const largeCD = new SynchedMotorPair(Output.CD);
|
||||
|
||||
function reset(out: Output) {
|
||||
|
@ -31,7 +31,7 @@ namespace brick {
|
||||
*/
|
||||
show() {
|
||||
brick.setStatusLight(this.light);
|
||||
brick.showImage(this.image);
|
||||
brick.showImage(this.image, 0);
|
||||
music.playSoundEffectUntilDone(this.sound);
|
||||
pause(20);
|
||||
}
|
||||
|
@ -279,7 +279,7 @@ namespace sensors {
|
||||
//% group="Threshold" blockGap=8 weight=49
|
||||
//% this.fieldEditor="ports"
|
||||
proximityThreshold(condition: InfraredSensorEvent): number {
|
||||
return this._proximityThreshold.threshold(<ThresholdState><number>LightCondition.Dark);
|
||||
return this._proximityThreshold.threshold(<ThresholdState><number>condition);
|
||||
}
|
||||
|
||||
// TODO
|
||||
|
3
libs/music/docs/reference/music/play-sound-until-done.md
Normal file
@ -0,0 +1,3 @@
|
||||
# play Sound Until Done
|
||||
|
||||
This function is not enabled for @boardname@.
|