├── .gitignore
├── .ipynb_checkpoints
├── Research-checkpoint.ipynb
└── final-checkpoint.ipynb
├── LICENSE
├── README.md
├── Research.ipynb
├── beep.py
├── color_sensor.py
├── demo.py
├── final.ipynb
├── images
├── InTheBox_45500_P_Brik_Left_Square.png
├── InTheBox_45502_L_Motor_Square.png
├── InTheBox_45503_M_Motor_Square.png
├── InTheBox_45506_Colour_Sensor_Square.png
├── InTheBox_45507_Touch_Sensor_Square.png
├── InTheBox_45508_IR_Beacon_Square.png
├── InTheBox_45509_IR_Sensor_Square.png
├── InTheBox_Bricks_Landscape.jpg
├── LEGO-MINDSTORMS-EV3-EV3RSTORM_688.jpg
├── Lego-Mindstorms-EV3-unveiled-at-CES-2013_7.jpg
├── PartsCollage.jpg
├── PartsWordcloud.png
├── Product_BOBB3E_mainstage.png
├── Product_EL3CTRIC_GUITAR_mainstage.png
├── Product_EV3D4_02_mainstage.png
├── Product_EV3ERSTORM_mainstage.png
├── Product_GRIPP3R_mainstage.png
├── Product_PLOTT3R_mainstage.png
├── Product_R3PTAR_mainstage.png
├── Product_RAC3R_mainstage.png
├── Product_ROBODOZ3R_mainstage.png
├── Product_SH3LL_GAME_mainstage.png
├── Product_SPIK3R_mainstage.png
├── Product_TRACK3R_mainstage.png
├── Product_TRIC3RA_mainstage.png
├── Product_WACK3M_mainstage.png
├── action-mediumMotor-largeMotor-moveSteering-moveTank-display-sound-brickStatusLight.PNG
├── advanced-fileAccess-messaging-bluetoothConnection-keepAwake-rawSensorValue-unregulatedMotor-invertMotor-stopProgram-comment.PNG
├── cool_projects
│ ├── automated_toilet.PNG
│ ├── autonomous_car.PNG
│ ├── dragster.PNG
│ ├── egg_decorating_machine.PNG
│ ├── helicopter.PNG
│ ├── house_builder.PNG
│ ├── paper_plane_folding_machine.PNG
│ ├── printer.PNG
│ ├── rock_paper_scisors.PNG
│ ├── shooter.PNG
│ ├── simon_says.PNG
│ ├── space_elevator.PNG
│ ├── spirograph.PNG
│ ├── sudoku.PNG
│ └── toiler_paper_challenge.PNG
├── dataOps-variable-constant-arrayOp-logicOp-math-round-compare-range-text-random.PNG
├── ev3.jpg
├── ev3rstorm-mindstorms-ev3.jpg
├── ev3storm-mission4-logic.PNG
├── flowControl-start-wait-loop-switch-loopInterrupt.PNG
├── innodev_logo_landscape.jpg
├── innodev_logo_stacked.jpg
├── irTarget.PNG
├── lego-ev3-home-lego-mindstorms-ev3-home-package.jpg.png
├── lego-mindstorms-parts-wordcloud.png
├── lego-overview.PNG
├── lego-overview2.PNG
├── me-ev3-cropped.png
├── me-ev3-shrank.jpg
├── me-ev3.jpg
├── me.jpg
├── me.pdn
├── parts.txt
├── parts
│ ├── 1-2_Bush.jpg
│ ├── 2M_Cross_Axle_W_Groove.jpg
│ ├── 2M_Fric_Snap_W-Cross_Hole.jpg
│ ├── 3-Branch_Cross_Axle_W-Cross_H.jpg
│ ├── 3M_Connector_Peg.jpg
│ ├── Angle_Element_0_Degrees_[1].jpg
│ ├── Angle_Element_135_Deg_[4].jpg
│ ├── Angle_Element_180_Degrees_[2].jpg
│ ├── Angle_Element_90_Degrees_[6].jpg
│ ├── Ball_165.jpg
│ ├── Ball_W_Cross_Axle.jpg
│ ├── Ball_With_Friction_Snap.jpg
│ ├── Beam_1X2_W-Cross_And_Hole.jpg
│ ├── Beam_3M_485_W_Fork.jpg
│ ├── Beam_3_M_W-4_Snaps.jpg
│ ├── Beam_Frame_5X7_485.jpg
│ ├── Beam_R_Frame_5X11_485.jpg
│ ├── Bevel_Gear_Z20.jpg
│ ├── Bion_Eye.jpg
│ ├── Blade_W_Technic_Hole_1.jpg
│ ├── Bush_For_Cross_Axle.jpg
│ ├── Catch_W_Cross_Hole.jpg
│ ├── Caterpillar_Track.jpg
│ ├── Comb_Wheel.jpg
│ ├── Conical_Wheel_Z12.jpg
│ ├── ConnBush_WFric-Crossale.jpg
│ ├── Connector_Peg.jpg
│ ├── Connector_Peg_W_Friction.jpg
│ ├── Connector_Peg_W_Friction_3M.jpg
│ ├── Cross_Axle_3M.jpg
│ ├── Cross_Axle_4M_With_End_Stop.jpg
│ ├── Cross_Axle_55_With_Stop_1M.jpg
│ ├── Cross_Axle_5M.jpg
│ ├── Cross_Axle_6M.jpg
│ ├── Cross_Axle_7M.jpg
│ ├── Cross_Axle_8M_With_End_Stop.jpg
│ ├── Cross_Axle_9M.jpg
│ ├── Cross_Axle_Extension_2M.jpg
│ ├── Cross_Block-Form_2X2X2.jpg
│ ├── Cross_Block_3X2.jpg
│ ├── Cross_Block_90.jpg
│ ├── Cross_Blok_3M.jpg
│ ├── Crossaxle_3M_With_Knob.jpg
│ ├── Double_Angular_Beam_3X7_45.jpg
│ ├── Double_Bush_3M_49.jpg
│ ├── Double_Conical_Wheel_Z12_1M.jpg
│ ├── Double_Conical_Wheel_Z20_1M.jpg
│ ├── Double_Conical_Wheel_Z36.jpg
│ ├── Double_Cross_Block.jpg
│ ├── Ev3_Cable_250_Mm.jpg
│ ├── Ev3_Cable_350_Mm.jpg
│ ├── Ev3_Cable_500_Mm.jpg
│ ├── Gear_Wheel_Z24.jpg
│ ├── Hub_112_X_784.jpg
│ ├── Krydsaksel_M-Stop_4M.jpg
│ ├── Left_Panel_3X11.jpg
│ ├── Left_Panel_3X7.jpg
│ ├── Left_Screen_485_4X7X4.jpg
│ ├── Lt_Steering_Gear.jpg
│ ├── Magasine_For_Balls_165.jpg
│ ├── Module_Bush.jpg
│ ├── Right_Panel_3X11.jpg
│ ├── Right_Panel_3X7.jpg
│ ├── Right_Screen_485_4X7X4.jpg
│ ├── Rim_Wide_WCross_30-20.jpg
│ ├── Shooter.jpg
│ ├── Sword.jpg
│ ├── T-Beam_3X3_W-Hole_48.jpg
│ ├── Technic_11M_Beam.jpg
│ ├── Technic_13M_Beam.jpg
│ ├── Technic_15M_Beam.jpg
│ ├── Technic_3M_Beam.jpg
│ ├── Technic_5M_Beam.jpg
│ ├── Technic_7M_Beam.jpg
│ ├── Technic_9M_Beam.jpg
│ ├── Technic_Ang_Beam_3X5_90_Deg.jpg
│ ├── Technic_Ang_Beam_4X2_90_Deg.jpg
│ ├── Technic_Angular_Beam_3X7.jpg
│ ├── Technic_Angular_Beam_4X4.jpg
│ ├── Technic_Angular_Wheel.jpg
│ ├── Technic_Cross_Block-Fork_2X2.jpg
│ ├── Technic_Cross_Block_2X1.jpg
│ ├── Technic_Lever_3M.jpg
│ ├── Technic_Steering-Gear_3M.jpg
│ ├── Track_Rod_6M.jpg
│ ├── Tube_W-_Double_485_Hole.jpg
│ ├── Tyre_For_Wedge-Belt_Wheel.jpg
│ ├── Tyre_Low_Narrow_1458_X_624.jpg
│ ├── Tyre_Normal_Wide_432_X_22.jpg
│ ├── V-Belt_24_-_Clear_Red.jpg
│ ├── Wedge-Belt_Wheel_24.jpg
│ ├── Worm_Gear_2_Module_For_Gear_Wheel.jpg
│ ├── colorsensor.jpg
│ ├── ev3brick.jpg
│ ├── imageSensor.jpg
│ ├── irbeacon_.jpg
│ ├── irseeker.jpg
│ ├── largeServoMotor.jpg
│ ├── me-ev3-shrank.jpg
│ ├── mediumMotor.jpg
│ ├── parts.txt
│ └── zzz-empty.jpg
├── sensor-brickButtons-colorSensor-infraredSensor-motorRotation-timer-touchSensor.PNG
├── skate.PNG
├── spik3r-mission3.PNG
└── tree_178x128.bmp
├── labview
├── EL3CTRIC_GUITAR.ev3
├── ev3storm-mission3.ev3
├── ev3storm-mission4-irspinblades.ev3
├── ev3storm-mission5-ircontrol.ev3
├── ev3storm-mission6-followir-shoot.ev3
├── spik3r-mission3.ev3
└── spik3r-mission4.ev3
├── nupogodi.py
├── playspace.py
├── run.sh
├── run_rpyc.sh
├── sounds
└── r2d2.wav
└── starwars.py
/.gitignore:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sshopov/pyconau2017/e492e284a5afa5115f81fddf83546168b128591c/.gitignore
--------------------------------------------------------------------------------
/.ipynb_checkpoints/Research-checkpoint.ipynb:
--------------------------------------------------------------------------------
1 | {
2 | "cells": [
3 | {
4 | "cell_type": "markdown",
5 | "metadata": {
6 | "slideshow": {
7 | "slide_type": "slide"
8 | }
9 | },
10 | "source": [
11 | "https://en.wikipedia.org/wiki/Lego_Mindstorms\n",
12 | "\n",
13 | "## 0-2 minutes:\n",
14 | "\n",
15 | "* Introduction\n",
16 | "* A bit about me\n",
17 | "* What is Lego Mindstorms\n",
18 | "* Brief history\n",
19 | "\n",
20 | "## 2-5 minutes:\n",
21 | "\n",
22 | "* Cool stuff people have done with Mindstorms\n",
23 | "\n",
24 | "## 5-8 minutes:\n",
25 | "\n",
26 | "* The ev3dev operating system\n",
27 | "\n",
28 | " * What is it\n",
29 | " * How to install it and run it\n",
30 | "\n",
31 | "* The Python EV3 libraries\n",
32 | "\n",
33 | " * https://github.com/topikachu/python-ev3 \n",
34 | " * https://github.com/rhempel/ev3dev-lang-python#usage-examples\n",
35 | "\n",
36 | "\n",
37 | "## 8-12 minutes:\n",
38 | "\n",
39 | "* The motors and how to program them \n",
40 | "\n",
41 | " * Medium motor\n",
42 | " * Servo motor\n",
43 | "\n",
44 | "\n",
45 | "## 12-17 minutes:\n",
46 | "\n",
47 | "* The sensors and how to program them\n",
48 | " * Infrared\n",
49 | " * Touch\n",
50 | " * Gyro\n",
51 | " * Color\n",
52 | " * Ultrasonic\n",
53 | " * Power supply \n",
54 | "\n",
55 | "## 17-20 minutes:\n",
56 | "\n",
57 | "* Output options and how to program them\n",
58 | " * LED control \n",
59 | " * Sound and speech control\n",
60 | " * Screen control\n",
61 | "\n",
62 | "## 20-22 minutes:\n",
63 | "\n",
64 | "* Popular third-party sensors and parts \n",
65 | " * Dexter Industries\n",
66 | " * Mindsensors\n",
67 | " * HiTechnic \n",
68 | " * MATRIX robotics\n",
69 | " * Vernier \n",
70 | "\n",
71 | "* Extending the Python libraries to support custom sensors (might cut this one out if running short on time)\n",
72 | "\n",
73 | "## 22-23 minutes:\n",
74 | "\n",
75 | "* Other options to explore\n",
76 | "\n",
77 | " * BrickPi\n",
78 | "\n",
79 | "## 23-26 minutes:\n",
80 | "\n",
81 | "* Demo\n",
82 | "\n",
83 | " * Booting ev3dev\n",
84 | " * Running Jupyter notebook on the brick\n",
85 | " * Connecting to the Jupyter notebook and running \"Sound.speak('Hello PyCon Australia').\"\n",
86 | "\n",
87 | "## 26-30 minutes:\n",
88 | "\n",
89 | "* Thanks and Q&A "
90 | ]
91 | },
92 | {
93 | "cell_type": "markdown",
94 | "metadata": {
95 | "collapsed": true,
96 | "slideshow": {
97 | "slide_type": "slide"
98 | }
99 | },
100 | "source": [
101 | "## Putting it all together\n",
102 | "\n",
103 | "Download an mp3 from Spotify and make the robot dance. \n",
104 | "Bonus points for randomised dance moves. \n",
105 | "Bonus points for dance moves based on song analysis. "
106 | ]
107 | },
108 | {
109 | "cell_type": "code",
110 | "execution_count": null,
111 | "metadata": {
112 | "collapsed": true,
113 | "slideshow": {
114 | "slide_type": "slide"
115 | }
116 | },
117 | "outputs": [],
118 | "source": [
119 | "#https://github.com/plamere/spotipy\n",
120 | "\n",
121 | "import requests\n",
122 | "import spotipy\n",
123 | "\n",
124 | "sp = spotipy.Spotify()\n",
125 | "\n",
126 | "results = sp.search(q='i like to move it move it', limit=20)\n",
127 | "for i, t in enumerate(results['tracks']['items']):\n",
128 | " print ' ', i, t['name']\n",
129 | "\n",
130 | "with file(r'c:\\temp\\moveit.mp3','wb') as out:\n",
131 | " out.write(requests.get(results['tracks']['items'][0]['preview_url']).content)\n",
132 | "\n",
133 | "import os\n",
134 | "os.startfile(r'c:\\temp\\moveit.mp3')"
135 | ]
136 | },
137 | {
138 | "cell_type": "markdown",
139 | "metadata": {
140 | "slideshow": {
141 | "slide_type": "slide"
142 | }
143 | },
144 | "source": [
145 | "## .EV3 files\n",
146 | "\n",
147 | "\n",
148 | "* Lego Mindstorms LabView projects have a .ev3 extension.\n",
149 | "\n",
150 | "* .ev3 files can be unzipped with 7-zip to a folder.\n",
151 | "\n",
152 | "* Within the zip are:\n",
153 | "\n",
154 | " * .x3a files\n",
155 | "\n",
156 | " * .laz is also a .zip file which contains assets such as images\n",
157 | "\n",
158 | " * .rgf\n",
159 | "\n",
160 | " * .rsf \n",
161 | "\n",
162 | " * .ev3p is an XML file which captures the progam's logic\n",
163 | "\n",
164 | " * .lvprojx is an XML file \n",
165 | "\n"
166 | ]
167 | },
168 | {
169 | "cell_type": "code",
170 | "execution_count": null,
171 | "metadata": {
172 | "collapsed": true,
173 | "slideshow": {
174 | "slide_type": "slide"
175 | }
176 | },
177 | "outputs": [],
178 | "source": [
179 | "# TODO\n",
180 | "\n",
181 | "* toddler photo i had a dream\n",
182 | "* word cloud for parts\n",
183 | "* picasa collage for parts\n",
184 | "* lego intro\n",
185 | " * mindstorms robots\n",
186 | " * what: tecnic, brain, software\n",
187 | " * where: buy online 499 ebay less \n",
188 | " * why: community\n",
189 | " * history: nxt\n",
190 | " * education edition vs home edition"
191 | ]
192 | },
193 | {
194 | "cell_type": "code",
195 | "execution_count": 6,
196 | "metadata": {},
197 | "outputs": [
198 | {
199 | "name": "stdout",
200 | "output_type": "stream",
201 | "text": [
202 | " Volume in drive C is Windows\n",
203 | " Volume Serial Number is 7A71-E759\n",
204 | "\n",
205 | " Directory of C:\\work\\pyconau2017\\pyconau2017\n",
206 | "\n",
207 | "24/07/2017 12:19 PM
.\n",
208 | "24/07/2017 12:19 PM ..\n",
209 | "12/05/2017 10:20 AM 130 .gitignore\n",
210 | "08/05/2017 03:20 AM .ipynb_checkpoints\n",
211 | "01/07/2017 01:57 AM 92 beep.py\n",
212 | "08/05/2017 03:07 AM 1,091 LICENSE\n",
213 | "21/07/2017 06:54 PM 8,006 nupogodi.py\n",
214 | "24/07/2017 12:10 PM 15,613 pivottablejs.html\n",
215 | "21/07/2017 06:35 PM 2,752 playspace.py\n",
216 | "08/05/2017 03:07 AM 126 README.md\n",
217 | "24/07/2017 12:19 PM 10,847 Research.ipynb\n",
218 | "01/07/2017 02:06 AM 15 run.sh\n",
219 | "20/07/2017 03:15 PM 4,566 starwars.py\n",
220 | " 10 File(s) 43,238 bytes\n",
221 | " 3 Dir(s) 31,170,265,088 bytes free\n"
222 | ]
223 | }
224 | ],
225 | "source": [
226 | "!dir"
227 | ]
228 | },
229 | {
230 | "cell_type": "code",
231 | "execution_count": null,
232 | "metadata": {
233 | "collapsed": true
234 | },
235 | "outputs": [],
236 | "source": [
237 | "%config SqlMagic.autopandas = True"
238 | ]
239 | },
240 | {
241 | "cell_type": "code",
242 | "execution_count": null,
243 | "metadata": {
244 | "collapsed": true
245 | },
246 | "outputs": [],
247 | "source": [
248 | "%%sql sqlite://\n",
249 | "CREATE TABLE presidents (first, last, yob);\n",
250 | "INSERT INTO presidents VALUES ('George', 'Washington', 1732);"
251 | ]
252 | },
253 | {
254 | "cell_type": "code",
255 | "execution_count": 1,
256 | "metadata": {
257 | "collapsed": true,
258 | "slideshow": {
259 | "slide_type": "skip"
260 | }
261 | },
262 | "outputs": [],
263 | "source": [
264 | "import pandas as pd\n",
265 | "import numpy as np\n",
266 | "\n",
267 | "from pivottablejs import pivot_ui\n",
268 | "\n",
269 | "df = pd.read_csv(r'C:\\Users\\Stoyan\\Downloads\\ev3set-parts-inventory.csv')"
270 | ]
271 | },
272 | {
273 | "cell_type": "code",
274 | "execution_count": 2,
275 | "metadata": {
276 | "slideshow": {
277 | "slide_type": "slide"
278 | }
279 | },
280 | "outputs": [
281 | {
282 | "data": {
283 | "text/html": [
284 | "\n",
285 | "\n",
298 | "
\n",
299 | " \n",
300 | " \n",
301 | " | \n",
302 | " SetNumber | \n",
303 | " PartID | \n",
304 | " Quantity | \n",
305 | " Colour | \n",
306 | " Category | \n",
307 | " DesignID | \n",
308 | " PartName | \n",
309 | " ImageURL | \n",
310 | " SetCount | \n",
311 | "
\n",
312 | " \n",
313 | " \n",
314 | " \n",
315 | " 0 | \n",
316 | " 31313-1 | \n",
317 | " 4184286 | \n",
318 | " 4 | \n",
319 | " Black | \n",
320 | " System | \n",
321 | " 44309 | \n",
322 | " Tyre Normal Wide Ø43,2 X 22 | \n",
323 | " http://cache.lego.com/media/bricks/5/2/4184286... | \n",
324 | " 55 | \n",
325 | "
\n",
326 | " \n",
327 | " 1 | \n",
328 | " 31313-1 | \n",
329 | " 4246901 | \n",
330 | " 2 | \n",
331 | " Black | \n",
332 | " System | \n",
333 | " 50951 | \n",
334 | " Tyre Low Narrow Ø14.58 X 6.24 | \n",
335 | " http://cache.lego.com/media/bricks/5/2/4246901... | \n",
336 | " 130 | \n",
337 | "
\n",
338 | " \n",
339 | " 2 | \n",
340 | " 31313-1 | \n",
341 | " 4299389 | \n",
342 | " 4 | \n",
343 | " Black | \n",
344 | " System | \n",
345 | " 56145 | \n",
346 | " Rim Wide W.Cross 30/20 | \n",
347 | " http://cache.lego.com/media/bricks/5/2/4299389... | \n",
348 | " 59 | \n",
349 | "
\n",
350 | " \n",
351 | " 3 | \n",
352 | " 31313-1 | \n",
353 | " 4502834 | \n",
354 | " 2 | \n",
355 | " Black | \n",
356 | " System | \n",
357 | " 53992 | \n",
358 | " Caterpillar Track | \n",
359 | " http://cache.lego.com/media/bricks/5/2/4502834... | \n",
360 | " 11 | \n",
361 | "
\n",
362 | " \n",
363 | " 4 | \n",
364 | " 31313-1 | \n",
365 | " 370626 | \n",
366 | " 9 | \n",
367 | " Black | \n",
368 | " Technic | \n",
369 | " 3706 | \n",
370 | " Cross Axle 6M | \n",
371 | " http://cache.lego.com/media/bricks/5/2/370626.jpg | \n",
372 | " 761 | \n",
373 | "
\n",
374 | " \n",
375 | "
\n",
376 | "
"
377 | ],
378 | "text/plain": [
379 | " SetNumber PartID Quantity Colour Category DesignID \\\n",
380 | "0 31313-1 4184286 4 Black System 44309 \n",
381 | "1 31313-1 4246901 2 Black System 50951 \n",
382 | "2 31313-1 4299389 4 Black System 56145 \n",
383 | "3 31313-1 4502834 2 Black System 53992 \n",
384 | "4 31313-1 370626 9 Black Technic 3706 \n",
385 | "\n",
386 | " PartName \\\n",
387 | "0 Tyre Normal Wide Ø43,2 X 22 \n",
388 | "1 Tyre Low Narrow Ø14.58 X 6.24 \n",
389 | "2 Rim Wide W.Cross 30/20 \n",
390 | "3 Caterpillar Track \n",
391 | "4 Cross Axle 6M \n",
392 | "\n",
393 | " ImageURL SetCount \n",
394 | "0 http://cache.lego.com/media/bricks/5/2/4184286... 55 \n",
395 | "1 http://cache.lego.com/media/bricks/5/2/4246901... 130 \n",
396 | "2 http://cache.lego.com/media/bricks/5/2/4299389... 59 \n",
397 | "3 http://cache.lego.com/media/bricks/5/2/4502834... 11 \n",
398 | "4 http://cache.lego.com/media/bricks/5/2/370626.jpg 761 "
399 | ]
400 | },
401 | "execution_count": 2,
402 | "metadata": {},
403 | "output_type": "execute_result"
404 | }
405 | ],
406 | "source": [
407 | "df.head()"
408 | ]
409 | },
410 | {
411 | "cell_type": "code",
412 | "execution_count": 48,
413 | "metadata": {
414 | "collapsed": true
415 | },
416 | "outputs": [],
417 | "source": [
418 | "import requests\n",
419 | "import os\n",
420 | "\n",
421 | "root = r'C:\\work\\pyconau2017\\pyconau2017\\images\\parts'\n",
422 | "\n",
423 | "for row in df.itertuples():\n",
424 | " #print(row, type(row), dir(row))\n",
425 | " name = row.PartName.replace('Ø','').replace('°','').replace('/','-').replace(',','').replace('.','').replace(' ',' ').replace(' ','_')\n",
426 | " try:\n",
427 | " with open(os.path.join(root, '{0}.jpg'.format(name)), 'wb') as out:\n",
428 | " out.write(requests.get(row.ImageURL).content)\n",
429 | " except Exception as e:\n",
430 | " print(e.args[0], name)\n"
431 | ]
432 | },
433 | {
434 | "cell_type": "code",
435 | "execution_count": 50,
436 | "metadata": {},
437 | "outputs": [
438 | {
439 | "name": "stdout",
440 | "output_type": "stream",
441 | "text": [
442 | "Tyre_Normal_Wide_432_X_22 http://cache.lego.com/media/bricks/5/2/4184286.jpg\n",
443 | "Tyre_Low_Narrow_1458_X_624 http://cache.lego.com/media/bricks/5/2/4246901.jpg\n",
444 | "Rim_Wide_WCross_30-20 http://cache.lego.com/media/bricks/5/2/4299389.jpg\n",
445 | "Caterpillar_Track http://cache.lego.com/media/bricks/5/2/4502834.jpg\n",
446 | "Cross_Axle_6M http://cache.lego.com/media/bricks/5/2/370626.jpg\n",
447 | "Double_Angular_Beam_3X7_45 http://cache.lego.com/media/bricks/5/2/4111998.jpg\n",
448 | "Technic_Ang_Beam_4X2_90_Deg http://cache.lego.com/media/bricks/5/2/4120017.jpg\n",
449 | "Connector_Peg_W_Friction http://cache.lego.com/media/bricks/5/2/4121715.jpg\n",
450 | "Technic_Angular_Beam_4X4 http://cache.lego.com/media/bricks/5/2/4128593.jpg\n",
451 | "Technic_Angular_Beam_3X7 http://cache.lego.com/media/bricks/5/2/4140327.jpg\n",
452 | "Lt_Steering_Gear http://cache.lego.com/media/bricks/5/2/4141300.jpg\n",
453 | "Technic_5M_Beam http://cache.lego.com/media/bricks/5/2/4142135.jpg\n",
454 | "Technic_3M_Beam http://cache.lego.com/media/bricks/5/2/4142822.jpg\n",
455 | "Technic_Ang_Beam_3X5_90_Deg http://cache.lego.com/media/bricks/5/2/4142823.jpg\n",
456 | "Comb_Wheel http://cache.lego.com/media/bricks/5/2/4143187.jpg\n",
457 | "Double_Conical_Wheel_Z12_1M http://cache.lego.com/media/bricks/5/2/4177431.jpg\n",
458 | "Ball_With_Friction_Snap http://cache.lego.com/media/bricks/5/2/4184169.jpg\n",
459 | "Technic_Angular_Wheel http://cache.lego.com/media/bricks/5/2/4248204.jpg\n",
460 | "Double_Conical_Wheel_Z36 http://cache.lego.com/media/bricks/5/2/4255563.jpg\n",
461 | "Technic_7M_Beam http://cache.lego.com/media/bricks/5/2/4495935.jpg\n",
462 | "Technic_13M_Beam http://cache.lego.com/media/bricks/5/2/4522933.jpg\n",
463 | "Technic_15M_Beam http://cache.lego.com/media/bricks/5/2/4542573.jpg\n",
464 | "T-Beam_3X3_W-Hole_48 http://cache.lego.com/media/bricks/5/2/4552347.jpg\n",
465 | "Beam_3M_485_W_Fork http://cache.lego.com/media/bricks/5/2/4558692.jpg\n",
466 | "Track_Rod_6M http://cache.lego.com/media/bricks/5/2/4629921.jpg\n",
467 | "Technic_9M_Beam http://cache.lego.com/media/bricks/5/2/4645732.jpg\n",
468 | "Beam_1X2_W-Cross_And_Hole http://cache.lego.com/media/bricks/5/2/6006140.jpg\n",
469 | "Tyre_For_Wedge-Belt_Wheel http://cache.lego.com/media/bricks/5/2/6028041.jpg\n",
470 | "Double_Conical_Wheel_Z20_1M http://cache.lego.com/media/bricks/5/2/6093977.jpg\n",
471 | "Ev3_Cable_250_Mm http://cache.lego.com/media/bricks/4/2/6178438.jpg\n",
472 | "Ev3_Cable_350_Mm http://cache.lego.com/media/bricks/4/2/6178439.jpg\n",
473 | "Ev3_Cable_500_Mm http://cache.lego.com/media/bricks/4/2/6178448.jpg\n",
474 | "Shooter http://cache.lego.com/media/bricks/5/2/6024106.jpg\n",
475 | "Magasine_For_Balls_165 http://cache.lego.com/media/bricks/5/2/6024109.jpg\n",
476 | "3M_Connector_Peg http://cache.lego.com/media/bricks/5/2/4514554.jpg\n",
477 | "Conical_Wheel_Z12 http://cache.lego.com/media/bricks/5/2/4565452.jpg\n",
478 | "Krydsaksel_M-Stop_4M http://cache.lego.com/media/bricks/5/2/4666999.jpg\n",
479 | "Bevel_Gear_Z20 http://cache.lego.com/media/bricks/5/2/6031962.jpg\n",
480 | "ConnBush_WFric-Crossale http://cache.lego.com/media/bricks/5/2/4206482.jpg\n",
481 | "Connector_Peg_W_Friction_3M http://cache.lego.com/media/bricks/5/2/4514553.jpg\n",
482 | "V-Belt_24_-_Clear_Red http://cache.lego.com/media/bricks/5/2/4100396.jpg\n",
483 | "Technic_Cross_Block_2X1 http://cache.lego.com/media/bricks/5/2/4128594.jpg\n",
484 | "Double_Cross_Block http://cache.lego.com/media/bricks/5/2/4128598.jpg\n",
485 | "2M_Fric_Snap_W-Cross_Hole http://cache.lego.com/media/bricks/5/2/4140806.jpg\n",
486 | "2M_Cross_Axle_W_Groove http://cache.lego.com/media/bricks/5/2/4142865.jpg\n",
487 | "Technic_Cross_Block-Fork_2X2 http://cache.lego.com/media/bricks/5/2/4173975.jpg\n",
488 | "Cross_Blok_3M http://cache.lego.com/media/bricks/5/2/4175442.jpg\n",
489 | "Cross_Block_90 http://cache.lego.com/media/bricks/5/2/4188298.jpg\n",
490 | "Angle_Element_90_Degrees_[6] http://cache.lego.com/media/bricks/5/2/4189131.jpg\n",
491 | "Angle_Element_135_Deg_[4] http://cache.lego.com/media/bricks/5/2/4189936.jpg\n",
492 | "Bush_For_Cross_Axle http://cache.lego.com/media/bricks/5/2/4227155.jpg\n",
493 | "Angle_Element_180_Degrees_[2] http://cache.lego.com/media/bricks/5/2/4234429.jpg\n",
494 | "Angle_Element_0_Degrees_[1] http://cache.lego.com/media/bricks/5/2/4254606.jpg\n",
495 | "Cross_Axle_Extension_2M http://cache.lego.com/media/bricks/5/2/4513174.jpg\n",
496 | "Technic_11M_Beam http://cache.lego.com/media/bricks/5/2/4562805.jpg\n",
497 | "Bion_Eye http://cache.lego.com/media/bricks/5/2/4185661.jpg\n",
498 | "Ball_165 http://cache.lego.com/media/bricks/5/2/4545430.jpg\n",
499 | "1-2_Bush http://cache.lego.com/media/bricks/5/2/4239601.jpg\n",
500 | "Cross_Axle_8M_With_End_Stop http://cache.lego.com/media/bricks/5/2/4499858.jpg\n",
501 | "Cross_Axle_55_With_Stop_1M http://cache.lego.com/media/bricks/5/2/4508553.jpg\n",
502 | "Cross_Axle_4M_With_End_Stop http://cache.lego.com/media/bricks/5/2/6083620.jpg\n",
503 | "Gear_Wheel_Z24 http://cache.lego.com/media/bricks/5/2/6133119.jpg\n",
504 | "Ball_W_Cross_Axle http://cache.lego.com/media/bricks/5/2/4211375.jpg\n",
505 | "Catch_W_Cross_Hole http://cache.lego.com/media/bricks/5/2/4211553.jpg\n",
506 | "Technic_Lever_3M http://cache.lego.com/media/bricks/5/2/4211566.jpg\n",
507 | "Cross_Axle_5M http://cache.lego.com/media/bricks/5/2/4211639.jpg\n",
508 | "Hub_112_X_784 http://cache.lego.com/media/bricks/5/2/4211758.jpg\n",
509 | "Cross_Axle_7M http://cache.lego.com/media/bricks/5/2/4211805.jpg\n",
510 | "Connector_Peg http://cache.lego.com/media/bricks/5/2/4211807.jpg\n",
511 | "Cross_Axle_3M http://cache.lego.com/media/bricks/5/2/4211815.jpg\n",
512 | "Module_Bush http://cache.lego.com/media/bricks/5/2/4211888.jpg\n",
513 | "Beam_3_M_W-4_Snaps http://cache.lego.com/media/bricks/5/2/4225033.jpg\n",
514 | "Wedge-Belt_Wheel_24 http://cache.lego.com/media/bricks/5/2/4494222.jpg\n",
515 | "3-Branch_Cross_Axle_W-Cross_H http://cache.lego.com/media/bricks/5/2/4502595.jpg\n",
516 | "Cross_Axle_9M http://cache.lego.com/media/bricks/5/2/4535768.jpg\n",
517 | "Cross_Block_3X2 http://cache.lego.com/media/bricks/5/2/4538007.jpg\n",
518 | "Beam_Frame_5X7_485 http://cache.lego.com/media/bricks/5/2/4539880.jpg\n",
519 | "Beam_R_Frame_5X11_485 http://cache.lego.com/media/bricks/5/2/4540797.jpg\n",
520 | "Double_Bush_3M_49 http://cache.lego.com/media/bricks/5/2/4560175.jpg\n",
521 | "Cross_Block-Form_2X2X2 http://cache.lego.com/media/bricks/5/2/4630114.jpg\n",
522 | "Technic_Steering-Gear_3M http://cache.lego.com/media/bricks/5/2/6013936.jpg\n",
523 | "Ms_Ev3_Sensor_Colour http://cache.lego.com/media/bricks/5/2/6128869.jpg\n",
524 | "Ms-Ev3_Ir_Sensor http://cache.lego.com/media/bricks/5/2/6132629.jpg\n",
525 | "Ms_Ev3_Touch_Sensor http://cache.lego.com/media/bricks/5/2/6138404.jpg\n",
526 | "Ms-Ev3_Medium_Motor http://cache.lego.com/media/bricks/5/2/6148292.jpg\n",
527 | "Tube_W-_Double_485_Hole http://cache.lego.com/media/bricks/5/2/6173127.jpg\n",
528 | "Worm_Gear_2_Module_For_Gear_Wheel http://cache.lego.com/media/bricks/5/2/6185471.jpg\n",
529 | "Sword http://cache.lego.com/media/bricks/5/2/4657296.jpg\n",
530 | "Crossaxle_3M_With_Knob http://cache.lego.com/media/bricks/5/2/6031821.jpg\n",
531 | "Left_Panel_3X7 http://cache.lego.com/media/bricks/5/2/4547581.jpg\n",
532 | "Right_Panel_3X7 http://cache.lego.com/media/bricks/5/2/4547582.jpg\n",
533 | "Right_Panel_3X11 http://cache.lego.com/media/bricks/5/2/4558797.jpg\n",
534 | "Left_Panel_3X11 http://cache.lego.com/media/bricks/5/2/4558802.jpg\n",
535 | "Right_Screen_485_4X7X4 http://cache.lego.com/media/bricks/5/2/6015596.jpg\n",
536 | "Left_Screen_485_4X7X4 http://cache.lego.com/media/bricks/5/2/6015597.jpg\n",
537 | "Ms-Ev3_Ir_Beacon http://cache.lego.com/media/bricks/5/2/6127283.jpg\n",
538 | "Ms-Ev3_Large_Motor http://cache.lego.com/media/bricks/5/2/6148278.jpg\n",
539 | "Ms-Ev3_P-Brick http://cache.lego.com/media/bricks/5/2/6187080.jpg\n",
540 | "Bion_Eye http://cache.lego.com/media/bricks/5/2/4173941.jpg\n",
541 | "Blade_W_Technic_Hole_1 http://cache.lego.com/media/bricks/5/2/4656205.jpg\n"
542 | ]
543 | }
544 | ],
545 | "source": [
546 | "for row in df.itertuples():\n",
547 | " #print(row, type(row), dir(row))\n",
548 | " name = row.PartName.replace('Ø','').replace('°','').replace('/','-').replace(',','').replace('.','').replace(' ',' ').replace(' ','_')\n",
549 | " print(name, row.ImageURL)"
550 | ]
551 | },
552 | {
553 | "cell_type": "code",
554 | "execution_count": 49,
555 | "metadata": {
556 | "collapsed": true
557 | },
558 | "outputs": [],
559 | "source": [
560 | "names = []\n",
561 | "for row in df.itertuples():\n",
562 | " #print(row, type(row), dir(row))\n",
563 | " name = row.PartName.replace('Ø','').replace('°','').replace('/','-').replace(',','').replace('.','').replace(' ',' ').replace(' ','_')\n",
564 | " for i in range(0, row.Quantity):\n",
565 | " names.append(name)\n",
566 | "with open(os.path.join(root, 'parts.txt'), 'w') as out:\n",
567 | " out.write(' '.join(names))"
568 | ]
569 | },
570 | {
571 | "cell_type": "code",
572 | "execution_count": 3,
573 | "metadata": {
574 | "slideshow": {
575 | "slide_type": "subslide"
576 | }
577 | },
578 | "outputs": [
579 | {
580 | "data": {
581 | "text/html": [
582 | "\n",
583 | " \n",
590 | " "
591 | ],
592 | "text/plain": [
593 | ""
594 | ]
595 | },
596 | "execution_count": 3,
597 | "metadata": {},
598 | "output_type": "execute_result"
599 | }
600 | ],
601 | "source": [
602 | "pivot_ui(df)"
603 | ]
604 | },
605 | {
606 | "cell_type": "markdown",
607 | "metadata": {
608 | "slideshow": {
609 | "slide_type": "slide"
610 | }
611 | },
612 | "source": [
613 | ""
614 | ]
615 | },
616 | {
617 | "cell_type": "markdown",
618 | "metadata": {
619 | "slideshow": {
620 | "slide_type": "slide"
621 | }
622 | },
623 | "source": [
624 | "# Programming Lego Mindstorms with Python\n",
625 | "\n",
626 | "## Stoyan Shopov\n",
627 | "\n",
628 | "# \n",
629 | "\n",
630 | "# \n",
631 | " \n",
632 | "\n",
633 | ""
634 | ]
635 | },
636 | {
637 | "cell_type": "markdown",
638 | "metadata": {
639 | "slideshow": {
640 | "slide_type": "slide"
641 | }
642 | },
643 | "source": [
644 | "| | |\n",
645 | "| ------------- |:-------------:|\n",
646 | "| #Programming Lego Mindstorms with Python# |  |"
647 | ]
648 | },
649 | {
650 | "cell_type": "code",
651 | "execution_count": 58,
652 | "metadata": {},
653 | "outputs": [
654 | {
655 | "name": "stdout",
656 | "output_type": "stream",
657 | "text": [
658 | "100\n",
659 | "0 0 0\n",
660 | "1 0 50\n",
661 | "2 0 100\n",
662 | "3 0 150\n",
663 | "4 0 200\n",
664 | "5 0 250\n",
665 | "6 0 300\n",
666 | "7 0 350\n",
667 | "8 0 400\n",
668 | "9 0 450\n",
669 | "10 50 0\n",
670 | "11 50 50\n",
671 | "12 50 100\n",
672 | "13 50 150\n",
673 | "14 50 200\n",
674 | "15 50 250\n",
675 | "16 50 300\n",
676 | "17 50 350\n",
677 | "18 50 400\n",
678 | "19 50 450\n",
679 | "20 100 0\n",
680 | "21 100 50\n",
681 | "22 100 100\n",
682 | "23 100 150\n",
683 | "24 100 200\n",
684 | "25 100 250\n",
685 | "26 100 300\n",
686 | "27 100 350\n",
687 | "28 100 400\n",
688 | "29 100 450\n",
689 | "30 150 0\n",
690 | "31 150 50\n",
691 | "32 150 100\n",
692 | "33 150 150\n",
693 | "34 150 200\n",
694 | "35 150 250\n",
695 | "36 150 300\n",
696 | "37 150 350\n",
697 | "38 150 400\n",
698 | "39 150 450\n",
699 | "40 200 0\n",
700 | "41 200 50\n",
701 | "42 200 100\n",
702 | "43 200 150\n",
703 | "44 200 200\n",
704 | "45 200 250\n",
705 | "46 200 300\n",
706 | "47 200 350\n",
707 | "48 200 400\n",
708 | "49 200 450\n",
709 | "50 250 0\n",
710 | "51 250 50\n",
711 | "52 250 100\n",
712 | "53 250 150\n",
713 | "54 250 200\n",
714 | "55 250 250\n",
715 | "56 250 300\n",
716 | "57 250 350\n",
717 | "58 250 400\n",
718 | "59 250 450\n",
719 | "60 300 0\n",
720 | "61 300 50\n",
721 | "62 300 100\n",
722 | "63 300 150\n",
723 | "64 300 200\n",
724 | "65 300 250\n",
725 | "66 300 300\n",
726 | "67 300 350\n",
727 | "68 300 400\n",
728 | "69 300 450\n",
729 | "70 350 0\n",
730 | "71 350 50\n",
731 | "72 350 100\n",
732 | "73 350 150\n",
733 | "74 350 200\n",
734 | "75 350 250\n",
735 | "76 350 300\n",
736 | "77 350 350\n",
737 | "78 350 400\n",
738 | "79 350 450\n",
739 | "80 400 0\n",
740 | "81 400 50\n",
741 | "82 400 100\n",
742 | "83 400 150\n",
743 | "84 400 200\n",
744 | "85 400 250\n",
745 | "86 400 300\n",
746 | "87 400 350\n",
747 | "88 400 400\n",
748 | "89 400 450\n",
749 | "90 450 0\n",
750 | "91 450 50\n",
751 | "92 450 100\n",
752 | "93 450 150\n",
753 | "94 450 200\n",
754 | "95 450 250\n",
755 | "96 450 300\n",
756 | "97 450 350\n",
757 | "98 450 400\n",
758 | "99 450 450\n"
759 | ]
760 | }
761 | ],
762 | "source": [
763 | "import glob\n",
764 | "from PIL import Image\n",
765 | "\n",
766 | "#https://stackoverflow.com/questions/35438802/making-a-collage-in-pil\n",
767 | "'''im= Image.open('Tulips.jpg')\n",
768 | "\n",
769 | "out=im.convert(\"RGB\", (\n",
770 | " 0.412453, 0.357580, 0.180423, 0,\n",
771 | " 0.212671, 0.715160, 0.072169, 0,\n",
772 | " 0.019334, 0.119193, 0.950227, 0 ))\n",
773 | "out.save(\"Image2.jpg\")\n",
774 | "\n",
775 | "out2=im.convert(\"RGB\", (\n",
776 | " 0.9756324, 0.154789, 0.180423, 0,\n",
777 | " 0.212671, 0.715160, 0.254783, 0,\n",
778 | " 0.123456, 0.119193, 0.950227, 0 ))\n",
779 | "out2.save(\"Image3.jpg\")\n",
780 | "\n",
781 | "out3= im.convert(\"1\")\n",
782 | "out3.save(\"Image4.jpg\")\n",
783 | "\n",
784 | "out4=im.convert(\"RGB\", (\n",
785 | " 0.986542, 0.154789, 0.756231, 0,\n",
786 | " 0.212671, 0.715160, 0.254783, 0,\n",
787 | " 0.123456, 0.119193, 0.112348, 0 ))\n",
788 | "out4.save(\"Image5.jpg\")\n",
789 | "\n",
790 | "out5=Image.blend(im, out4, 0.5)\n",
791 | "out5.save(\"Image6.jpg\")'''\n",
792 | "\n",
793 | "listofimages=['Tulips.jpg', 'Image2.jpg', 'Image3.jpg', 'Image4.jpg', 'Image5.jpg', 'Image6.jpg']\n",
794 | "listofimages = glob.glob(r'C:\\work\\pyconau2017\\pyconau2017\\images\\parts\\*.jpg')\n",
795 | "print(len(listofimages))\n",
796 | "def create_collage(width, height, listofimages):\n",
797 | " cols = 10\n",
798 | " rows = 10\n",
799 | " thumbnail_width = width//cols\n",
800 | " thumbnail_height = height//rows\n",
801 | " size = thumbnail_width, thumbnail_height\n",
802 | " new_im = Image.new('RGB', (width, height))\n",
803 | " ims = []\n",
804 | " for p in listofimages:\n",
805 | " im = Image.open(p)\n",
806 | " im.thumbnail(size)\n",
807 | " ims.append(im)\n",
808 | " i = 0\n",
809 | " x = 0\n",
810 | " y = 0\n",
811 | " for col in range(cols):\n",
812 | " for row in range(rows):\n",
813 | " print(i, x, y)\n",
814 | " if i 0 and Leds.GREEN or Leds.RED)\n",
1093 | " else:\n",
1094 | " # Stop otherwise\n",
1095 | " motor.stop(stop_action='brake')\n",
1096 | " Leds.set(led_group, brightness_pct=0)\n",
1097 | "\n",
1098 | " return on_press\n",
1099 | "\n",
1100 | "# Assign event handler to each of the remote buttons\n",
1101 | "rc.on_red_up = roll(lmotor, Leds.LEFT, 1)\n",
1102 | "rc.on_red_down = roll(lmotor, Leds.LEFT, -1)\n",
1103 | "rc.on_blue_up = roll(rmotor, Leds.RIGHT, 1)\n",
1104 | "rc.on_blue_down = roll(rmotor, Leds.RIGHT, -1)\n",
1105 | "\n",
1106 | "# Enter event processing loop\n",
1107 | "#while not button.any(): #not working so commented out\n",
1108 | "while True: #replaces previous line so use Ctrl-C to exit\n",
1109 | " rc.process()\n",
1110 | " sleep(0.01)\n",
1111 | " \n",
1112 | "# Press Ctrl-C to exit"
1113 | ]
1114 | }
1115 | ],
1116 | "metadata": {
1117 | "celltoolbar": "Slideshow",
1118 | "kernelspec": {
1119 | "display_name": "Python 3",
1120 | "language": "python",
1121 | "name": "python3"
1122 | },
1123 | "language_info": {
1124 | "codemirror_mode": {
1125 | "name": "ipython",
1126 | "version": 3
1127 | },
1128 | "file_extension": ".py",
1129 | "mimetype": "text/x-python",
1130 | "name": "python",
1131 | "nbconvert_exporter": "python",
1132 | "pygments_lexer": "ipython3",
1133 | "version": "3.6.1"
1134 | }
1135 | },
1136 | "nbformat": 4,
1137 | "nbformat_minor": 1
1138 | }
1139 |
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | MIT License
2 |
3 | Copyright (c) 2017 Stoyan Shopov
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in all
13 | copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | SOFTWARE.
22 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # pyconau2017
2 |
3 | Notebook and code for the PyCon Australia 2017 presentation on programming Lego Mindstorms with Python.
4 |
5 | Start with final.ipynb and work your way through all the demoes.
--------------------------------------------------------------------------------
/beep.py:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env python3
2 |
3 | import os
4 | import time
5 |
6 | from ev3dev.ev3 import *
7 |
8 | Sound.beep()
--------------------------------------------------------------------------------
/color_sensor.py:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env python3
2 | # so that script can be run from Brickman
3 |
4 | from ev3dev.ev3 import *
5 |
6 | from time import sleep
7 |
8 |
9 | Sound.beep()
10 |
11 | cl = ColorSensor()
12 | ts = TouchSensor()
13 | cl.mode = 'COL-COLOR'
14 |
15 | colors = ('unknown black blue green yellow red white brown'.split())
16 |
17 | last_color = None
18 | while not ts.value():
19 | color = colors[cl.value()]
20 | if not last_color == color:
21 | Sound.speak(color).wait()
22 | last_color = color
23 | sleep(1)
24 |
25 | Sound.beep()
26 |
--------------------------------------------------------------------------------
/demo.py:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env python3
2 |
3 | '''
4 | Source name: demo.py
5 | Author(s): Stoyan Shopov
6 |
7 | Python Version: 3.* 32-bit or 64-bit
8 | License: LGPL
9 |
10 | Description:
11 | This program was demoed on EV3D4 at PyCon Australia 2017.
12 | It kicks off 2 threads a move thread and a feel thread.
13 | The move thread drives the bot forward until the feel thread
14 | detects an obstacle.
15 | Then the move thread makes the bot move around in a circle
16 | until the feel thread detects a touch on the touch sensor.
17 |
18 | Preconditions:
19 | The program has been loaded on to EV3 running ev3dev
20 |
21 | Postcoditions:
22 | Program exits cleanly.
23 |
24 | References:
25 | https://github.com/sshopov/pyconau2017
26 | https://github.com/rhempel/ev3dev-lang-python
27 |
28 | Release history:
29 | ----------------------------------------------------
30 | 0.0.1 - 06/08/2017:
31 | Initial release
32 | '''
33 |
34 | import sys
35 | import time
36 | import threading
37 | import signal
38 |
39 | from ev3dev import ev3
40 |
41 | def move(done):
42 | lm = ev3.LargeMotor('outB'); assert lm.connected
43 |
44 | rm = ev3.LargeMotor('outC'); assert rm.connected
45 |
46 | cl = ev3.ColorSensor(); assert cl.connected
47 | cl.mode='COL-AMBIENT'
48 |
49 | speed = 250 #cl.value()
50 |
51 | lm.run_forever(speed_sp=speed)
52 | rm.run_forever(speed_sp=speed)
53 |
54 | while not done.is_set():
55 | time.sleep(1)
56 |
57 | #stop both motors
58 | lm.stop(stop_action='brake')
59 | rm.stop(stop_action='brake')
60 | lm.wait_while('running')
61 | rm.wait_while('running')
62 |
63 | #run around in a circle
64 | done.clear()
65 | lm.run_forever(speed_sp=speed)
66 |
67 | while not done.is_set():
68 | time.sleep(1)
69 |
70 | lm.stop(stop_action='brake')
71 | lm.wait_while('running')
72 |
73 | def feel(done):
74 | ir = ev3.InfraredSensor(); assert ir.connected
75 | ts = ev3.TouchSensor(); assert ts.connected
76 |
77 | screen = ev3.Screen()
78 | sound = ev3.Sound()
79 |
80 | screen.draw.text((60,40), 'Going for a walk')
81 | screen.update()
82 |
83 | while ir.proximity > 30:
84 | if done.is_set():
85 | break
86 | time.sleep(0.1)
87 |
88 | done.set() #this will set it running in a circle
89 |
90 | ev3.Leds.set_color(ev3.Leds.LEFT, ev3.Leds.RED)
91 | ev3.Leds.set_color(ev3.Leds.RIGHT, ev3.Leds.RED)
92 |
93 | screen.clear()
94 | screen.draw.text((60,20), 'There is something is front of me')
95 | screen.update()
96 |
97 | while not ts.is_pressed:
98 | sound.speak("Where should I go next?").wait()
99 | time.sleep(0.5)
100 |
101 | done.set() #will stop the circle dance
102 |
103 | # The 'done' event will be used to signal the threads to stop:
104 | done = threading.Event()
105 |
106 | # We also need to catch SIGINT (keyboard interrup) and SIGTERM (termination
107 | # signal from brickman) and exit gracefully:
108 | def signal_handler(signal, frame):
109 | done.set()
110 |
111 | signal.signal(signal.SIGINT, signal_handler)
112 | signal.signal(signal.SIGTERM, signal_handler)
113 |
114 | # Now that we have the worker functions defined, lets run those in separate
115 | # threads.
116 | move_thread = threading.Thread(target=move, args=(done,))
117 | feel_thread = threading.Thread(target=feel, args=(done,))
118 |
119 | move_thread.start()
120 | feel_thread.start()
121 |
122 | # The main thread will wait for the 'back' button to be pressed. When that
123 | # happens, it will signal the worker threads to stop and wait for their completion.
124 | btn = ev3.Button()
125 | while not btn.backspace and not done.is_set():
126 | time.sleep(1)
127 |
128 | done.set()
129 | move_thread.join()
130 | feel_thread.join()
131 |
132 | ev3.Sound.speak('Farewell and good bye!').wait()
133 | ev3.Leds.all_off()
--------------------------------------------------------------------------------
/final.ipynb:
--------------------------------------------------------------------------------
1 | {
2 | "cells": [
3 | {
4 | "cell_type": "markdown",
5 | "metadata": {
6 | "slideshow": {
7 | "slide_type": "slide"
8 | }
9 | },
10 | "source": [
11 | "# Programming Lego Mindstorms with Python\n",
12 | "\n",
13 | "by\n",
14 | "\n",
15 | "## Stoyan Shopov (@hrastche)\n",
16 | "\n",
17 | "# \n",
18 | "\n",
19 | "from\n",
20 | "\n",
21 | "\n",
22 | "\n",
23 | ""
24 | ]
25 | },
26 | {
27 | "cell_type": "markdown",
28 | "metadata": {
29 | "slideshow": {
30 | "slide_type": "notes"
31 | }
32 | },
33 | "source": [
34 | "Welcome to Progamming Lego Mindstorms robots with Python.\n",
35 | "\n",
36 | "My name is Stoyan and I am a solution architect from Innodev. "
37 | ]
38 | },
39 | {
40 | "cell_type": "markdown",
41 | "metadata": {
42 | "slideshow": {
43 | "slide_type": "slide"
44 | }
45 | },
46 | "source": [
47 | ""
48 | ]
49 | },
50 | {
51 | "cell_type": "markdown",
52 | "metadata": {
53 | "slideshow": {
54 | "slide_type": "notes"
55 | }
56 | },
57 | "source": [
58 | "This is a story about how dreams come true. Ever since I remember I've wanted a robot of my own. I don't know how this idea got planted but I used to make robots out of toilet paper rolls, cigarette boxes I found on the street or yogurt containers. When I was a bit older I even joined the model maker club. \n",
59 | "\n",
60 | "Then life happened, the dream faded and it wasn't until my 7-year old son Hugo started showing interest in Lego that I thought it was time to revisit the dream. \n",
61 | "\n",
62 | "So I did some research on robotics kits. I was looking for: \n",
63 | "* an all in one kit, meaning I don't have to buy anything else to get going; \n",
64 | "* something open ended, meaning that there is room for imagination to build many models\n",
65 | "* a vibrant community with helpful resources \n",
66 | "* and of course it has to be programmable in Python. \n",
67 | "\n",
68 | "So early this year I got myself an expensive birthday present on behalf of the family and it was Lego Mindstorms. \n",
69 | "\n",
70 | "At this stage I would like to make the disclaimer that I am not sponsored by Lego in any way and check by a show of hands, who is already living the dream and playing with Mindstorms?\n",
71 | "Great! "
72 | ]
73 | },
74 | {
75 | "cell_type": "markdown",
76 | "metadata": {
77 | "slideshow": {
78 | "slide_type": "slide"
79 | }
80 | },
81 | "source": [
82 | ""
83 | ]
84 | },
85 | {
86 | "cell_type": "markdown",
87 | "metadata": {
88 | "slideshow": {
89 | "slide_type": "notes"
90 | }
91 | },
92 | "source": [
93 | "So I acted surprised when I unwrapped my present. We opened the box and this is what we found:"
94 | ]
95 | },
96 | {
97 | "cell_type": "markdown",
98 | "metadata": {
99 | "slideshow": {
100 | "slide_type": "slide"
101 | }
102 | },
103 | "source": [
104 | ""
105 | ]
106 | },
107 | {
108 | "cell_type": "markdown",
109 | "metadata": {
110 | "slideshow": {
111 | "slide_type": "notes"
112 | }
113 | },
114 | "source": [
115 | "Technic parts, controller brick, motors, sensors, cables and one set of build instructions. \n",
116 | "\n",
117 | "It may not look like much but it's amazing what you can build with the 601 pieces you get out of the box. \n",
118 | "\n",
119 | "The other good news is that you can mix it up with any of your existing Technic parts to make even bigger creations.\n",
120 | "\n",
121 | "And if you want more there are sites which would 3D print your custom Technic parts or sites which sell classic Lego to Technic connectors. "
122 | ]
123 | },
124 | {
125 | "cell_type": "markdown",
126 | "metadata": {
127 | "slideshow": {
128 | "slide_type": "skip"
129 | }
130 | },
131 | "source": [
132 | ""
133 | ]
134 | },
135 | {
136 | "cell_type": "markdown",
137 | "metadata": {
138 | "slideshow": {
139 | "slide_type": "slide"
140 | }
141 | },
142 | "source": [
143 | ""
144 | ]
145 | },
146 | {
147 | "cell_type": "markdown",
148 | "metadata": {
149 | "slideshow": {
150 | "slide_type": "notes"
151 | }
152 | },
153 | "source": [
154 | "All these parts actually have a name, so here they are in a word cloud based on total count per part. \n",
155 | "\n",
156 | "Then we went online and downloaded PDFs with more models to build. "
157 | ]
158 | },
159 | {
160 | "cell_type": "markdown",
161 | "metadata": {
162 | "slideshow": {
163 | "slide_type": "slide"
164 | }
165 | },
166 | "source": [
167 | " | | | |\n",
168 | "--- | --- | --- | ---\n",
169 | " |  |  |  \n",
170 | " |  |  |  \n",
171 | " |  |  | "
172 | ]
173 | },
174 | {
175 | "cell_type": "markdown",
176 | "metadata": {
177 | "slideshow": {
178 | "slide_type": "notes"
179 | }
180 | },
181 | "source": [
182 | "These are some of the models you can find on the official web page. \n",
183 | "\n",
184 | "There are many others contributed by the community. \n",
185 | "\n",
186 | "The models are a bit more difficult than standard Lego. The instructions range from 50 to 300 steps and it can take sometimes 6-8 hours for my son to build a model and he is pretty good at this. \n",
187 | "\n",
188 | "The ingenuity in them is facinating, especially how the motors drive the contraptions. It's a somewhat different way of thinking compared to writing software, but after awhile you get used to it and start seeing the patterns. \n",
189 | "\n",
190 | "For our very first model we chose to build the EV3STORM which is a rolling, skating, talking, shooting robot. The one on the top left. The kids called it Betty. "
191 | ]
192 | },
193 | {
194 | "cell_type": "markdown",
195 | "metadata": {
196 | "slideshow": {
197 | "slide_type": "slide"
198 | }
199 | },
200 | "source": [
201 | ""
202 | ]
203 | },
204 | {
205 | "cell_type": "markdown",
206 | "metadata": {
207 | "slideshow": {
208 | "slide_type": "skip"
209 | }
210 | },
211 | "source": [
212 | "\n",
213 | "Once we built Betty, we had to give her the gift of life by programming her. Officially to do this we had to download the Lego Mindstorms Porgammer iPad app, connect to the EV3 brick via Bluetooth, select the right program (or mission as they call it) and load it up. \n",
214 | "\n",
215 | "This shows the graphical programming language used to program Mindstorms. It's a LabVIEW dialect: you drag components from the toolbox to the canvas, connect and configure them, then save and upload. "
216 | ]
217 | },
218 | {
219 | "cell_type": "markdown",
220 | "metadata": {
221 | "slideshow": {
222 | "slide_type": "slide"
223 | }
224 | },
225 | "source": [
226 | "\n",
227 | "\n",
228 | "\n",
229 | "\n",
230 | ""
231 | ]
232 | },
233 | {
234 | "cell_type": "markdown",
235 | "metadata": {
236 | "slideshow": {
237 | "slide_type": "notes"
238 | }
239 | },
240 | "source": [
241 | "These are the tools available. \n",
242 | "\n",
243 | "There are actions to control the motors, steering, display, sound and light.\n",
244 | "\n",
245 | "There are flow control constructs such as start, wait, loops, switch and interrupt. \n",
246 | "\n",
247 | "Of course you can also control the sensors. \n",
248 | "\n",
249 | "As well as perform data and logic operations such as round, random, compare, write text, assign variables, etc. \n",
250 | "\n",
251 | "Finally there are advanced operations for file access, messaging, bluetooth access, access raw sensor values, start, stop and comment. \n",
252 | "\n",
253 | "So, why are we talking about LabVIEW at a Python conference?\n",
254 | "\n",
255 | "There are two reasons for this. \n",
256 | "\n",
257 | "1. These same interfaces are available through Python. \n",
258 | "\n",
259 | "2. It's good to understand LabVIEW so that you can read these programs and translate them into Python. In fact the .ev3 project files are just zip files and if you unzip them you'll find all the sounds, images and even an XML file which stores the logic. \n"
260 | ]
261 | },
262 | {
263 | "cell_type": "markdown",
264 | "metadata": {
265 | "slideshow": {
266 | "slide_type": "skip"
267 | }
268 | },
269 | "source": [
270 | "## .EV3 files\n",
271 | "\n",
272 | "\n",
273 | "* Lego Mindstorms LabVIEW projects have a .ev3 extension.\n",
274 | "\n",
275 | "* .ev3 files can be unzipped with 7-zip to a folder.\n",
276 | "\n",
277 | "* Within the zip are:\n",
278 | "\n",
279 | " * .x3a files\n",
280 | "\n",
281 | " * .laz is also a .zip file which contains assets such as images\n",
282 | "\n",
283 | " * .rgf\n",
284 | "\n",
285 | " * .rsf \n",
286 | "\n",
287 | " * .ev3p is an XML file which captures the program's logic\n",
288 | "\n",
289 | " * .lvprojx is an XML file "
290 | ]
291 | },
292 | {
293 | "cell_type": "markdown",
294 | "metadata": {
295 | "slideshow": {
296 | "slide_type": "notes"
297 | }
298 | },
299 | "source": [
300 | "So how do we get started with Python?\n",
301 | "For this you need ev3dev: the Debian Linux-based OS which can run on Lego Mindstorms compatible platforms. \n",
302 | "The EV3 brick runs Linux and has micro SD card slot for dual boot. "
303 | ]
304 | },
305 | {
306 | "cell_type": "markdown",
307 | "metadata": {
308 | "slideshow": {
309 | "slide_type": "slide"
310 | }
311 | },
312 | "source": [
313 | "# Getting started with ev3dev\n",
314 | "\n",
315 | "1. Buy an micro SD card (<32GB)\n",
316 | "2. Buy a wireless adapter (e.g. Edimax N150 USB Nano)\n",
317 | "3. Download the latest [ev3dev](http://www.ev3dev.org/docs/getting-started/) image file\n",
318 | "4. Flash the SD card with [Etcher](https://etcher.io/) (or equivalent)\n",
319 | "5. Boot ev3dev \n",
320 | "6. Set up a network connection\n",
321 | "7. Connect to the EV3 via SSH (e.g. [Bitvise SSH Client](https://www.bitvise.com/ssh-client) or [Pythonista with StaSh](https://github.com/Klabbedi/ev3))\n",
322 | "7. Write some code [Python | JavaScript | Java | Go | C | C++ | Ruby | Perl]"
323 | ]
324 | },
325 | {
326 | "cell_type": "markdown",
327 | "metadata": {
328 | "slideshow": {
329 | "slide_type": "slide"
330 | }
331 | },
332 | "source": [
333 | "# How to run Python scripts on EV3\n",
334 | "\n",
335 | "* Via SSH\n",
336 | " * Username: robot\n",
337 | " * Password: maker\n",
338 | "* Via Brickman\n",
339 | " * Files must start with the shebang: #!/usr/bin/env python3\n",
340 | " * chmod +x file to make it executable\n",
341 | " * Need Unix-style line endings otherwise the script just exits\n",
342 | " * Run [sed -i 's/\\r//g' file](http://python-ev3dev.readthedocs.io/en/latest/faq.html) to fix the line endings\n",
343 | " * Alternatively, write a .sh file to call the script: `python3 file`\n",
344 | "* Via [RPyC](http://python-ev3dev.readthedocs.io/en/latest/rpyc.html) in Jupyter notebooks"
345 | ]
346 | },
347 | {
348 | "cell_type": "markdown",
349 | "metadata": {
350 | "slideshow": {
351 | "slide_type": "slide"
352 | }
353 | },
354 | "source": [
355 | "# How to stop Python scripts on EV3\n",
356 | "\n",
357 | "* If running from an SSH prompt press Ctrl + C \n",
358 | "* If running via Brickman press and hold the backspace button\n",
359 | "* Worst case: take the batteries out"
360 | ]
361 | },
362 | {
363 | "cell_type": "markdown",
364 | "metadata": {
365 | "slideshow": {
366 | "slide_type": "slide"
367 | }
368 | },
369 | "source": [
370 | ""
371 | ]
372 | },
373 | {
374 | "cell_type": "markdown",
375 | "metadata": {
376 | "slideshow": {
377 | "slide_type": "notes"
378 | }
379 | },
380 | "source": [
381 | "So what can you do with Python? \n",
382 | "\n",
383 | "These are the things you can control. \n",
384 | "\n",
385 | "Let's look at them one at a time!"
386 | ]
387 | },
388 | {
389 | "cell_type": "markdown",
390 | "metadata": {
391 | "slideshow": {
392 | "slide_type": "slide"
393 | }
394 | },
395 | "source": [
396 | "# EV3 brick\n",
397 | "\n",
398 | "\n",
399 | "\n",
400 | " | |\n",
401 | ":--- | :--- | :--- \n",
402 | "LCD screen monochrome 178x128 pixels | Buttons (up, down, left, right, enter, backspace) |\n",
403 | "LEDs left and right with colors (red, green, amber, orange, yellow) | Speaker |\n",
404 | "1 micro SD card slot | 1 USB port |\n",
405 | "8 EV3 cable ports for motors and sensors | |"
406 | ]
407 | },
408 | {
409 | "cell_type": "code",
410 | "execution_count": null,
411 | "metadata": {
412 | "collapsed": true,
413 | "slideshow": {
414 | "slide_type": "slide"
415 | }
416 | },
417 | "outputs": [],
418 | "source": [
419 | "import sys\n",
420 | "import time\n",
421 | "import rpyc\n",
422 | "\n",
423 | "host = '192.168.198.70' #host name or IP address of the EV3\n",
424 | "\n",
425 | "try:\n",
426 | " conn = rpyc.classic.connect(host) \n",
427 | " ev3 = conn.modules['ev3dev.ev3'] #import ev3dev.ev3 remotely\n",
428 | "except:\n",
429 | " print(sys.exc_info()[1])\n",
430 | "finally:\n",
431 | " from ev3dev import ev3 #RPyC failed so we must be running on the EV3\n",
432 | " \n",
433 | "ev3.Sound.beep() #success!"
434 | ]
435 | },
436 | {
437 | "cell_type": "code",
438 | "execution_count": null,
439 | "metadata": {
440 | "slideshow": {
441 | "slide_type": "slide"
442 | }
443 | },
444 | "outputs": [],
445 | "source": [
446 | "#WORKING WITH SOUND:\n",
447 | "\n",
448 | "ev3.Sound.set_volume(100) #set volume to 100%\n",
449 | "\n",
450 | "ev3.Sound.beep().wait() #wait for the finish before continuing with the program\n",
451 | "\n",
452 | "ev3.Sound.tone(1000, 2000).wait() # play a single 1000Hz tone for 2 seconds\n",
453 | "\n",
454 | "#musical note to frequecy lookup: http://pages.mtu.edu/~suits/notefreqs.html\n",
455 | "G =(392, 500, 50) #( frequency in Hz, duration in ms, delay in ms)\n",
456 | "E = (329.63, 2000, 50)\n",
457 | "F = (349.23, 500, 50)\n",
458 | "D = (293.66, 2000, 50)\n",
459 | "ev3.Sound.tone([G, G, G, E, F, F, F, D]).wait() #Bethoven Symphony #5\n",
460 | "\n",
461 | "ev3.Sound.play_song((\n",
462 | " ('G4', 'e3'), ('G4', 'e3'), ('G4', 'e3'), ('E4', 'h'),\n",
463 | " ('F4', 'e3'), ('F4', 'e3'), ('F4', 'e3'), ('D4', 'h')))\n",
464 | "\n",
465 | "#use pydub to convert mp3 to wav\n",
466 | "ev3.Sound.play('sounds/r2d2.wav').wait() \n",
467 | "\n",
468 | "ev3.Sound.speak(\"Luke, I am your father\")"
469 | ]
470 | },
471 | {
472 | "cell_type": "code",
473 | "execution_count": null,
474 | "metadata": {
475 | "slideshow": {
476 | "slide_type": "subslide"
477 | }
478 | },
479 | "outputs": [],
480 | "source": [
481 | "# A long time ago in a galaxy far, far away\n",
482 | "ev3.Sound.play_song((\n",
483 | " ('D4', 'e3'), # intro anacrouse\n",
484 | " ('D4', 'e3'),\n",
485 | " ('D4', 'e3'),\n",
486 | " ('G4', 'h'), # meas 1\n",
487 | " ('D5', 'h'),\n",
488 | " ('C5', 'e3'), # meas 2\n",
489 | " ('B4', 'e3'),\n",
490 | " ('A4', 'e3'),\n",
491 | " ('G5', 'h'),\n",
492 | " ('D5', 'q'),\n",
493 | " ('C5', 'e3'), # meas 3\n",
494 | " ('B4', 'e3'),\n",
495 | " ('A4', 'e3'),\n",
496 | " ('G5', 'h'),\n",
497 | " ('D5', 'q'),\n",
498 | " ('C5', 'e3'), # meas 4\n",
499 | " ('B4', 'e3'),\n",
500 | " ('C5', 'e3'),\n",
501 | " ('A4', 'h.')\n",
502 | "))"
503 | ]
504 | },
505 | {
506 | "cell_type": "code",
507 | "execution_count": null,
508 | "metadata": {
509 | "collapsed": true,
510 | "slideshow": {
511 | "slide_type": "slide"
512 | }
513 | },
514 | "outputs": [],
515 | "source": [
516 | "#WORKING WITH LEDs:\n",
517 | "\n",
518 | "#configure the settings for the left LEDs\n",
519 | "ev3.Leds.set(ev3.Leds.LEFT, brightness_pct=0.5, trigger='timer') #check ev3.Leds.triggers for options\n",
520 | "ev3.Leds.set(ev3.Leds.LEFT, delay_on=3000, delay_off=500)\n",
521 | "\n",
522 | "#possible colors are RED, GREEN, AMBER, ORGANGE, YELLOW\n",
523 | "ev3.Leds.set_color(ev3.Leds.LEFT, ev3.Leds.RED)\n",
524 | "\n",
525 | "#set the right LEDs to green at 100% brightness\n",
526 | "ev3.Leds.set_color(ev3.Leds.RIGHT, ev3.Leds.GREEN, pct=100) \n",
527 | " \n",
528 | "ev3.Leds.all_off()"
529 | ]
530 | },
531 | {
532 | "cell_type": "code",
533 | "execution_count": null,
534 | "metadata": {
535 | "slideshow": {
536 | "slide_type": "slide"
537 | }
538 | },
539 | "outputs": [],
540 | "source": [
541 | "#WORKING WITH BUTTONS:\n",
542 | "\n",
543 | "btn = ev3.Button()\n",
544 | "\n",
545 | "say = lambda sentence: ev3.Sound.speak(sentence)\n",
546 | "\n",
547 | "def left(state):\n",
548 | " say('Left button {0}'.format('pressed' if state else 'released'))\n",
549 | " \n",
550 | "def right(state):\n",
551 | " say('Right button {0}'.format('pressed' if state else 'released'))\n",
552 | " \n",
553 | "def up(state):\n",
554 | " say('Up button {0}'.format('pressed' if state else 'released'))\n",
555 | " \n",
556 | "def down(state):\n",
557 | " say('Down button {0}'.format('pressed' if state else 'released'))\n",
558 | " \n",
559 | "def enter(state):\n",
560 | " say('Enter button {0}'.format('pressed' if state else 'released'))\n",
561 | " \n",
562 | "def backspace(state):\n",
563 | " say('Backspace button {0}'.format('pressed' if state else 'released'))"
564 | ]
565 | },
566 | {
567 | "cell_type": "code",
568 | "execution_count": null,
569 | "metadata": {
570 | "slideshow": {
571 | "slide_type": "slide"
572 | }
573 | },
574 | "outputs": [],
575 | "source": [
576 | "#WORKING WITH BUTTONS (continued): \n",
577 | "\n",
578 | "btn.on_left = left\n",
579 | "btn.on_right = right\n",
580 | "btn.on_up = up\n",
581 | "btn.on_down = down\n",
582 | "btn.on_enter = enter\n",
583 | "btn.on_backspace = backspace\n",
584 | "\n",
585 | "while True:\n",
586 | " #Check for currenly pressed buttons. \n",
587 | " #If the new state differs from the old state, \n",
588 | " #call the appropriate button event handlers.\n",
589 | " btn.process() \n",
590 | " \n",
591 | " #exit if both the left and right buttons are pressed simultaneously\n",
592 | " if btn.check_buttons(buttons=['left','right']):\n",
593 | " break\n",
594 | " time.sleep(0.1) "
595 | ]
596 | },
597 | {
598 | "cell_type": "code",
599 | "execution_count": null,
600 | "metadata": {
601 | "scrolled": true,
602 | "slideshow": {
603 | "slide_type": "slide"
604 | }
605 | },
606 | "outputs": [],
607 | "source": [
608 | "#WORKING WITH SCREEN:\n",
609 | "\n",
610 | "#run change foreground virtual terminal (chvt) command to get exclusive use of the screen\n",
611 | "!sudo chvt 6\n",
612 | "\n",
613 | "from PIL import Image, ImageDraw, ImageFont\n",
614 | "\n",
615 | "screen = ev3.Screen()\n",
616 | "screen.clear()\n",
617 | "\n",
618 | "#(0, 0) is top left and (177, 127) is bottom right coordinates\n",
619 | "screen.draw.text((60,40), 'Help me Obi Wan Kenobi!', font=ImageFont.load('ncenB24'))\n",
620 | "screen.update()\n",
621 | "\n",
622 | "time.sleep(5)\n",
623 | "\n",
624 | "logo = Image.open('/home/robot/images/tree.bmp')\n",
625 | "screen.image.paste(logo, (0,0))\n",
626 | "screen.update()\n",
627 | "\n",
628 | "time.sleep(5)\n"
629 | ]
630 | },
631 | {
632 | "cell_type": "code",
633 | "execution_count": null,
634 | "metadata": {
635 | "slideshow": {
636 | "slide_type": "slide"
637 | }
638 | },
639 | "outputs": [],
640 | "source": [
641 | "#WORKING WITH SCREEN (continued):\n",
642 | "\n",
643 | "screen.clear()\n",
644 | "\n",
645 | "width, height = screen.shape\n",
646 | "#screen.draw returns PIL.ImageDraw instance\n",
647 | "screen.draw.line((0, 0, width, height), fill='black') #diagonal from top left to bottom right\n",
648 | "screen.draw.line((0, height, width, 0), fill='black') #diagonal from bottom left to top right\n",
649 | "screen.update()\n",
650 | "\n",
651 | "time.sleep(5)\n",
652 | "\n",
653 | "screen.draw.rectangle((0, 0, 177, 127), fill='black')\n",
654 | "screen.update()\n",
655 | "\n",
656 | "time.sleep(5)\n",
657 | "\n",
658 | "#there are also: arc, ellipse, pieslice, point, polygon, ... all the PIL/Pillow goodness\n",
659 | "\n",
660 | "#release screen\n",
661 | "!sudo chvt 1"
662 | ]
663 | },
664 | {
665 | "cell_type": "markdown",
666 | "metadata": {
667 | "slideshow": {
668 | "slide_type": "slide"
669 | }
670 | },
671 | "source": [
672 | "# Touch sensor\n",
673 | "\n",
674 | ""
675 | ]
676 | },
677 | {
678 | "cell_type": "code",
679 | "execution_count": null,
680 | "metadata": {
681 | "collapsed": true,
682 | "slideshow": {
683 | "slide_type": "slide"
684 | }
685 | },
686 | "outputs": [],
687 | "source": [
688 | "#WORKING WITH TOUCH SENSOR:\n",
689 | "\n",
690 | "ts = ev3.TouchSensor()\n",
691 | "assert ts.connected\n",
692 | "\n",
693 | "while not ts.is_pressed:\n",
694 | " time.sleep(0.5)"
695 | ]
696 | },
697 | {
698 | "cell_type": "markdown",
699 | "metadata": {
700 | "slideshow": {
701 | "slide_type": "slide"
702 | }
703 | },
704 | "source": [
705 | "# Color sensor\n",
706 | "\n",
707 | ""
708 | ]
709 | },
710 | {
711 | "cell_type": "code",
712 | "execution_count": null,
713 | "metadata": {
714 | "collapsed": true,
715 | "slideshow": {
716 | "slide_type": "slide"
717 | }
718 | },
719 | "outputs": [],
720 | "source": [
721 | "#WORKING TO COLOR SENSOR:\n",
722 | "\n",
723 | "ts = ev3.TouchSensor()\n",
724 | "\n",
725 | "cl = ev3.ColorSensor()\n",
726 | "cl.mode = 'COL-COLOR' #returns an integer [0,7]\n",
727 | "#cl.mode='COL-REFLECT' #measures reflected light intensity and returns an integer [0,100]\n",
728 | "#cl.mode='COL-AMBIENT' #measures ambient light intensity and returns an integer [0,100]\n",
729 | "#cl.mode='RGB-RAW' #returns RGB tuple ([0,1020], [0,1020], [0,1020])\n",
730 | "\n",
731 | "colors = ('unknown black blue green yellow red white brown'.split())\n",
732 | "\n",
733 | "while not ts.value():\n",
734 | " ev3.Sound.speak(colors[cl.value()]).wait()\n",
735 | " time.sleep(1)"
736 | ]
737 | },
738 | {
739 | "cell_type": "markdown",
740 | "metadata": {
741 | "slideshow": {
742 | "slide_type": "slide"
743 | }
744 | },
745 | "source": [
746 | "# Infrared sensor\n",
747 | "\n",
748 | ""
749 | ]
750 | },
751 | {
752 | "cell_type": "code",
753 | "execution_count": null,
754 | "metadata": {
755 | "slideshow": {
756 | "slide_type": "slide"
757 | }
758 | },
759 | "outputs": [],
760 | "source": [
761 | "#WORKING WITH INFRARED SENSOR:\n",
762 | "\n",
763 | "ir = ev3.InfraredSensor()\n",
764 | "ir.mode = 'IR-PROX'\n",
765 | "#A measurement of the distance between the sensor and the remote, as a percentage. \n",
766 | "#100% is approximately 70cm\n",
767 | "\n",
768 | "lm = ev3.LargeMotor('outB')\n",
769 | "rm = ev3.LargeMotor('outC')\n",
770 | "\n",
771 | "lm.run_forever(speed_sp=360)\n",
772 | "rm.run_forever(speed_sp=360)\n",
773 | "\n",
774 | "while True:\n",
775 | " if ir.proximity < 10: #or ir.value()\n",
776 | " lm.stop(stop_action='brake')\n",
777 | " rm.stop(stop_action='brake')\n",
778 | " break\n",
779 | " time.sleep(0.1)"
780 | ]
781 | },
782 | {
783 | "cell_type": "markdown",
784 | "metadata": {
785 | "slideshow": {
786 | "slide_type": "slide"
787 | }
788 | },
789 | "source": [
790 | "# Remote control\n",
791 | "\n",
792 | ""
793 | ]
794 | },
795 | {
796 | "cell_type": "code",
797 | "execution_count": null,
798 | "metadata": {
799 | "slideshow": {
800 | "slide_type": "slide"
801 | }
802 | },
803 | "outputs": [],
804 | "source": [
805 | "#WORKING WITH REMOTE CONTROL:\n",
806 | "\n",
807 | "remote1 = ev3.RemoteControl(channel=1) \n",
808 | "remote2 = ev3.RemoteControl(channel=2)\n",
809 | "\n",
810 | "say = lambda sentence: ev3.Sound.speak(sentence)\n",
811 | "\n",
812 | "remote1.on_red_up = lambda x: say(\"Red up pressed\")\n",
813 | "remote1.on_red_down = lambda x: say(\"Red down pressed\")\n",
814 | "remote1.on_blue_up = lambda x: say(\"Blue up pressed\")\n",
815 | "remote1.on_blue_down = lambda x: say(\"Blue up pressed\")\n",
816 | "\n",
817 | "remote2.on_red_up = sys.exit\n",
818 | "remote2.on_red_down = sys.exit\n",
819 | "remote2.on_blue_up = sys.exit\n",
820 | "remote2.on_blue_down = sys.exit\n",
821 | "\n",
822 | "while True:\n",
823 | " remote1.process()\n",
824 | " remote2.process()\n",
825 | " time.sleep(0.01)"
826 | ]
827 | },
828 | {
829 | "cell_type": "markdown",
830 | "metadata": {
831 | "slideshow": {
832 | "slide_type": "notes"
833 | }
834 | },
835 | "source": [
836 | "There are also remote1.beacon event and ev3.BeaconSeaker class related to the IR and remote control"
837 | ]
838 | },
839 | {
840 | "cell_type": "markdown",
841 | "metadata": {
842 | "slideshow": {
843 | "slide_type": "slide"
844 | }
845 | },
846 | "source": [
847 | "# Large motors\n",
848 | "\n",
849 | ""
850 | ]
851 | },
852 | {
853 | "cell_type": "code",
854 | "execution_count": null,
855 | "metadata": {
856 | "slideshow": {
857 | "slide_type": "slide"
858 | }
859 | },
860 | "outputs": [],
861 | "source": [
862 | "# WORKING WITH LARGE MOTORS:\n",
863 | "\n",
864 | "m = ev3.LargeMotor('outB')\n",
865 | "\n",
866 | "print(m.count_per_m) #number of tacho counts in one meter of travel of the motor\n",
867 | "print(m.count_per_rot) #number of tacho counts in one rotation of the motor\n",
868 | "#guideline: 1 tacho count = 1 degree, so speed of 360 = 1 revolution per second\n",
869 | "\n",
870 | "#speed_sp is in tacho counts, recommended range is [-1000, 1000]\n",
871 | "#stop_action in [break, hold, coast]\n",
872 | "m.run_timed(time_sp=5000, speed_sp=250, stop_action=\"hold\")\n",
873 | "\n",
874 | "m.wait_while('running') #wait for the motor to stop moving\n",
875 | "\n",
876 | "m.run_timed(time_sp=5000, speed_sp=-250, stop_action=\"coast\") #go back to initial position"
877 | ]
878 | },
879 | {
880 | "cell_type": "markdown",
881 | "metadata": {
882 | "slideshow": {
883 | "slide_type": "notes"
884 | }
885 | },
886 | "source": [
887 | "[motors reference](http://python-ev3dev.readthedocs.io/en/latest/motors.html#tacho-motor)\n",
888 | "\n",
889 | "STOP_ACTION_BRAKE = 'brake'\n",
890 | "Power will be removed from the motor and a passive electrical load will be placed on the motor. This is usually done by shorting the motor terminals together. This load will absorb the energy from the rotation of the motors and cause the motor to stop more quickly than coasting.\n",
891 | "\n",
892 | "STOP_ACTION_COAST = 'coast'\n",
893 | "Power will be removed from the motor and it will freely coast to a stop.\n",
894 | "\n",
895 | "STOP_ACTION_HOLD = 'hold'\n",
896 | "Does not remove power from the motor. Instead it actively try to hold the motor at the current position. If an external force tries to turn the motor, the motor will push back to maintain its position."
897 | ]
898 | },
899 | {
900 | "cell_type": "markdown",
901 | "metadata": {
902 | "slideshow": {
903 | "slide_type": "slide"
904 | }
905 | },
906 | "source": [
907 | "# Medium motor\n",
908 | "\n",
909 | ""
910 | ]
911 | },
912 | {
913 | "cell_type": "code",
914 | "execution_count": null,
915 | "metadata": {
916 | "collapsed": true,
917 | "slideshow": {
918 | "slide_type": "slide"
919 | }
920 | },
921 | "outputs": [],
922 | "source": [
923 | "#WORKING WITH MEDIUM MOTOR:\n",
924 | "\n",
925 | "mm = ev3.MediumMotor()\n",
926 | "\n",
927 | "#shoot a ball in the specified direction\n",
928 | "#speed_sp recommended range is [-1400, 1400]\n",
929 | "\n",
930 | "mm.run_to_rel_pos(speed_sp=900, position_sp=-1080)\n",
931 | "\n",
932 | "while 'running' in mm.state:\n",
933 | " time.sleep(0.1)"
934 | ]
935 | },
936 | {
937 | "cell_type": "markdown",
938 | "metadata": {
939 | "slideshow": {
940 | "slide_type": "notes"
941 | }
942 | },
943 | "source": [
944 | "The medium motor has the same attributes and methods as the large motors. It is less powerful but faster and more precise, thus its speed_sp range is higher [-1400, 1400] "
945 | ]
946 | },
947 | {
948 | "cell_type": "markdown",
949 | "metadata": {
950 | "slideshow": {
951 | "slide_type": "slide"
952 | }
953 | },
954 | "source": [
955 | "# Putting it all together: EV3D4\n",
956 | "\n",
957 | ""
958 | ]
959 | },
960 | {
961 | "cell_type": "code",
962 | "execution_count": null,
963 | "metadata": {
964 | "slideshow": {
965 | "slide_type": "slide"
966 | }
967 | },
968 | "outputs": [],
969 | "source": [
970 | "import sys\n",
971 | "import time\n",
972 | "import threading\n",
973 | "import signal \n",
974 | "\n",
975 | "import rpyc\n",
976 | "\n",
977 | "host = '192.168.1.4' \n",
978 | "\n",
979 | "conn = rpyc.classic.connect(host) \n",
980 | "ev3 = conn.modules['ev3dev.ev3'] \n",
981 | "\n",
982 | "ev3.Sound.beep()\n",
983 | "\n",
984 | "#The 'done' event will be used to signal the threads to stop:\n",
985 | "done = threading.Event()"
986 | ]
987 | },
988 | {
989 | "cell_type": "code",
990 | "execution_count": null,
991 | "metadata": {
992 | "slideshow": {
993 | "slide_type": "slide"
994 | }
995 | },
996 | "outputs": [],
997 | "source": [
998 | "def move(done):\n",
999 | " lm = ev3.LargeMotor('outB'); assert lm.connected\n",
1000 | " \n",
1001 | " rm = ev3.LargeMotor('outC'); assert rm.connected\n",
1002 | " \n",
1003 | " cl = ev3.ColorSensor(); assert cl.connected\n",
1004 | " cl.mode='COL-AMBIENT'\n",
1005 | " \n",
1006 | " speed = -250 #cl.value() is too low\n",
1007 | "\n",
1008 | " lm.run_forever(speed_sp=speed)\n",
1009 | " rm.run_forever(speed_sp=speed)\n",
1010 | "\n",
1011 | " while not done.is_set():\n",
1012 | " time.sleep(1) \n",
1013 | " \n",
1014 | " #stop both motors\n",
1015 | " lm.stop(stop_action='brake')\n",
1016 | " rm.stop(stop_action='brake')\n",
1017 | " lm.wait_while('running')\n",
1018 | " rm.wait_while('running')\n",
1019 | " \n",
1020 | " #run around in a circle\n",
1021 | " done.clear()\n",
1022 | " lm.run_forever(speed_sp=speed)\n",
1023 | " \n",
1024 | " while not done.is_set():\n",
1025 | " time.sleep(1)\n",
1026 | " \n",
1027 | " lm.stop(stop_action='brake')\n",
1028 | " lm.wait_while('running')"
1029 | ]
1030 | },
1031 | {
1032 | "cell_type": "code",
1033 | "execution_count": null,
1034 | "metadata": {
1035 | "collapsed": true,
1036 | "slideshow": {
1037 | "slide_type": "slide"
1038 | }
1039 | },
1040 | "outputs": [],
1041 | "source": [
1042 | "def feel(done):\n",
1043 | " ir = ev3.InfraredSensor(); assert ir.connected\n",
1044 | " ts = ev3.TouchSensor(); assert ts.connected\n",
1045 | "\n",
1046 | " screen = ev3.Screen()\n",
1047 | " sound = ev3.Sound()\n",
1048 | "\n",
1049 | " screen.draw.text((60,40), 'Going for a walk')\n",
1050 | " screen.update()\n",
1051 | "\n",
1052 | " while ir.proximity > 30:\n",
1053 | " if done.is_set(): \n",
1054 | " break\n",
1055 | " time.sleep(0.1)\n",
1056 | "\n",
1057 | " done.set() #this will set it running in a circle\n",
1058 | " \n",
1059 | " ev3.Leds.set_color(ev3.Leds.LEFT, ev3.Leds.RED)\n",
1060 | " ev3.Leds.set_color(ev3.Leds.RIGHT, ev3.Leds.RED)\n",
1061 | " \n",
1062 | " screen.clear()\n",
1063 | " screen.draw.text((60,20), 'There is something is front of me')\n",
1064 | " screen.update()\n",
1065 | " \n",
1066 | " while not ts.is_pressed:\n",
1067 | " sound.speak(\"Where should I go next?\").wait()\n",
1068 | " time.sleep(0.5)\n",
1069 | " \n",
1070 | " done.set() #will stop the circle dance"
1071 | ]
1072 | },
1073 | {
1074 | "cell_type": "code",
1075 | "execution_count": null,
1076 | "metadata": {
1077 | "slideshow": {
1078 | "slide_type": "slide"
1079 | }
1080 | },
1081 | "outputs": [],
1082 | "source": [
1083 | "# We also need to catch SIGINT (keyboard interrup) and SIGTERM (termination\n",
1084 | "# signal from brickman) and exit gracefully:\n",
1085 | "def signal_handler(signal, frame):\n",
1086 | " done.set()\n",
1087 | "\n",
1088 | "signal.signal(signal.SIGINT, signal_handler)\n",
1089 | "signal.signal(signal.SIGTERM, signal_handler)\n",
1090 | "\n",
1091 | "# Now that we have the worker functions defined, lets run those in separate\n",
1092 | "# threads.\n",
1093 | "move_thread = threading.Thread(target=move, args=(done,))\n",
1094 | "feel_thread = threading.Thread(target=feel, args=(done,))\n",
1095 | "\n",
1096 | "move_thread.start()\n",
1097 | "feel_thread.start()\n",
1098 | "\n",
1099 | "# The main thread will wait for the 'back' button to be pressed. When that\n",
1100 | "# happens, it will signal the worker threads to stop and wait for their completion.\n",
1101 | "btn = ev3.Button()\n",
1102 | "while not btn.backspace and not done.is_set():\n",
1103 | " time.sleep(1)\n",
1104 | "\n",
1105 | "done.set()\n",
1106 | "move_thread.join()\n",
1107 | "feel_thread.join() \n",
1108 | "\n",
1109 | "ev3.Sound.speak('Farewell and good bye!').wait()\n",
1110 | "ev3.Leds.all_off() "
1111 | ]
1112 | },
1113 | {
1114 | "cell_type": "markdown",
1115 | "metadata": {
1116 | "slideshow": {
1117 | "slide_type": "slide"
1118 | }
1119 | },
1120 | "source": [
1121 | "## Resources\n",
1122 | "\n",
1123 | "* [Lego Mindstorms: official site](https://www.lego.com/en-us/mindstorms)\n",
1124 | "* [ev3dev official site](http://www.ev3dev.org)\n",
1125 | "* [Python ev3dev repository](https://github.com/rhempel/ev3dev-lang-python)\n",
1126 | "* [ev3python: unoffical documentation](http://ev3python.com)\n",
1127 | "* [Build a PID controlled line following robot with ev3dev and Pythonista](https://github.com/Klabbedi/ev3)\n",
1128 | "* [Supported third party sensors](http://docs.ev3dev.org/projects/lego-linux-drivers/en/ev3dev-jessie/sensor_data.html#) and [BrickPi](https://www.dexterindustries.com/brickpi/)\n",
1129 | "* This presentation: [https://github.com/sshopov/pyconau2017](https://github.com/sshopov/pyconau2017)\n",
1130 | "* [Books:](https://www.safaribooksonline.com/search/?query=mindstorms)\n",
1131 | "\n",
1132 | "\n",
1133 | " | | | |\n",
1134 | "--- | --- | --- | ---\n",
1135 | " |  |  |  |  | ...\n"
1136 | ]
1137 | },
1138 | {
1139 | "cell_type": "markdown",
1140 | "metadata": {
1141 | "slideshow": {
1142 | "slide_type": "subslide"
1143 | }
1144 | },
1145 | "source": [
1146 | "## Cool NXT/EV3 Mindstorms videos on YouTube\n",
1147 | "### in no particular order\n",
1148 | "\n",
1149 | "https://www.youtube.com/watch?v=HZ_0qk7Yd7A pixy camera for lego http://charmedlabs.com/default/pixy-lego/\n",
1150 | " http://www.tribotix.com/Products/CharmedLabs/CharmedLabs.htm\n",
1151 | "vision command lego cam +vision recognition sudoku solver https://www.youtube.com/watch?v=Mp8Y2yjV4fU \n",
1152 | "https://www.youtube.com/watch?v=gA-zX3Tcjh0 vision \n",
1153 | "dragster https://www.youtube.com/watch?v=7v-anhPAAVw \n",
1154 | "helicopter https://www.youtube.com/watch?v=Oq4vm5Wq2-Y\n",
1155 | "shooter https://www.youtube.com/watch?v=l7O1dVTMHyA\n",
1156 | "space elevator https://www.youtube.com/watch?v=g2xDFeCnaOY\n",
1157 | "paper plane folding machine https://www.youtube.com/watch?v=brQMq8Vz4QA \n",
1158 | "egg decorating robot https://www.youtube.com/watch?v=aQru5c6GwFs http://jkbrickworks.com/ev3-egg-decorator/ \n",
1159 | "rock paper scisors https://www.youtube.com/watch?v=5Rmd5M5ATcU \n",
1160 | "3d printer lego house builder https://www.youtube.com/watch?v=Sjix76QjtMU \n",
1161 | "automated toilet https://www.youtube.com/watch?v=62YnuPKkdws \n",
1162 | "simon sings music game https://www.youtube.com/watch?v=DFx8u8hV0-Y\n",
1163 | "https://www.youtube.com/watch?v=dHmgaLgFRGM printer \n",
1164 | "spirograph https://www.youtube.com/watch?v=1Ihjh_F7jn0 \n",
1165 | "http://jkbrickworks.com/ \n",
1166 | "robotilus.com forklift slots bot ai dragster tic tac toe card shuffler\n",
1167 | "toilet paper challenge https://www.youtube.com/watch?v=urdHZAZ0brM \n",
1168 | "rally car https://www.youtube.com/watch?v=uYygy5tTT0s \n",
1169 | "autonomous car https://www.youtube.com/watch?v=zEou8mtcxhU \n",
1170 | "pencil sharpener https://www.youtube.com/watch?v=-ozR2q1LxN0\n",
1171 | "logalas pringles vending machine https://www.youtube.com/channel/UCtfEIPhzdWCz7MEiiOMLS0w \n",
1172 | "clever car https://www.youtube.com/watch?v=kAvduVtT748 \n",
1173 | "outlander https://www.youtube.com/watch?v=znHbTL6Oxhg\n",
1174 | "truck https://www.youtube.com/watch?v=2s9C-2m7m_w\n",
1175 | "bike https://www.youtube.com/watch?v=2YtpPu-SI5M\n",
1176 | "dancing robot https://www.youtube.com/watch?v=8H6ldqkI3uM http://arthursacek.com/lego-danc3r \n",
1177 | "elephant https://www.youtube.com/watch?v=oYJCaeYTWnw \n",
1178 | "trex https://www.youtube.com/watch?v=rgTDLO8i8cQ \n",
1179 | "drover dog https://www.youtube.com/watch?v=Pgnpvx7JEcA \n",
1180 | "m&m color sorter https://www.youtube.com/watch?v=B2QUI1gIUS4 \n",
1181 | "fave 15 https://www.youtube.com/watch?v=HJ3XLFsd4zI&list=PLinR9IaPy4sr5amP8orLME9QyY-dFcztX \n",
1182 | "weaving machine https://www.youtube.com/watch?v=IPIJsdvDjsc \n",
1183 | "loom https://www.youtube.com/watch?v=iqlxO5RYyGU \n",
1184 | "loom https://www.youtube.com/watch?v=xaj2M2KtH-w \n",
1185 | "piano https://www.youtube.com/watch?v=TDvcTa3abRM https://www.youtube.com/watch?v=TlmEpdyKwpI https://www.youtube.com/watch?v=9m3qFaF2t7g https://www.youtube.com/watch?v=5smytm90z80\n",
1186 | "warehouse loading https://www.youtube.com/watch?v=GToA2tOVyHg \n",
1187 | "ai vs human car park https://www.youtube.com/watch?v=KseycJFgi1U\n",
1188 | "cleaner https://www.youtube.com/watch?v=mGbdfx1rP4c \n",
1189 | "ldraw.org \n",
1190 | "milling machine https://www.youtube.com/watch?v=oF0pMILT7_Y https://www.youtube.com/watch?v=pX1cO2XhMrg \n",
1191 | "lathe https://www.youtube.com/watch?v=E4k7Nkr7sRg \n",
1192 | "http://arthursacek.com/ \n",
1193 | "chess playing https://www.youtube.com/watch?v=y3gJ2ERa0_8 https://www.youtube.com/watch?v=-rR3omAdOM0 $30,000 making the 100,000-piece chess set. \n",
1194 | "sign language https://www.youtube.com/watch?v=aTk7guHpHLk \n",
1195 | "cradle rock https://www.youtube.com/watch?v=-ZIckCvTnek\n",
1196 | "shirt folder https://www.youtube.com/watch?v=gEmwU_t0qsE "
1197 | ]
1198 | },
1199 | {
1200 | "cell_type": "markdown",
1201 | "metadata": {
1202 | "slideshow": {
1203 | "slide_type": "slide"
1204 | }
1205 | },
1206 | "source": [
1207 | "# Thanks!\n",
1208 | "\n",
1209 | ""
1210 | ]
1211 | }
1212 | ],
1213 | "metadata": {
1214 | "celltoolbar": "Slideshow",
1215 | "kernelspec": {
1216 | "display_name": "Python 3",
1217 | "language": "python",
1218 | "name": "python3"
1219 | },
1220 | "language_info": {
1221 | "codemirror_mode": {
1222 | "name": "ipython",
1223 | "version": 3
1224 | },
1225 | "file_extension": ".py",
1226 | "mimetype": "text/x-python",
1227 | "name": "python",
1228 | "nbconvert_exporter": "python",
1229 | "pygments_lexer": "ipython3",
1230 | "version": "3.6.1"
1231 | }
1232 | },
1233 | "nbformat": 4,
1234 | "nbformat_minor": 2
1235 | }
1236 |
--------------------------------------------------------------------------------
/images/InTheBox_45500_P_Brik_Left_Square.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sshopov/pyconau2017/e492e284a5afa5115f81fddf83546168b128591c/images/InTheBox_45500_P_Brik_Left_Square.png
--------------------------------------------------------------------------------
/images/InTheBox_45502_L_Motor_Square.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sshopov/pyconau2017/e492e284a5afa5115f81fddf83546168b128591c/images/InTheBox_45502_L_Motor_Square.png
--------------------------------------------------------------------------------
/images/InTheBox_45503_M_Motor_Square.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sshopov/pyconau2017/e492e284a5afa5115f81fddf83546168b128591c/images/InTheBox_45503_M_Motor_Square.png
--------------------------------------------------------------------------------
/images/InTheBox_45506_Colour_Sensor_Square.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sshopov/pyconau2017/e492e284a5afa5115f81fddf83546168b128591c/images/InTheBox_45506_Colour_Sensor_Square.png
--------------------------------------------------------------------------------
/images/InTheBox_45507_Touch_Sensor_Square.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sshopov/pyconau2017/e492e284a5afa5115f81fddf83546168b128591c/images/InTheBox_45507_Touch_Sensor_Square.png
--------------------------------------------------------------------------------
/images/InTheBox_45508_IR_Beacon_Square.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sshopov/pyconau2017/e492e284a5afa5115f81fddf83546168b128591c/images/InTheBox_45508_IR_Beacon_Square.png
--------------------------------------------------------------------------------
/images/InTheBox_45509_IR_Sensor_Square.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sshopov/pyconau2017/e492e284a5afa5115f81fddf83546168b128591c/images/InTheBox_45509_IR_Sensor_Square.png
--------------------------------------------------------------------------------
/images/InTheBox_Bricks_Landscape.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sshopov/pyconau2017/e492e284a5afa5115f81fddf83546168b128591c/images/InTheBox_Bricks_Landscape.jpg
--------------------------------------------------------------------------------
/images/LEGO-MINDSTORMS-EV3-EV3RSTORM_688.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sshopov/pyconau2017/e492e284a5afa5115f81fddf83546168b128591c/images/LEGO-MINDSTORMS-EV3-EV3RSTORM_688.jpg
--------------------------------------------------------------------------------
/images/Lego-Mindstorms-EV3-unveiled-at-CES-2013_7.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sshopov/pyconau2017/e492e284a5afa5115f81fddf83546168b128591c/images/Lego-Mindstorms-EV3-unveiled-at-CES-2013_7.jpg
--------------------------------------------------------------------------------
/images/PartsCollage.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sshopov/pyconau2017/e492e284a5afa5115f81fddf83546168b128591c/images/PartsCollage.jpg
--------------------------------------------------------------------------------
/images/PartsWordcloud.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sshopov/pyconau2017/e492e284a5afa5115f81fddf83546168b128591c/images/PartsWordcloud.png
--------------------------------------------------------------------------------
/images/Product_BOBB3E_mainstage.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sshopov/pyconau2017/e492e284a5afa5115f81fddf83546168b128591c/images/Product_BOBB3E_mainstage.png
--------------------------------------------------------------------------------
/images/Product_EL3CTRIC_GUITAR_mainstage.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sshopov/pyconau2017/e492e284a5afa5115f81fddf83546168b128591c/images/Product_EL3CTRIC_GUITAR_mainstage.png
--------------------------------------------------------------------------------
/images/Product_EV3D4_02_mainstage.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sshopov/pyconau2017/e492e284a5afa5115f81fddf83546168b128591c/images/Product_EV3D4_02_mainstage.png
--------------------------------------------------------------------------------
/images/Product_EV3ERSTORM_mainstage.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sshopov/pyconau2017/e492e284a5afa5115f81fddf83546168b128591c/images/Product_EV3ERSTORM_mainstage.png
--------------------------------------------------------------------------------
/images/Product_GRIPP3R_mainstage.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sshopov/pyconau2017/e492e284a5afa5115f81fddf83546168b128591c/images/Product_GRIPP3R_mainstage.png
--------------------------------------------------------------------------------
/images/Product_PLOTT3R_mainstage.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sshopov/pyconau2017/e492e284a5afa5115f81fddf83546168b128591c/images/Product_PLOTT3R_mainstage.png
--------------------------------------------------------------------------------
/images/Product_R3PTAR_mainstage.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sshopov/pyconau2017/e492e284a5afa5115f81fddf83546168b128591c/images/Product_R3PTAR_mainstage.png
--------------------------------------------------------------------------------
/images/Product_RAC3R_mainstage.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sshopov/pyconau2017/e492e284a5afa5115f81fddf83546168b128591c/images/Product_RAC3R_mainstage.png
--------------------------------------------------------------------------------
/images/Product_ROBODOZ3R_mainstage.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sshopov/pyconau2017/e492e284a5afa5115f81fddf83546168b128591c/images/Product_ROBODOZ3R_mainstage.png
--------------------------------------------------------------------------------
/images/Product_SH3LL_GAME_mainstage.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sshopov/pyconau2017/e492e284a5afa5115f81fddf83546168b128591c/images/Product_SH3LL_GAME_mainstage.png
--------------------------------------------------------------------------------
/images/Product_SPIK3R_mainstage.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sshopov/pyconau2017/e492e284a5afa5115f81fddf83546168b128591c/images/Product_SPIK3R_mainstage.png
--------------------------------------------------------------------------------
/images/Product_TRACK3R_mainstage.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sshopov/pyconau2017/e492e284a5afa5115f81fddf83546168b128591c/images/Product_TRACK3R_mainstage.png
--------------------------------------------------------------------------------
/images/Product_TRIC3RA_mainstage.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sshopov/pyconau2017/e492e284a5afa5115f81fddf83546168b128591c/images/Product_TRIC3RA_mainstage.png
--------------------------------------------------------------------------------
/images/Product_WACK3M_mainstage.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sshopov/pyconau2017/e492e284a5afa5115f81fddf83546168b128591c/images/Product_WACK3M_mainstage.png
--------------------------------------------------------------------------------
/images/action-mediumMotor-largeMotor-moveSteering-moveTank-display-sound-brickStatusLight.PNG:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sshopov/pyconau2017/e492e284a5afa5115f81fddf83546168b128591c/images/action-mediumMotor-largeMotor-moveSteering-moveTank-display-sound-brickStatusLight.PNG
--------------------------------------------------------------------------------
/images/advanced-fileAccess-messaging-bluetoothConnection-keepAwake-rawSensorValue-unregulatedMotor-invertMotor-stopProgram-comment.PNG:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sshopov/pyconau2017/e492e284a5afa5115f81fddf83546168b128591c/images/advanced-fileAccess-messaging-bluetoothConnection-keepAwake-rawSensorValue-unregulatedMotor-invertMotor-stopProgram-comment.PNG
--------------------------------------------------------------------------------
/images/cool_projects/automated_toilet.PNG:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sshopov/pyconau2017/e492e284a5afa5115f81fddf83546168b128591c/images/cool_projects/automated_toilet.PNG
--------------------------------------------------------------------------------
/images/cool_projects/autonomous_car.PNG:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sshopov/pyconau2017/e492e284a5afa5115f81fddf83546168b128591c/images/cool_projects/autonomous_car.PNG
--------------------------------------------------------------------------------
/images/cool_projects/dragster.PNG:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sshopov/pyconau2017/e492e284a5afa5115f81fddf83546168b128591c/images/cool_projects/dragster.PNG
--------------------------------------------------------------------------------
/images/cool_projects/egg_decorating_machine.PNG:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sshopov/pyconau2017/e492e284a5afa5115f81fddf83546168b128591c/images/cool_projects/egg_decorating_machine.PNG
--------------------------------------------------------------------------------
/images/cool_projects/helicopter.PNG:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sshopov/pyconau2017/e492e284a5afa5115f81fddf83546168b128591c/images/cool_projects/helicopter.PNG
--------------------------------------------------------------------------------
/images/cool_projects/house_builder.PNG:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sshopov/pyconau2017/e492e284a5afa5115f81fddf83546168b128591c/images/cool_projects/house_builder.PNG
--------------------------------------------------------------------------------
/images/cool_projects/paper_plane_folding_machine.PNG:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sshopov/pyconau2017/e492e284a5afa5115f81fddf83546168b128591c/images/cool_projects/paper_plane_folding_machine.PNG
--------------------------------------------------------------------------------
/images/cool_projects/printer.PNG:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sshopov/pyconau2017/e492e284a5afa5115f81fddf83546168b128591c/images/cool_projects/printer.PNG
--------------------------------------------------------------------------------
/images/cool_projects/rock_paper_scisors.PNG:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sshopov/pyconau2017/e492e284a5afa5115f81fddf83546168b128591c/images/cool_projects/rock_paper_scisors.PNG
--------------------------------------------------------------------------------
/images/cool_projects/shooter.PNG:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sshopov/pyconau2017/e492e284a5afa5115f81fddf83546168b128591c/images/cool_projects/shooter.PNG
--------------------------------------------------------------------------------
/images/cool_projects/simon_says.PNG:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sshopov/pyconau2017/e492e284a5afa5115f81fddf83546168b128591c/images/cool_projects/simon_says.PNG
--------------------------------------------------------------------------------
/images/cool_projects/space_elevator.PNG:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sshopov/pyconau2017/e492e284a5afa5115f81fddf83546168b128591c/images/cool_projects/space_elevator.PNG
--------------------------------------------------------------------------------
/images/cool_projects/spirograph.PNG:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sshopov/pyconau2017/e492e284a5afa5115f81fddf83546168b128591c/images/cool_projects/spirograph.PNG
--------------------------------------------------------------------------------
/images/cool_projects/sudoku.PNG:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sshopov/pyconau2017/e492e284a5afa5115f81fddf83546168b128591c/images/cool_projects/sudoku.PNG
--------------------------------------------------------------------------------
/images/cool_projects/toiler_paper_challenge.PNG:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sshopov/pyconau2017/e492e284a5afa5115f81fddf83546168b128591c/images/cool_projects/toiler_paper_challenge.PNG
--------------------------------------------------------------------------------
/images/dataOps-variable-constant-arrayOp-logicOp-math-round-compare-range-text-random.PNG:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sshopov/pyconau2017/e492e284a5afa5115f81fddf83546168b128591c/images/dataOps-variable-constant-arrayOp-logicOp-math-round-compare-range-text-random.PNG
--------------------------------------------------------------------------------
/images/ev3.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sshopov/pyconau2017/e492e284a5afa5115f81fddf83546168b128591c/images/ev3.jpg
--------------------------------------------------------------------------------
/images/ev3rstorm-mindstorms-ev3.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sshopov/pyconau2017/e492e284a5afa5115f81fddf83546168b128591c/images/ev3rstorm-mindstorms-ev3.jpg
--------------------------------------------------------------------------------
/images/ev3storm-mission4-logic.PNG:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sshopov/pyconau2017/e492e284a5afa5115f81fddf83546168b128591c/images/ev3storm-mission4-logic.PNG
--------------------------------------------------------------------------------
/images/flowControl-start-wait-loop-switch-loopInterrupt.PNG:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sshopov/pyconau2017/e492e284a5afa5115f81fddf83546168b128591c/images/flowControl-start-wait-loop-switch-loopInterrupt.PNG
--------------------------------------------------------------------------------
/images/innodev_logo_landscape.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sshopov/pyconau2017/e492e284a5afa5115f81fddf83546168b128591c/images/innodev_logo_landscape.jpg
--------------------------------------------------------------------------------
/images/innodev_logo_stacked.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sshopov/pyconau2017/e492e284a5afa5115f81fddf83546168b128591c/images/innodev_logo_stacked.jpg
--------------------------------------------------------------------------------
/images/irTarget.PNG:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sshopov/pyconau2017/e492e284a5afa5115f81fddf83546168b128591c/images/irTarget.PNG
--------------------------------------------------------------------------------
/images/lego-ev3-home-lego-mindstorms-ev3-home-package.jpg.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sshopov/pyconau2017/e492e284a5afa5115f81fddf83546168b128591c/images/lego-ev3-home-lego-mindstorms-ev3-home-package.jpg.png
--------------------------------------------------------------------------------
/images/lego-mindstorms-parts-wordcloud.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sshopov/pyconau2017/e492e284a5afa5115f81fddf83546168b128591c/images/lego-mindstorms-parts-wordcloud.png
--------------------------------------------------------------------------------
/images/lego-overview.PNG:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sshopov/pyconau2017/e492e284a5afa5115f81fddf83546168b128591c/images/lego-overview.PNG
--------------------------------------------------------------------------------
/images/lego-overview2.PNG:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sshopov/pyconau2017/e492e284a5afa5115f81fddf83546168b128591c/images/lego-overview2.PNG
--------------------------------------------------------------------------------
/images/me-ev3-cropped.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sshopov/pyconau2017/e492e284a5afa5115f81fddf83546168b128591c/images/me-ev3-cropped.png
--------------------------------------------------------------------------------
/images/me-ev3-shrank.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sshopov/pyconau2017/e492e284a5afa5115f81fddf83546168b128591c/images/me-ev3-shrank.jpg
--------------------------------------------------------------------------------
/images/me-ev3.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sshopov/pyconau2017/e492e284a5afa5115f81fddf83546168b128591c/images/me-ev3.jpg
--------------------------------------------------------------------------------
/images/me.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sshopov/pyconau2017/e492e284a5afa5115f81fddf83546168b128591c/images/me.jpg
--------------------------------------------------------------------------------
/images/me.pdn:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sshopov/pyconau2017/e492e284a5afa5115f81fddf83546168b128591c/images/me.pdn
--------------------------------------------------------------------------------
/images/parts.txt:
--------------------------------------------------------------------------------
1 | Tyre_Normal_Wide_432_X_22 Tyre_Normal_Wide_432_X_22 Tyre_Normal_Wide_432_X_22 Tyre_Normal_Wide_432_X_22 Tyre_Low_Narrow_1458_X_624 Tyre_Low_Narrow_1458_X_624 Rim_Wide_WCross_30-20 Rim_Wide_WCross_30-20 Rim_Wide_WCross_30-20 Rim_Wide_WCross_30-20 Caterpillar_Track Caterpillar_Track Cross_Axle_6M Cross_Axle_6M Cross_Axle_6M Cross_Axle_6M Cross_Axle_6M Cross_Axle_6M Cross_Axle_6M Cross_Axle_6M Cross_Axle_6M Double_Angular_Beam_3X7_45 Double_Angular_Beam_3X7_45 Double_Angular_Beam_3X7_45 Double_Angular_Beam_3X7_45 Double_Angular_Beam_3X7_45 Double_Angular_Beam_3X7_45 Double_Angular_Beam_3X7_45 Double_Angular_Beam_3X7_45 Double_Angular_Beam_3X7_45 Double_Angular_Beam_3X7_45 Double_Angular_Beam_3X7_45 Double_Angular_Beam_3X7_45 Technic_Ang_Beam_4X2_90_Deg Technic_Ang_Beam_4X2_90_Deg Technic_Ang_Beam_4X2_90_Deg Technic_Ang_Beam_4X2_90_Deg Technic_Ang_Beam_4X2_90_Deg Technic_Ang_Beam_4X2_90_Deg Technic_Ang_Beam_4X2_90_Deg Technic_Ang_Beam_4X2_90_Deg Connector_Peg_W_Friction Connector_Peg_W_Friction Connector_Peg_W_Friction Connector_Peg_W_Friction Connector_Peg_W_Friction Connector_Peg_W_Friction Connector_Peg_W_Friction Connector_Peg_W_Friction Connector_Peg_W_Friction Connector_Peg_W_Friction Connector_Peg_W_Friction Connector_Peg_W_Friction Connector_Peg_W_Friction Connector_Peg_W_Friction Connector_Peg_W_Friction Connector_Peg_W_Friction Connector_Peg_W_Friction Connector_Peg_W_Friction Connector_Peg_W_Friction Connector_Peg_W_Friction Connector_Peg_W_Friction Connector_Peg_W_Friction Connector_Peg_W_Friction Connector_Peg_W_Friction Connector_Peg_W_Friction Connector_Peg_W_Friction Connector_Peg_W_Friction Connector_Peg_W_Friction Connector_Peg_W_Friction Connector_Peg_W_Friction Connector_Peg_W_Friction Connector_Peg_W_Friction Connector_Peg_W_Friction Connector_Peg_W_Friction Connector_Peg_W_Friction Connector_Peg_W_Friction Connector_Peg_W_Friction Connector_Peg_W_Friction Connector_Peg_W_Friction Connector_Peg_W_Friction Connector_Peg_W_Friction Connector_Peg_W_Friction Connector_Peg_W_Friction Connector_Peg_W_Friction Connector_Peg_W_Friction Connector_Peg_W_Friction Connector_Peg_W_Friction Connector_Peg_W_Friction Connector_Peg_W_Friction Connector_Peg_W_Friction Connector_Peg_W_Friction Connector_Peg_W_Friction Connector_Peg_W_Friction Connector_Peg_W_Friction Connector_Peg_W_Friction Connector_Peg_W_Friction Connector_Peg_W_Friction Connector_Peg_W_Friction Connector_Peg_W_Friction Connector_Peg_W_Friction Connector_Peg_W_Friction Connector_Peg_W_Friction Connector_Peg_W_Friction Connector_Peg_W_Friction Connector_Peg_W_Friction Connector_Peg_W_Friction Connector_Peg_W_Friction Connector_Peg_W_Friction Connector_Peg_W_Friction Connector_Peg_W_Friction Connector_Peg_W_Friction Connector_Peg_W_Friction Connector_Peg_W_Friction Connector_Peg_W_Friction Connector_Peg_W_Friction Connector_Peg_W_Friction Connector_Peg_W_Friction Connector_Peg_W_Friction Connector_Peg_W_Friction Connector_Peg_W_Friction Connector_Peg_W_Friction Connector_Peg_W_Friction Connector_Peg_W_Friction Connector_Peg_W_Friction Connector_Peg_W_Friction Connector_Peg_W_Friction Connector_Peg_W_Friction Connector_Peg_W_Friction Connector_Peg_W_Friction Connector_Peg_W_Friction Connector_Peg_W_Friction Connector_Peg_W_Friction Connector_Peg_W_Friction Connector_Peg_W_Friction Connector_Peg_W_Friction Technic_Angular_Beam_4X4 Technic_Angular_Beam_4X4 Technic_Angular_Beam_4X4 Technic_Angular_Beam_4X4 Technic_Angular_Beam_3X7 Technic_Angular_Beam_3X7 Technic_Angular_Beam_3X7 Technic_Angular_Beam_3X7 Technic_Angular_Beam_3X7 Technic_Angular_Beam_3X7 Technic_Angular_Beam_3X7 Technic_Angular_Beam_3X7 Technic_Angular_Beam_3X7 Technic_Angular_Beam_3X7 Technic_Angular_Beam_3X7 Technic_Angular_Beam_3X7 Lt_Steering_Gear Lt_Steering_Gear Lt_Steering_Gear Lt_Steering_Gear Technic_5M_Beam Technic_5M_Beam Technic_5M_Beam Technic_5M_Beam Technic_5M_Beam Technic_5M_Beam Technic_5M_Beam Technic_5M_Beam Technic_5M_Beam Technic_5M_Beam Technic_3M_Beam Technic_3M_Beam Technic_3M_Beam Technic_3M_Beam Technic_3M_Beam Technic_3M_Beam Technic_3M_Beam Technic_3M_Beam Technic_3M_Beam Technic_3M_Beam Technic_3M_Beam Technic_3M_Beam Technic_Ang_Beam_3X5_90_Deg Technic_Ang_Beam_3X5_90_Deg Technic_Ang_Beam_3X5_90_Deg Technic_Ang_Beam_3X5_90_Deg Technic_Ang_Beam_3X5_90_Deg Technic_Ang_Beam_3X5_90_Deg Comb_Wheel Comb_Wheel Double_Conical_Wheel_Z12_1M Double_Conical_Wheel_Z12_1M Ball_With_Friction_Snap Ball_With_Friction_Snap Ball_With_Friction_Snap Ball_With_Friction_Snap Ball_With_Friction_Snap Ball_With_Friction_Snap Technic_Angular_Wheel Technic_Angular_Wheel Technic_Angular_Wheel Technic_Angular_Wheel Double_Conical_Wheel_Z36 Double_Conical_Wheel_Z36 Double_Conical_Wheel_Z36 Double_Conical_Wheel_Z36 Double_Conical_Wheel_Z36 Technic_7M_Beam Technic_7M_Beam Technic_7M_Beam Technic_7M_Beam Technic_7M_Beam Technic_7M_Beam Technic_13M_Beam Technic_13M_Beam Technic_13M_Beam Technic_13M_Beam Technic_15M_Beam Technic_15M_Beam Technic_15M_Beam Technic_15M_Beam T-Beam_3X3_W-Hole_48 T-Beam_3X3_W-Hole_48 T-Beam_3X3_W-Hole_48 T-Beam_3X3_W-Hole_48 Beam_3M_485_W_Fork Track_Rod_6M Track_Rod_6M Technic_9M_Beam Technic_9M_Beam Technic_9M_Beam Technic_9M_Beam Technic_9M_Beam Technic_9M_Beam Technic_9M_Beam Technic_9M_Beam Beam_1X2_W-Cross_And_Hole Beam_1X2_W-Cross_And_Hole Beam_1X2_W-Cross_And_Hole Beam_1X2_W-Cross_And_Hole Beam_1X2_W-Cross_And_Hole Beam_1X2_W-Cross_And_Hole Beam_1X2_W-Cross_And_Hole Beam_1X2_W-Cross_And_Hole Beam_1X2_W-Cross_And_Hole Beam_1X2_W-Cross_And_Hole Tyre_For_Wedge-Belt_Wheel Tyre_For_Wedge-Belt_Wheel Tyre_For_Wedge-Belt_Wheel Double_Conical_Wheel_Z20_1M Double_Conical_Wheel_Z20_1M Double_Conical_Wheel_Z20_1M Double_Conical_Wheel_Z20_1M Ev3_Cable_250_Mm Ev3_Cable_250_Mm Ev3_Cable_250_Mm Ev3_Cable_250_Mm Ev3_Cable_350_Mm Ev3_Cable_350_Mm Ev3_Cable_500_Mm Shooter Magasine_For_Balls_165 3M_Connector_Peg 3M_Connector_Peg 3M_Connector_Peg 3M_Connector_Peg Conical_Wheel_Z12 Krydsaksel_M-Stop_4M Krydsaksel_M-Stop_4M Krydsaksel_M-Stop_4M Bevel_Gear_Z20 ConnBush_WFric-Crossale ConnBush_WFric-Crossale ConnBush_WFric-Crossale ConnBush_WFric-Crossale ConnBush_WFric-Crossale ConnBush_WFric-Crossale ConnBush_WFric-Crossale ConnBush_WFric-Crossale ConnBush_WFric-Crossale ConnBush_WFric-Crossale ConnBush_WFric-Crossale ConnBush_WFric-Crossale ConnBush_WFric-Crossale ConnBush_WFric-Crossale ConnBush_WFric-Crossale ConnBush_WFric-Crossale ConnBush_WFric-Crossale ConnBush_WFric-Crossale ConnBush_WFric-Crossale ConnBush_WFric-Crossale ConnBush_WFric-Crossale ConnBush_WFric-Crossale ConnBush_WFric-Crossale ConnBush_WFric-Crossale ConnBush_WFric-Crossale ConnBush_WFric-Crossale ConnBush_WFric-Crossale ConnBush_WFric-Crossale Connector_Peg_W_Friction_3M Connector_Peg_W_Friction_3M Connector_Peg_W_Friction_3M Connector_Peg_W_Friction_3M Connector_Peg_W_Friction_3M Connector_Peg_W_Friction_3M Connector_Peg_W_Friction_3M Connector_Peg_W_Friction_3M Connector_Peg_W_Friction_3M Connector_Peg_W_Friction_3M Connector_Peg_W_Friction_3M Connector_Peg_W_Friction_3M Connector_Peg_W_Friction_3M Connector_Peg_W_Friction_3M Connector_Peg_W_Friction_3M Connector_Peg_W_Friction_3M Connector_Peg_W_Friction_3M Connector_Peg_W_Friction_3M Connector_Peg_W_Friction_3M Connector_Peg_W_Friction_3M Connector_Peg_W_Friction_3M Connector_Peg_W_Friction_3M Connector_Peg_W_Friction_3M Connector_Peg_W_Friction_3M Connector_Peg_W_Friction_3M Connector_Peg_W_Friction_3M Connector_Peg_W_Friction_3M Connector_Peg_W_Friction_3M Connector_Peg_W_Friction_3M Connector_Peg_W_Friction_3M Connector_Peg_W_Friction_3M Connector_Peg_W_Friction_3M Connector_Peg_W_Friction_3M Connector_Peg_W_Friction_3M Connector_Peg_W_Friction_3M Connector_Peg_W_Friction_3M Connector_Peg_W_Friction_3M Connector_Peg_W_Friction_3M V-Belt_24_-_Clear_Red Technic_Cross_Block_2X1 Technic_Cross_Block_2X1 Double_Cross_Block Double_Cross_Block Double_Cross_Block Double_Cross_Block Double_Cross_Block Double_Cross_Block Double_Cross_Block Double_Cross_Block Double_Cross_Block Double_Cross_Block Double_Cross_Block Double_Cross_Block Double_Cross_Block Double_Cross_Block Double_Cross_Block Double_Cross_Block Double_Cross_Block 2M_Fric_Snap_W-Cross_Hole 2M_Fric_Snap_W-Cross_Hole 2M_Fric_Snap_W-Cross_Hole 2M_Fric_Snap_W-Cross_Hole 2M_Fric_Snap_W-Cross_Hole 2M_Fric_Snap_W-Cross_Hole 2M_Fric_Snap_W-Cross_Hole 2M_Fric_Snap_W-Cross_Hole 2M_Fric_Snap_W-Cross_Hole 2M_Fric_Snap_W-Cross_Hole 2M_Cross_Axle_W_Groove 2M_Cross_Axle_W_Groove 2M_Cross_Axle_W_Groove 2M_Cross_Axle_W_Groove 2M_Cross_Axle_W_Groove 2M_Cross_Axle_W_Groove 2M_Cross_Axle_W_Groove 2M_Cross_Axle_W_Groove 2M_Cross_Axle_W_Groove 2M_Cross_Axle_W_Groove 2M_Cross_Axle_W_Groove 2M_Cross_Axle_W_Groove Technic_Cross_Block-Fork_2X2 Technic_Cross_Block-Fork_2X2 Technic_Cross_Block-Fork_2X2 Technic_Cross_Block-Fork_2X2 Cross_Blok_3M Cross_Blok_3M Cross_Blok_3M Cross_Blok_3M Cross_Blok_3M Cross_Blok_3M Cross_Blok_3M Cross_Blok_3M Cross_Blok_3M Cross_Blok_3M Cross_Blok_3M Cross_Blok_3M Cross_Blok_3M Cross_Blok_3M Cross_Block_90 Cross_Block_90 Cross_Block_90 Cross_Block_90 Cross_Block_90 Cross_Block_90 Cross_Block_90 Cross_Block_90 Angle_Element_90_Degrees_[6] Angle_Element_135_Deg_[4] Angle_Element_135_Deg_[4] Angle_Element_135_Deg_[4] Angle_Element_135_Deg_[4] Bush_For_Cross_Axle Bush_For_Cross_Axle Bush_For_Cross_Axle Bush_For_Cross_Axle Bush_For_Cross_Axle Bush_For_Cross_Axle Bush_For_Cross_Axle Bush_For_Cross_Axle Bush_For_Cross_Axle Angle_Element_180_Degrees_[2] Angle_Element_180_Degrees_[2] Angle_Element_180_Degrees_[2] Angle_Element_180_Degrees_[2] Angle_Element_180_Degrees_[2] Angle_Element_180_Degrees_[2] Angle_Element_0_Degrees_[1] Angle_Element_0_Degrees_[1] Angle_Element_0_Degrees_[1] Angle_Element_0_Degrees_[1] Cross_Axle_Extension_2M Cross_Axle_Extension_2M Cross_Axle_Extension_2M Technic_11M_Beam Technic_11M_Beam Technic_11M_Beam Technic_11M_Beam Bion_Eye Bion_Eye Bion_Eye Bion_Eye Bion_Eye Bion_Eye Ball_165 Ball_165 Ball_165 1-2_Bush 1-2_Bush 1-2_Bush 1-2_Bush 1-2_Bush 1-2_Bush 1-2_Bush 1-2_Bush 1-2_Bush 1-2_Bush 1-2_Bush Cross_Axle_8M_With_End_Stop Cross_Axle_8M_With_End_Stop Cross_Axle_8M_With_End_Stop Cross_Axle_8M_With_End_Stop Cross_Axle_8M_With_End_Stop Cross_Axle_8M_With_End_Stop Cross_Axle_55_With_Stop_1M Cross_Axle_55_With_Stop_1M Cross_Axle_4M_With_End_Stop Cross_Axle_4M_With_End_Stop Cross_Axle_4M_With_End_Stop Cross_Axle_4M_With_End_Stop Gear_Wheel_Z24 Gear_Wheel_Z24 Ball_W_Cross_Axle Ball_W_Cross_Axle Ball_W_Cross_Axle Ball_W_Cross_Axle Ball_W_Cross_Axle Ball_W_Cross_Axle Catch_W_Cross_Hole Catch_W_Cross_Hole Technic_Lever_3M Cross_Axle_5M Cross_Axle_5M Cross_Axle_5M Cross_Axle_5M Cross_Axle_5M Cross_Axle_5M Cross_Axle_5M Cross_Axle_5M Cross_Axle_5M Hub_112_X_784 Hub_112_X_784 Hub_112_X_784 Hub_112_X_784 Cross_Axle_7M Cross_Axle_7M Connector_Peg Connector_Peg Connector_Peg Connector_Peg Cross_Axle_3M Cross_Axle_3M Cross_Axle_3M Cross_Axle_3M Cross_Axle_3M Cross_Axle_3M Cross_Axle_3M Cross_Axle_3M Cross_Axle_3M Cross_Axle_3M Cross_Axle_3M Cross_Axle_3M Cross_Axle_3M Cross_Axle_3M Cross_Axle_3M Cross_Axle_3M Cross_Axle_3M Cross_Axle_3M Cross_Axle_3M Cross_Axle_3M Cross_Axle_3M Cross_Axle_3M Module_Bush Module_Bush Module_Bush Module_Bush Beam_3_M_W-4_Snaps Beam_3_M_W-4_Snaps Beam_3_M_W-4_Snaps Beam_3_M_W-4_Snaps Beam_3_M_W-4_Snaps Beam_3_M_W-4_Snaps Beam_3_M_W-4_Snaps Beam_3_M_W-4_Snaps Beam_3_M_W-4_Snaps Beam_3_M_W-4_Snaps Beam_3_M_W-4_Snaps Beam_3_M_W-4_Snaps Wedge-Belt_Wheel_24 Wedge-Belt_Wheel_24 Wedge-Belt_Wheel_24 3-Branch_Cross_Axle_W-Cross_H Cross_Axle_9M Cross_Block_3X2 Cross_Block_3X2 Beam_Frame_5X7_485 Beam_Frame_5X7_485 Beam_R_Frame_5X11_485 Beam_R_Frame_5X11_485 Double_Bush_3M_49 Double_Bush_3M_49 Double_Bush_3M_49 Double_Bush_3M_49 Double_Bush_3M_49 Double_Bush_3M_49 Cross_Block-Form_2X2X2 Cross_Block-Form_2X2X2 Technic_Steering-Gear_3M Technic_Steering-Gear_3M Technic_Steering-Gear_3M Technic_Steering-Gear_3M Ms_Ev3_Sensor_Colour Ms-Ev3_Ir_Sensor Ms_Ev3_Touch_Sensor Ms-Ev3_Medium_Motor Tube_W-_Double_485_Hole Tube_W-_Double_485_Hole Worm_Gear_2_Module_For_Gear_Wheel Worm_Gear_2_Module_For_Gear_Wheel Sword Sword Sword Sword Sword Sword Crossaxle_3M_With_Knob Crossaxle_3M_With_Knob Crossaxle_3M_With_Knob Crossaxle_3M_With_Knob Left_Panel_3X7 Left_Panel_3X7 Left_Panel_3X7 Right_Panel_3X7 Right_Panel_3X7 Right_Panel_3X7 Right_Panel_3X11 Right_Panel_3X11 Right_Panel_3X11 Left_Panel_3X11 Left_Panel_3X11 Left_Panel_3X11 Right_Screen_485_4X7X4 Left_Screen_485_4X7X4 Ms-Ev3_Ir_Beacon Ms-Ev3_Large_Motor Ms-Ev3_Large_Motor Ms-Ev3_P-Brick Bion_Eye Bion_Eye Bion_Eye Bion_Eye Blade_W_Technic_Hole_1 Blade_W_Technic_Hole_1 Blade_W_Technic_Hole_1 Blade_W_Technic_Hole_1
--------------------------------------------------------------------------------
/images/parts/1-2_Bush.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sshopov/pyconau2017/e492e284a5afa5115f81fddf83546168b128591c/images/parts/1-2_Bush.jpg
--------------------------------------------------------------------------------
/images/parts/2M_Cross_Axle_W_Groove.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sshopov/pyconau2017/e492e284a5afa5115f81fddf83546168b128591c/images/parts/2M_Cross_Axle_W_Groove.jpg
--------------------------------------------------------------------------------
/images/parts/2M_Fric_Snap_W-Cross_Hole.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sshopov/pyconau2017/e492e284a5afa5115f81fddf83546168b128591c/images/parts/2M_Fric_Snap_W-Cross_Hole.jpg
--------------------------------------------------------------------------------
/images/parts/3-Branch_Cross_Axle_W-Cross_H.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sshopov/pyconau2017/e492e284a5afa5115f81fddf83546168b128591c/images/parts/3-Branch_Cross_Axle_W-Cross_H.jpg
--------------------------------------------------------------------------------
/images/parts/3M_Connector_Peg.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sshopov/pyconau2017/e492e284a5afa5115f81fddf83546168b128591c/images/parts/3M_Connector_Peg.jpg
--------------------------------------------------------------------------------
/images/parts/Angle_Element_0_Degrees_[1].jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sshopov/pyconau2017/e492e284a5afa5115f81fddf83546168b128591c/images/parts/Angle_Element_0_Degrees_[1].jpg
--------------------------------------------------------------------------------
/images/parts/Angle_Element_135_Deg_[4].jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sshopov/pyconau2017/e492e284a5afa5115f81fddf83546168b128591c/images/parts/Angle_Element_135_Deg_[4].jpg
--------------------------------------------------------------------------------
/images/parts/Angle_Element_180_Degrees_[2].jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sshopov/pyconau2017/e492e284a5afa5115f81fddf83546168b128591c/images/parts/Angle_Element_180_Degrees_[2].jpg
--------------------------------------------------------------------------------
/images/parts/Angle_Element_90_Degrees_[6].jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sshopov/pyconau2017/e492e284a5afa5115f81fddf83546168b128591c/images/parts/Angle_Element_90_Degrees_[6].jpg
--------------------------------------------------------------------------------
/images/parts/Ball_165.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sshopov/pyconau2017/e492e284a5afa5115f81fddf83546168b128591c/images/parts/Ball_165.jpg
--------------------------------------------------------------------------------
/images/parts/Ball_W_Cross_Axle.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sshopov/pyconau2017/e492e284a5afa5115f81fddf83546168b128591c/images/parts/Ball_W_Cross_Axle.jpg
--------------------------------------------------------------------------------
/images/parts/Ball_With_Friction_Snap.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sshopov/pyconau2017/e492e284a5afa5115f81fddf83546168b128591c/images/parts/Ball_With_Friction_Snap.jpg
--------------------------------------------------------------------------------
/images/parts/Beam_1X2_W-Cross_And_Hole.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sshopov/pyconau2017/e492e284a5afa5115f81fddf83546168b128591c/images/parts/Beam_1X2_W-Cross_And_Hole.jpg
--------------------------------------------------------------------------------
/images/parts/Beam_3M_485_W_Fork.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sshopov/pyconau2017/e492e284a5afa5115f81fddf83546168b128591c/images/parts/Beam_3M_485_W_Fork.jpg
--------------------------------------------------------------------------------
/images/parts/Beam_3_M_W-4_Snaps.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sshopov/pyconau2017/e492e284a5afa5115f81fddf83546168b128591c/images/parts/Beam_3_M_W-4_Snaps.jpg
--------------------------------------------------------------------------------
/images/parts/Beam_Frame_5X7_485.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sshopov/pyconau2017/e492e284a5afa5115f81fddf83546168b128591c/images/parts/Beam_Frame_5X7_485.jpg
--------------------------------------------------------------------------------
/images/parts/Beam_R_Frame_5X11_485.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sshopov/pyconau2017/e492e284a5afa5115f81fddf83546168b128591c/images/parts/Beam_R_Frame_5X11_485.jpg
--------------------------------------------------------------------------------
/images/parts/Bevel_Gear_Z20.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sshopov/pyconau2017/e492e284a5afa5115f81fddf83546168b128591c/images/parts/Bevel_Gear_Z20.jpg
--------------------------------------------------------------------------------
/images/parts/Bion_Eye.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sshopov/pyconau2017/e492e284a5afa5115f81fddf83546168b128591c/images/parts/Bion_Eye.jpg
--------------------------------------------------------------------------------
/images/parts/Blade_W_Technic_Hole_1.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sshopov/pyconau2017/e492e284a5afa5115f81fddf83546168b128591c/images/parts/Blade_W_Technic_Hole_1.jpg
--------------------------------------------------------------------------------
/images/parts/Bush_For_Cross_Axle.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sshopov/pyconau2017/e492e284a5afa5115f81fddf83546168b128591c/images/parts/Bush_For_Cross_Axle.jpg
--------------------------------------------------------------------------------
/images/parts/Catch_W_Cross_Hole.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sshopov/pyconau2017/e492e284a5afa5115f81fddf83546168b128591c/images/parts/Catch_W_Cross_Hole.jpg
--------------------------------------------------------------------------------
/images/parts/Caterpillar_Track.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sshopov/pyconau2017/e492e284a5afa5115f81fddf83546168b128591c/images/parts/Caterpillar_Track.jpg
--------------------------------------------------------------------------------
/images/parts/Comb_Wheel.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sshopov/pyconau2017/e492e284a5afa5115f81fddf83546168b128591c/images/parts/Comb_Wheel.jpg
--------------------------------------------------------------------------------
/images/parts/Conical_Wheel_Z12.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sshopov/pyconau2017/e492e284a5afa5115f81fddf83546168b128591c/images/parts/Conical_Wheel_Z12.jpg
--------------------------------------------------------------------------------
/images/parts/ConnBush_WFric-Crossale.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sshopov/pyconau2017/e492e284a5afa5115f81fddf83546168b128591c/images/parts/ConnBush_WFric-Crossale.jpg
--------------------------------------------------------------------------------
/images/parts/Connector_Peg.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sshopov/pyconau2017/e492e284a5afa5115f81fddf83546168b128591c/images/parts/Connector_Peg.jpg
--------------------------------------------------------------------------------
/images/parts/Connector_Peg_W_Friction.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sshopov/pyconau2017/e492e284a5afa5115f81fddf83546168b128591c/images/parts/Connector_Peg_W_Friction.jpg
--------------------------------------------------------------------------------
/images/parts/Connector_Peg_W_Friction_3M.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sshopov/pyconau2017/e492e284a5afa5115f81fddf83546168b128591c/images/parts/Connector_Peg_W_Friction_3M.jpg
--------------------------------------------------------------------------------
/images/parts/Cross_Axle_3M.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sshopov/pyconau2017/e492e284a5afa5115f81fddf83546168b128591c/images/parts/Cross_Axle_3M.jpg
--------------------------------------------------------------------------------
/images/parts/Cross_Axle_4M_With_End_Stop.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sshopov/pyconau2017/e492e284a5afa5115f81fddf83546168b128591c/images/parts/Cross_Axle_4M_With_End_Stop.jpg
--------------------------------------------------------------------------------
/images/parts/Cross_Axle_55_With_Stop_1M.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sshopov/pyconau2017/e492e284a5afa5115f81fddf83546168b128591c/images/parts/Cross_Axle_55_With_Stop_1M.jpg
--------------------------------------------------------------------------------
/images/parts/Cross_Axle_5M.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sshopov/pyconau2017/e492e284a5afa5115f81fddf83546168b128591c/images/parts/Cross_Axle_5M.jpg
--------------------------------------------------------------------------------
/images/parts/Cross_Axle_6M.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sshopov/pyconau2017/e492e284a5afa5115f81fddf83546168b128591c/images/parts/Cross_Axle_6M.jpg
--------------------------------------------------------------------------------
/images/parts/Cross_Axle_7M.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sshopov/pyconau2017/e492e284a5afa5115f81fddf83546168b128591c/images/parts/Cross_Axle_7M.jpg
--------------------------------------------------------------------------------
/images/parts/Cross_Axle_8M_With_End_Stop.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sshopov/pyconau2017/e492e284a5afa5115f81fddf83546168b128591c/images/parts/Cross_Axle_8M_With_End_Stop.jpg
--------------------------------------------------------------------------------
/images/parts/Cross_Axle_9M.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sshopov/pyconau2017/e492e284a5afa5115f81fddf83546168b128591c/images/parts/Cross_Axle_9M.jpg
--------------------------------------------------------------------------------
/images/parts/Cross_Axle_Extension_2M.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sshopov/pyconau2017/e492e284a5afa5115f81fddf83546168b128591c/images/parts/Cross_Axle_Extension_2M.jpg
--------------------------------------------------------------------------------
/images/parts/Cross_Block-Form_2X2X2.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sshopov/pyconau2017/e492e284a5afa5115f81fddf83546168b128591c/images/parts/Cross_Block-Form_2X2X2.jpg
--------------------------------------------------------------------------------
/images/parts/Cross_Block_3X2.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sshopov/pyconau2017/e492e284a5afa5115f81fddf83546168b128591c/images/parts/Cross_Block_3X2.jpg
--------------------------------------------------------------------------------
/images/parts/Cross_Block_90.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sshopov/pyconau2017/e492e284a5afa5115f81fddf83546168b128591c/images/parts/Cross_Block_90.jpg
--------------------------------------------------------------------------------
/images/parts/Cross_Blok_3M.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sshopov/pyconau2017/e492e284a5afa5115f81fddf83546168b128591c/images/parts/Cross_Blok_3M.jpg
--------------------------------------------------------------------------------
/images/parts/Crossaxle_3M_With_Knob.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sshopov/pyconau2017/e492e284a5afa5115f81fddf83546168b128591c/images/parts/Crossaxle_3M_With_Knob.jpg
--------------------------------------------------------------------------------
/images/parts/Double_Angular_Beam_3X7_45.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sshopov/pyconau2017/e492e284a5afa5115f81fddf83546168b128591c/images/parts/Double_Angular_Beam_3X7_45.jpg
--------------------------------------------------------------------------------
/images/parts/Double_Bush_3M_49.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sshopov/pyconau2017/e492e284a5afa5115f81fddf83546168b128591c/images/parts/Double_Bush_3M_49.jpg
--------------------------------------------------------------------------------
/images/parts/Double_Conical_Wheel_Z12_1M.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sshopov/pyconau2017/e492e284a5afa5115f81fddf83546168b128591c/images/parts/Double_Conical_Wheel_Z12_1M.jpg
--------------------------------------------------------------------------------
/images/parts/Double_Conical_Wheel_Z20_1M.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sshopov/pyconau2017/e492e284a5afa5115f81fddf83546168b128591c/images/parts/Double_Conical_Wheel_Z20_1M.jpg
--------------------------------------------------------------------------------
/images/parts/Double_Conical_Wheel_Z36.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sshopov/pyconau2017/e492e284a5afa5115f81fddf83546168b128591c/images/parts/Double_Conical_Wheel_Z36.jpg
--------------------------------------------------------------------------------
/images/parts/Double_Cross_Block.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sshopov/pyconau2017/e492e284a5afa5115f81fddf83546168b128591c/images/parts/Double_Cross_Block.jpg
--------------------------------------------------------------------------------
/images/parts/Ev3_Cable_250_Mm.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sshopov/pyconau2017/e492e284a5afa5115f81fddf83546168b128591c/images/parts/Ev3_Cable_250_Mm.jpg
--------------------------------------------------------------------------------
/images/parts/Ev3_Cable_350_Mm.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sshopov/pyconau2017/e492e284a5afa5115f81fddf83546168b128591c/images/parts/Ev3_Cable_350_Mm.jpg
--------------------------------------------------------------------------------
/images/parts/Ev3_Cable_500_Mm.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sshopov/pyconau2017/e492e284a5afa5115f81fddf83546168b128591c/images/parts/Ev3_Cable_500_Mm.jpg
--------------------------------------------------------------------------------
/images/parts/Gear_Wheel_Z24.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sshopov/pyconau2017/e492e284a5afa5115f81fddf83546168b128591c/images/parts/Gear_Wheel_Z24.jpg
--------------------------------------------------------------------------------
/images/parts/Hub_112_X_784.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sshopov/pyconau2017/e492e284a5afa5115f81fddf83546168b128591c/images/parts/Hub_112_X_784.jpg
--------------------------------------------------------------------------------
/images/parts/Krydsaksel_M-Stop_4M.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sshopov/pyconau2017/e492e284a5afa5115f81fddf83546168b128591c/images/parts/Krydsaksel_M-Stop_4M.jpg
--------------------------------------------------------------------------------
/images/parts/Left_Panel_3X11.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sshopov/pyconau2017/e492e284a5afa5115f81fddf83546168b128591c/images/parts/Left_Panel_3X11.jpg
--------------------------------------------------------------------------------
/images/parts/Left_Panel_3X7.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sshopov/pyconau2017/e492e284a5afa5115f81fddf83546168b128591c/images/parts/Left_Panel_3X7.jpg
--------------------------------------------------------------------------------
/images/parts/Left_Screen_485_4X7X4.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sshopov/pyconau2017/e492e284a5afa5115f81fddf83546168b128591c/images/parts/Left_Screen_485_4X7X4.jpg
--------------------------------------------------------------------------------
/images/parts/Lt_Steering_Gear.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sshopov/pyconau2017/e492e284a5afa5115f81fddf83546168b128591c/images/parts/Lt_Steering_Gear.jpg
--------------------------------------------------------------------------------
/images/parts/Magasine_For_Balls_165.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sshopov/pyconau2017/e492e284a5afa5115f81fddf83546168b128591c/images/parts/Magasine_For_Balls_165.jpg
--------------------------------------------------------------------------------
/images/parts/Module_Bush.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sshopov/pyconau2017/e492e284a5afa5115f81fddf83546168b128591c/images/parts/Module_Bush.jpg
--------------------------------------------------------------------------------
/images/parts/Right_Panel_3X11.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sshopov/pyconau2017/e492e284a5afa5115f81fddf83546168b128591c/images/parts/Right_Panel_3X11.jpg
--------------------------------------------------------------------------------
/images/parts/Right_Panel_3X7.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sshopov/pyconau2017/e492e284a5afa5115f81fddf83546168b128591c/images/parts/Right_Panel_3X7.jpg
--------------------------------------------------------------------------------
/images/parts/Right_Screen_485_4X7X4.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sshopov/pyconau2017/e492e284a5afa5115f81fddf83546168b128591c/images/parts/Right_Screen_485_4X7X4.jpg
--------------------------------------------------------------------------------
/images/parts/Rim_Wide_WCross_30-20.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sshopov/pyconau2017/e492e284a5afa5115f81fddf83546168b128591c/images/parts/Rim_Wide_WCross_30-20.jpg
--------------------------------------------------------------------------------
/images/parts/Shooter.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sshopov/pyconau2017/e492e284a5afa5115f81fddf83546168b128591c/images/parts/Shooter.jpg
--------------------------------------------------------------------------------
/images/parts/Sword.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sshopov/pyconau2017/e492e284a5afa5115f81fddf83546168b128591c/images/parts/Sword.jpg
--------------------------------------------------------------------------------
/images/parts/T-Beam_3X3_W-Hole_48.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sshopov/pyconau2017/e492e284a5afa5115f81fddf83546168b128591c/images/parts/T-Beam_3X3_W-Hole_48.jpg
--------------------------------------------------------------------------------
/images/parts/Technic_11M_Beam.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sshopov/pyconau2017/e492e284a5afa5115f81fddf83546168b128591c/images/parts/Technic_11M_Beam.jpg
--------------------------------------------------------------------------------
/images/parts/Technic_13M_Beam.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sshopov/pyconau2017/e492e284a5afa5115f81fddf83546168b128591c/images/parts/Technic_13M_Beam.jpg
--------------------------------------------------------------------------------
/images/parts/Technic_15M_Beam.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sshopov/pyconau2017/e492e284a5afa5115f81fddf83546168b128591c/images/parts/Technic_15M_Beam.jpg
--------------------------------------------------------------------------------
/images/parts/Technic_3M_Beam.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sshopov/pyconau2017/e492e284a5afa5115f81fddf83546168b128591c/images/parts/Technic_3M_Beam.jpg
--------------------------------------------------------------------------------
/images/parts/Technic_5M_Beam.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sshopov/pyconau2017/e492e284a5afa5115f81fddf83546168b128591c/images/parts/Technic_5M_Beam.jpg
--------------------------------------------------------------------------------
/images/parts/Technic_7M_Beam.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sshopov/pyconau2017/e492e284a5afa5115f81fddf83546168b128591c/images/parts/Technic_7M_Beam.jpg
--------------------------------------------------------------------------------
/images/parts/Technic_9M_Beam.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sshopov/pyconau2017/e492e284a5afa5115f81fddf83546168b128591c/images/parts/Technic_9M_Beam.jpg
--------------------------------------------------------------------------------
/images/parts/Technic_Ang_Beam_3X5_90_Deg.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sshopov/pyconau2017/e492e284a5afa5115f81fddf83546168b128591c/images/parts/Technic_Ang_Beam_3X5_90_Deg.jpg
--------------------------------------------------------------------------------
/images/parts/Technic_Ang_Beam_4X2_90_Deg.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sshopov/pyconau2017/e492e284a5afa5115f81fddf83546168b128591c/images/parts/Technic_Ang_Beam_4X2_90_Deg.jpg
--------------------------------------------------------------------------------
/images/parts/Technic_Angular_Beam_3X7.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sshopov/pyconau2017/e492e284a5afa5115f81fddf83546168b128591c/images/parts/Technic_Angular_Beam_3X7.jpg
--------------------------------------------------------------------------------
/images/parts/Technic_Angular_Beam_4X4.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sshopov/pyconau2017/e492e284a5afa5115f81fddf83546168b128591c/images/parts/Technic_Angular_Beam_4X4.jpg
--------------------------------------------------------------------------------
/images/parts/Technic_Angular_Wheel.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sshopov/pyconau2017/e492e284a5afa5115f81fddf83546168b128591c/images/parts/Technic_Angular_Wheel.jpg
--------------------------------------------------------------------------------
/images/parts/Technic_Cross_Block-Fork_2X2.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sshopov/pyconau2017/e492e284a5afa5115f81fddf83546168b128591c/images/parts/Technic_Cross_Block-Fork_2X2.jpg
--------------------------------------------------------------------------------
/images/parts/Technic_Cross_Block_2X1.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sshopov/pyconau2017/e492e284a5afa5115f81fddf83546168b128591c/images/parts/Technic_Cross_Block_2X1.jpg
--------------------------------------------------------------------------------
/images/parts/Technic_Lever_3M.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sshopov/pyconau2017/e492e284a5afa5115f81fddf83546168b128591c/images/parts/Technic_Lever_3M.jpg
--------------------------------------------------------------------------------
/images/parts/Technic_Steering-Gear_3M.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sshopov/pyconau2017/e492e284a5afa5115f81fddf83546168b128591c/images/parts/Technic_Steering-Gear_3M.jpg
--------------------------------------------------------------------------------
/images/parts/Track_Rod_6M.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sshopov/pyconau2017/e492e284a5afa5115f81fddf83546168b128591c/images/parts/Track_Rod_6M.jpg
--------------------------------------------------------------------------------
/images/parts/Tube_W-_Double_485_Hole.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sshopov/pyconau2017/e492e284a5afa5115f81fddf83546168b128591c/images/parts/Tube_W-_Double_485_Hole.jpg
--------------------------------------------------------------------------------
/images/parts/Tyre_For_Wedge-Belt_Wheel.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sshopov/pyconau2017/e492e284a5afa5115f81fddf83546168b128591c/images/parts/Tyre_For_Wedge-Belt_Wheel.jpg
--------------------------------------------------------------------------------
/images/parts/Tyre_Low_Narrow_1458_X_624.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sshopov/pyconau2017/e492e284a5afa5115f81fddf83546168b128591c/images/parts/Tyre_Low_Narrow_1458_X_624.jpg
--------------------------------------------------------------------------------
/images/parts/Tyre_Normal_Wide_432_X_22.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sshopov/pyconau2017/e492e284a5afa5115f81fddf83546168b128591c/images/parts/Tyre_Normal_Wide_432_X_22.jpg
--------------------------------------------------------------------------------
/images/parts/V-Belt_24_-_Clear_Red.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sshopov/pyconau2017/e492e284a5afa5115f81fddf83546168b128591c/images/parts/V-Belt_24_-_Clear_Red.jpg
--------------------------------------------------------------------------------
/images/parts/Wedge-Belt_Wheel_24.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sshopov/pyconau2017/e492e284a5afa5115f81fddf83546168b128591c/images/parts/Wedge-Belt_Wheel_24.jpg
--------------------------------------------------------------------------------
/images/parts/Worm_Gear_2_Module_For_Gear_Wheel.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sshopov/pyconau2017/e492e284a5afa5115f81fddf83546168b128591c/images/parts/Worm_Gear_2_Module_For_Gear_Wheel.jpg
--------------------------------------------------------------------------------
/images/parts/colorsensor.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sshopov/pyconau2017/e492e284a5afa5115f81fddf83546168b128591c/images/parts/colorsensor.jpg
--------------------------------------------------------------------------------
/images/parts/ev3brick.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sshopov/pyconau2017/e492e284a5afa5115f81fddf83546168b128591c/images/parts/ev3brick.jpg
--------------------------------------------------------------------------------
/images/parts/imageSensor.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sshopov/pyconau2017/e492e284a5afa5115f81fddf83546168b128591c/images/parts/imageSensor.jpg
--------------------------------------------------------------------------------
/images/parts/irbeacon_.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sshopov/pyconau2017/e492e284a5afa5115f81fddf83546168b128591c/images/parts/irbeacon_.jpg
--------------------------------------------------------------------------------
/images/parts/irseeker.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sshopov/pyconau2017/e492e284a5afa5115f81fddf83546168b128591c/images/parts/irseeker.jpg
--------------------------------------------------------------------------------
/images/parts/largeServoMotor.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sshopov/pyconau2017/e492e284a5afa5115f81fddf83546168b128591c/images/parts/largeServoMotor.jpg
--------------------------------------------------------------------------------
/images/parts/me-ev3-shrank.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sshopov/pyconau2017/e492e284a5afa5115f81fddf83546168b128591c/images/parts/me-ev3-shrank.jpg
--------------------------------------------------------------------------------
/images/parts/mediumMotor.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sshopov/pyconau2017/e492e284a5afa5115f81fddf83546168b128591c/images/parts/mediumMotor.jpg
--------------------------------------------------------------------------------
/images/parts/parts.txt:
--------------------------------------------------------------------------------
1 | Tyre_Normal_Wide_432_X_22 Tyre_Normal_Wide_432_X_22 Tyre_Normal_Wide_432_X_22 Tyre_Normal_Wide_432_X_22 Tyre_Low_Narrow_1458_X_624 Tyre_Low_Narrow_1458_X_624 Rim_Wide_WCross_30-20 Rim_Wide_WCross_30-20 Rim_Wide_WCross_30-20 Rim_Wide_WCross_30-20 Caterpillar_Track Caterpillar_Track Cross_Axle_6M Cross_Axle_6M Cross_Axle_6M Cross_Axle_6M Cross_Axle_6M Cross_Axle_6M Cross_Axle_6M Cross_Axle_6M Cross_Axle_6M Double_Angular_Beam_3X7_45 Double_Angular_Beam_3X7_45 Double_Angular_Beam_3X7_45 Double_Angular_Beam_3X7_45 Double_Angular_Beam_3X7_45 Double_Angular_Beam_3X7_45 Double_Angular_Beam_3X7_45 Double_Angular_Beam_3X7_45 Double_Angular_Beam_3X7_45 Double_Angular_Beam_3X7_45 Double_Angular_Beam_3X7_45 Double_Angular_Beam_3X7_45 Technic_Ang_Beam_4X2_90_Deg Technic_Ang_Beam_4X2_90_Deg Technic_Ang_Beam_4X2_90_Deg Technic_Ang_Beam_4X2_90_Deg Technic_Ang_Beam_4X2_90_Deg Technic_Ang_Beam_4X2_90_Deg Technic_Ang_Beam_4X2_90_Deg Technic_Ang_Beam_4X2_90_Deg Connector_Peg_W_Friction Connector_Peg_W_Friction Connector_Peg_W_Friction Connector_Peg_W_Friction Connector_Peg_W_Friction Connector_Peg_W_Friction Connector_Peg_W_Friction Connector_Peg_W_Friction Connector_Peg_W_Friction Connector_Peg_W_Friction Connector_Peg_W_Friction Connector_Peg_W_Friction Connector_Peg_W_Friction Connector_Peg_W_Friction Connector_Peg_W_Friction Connector_Peg_W_Friction Connector_Peg_W_Friction Connector_Peg_W_Friction Connector_Peg_W_Friction Connector_Peg_W_Friction Connector_Peg_W_Friction Connector_Peg_W_Friction Connector_Peg_W_Friction Connector_Peg_W_Friction Connector_Peg_W_Friction Connector_Peg_W_Friction Connector_Peg_W_Friction Connector_Peg_W_Friction Connector_Peg_W_Friction Connector_Peg_W_Friction Connector_Peg_W_Friction Connector_Peg_W_Friction Connector_Peg_W_Friction Connector_Peg_W_Friction Connector_Peg_W_Friction Connector_Peg_W_Friction Connector_Peg_W_Friction Connector_Peg_W_Friction Connector_Peg_W_Friction Connector_Peg_W_Friction Connector_Peg_W_Friction Connector_Peg_W_Friction Connector_Peg_W_Friction Connector_Peg_W_Friction Connector_Peg_W_Friction Connector_Peg_W_Friction Connector_Peg_W_Friction Connector_Peg_W_Friction Connector_Peg_W_Friction Connector_Peg_W_Friction Connector_Peg_W_Friction Connector_Peg_W_Friction Connector_Peg_W_Friction Connector_Peg_W_Friction Connector_Peg_W_Friction Connector_Peg_W_Friction Connector_Peg_W_Friction Connector_Peg_W_Friction Connector_Peg_W_Friction Connector_Peg_W_Friction Connector_Peg_W_Friction Connector_Peg_W_Friction Connector_Peg_W_Friction Connector_Peg_W_Friction Connector_Peg_W_Friction Connector_Peg_W_Friction Connector_Peg_W_Friction Connector_Peg_W_Friction Connector_Peg_W_Friction Connector_Peg_W_Friction Connector_Peg_W_Friction Connector_Peg_W_Friction Connector_Peg_W_Friction Connector_Peg_W_Friction Connector_Peg_W_Friction Connector_Peg_W_Friction Connector_Peg_W_Friction Connector_Peg_W_Friction Connector_Peg_W_Friction Connector_Peg_W_Friction Connector_Peg_W_Friction Connector_Peg_W_Friction Connector_Peg_W_Friction Connector_Peg_W_Friction Connector_Peg_W_Friction Connector_Peg_W_Friction Connector_Peg_W_Friction Connector_Peg_W_Friction Connector_Peg_W_Friction Connector_Peg_W_Friction Connector_Peg_W_Friction Connector_Peg_W_Friction Connector_Peg_W_Friction Connector_Peg_W_Friction Connector_Peg_W_Friction Technic_Angular_Beam_4X4 Technic_Angular_Beam_4X4 Technic_Angular_Beam_4X4 Technic_Angular_Beam_4X4 Technic_Angular_Beam_3X7 Technic_Angular_Beam_3X7 Technic_Angular_Beam_3X7 Technic_Angular_Beam_3X7 Technic_Angular_Beam_3X7 Technic_Angular_Beam_3X7 Technic_Angular_Beam_3X7 Technic_Angular_Beam_3X7 Technic_Angular_Beam_3X7 Technic_Angular_Beam_3X7 Technic_Angular_Beam_3X7 Technic_Angular_Beam_3X7 Lt_Steering_Gear Lt_Steering_Gear Lt_Steering_Gear Lt_Steering_Gear Technic_5M_Beam Technic_5M_Beam Technic_5M_Beam Technic_5M_Beam Technic_5M_Beam Technic_5M_Beam Technic_5M_Beam Technic_5M_Beam Technic_5M_Beam Technic_5M_Beam Technic_3M_Beam Technic_3M_Beam Technic_3M_Beam Technic_3M_Beam Technic_3M_Beam Technic_3M_Beam Technic_3M_Beam Technic_3M_Beam Technic_3M_Beam Technic_3M_Beam Technic_3M_Beam Technic_3M_Beam Technic_Ang_Beam_3X5_90_Deg Technic_Ang_Beam_3X5_90_Deg Technic_Ang_Beam_3X5_90_Deg Technic_Ang_Beam_3X5_90_Deg Technic_Ang_Beam_3X5_90_Deg Technic_Ang_Beam_3X5_90_Deg Comb_Wheel Comb_Wheel Double_Conical_Wheel_Z12_1M Double_Conical_Wheel_Z12_1M Ball_With_Friction_Snap Ball_With_Friction_Snap Ball_With_Friction_Snap Ball_With_Friction_Snap Ball_With_Friction_Snap Ball_With_Friction_Snap Technic_Angular_Wheel Technic_Angular_Wheel Technic_Angular_Wheel Technic_Angular_Wheel Double_Conical_Wheel_Z36 Double_Conical_Wheel_Z36 Double_Conical_Wheel_Z36 Double_Conical_Wheel_Z36 Double_Conical_Wheel_Z36 Technic_7M_Beam Technic_7M_Beam Technic_7M_Beam Technic_7M_Beam Technic_7M_Beam Technic_7M_Beam Technic_13M_Beam Technic_13M_Beam Technic_13M_Beam Technic_13M_Beam Technic_15M_Beam Technic_15M_Beam Technic_15M_Beam Technic_15M_Beam T-Beam_3X3_W-Hole_48 T-Beam_3X3_W-Hole_48 T-Beam_3X3_W-Hole_48 T-Beam_3X3_W-Hole_48 Beam_3M_485_W_Fork Track_Rod_6M Track_Rod_6M Technic_9M_Beam Technic_9M_Beam Technic_9M_Beam Technic_9M_Beam Technic_9M_Beam Technic_9M_Beam Technic_9M_Beam Technic_9M_Beam Beam_1X2_W-Cross_And_Hole Beam_1X2_W-Cross_And_Hole Beam_1X2_W-Cross_And_Hole Beam_1X2_W-Cross_And_Hole Beam_1X2_W-Cross_And_Hole Beam_1X2_W-Cross_And_Hole Beam_1X2_W-Cross_And_Hole Beam_1X2_W-Cross_And_Hole Beam_1X2_W-Cross_And_Hole Beam_1X2_W-Cross_And_Hole Tyre_For_Wedge-Belt_Wheel Tyre_For_Wedge-Belt_Wheel Tyre_For_Wedge-Belt_Wheel Double_Conical_Wheel_Z20_1M Double_Conical_Wheel_Z20_1M Double_Conical_Wheel_Z20_1M Double_Conical_Wheel_Z20_1M Ev3_Cable_250_Mm Ev3_Cable_250_Mm Ev3_Cable_250_Mm Ev3_Cable_250_Mm Ev3_Cable_350_Mm Ev3_Cable_350_Mm Ev3_Cable_500_Mm Shooter Magasine_For_Balls_165 3M_Connector_Peg 3M_Connector_Peg 3M_Connector_Peg 3M_Connector_Peg Conical_Wheel_Z12 Krydsaksel_M-Stop_4M Krydsaksel_M-Stop_4M Krydsaksel_M-Stop_4M Bevel_Gear_Z20 ConnBush_WFric-Crossale ConnBush_WFric-Crossale ConnBush_WFric-Crossale ConnBush_WFric-Crossale ConnBush_WFric-Crossale ConnBush_WFric-Crossale ConnBush_WFric-Crossale ConnBush_WFric-Crossale ConnBush_WFric-Crossale ConnBush_WFric-Crossale ConnBush_WFric-Crossale ConnBush_WFric-Crossale ConnBush_WFric-Crossale ConnBush_WFric-Crossale ConnBush_WFric-Crossale ConnBush_WFric-Crossale ConnBush_WFric-Crossale ConnBush_WFric-Crossale ConnBush_WFric-Crossale ConnBush_WFric-Crossale ConnBush_WFric-Crossale ConnBush_WFric-Crossale ConnBush_WFric-Crossale ConnBush_WFric-Crossale ConnBush_WFric-Crossale ConnBush_WFric-Crossale ConnBush_WFric-Crossale ConnBush_WFric-Crossale Connector_Peg_W_Friction_3M Connector_Peg_W_Friction_3M Connector_Peg_W_Friction_3M Connector_Peg_W_Friction_3M Connector_Peg_W_Friction_3M Connector_Peg_W_Friction_3M Connector_Peg_W_Friction_3M Connector_Peg_W_Friction_3M Connector_Peg_W_Friction_3M Connector_Peg_W_Friction_3M Connector_Peg_W_Friction_3M Connector_Peg_W_Friction_3M Connector_Peg_W_Friction_3M Connector_Peg_W_Friction_3M Connector_Peg_W_Friction_3M Connector_Peg_W_Friction_3M Connector_Peg_W_Friction_3M Connector_Peg_W_Friction_3M Connector_Peg_W_Friction_3M Connector_Peg_W_Friction_3M Connector_Peg_W_Friction_3M Connector_Peg_W_Friction_3M Connector_Peg_W_Friction_3M Connector_Peg_W_Friction_3M Connector_Peg_W_Friction_3M Connector_Peg_W_Friction_3M Connector_Peg_W_Friction_3M Connector_Peg_W_Friction_3M Connector_Peg_W_Friction_3M Connector_Peg_W_Friction_3M Connector_Peg_W_Friction_3M Connector_Peg_W_Friction_3M Connector_Peg_W_Friction_3M Connector_Peg_W_Friction_3M Connector_Peg_W_Friction_3M Connector_Peg_W_Friction_3M Connector_Peg_W_Friction_3M Connector_Peg_W_Friction_3M V-Belt_24_-_Clear_Red Technic_Cross_Block_2X1 Technic_Cross_Block_2X1 Double_Cross_Block Double_Cross_Block Double_Cross_Block Double_Cross_Block Double_Cross_Block Double_Cross_Block Double_Cross_Block Double_Cross_Block Double_Cross_Block Double_Cross_Block Double_Cross_Block Double_Cross_Block Double_Cross_Block Double_Cross_Block Double_Cross_Block Double_Cross_Block Double_Cross_Block 2M_Fric_Snap_W-Cross_Hole 2M_Fric_Snap_W-Cross_Hole 2M_Fric_Snap_W-Cross_Hole 2M_Fric_Snap_W-Cross_Hole 2M_Fric_Snap_W-Cross_Hole 2M_Fric_Snap_W-Cross_Hole 2M_Fric_Snap_W-Cross_Hole 2M_Fric_Snap_W-Cross_Hole 2M_Fric_Snap_W-Cross_Hole 2M_Fric_Snap_W-Cross_Hole 2M_Cross_Axle_W_Groove 2M_Cross_Axle_W_Groove 2M_Cross_Axle_W_Groove 2M_Cross_Axle_W_Groove 2M_Cross_Axle_W_Groove 2M_Cross_Axle_W_Groove 2M_Cross_Axle_W_Groove 2M_Cross_Axle_W_Groove 2M_Cross_Axle_W_Groove 2M_Cross_Axle_W_Groove 2M_Cross_Axle_W_Groove 2M_Cross_Axle_W_Groove Technic_Cross_Block-Fork_2X2 Technic_Cross_Block-Fork_2X2 Technic_Cross_Block-Fork_2X2 Technic_Cross_Block-Fork_2X2 Cross_block_3M Cross_block_3M Cross_block_3M Cross_block_3M Cross_block_3M Cross_block_3M Cross_block_3M Cross_block_3M Cross_block_3M Cross_block_3M Cross_block_3M Cross_block_3M Cross_block_3M Cross_block_3M Cross_Block_90 Cross_Block_90 Cross_Block_90 Cross_Block_90 Cross_Block_90 Cross_Block_90 Cross_Block_90 Cross_Block_90 Angle_Element_90_Degrees_[6] Angle_Element_135_Deg_[4] Angle_Element_135_Deg_[4] Angle_Element_135_Deg_[4] Angle_Element_135_Deg_[4] Bush_For_Cross_Axle Bush_For_Cross_Axle Bush_For_Cross_Axle Bush_For_Cross_Axle Bush_For_Cross_Axle Bush_For_Cross_Axle Bush_For_Cross_Axle Bush_For_Cross_Axle Bush_For_Cross_Axle Angle_Element_180_Degrees_[2] Angle_Element_180_Degrees_[2] Angle_Element_180_Degrees_[2] Angle_Element_180_Degrees_[2] Angle_Element_180_Degrees_[2] Angle_Element_180_Degrees_[2] Angle_Element_0_Degrees_[1] Angle_Element_0_Degrees_[1] Angle_Element_0_Degrees_[1] Angle_Element_0_Degrees_[1] Cross_Axle_Extension_2M Cross_Axle_Extension_2M Cross_Axle_Extension_2M Technic_11M_Beam Technic_11M_Beam Technic_11M_Beam Technic_11M_Beam Bion_Eye Bion_Eye Bion_Eye Bion_Eye Bion_Eye Bion_Eye Ball_165 Ball_165 Ball_165 1-2_Bush 1-2_Bush 1-2_Bush 1-2_Bush 1-2_Bush 1-2_Bush 1-2_Bush 1-2_Bush 1-2_Bush 1-2_Bush 1-2_Bush Cross_Axle_8M_With_End_Stop Cross_Axle_8M_With_End_Stop Cross_Axle_8M_With_End_Stop Cross_Axle_8M_With_End_Stop Cross_Axle_8M_With_End_Stop Cross_Axle_8M_With_End_Stop Cross_Axle_55_With_Stop_1M Cross_Axle_55_With_Stop_1M Cross_Axle_4M_With_End_Stop Cross_Axle_4M_With_End_Stop Cross_Axle_4M_With_End_Stop Cross_Axle_4M_With_End_Stop Gear_Wheel_Z24 Gear_Wheel_Z24 Ball_W_Cross_Axle Ball_W_Cross_Axle Ball_W_Cross_Axle Ball_W_Cross_Axle Ball_W_Cross_Axle Ball_W_Cross_Axle Catch_W_Cross_Hole Catch_W_Cross_Hole Technic_Lever_3M Cross_Axle_5M Cross_Axle_5M Cross_Axle_5M Cross_Axle_5M Cross_Axle_5M Cross_Axle_5M Cross_Axle_5M Cross_Axle_5M Cross_Axle_5M Hub_112_X_784 Hub_112_X_784 Hub_112_X_784 Hub_112_X_784 Cross_Axle_7M Cross_Axle_7M Connector_Peg Connector_Peg Connector_Peg Connector_Peg Cross_Axle_3M Cross_Axle_3M Cross_Axle_3M Cross_Axle_3M Cross_Axle_3M Cross_Axle_3M Cross_Axle_3M Cross_Axle_3M Cross_Axle_3M Cross_Axle_3M Cross_Axle_3M Cross_Axle_3M Cross_Axle_3M Cross_Axle_3M Cross_Axle_3M Cross_Axle_3M Cross_Axle_3M Cross_Axle_3M Cross_Axle_3M Cross_Axle_3M Cross_Axle_3M Cross_Axle_3M Module_Bush Module_Bush Module_Bush Module_Bush Beam_3_M_W-4_Snaps Beam_3_M_W-4_Snaps Beam_3_M_W-4_Snaps Beam_3_M_W-4_Snaps Beam_3_M_W-4_Snaps Beam_3_M_W-4_Snaps Beam_3_M_W-4_Snaps Beam_3_M_W-4_Snaps Beam_3_M_W-4_Snaps Beam_3_M_W-4_Snaps Beam_3_M_W-4_Snaps Beam_3_M_W-4_Snaps Wedge-Belt_Wheel_24 Wedge-Belt_Wheel_24 Wedge-Belt_Wheel_24 3-Branch_Cross_Axle_W-Cross_H Cross_Axle_9M Cross_Block_3X2 Cross_Block_3X2 Beam_Frame_5X7_485 Beam_Frame_5X7_485 Beam_R_Frame_5X11_485 Beam_R_Frame_5X11_485 Double_Bush_3M_49 Double_Bush_3M_49 Double_Bush_3M_49 Double_Bush_3M_49 Double_Bush_3M_49 Double_Bush_3M_49 Cross_Block-Form_2X2X2 Cross_Block-Form_2X2X2 Technic_Steering-Gear_3M Technic_Steering-Gear_3M Technic_Steering-Gear_3M Technic_Steering-Gear_3M Ms_Ev3_Sensor_Colour Ms-Ev3_Ir_Sensor Ms_Ev3_Touch_Sensor Ms-Ev3_Medium_Motor Tube_W-_Double_485_Hole Tube_W-_Double_485_Hole Worm_Gear_2_Module_For_Gear_Wheel Worm_Gear_2_Module_For_Gear_Wheel Sword Sword Sword Sword Sword Sword Crossaxle_3M_With_Knob Crossaxle_3M_With_Knob Crossaxle_3M_With_Knob Crossaxle_3M_With_Knob Left_Panel_3X7 Left_Panel_3X7 Left_Panel_3X7 Right_Panel_3X7 Right_Panel_3X7 Right_Panel_3X7 Right_Panel_3X11 Right_Panel_3X11 Right_Panel_3X11 Left_Panel_3X11 Left_Panel_3X11 Left_Panel_3X11 Right_Screen_485_4X7X4 Left_Screen_485_4X7X4 Ms-Ev3_Ir_Beacon Ms-Ev3_Large_Motor Ms-Ev3_Large_Motor Ms-Ev3_P-Brick Bion_Eye Bion_Eye Bion_Eye Bion_Eye Blade_W_Technic_Hole_1 Blade_W_Technic_Hole_1 Blade_W_Technic_Hole_1 Blade_W_Technic_Hole_1
--------------------------------------------------------------------------------
/images/parts/zzz-empty.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sshopov/pyconau2017/e492e284a5afa5115f81fddf83546168b128591c/images/parts/zzz-empty.jpg
--------------------------------------------------------------------------------
/images/sensor-brickButtons-colorSensor-infraredSensor-motorRotation-timer-touchSensor.PNG:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sshopov/pyconau2017/e492e284a5afa5115f81fddf83546168b128591c/images/sensor-brickButtons-colorSensor-infraredSensor-motorRotation-timer-touchSensor.PNG
--------------------------------------------------------------------------------
/images/skate.PNG:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sshopov/pyconau2017/e492e284a5afa5115f81fddf83546168b128591c/images/skate.PNG
--------------------------------------------------------------------------------
/images/spik3r-mission3.PNG:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sshopov/pyconau2017/e492e284a5afa5115f81fddf83546168b128591c/images/spik3r-mission3.PNG
--------------------------------------------------------------------------------
/images/tree_178x128.bmp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sshopov/pyconau2017/e492e284a5afa5115f81fddf83546168b128591c/images/tree_178x128.bmp
--------------------------------------------------------------------------------
/labview/EL3CTRIC_GUITAR.ev3:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sshopov/pyconau2017/e492e284a5afa5115f81fddf83546168b128591c/labview/EL3CTRIC_GUITAR.ev3
--------------------------------------------------------------------------------
/labview/ev3storm-mission3.ev3:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sshopov/pyconau2017/e492e284a5afa5115f81fddf83546168b128591c/labview/ev3storm-mission3.ev3
--------------------------------------------------------------------------------
/labview/ev3storm-mission4-irspinblades.ev3:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sshopov/pyconau2017/e492e284a5afa5115f81fddf83546168b128591c/labview/ev3storm-mission4-irspinblades.ev3
--------------------------------------------------------------------------------
/labview/ev3storm-mission5-ircontrol.ev3:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sshopov/pyconau2017/e492e284a5afa5115f81fddf83546168b128591c/labview/ev3storm-mission5-ircontrol.ev3
--------------------------------------------------------------------------------
/labview/ev3storm-mission6-followir-shoot.ev3:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sshopov/pyconau2017/e492e284a5afa5115f81fddf83546168b128591c/labview/ev3storm-mission6-followir-shoot.ev3
--------------------------------------------------------------------------------
/labview/spik3r-mission3.ev3:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sshopov/pyconau2017/e492e284a5afa5115f81fddf83546168b128591c/labview/spik3r-mission3.ev3
--------------------------------------------------------------------------------
/labview/spik3r-mission4.ev3:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sshopov/pyconau2017/e492e284a5afa5115f81fddf83546168b128591c/labview/spik3r-mission4.ev3
--------------------------------------------------------------------------------
/nupogodi.py:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env python3
2 | from ev3dev.ev3 import *
3 | from time import sleep
4 | from PIL import Image
5 |
6 | player = 1
7 | trigger = True
8 | last = 0
9 | Speed = 350
10 | score = 0
11 | game_over = False
12 | over = True
13 | life = 3
14 | level = 0
15 |
16 | m1 = []
17 | m2 = []
18 | m3 = []
19 | m4 = []
20 | x1 = []
21 | y1 = []
22 | x2 = []
23 | y2 = []
24 | x3 = []
25 | y3 = []
26 | x4 = []
27 | y4 = []
28 |
29 |
30 |
31 |
32 | ir = InfraredSensor() #Sensor.SetMode(4,2)
33 | wolf1 = Image.open(r'/home/robot/images/vl1.bmp')
34 | wolf2 = Image.open(r'/home/robot/images/vl2.bmp')
35 | wolf3 = Image.open(r'/home/robot/images/vl3.bmp')
36 | wolf4 = Image.open(r'/home/robot/images/vl4.bmp')
37 |
38 | lcd.clear()
39 | lcd.image.paste(wolf1, (0,0))
40 | lcd.update()
41 |
42 | Sound.beep()
43 |
44 | for i in range(0,5):
45 | m1[i] = 0
46 | m2[i] = 0
47 | m3[i] = 0
48 | m4[i] = 0
49 |
50 |
51 | x1[0] = 26
52 | y1[0] = 44
53 | x1[1] = 34
54 | y1[1] = 49
55 | x1[2] = 42
56 | y1[2] = 54
57 | x1[3] = 52
58 | y1[3] = 61
59 | x1[4] = 52
60 | y1[4] = 120
61 |
62 |
63 | x2[0] = 26
64 | y2[0] = 72
65 | x2[1] = 34
66 | y2[1] = 77
67 | x2[2] = 42
68 | y2[2] = 82
69 | x2[3] = 52
70 | y2[3] = 89
71 | x2[4] = 52
72 | y2[4] = 120
73 |
74 |
75 | x3[0] = 151
76 | y3[0] = 44
77 | x3[1] = 143
78 | y3[1] = 49
79 | x3[2] = 135
80 | y3[2] = 54
81 | x3[3] = 126
82 | y3[3] = 61
83 | x3[4] = 126
84 | y3[4] = 120
85 |
86 |
87 | x4[0] = 150
88 | y4[0] = 73
89 | x4[1] = 143
90 | y4[1] = 77
91 | x4[2] = 136
92 | y4[2] = 82
93 | x4[3] = 126
94 | y4[3] = 89
95 | x4[4] = 126
96 | y4[4] = 120
97 |
98 | ' Запускаем подпроцесы
99 | Thread.Run = logic
100 | Thread.Run = screen
101 | ' отрисовка экрана
102 | Sub screen
103 | While over
104 | If trigger = "True" Then
105 | If player = 1 Then
106 | LCD.BmpFile(1,0,0,"/home/root/lms2012/prjs/volk/vl1")
107 | EndIf
108 |
109 | If player = 2 Then
110 | LCD.BmpFile(1,0,0,"/home/root/lms2012/prjs/volk/vl2")
111 | EndIf
112 |
113 | If player = 3 Then
114 | LCD.BmpFile(1,0,0,"/home/root/lms2012/prjs/volk/vl3")
115 | EndIf
116 |
117 | If player = 4 Then
118 | LCD.BmpFile(1,0,0,"/home/root/lms2012/prjs/volk/vl4")
119 | EndIf
120 |
121 |
122 |
123 | For i = 0 To 4
124 | If m1[i] > 0 Then
125 | LCD.FillCircle(1,x1[i],y1[i],3)
126 | EndIf
127 |
128 | If m2[i] > 0 Then
129 | LCD.FillCircle(1,x2[i],y2[i],3)
130 | EndIf
131 |
132 | If m3[i] > 0 Then
133 | LCD.FillCircle(1,x3[i],y3[i],3)
134 | EndIf
135 |
136 | If m4[i] > 0 Then
137 | LCD.FillCircle(1,x4[i],y4[i],3)
138 | EndIf
139 | EndFor
140 |
141 | LCD.Text(1,40,34,1,"Life-" + life + " " + score)
142 |
143 | If game_over = "True" Then
144 | LCD.BmpFile(1,0,0,"/home/root/lms2012/prjs/volk/GO")
145 | Speaker.Note(100,"E4",3000)
146 | Speaker.Wait()
147 | Speaker.Note(100,"D4",3000)
148 | Speaker.Wait()
149 | Speaker.Note(100,"C4",3000)
150 | Speaker.Wait()
151 | Program.End()
152 | EndIf
153 |
154 | trigger = "False"
155 | EndIf
156 |
157 |
158 | EndWhile
159 | EndSub
160 | ' процедура обработки яйца
161 | Sub logic
162 | While over
163 | ' процедура увеличивания сложности игры
164 | Speed = 1000 / (0.03*score+1)
165 |
166 | ' процедура рождения яйца
167 | If EV3.Time > (last + (Speed*2)) Then
168 | If m1[0] = 0 And m1[1] = 0 And Math.Round(Math.GetRandomNumber(100)) = 10 Then
169 | m1[0] = EV3.Time
170 | last = m1[0]
171 | trigger = "True"
172 | EndIf
173 | EndIf
174 |
175 | If EV3.Time > (last + (Speed*2)) Then
176 | If m2[0] = 0 And m2[1] = 0 And Math.Round(Math.GetRandomNumber(100)) = 20 Then
177 | m2[0] = EV3.Time
178 | last = m2[0]
179 | trigger = "True"
180 | EndIf
181 | EndIf
182 |
183 | If EV3.Time > (last + (Speed*2)) Then
184 | If m3[0] = 0 And m3[1] = 0 And Math.Round(Math.GetRandomNumber(100)) = 30 Then
185 | m3[0] = EV3.Time
186 | last = m3[0]
187 | trigger = "True"
188 | EndIf
189 | EndIf
190 |
191 | If EV3.Time > (last + (Speed*2)) Then
192 | If m4[0] = 0 And m4[1] = 0 And Math.Round(Math.GetRandomNumber(100)) = 40 Then
193 | m4[0] = EV3.Time
194 | last = m4[0]
195 | trigger = "True"
196 | EndIf
197 | EndIf
198 |
199 | ' цикл для перемещения яйца
200 | For i = 0 To 4
201 | If m1[i] <> 0 And m1[i] + (Speed*(i+1)) < EV3.Time Then
202 | m1[i+1] = m1[i]
203 | m1[i] = 0
204 | trigger = "True"
205 | Speaker.Note(100,"C4",150)
206 | EndIf
207 |
208 | If m2[i] <> 0 And m2[i] + (Speed*(i+1)) < EV3.Time Then
209 | m2[i+1] = m2[i]
210 | m2[i] = 0
211 | trigger = "True"
212 | Speaker.Note(100,"C4",150)
213 | EndIf
214 |
215 | If m3[i] <> 0 And m3[i] + (Speed*(i+1)) < EV3.Time Then
216 | m3[i+1] = m3[i]
217 | m3[i] = 0
218 | trigger = "True"
219 | Speaker.Note(100,"C4",150)
220 | EndIf
221 |
222 | If m4[i] <> 0 And m4[i] + (Speed*(i+1)) < EV3.Time Then
223 | m4[i+1] = m4[i]
224 | m4[i] = 0
225 | trigger = "True"
226 | Speaker.Note(100,"C4",150)
227 | EndIf
228 | EndFor
229 | ' Проверка на забирание яйца
230 |
231 | If m1[3] > 0 And player = 1 And m1[3] + (Speed*3.5) < EV3.Time Then
232 | score = score+1
233 | m1[3] = 0
234 | trigger = "True"
235 | Speaker.Note(100,"C5",250)
236 | EndIf
237 |
238 | If m2[3] > 0 And player = 2 And m2[3] + (Speed*3.5) < EV3.Time Then
239 | score = score+1
240 | m2[3] = 0
241 | trigger = "True"
242 | Speaker.Note(100,"C5",250)
243 | EndIf
244 |
245 | If m3[3] > 0 And player = 3 And m3[3] + (Speed*3.5) < EV3.Time Then
246 | score = score+1
247 | m3[3] = 0
248 | trigger = "True"
249 | Speaker.Note(100,"C5",250)
250 | EndIf
251 |
252 | If m4[3] > 0 And player = 4 And m4[3] + (Speed*3.5) < EV3.Time Then
253 | score = score+1
254 | m4[3] = 0
255 | trigger = "True"
256 | Speaker.Note(100,"C5",250)
257 | EndIf
258 | ' Проверяем не упалоли яйцо
259 |
260 | If m1[4] > 0 Then
261 | Program.Delay(1500)
262 | Speaker.Note(100,"E4",500)
263 | Speaker.Wait()
264 | Speaker.Note(100,"D4",250)
265 | Speaker.Wait()
266 | Speaker.Note(100,"C4",250)
267 | Speaker.Wait()
268 |
269 | life = life - 1
270 | If life = 0 Then
271 | game_over = "True"
272 | EndIf
273 | m1[4] = 0
274 | trigger = "True"
275 | Program.Delay(1500)
276 | EndIf
277 |
278 | If m2[4] > 0 Then
279 | Program.Delay(1500)
280 | Speaker.Note(100,"E4",500)
281 | Speaker.Wait()
282 | Speaker.Note(100,"D4",250)
283 | Speaker.Wait()
284 | Speaker.Note(100,"C4",250)
285 | Speaker.Wait()
286 |
287 | life = life - 1
288 | If life = 0 Then
289 | game_over = "True"
290 | EndIf
291 | m2[4] = 0
292 | trigger = "True"
293 | Program.Delay(1500)
294 | EndIf
295 |
296 | If m3[4] > 0 Then
297 | Program.Delay(1500)
298 | Speaker.Note(100,"E4",500)
299 | Speaker.Wait()
300 | Speaker.Note(100,"D4",250)
301 | Speaker.Wait()
302 | Speaker.Note(100,"C4",250)
303 | Speaker.Wait()
304 |
305 | life = life - 1
306 | If life = 0 Then
307 | game_over = "True"
308 | EndIf
309 | m3[4] = 0
310 | trigger = "True"
311 | Program.Delay(1500)
312 | EndIf
313 |
314 | If m4[4] > 0 Then
315 | Program.Delay(1500)
316 | Speaker.Note(100,"E4",500)
317 | Speaker.Wait()
318 | Speaker.Note(100,"D4",250)
319 | Speaker.Wait()
320 | Speaker.Note(100,"C4",250)
321 | Speaker.Wait()
322 |
323 | life = life - 1
324 | If life = 0 Then
325 | game_over = "True"
326 | EndIf
327 | m4[4] = 0
328 | trigger = "True"
329 | Program.Delay(1500)
330 | EndIf
331 | EndWhile
332 | EndSub
333 | ' процедура считывания покозаний ИК-датчика
334 |
335 | Speaker.Note(100,"E4",1000)
336 | Speaker.Wait()
337 | Speaker.Note(100,"D4",1000)
338 | Speaker.Wait()
339 |
340 | While over
341 | If Sensor.ReadRawValue(4,0) = 1 Then
342 | If player <> 1 Then
343 | player = 1
344 | trigger = "True"
345 | EndIf
346 | EndIf
347 |
348 | If Sensor.ReadRawValue(4,0) = 2 Then
349 | If player <> 2 Then
350 | player = 2
351 | trigger = "True"
352 | EndIf
353 | EndIf
354 |
355 | If Sensor.ReadRawValue(4,0) = 3 Then
356 | If player <> 3 Then
357 | player = 3
358 | trigger = "True"
359 | EndIf
360 | EndIf
361 |
362 | If Sensor.ReadRawValue(4,0) = 4 Then
363 | If player <> 4 Then
364 | player = 4
365 | trigger = "True"
366 | EndIf
367 | EndIf
368 | EndWhile
--------------------------------------------------------------------------------
/playspace.py:
--------------------------------------------------------------------------------
1 | def roll(motor, led_group, direction):
2 | ? ? def on_press(state):
3 | Sound.speak('red is up')
4 | ? ? return on_press
5 |
6 | rc.on_red_up = roll(0, Leds.LEFT, ? 1)
7 | 192.168.178.40
8 |
9 | import threading
10 | import time
11 |
12 | exitFlag = 0
13 |
14 | class myThread (threading.Thread):
15 | def __init__(self):
16 | threading.Thread.__init__(self)
17 | def run(self):
18 | Sound.speak('i like to move it, move it').wait()
19 | time.sleep(0.5)
20 | Sound.speak('you like to move it, move it').wait()
21 | time.sleep(0.5)
22 | Sound.speak('we like to ... move it!').wait()
23 |
24 |
25 | # Create new threads
26 | thread1 = myThread()
27 |
28 | # Start new Threads
29 | thread1.start()
30 |
31 | print "Exiting Main Thread"
32 |
33 | from pydub import AudioSegment
34 | sound = AudioSegment.from_mp3(r"C:/temp/moveit.mp3")
35 | sound.export(r"C:\work\pyconau2017\moveit.wav", format="wav")
36 | http://pydub.com/
37 |
38 | from ev3dev.ev3 import *
39 | Sound.play('/home/robot/moveit.wav')
40 | #can't play and talk at the same time because the audio device gets blocked
41 | Sound.speak('i like to move it, move it').wait()
42 | Sound.speak('you like to move it, move it').wait()
43 | Sound.speak('we like to ... move it!').wait()
44 |
45 | cool projects http://www.ev3dev.org/projects/
46 |
47 | Threads
48 | remote control
49 | sound speak and play
50 | mp3 to wav
51 |
52 |
53 | ABBRobotics prototyping with lego https://www.youtube.com/watch?v=-tsPuHaHFDw
54 | lays its own bridge https://www.youtube.com/watch?v=oUJ4L4kmbHw
55 | https://www.youtube.com/watch?v=Sjix76QjtMU top 5 3d printer CNC machine
56 |
57 | ev3 photo booth https://github.com/dlech/ev3dev-photo-booth
58 | https://lechnology.com/category/ev3dev/
59 |
60 |
61 | https://sites.google.com/site/ev3python/learn_ev3_python/screen
62 | The EV3 has a 178 x 128 pixels monochrome (black and white) LCD. The coordinates of the top-left pixel are (0, 0) and the coordinates of the bottom-right pixel are (177, 127).
63 | #!/usr/bin/env python3
64 | from ev3dev.ev3 import *
65 | from time import sleep
66 | from PIL import Image
67 |
68 | lcd = Screen()
69 |
70 | from PIL import Image
71 | im = Image.open(r'C:\work\EV3-NU-POGODI\sources\volk\nu_pogodi volk 1.jpg')
72 | im.save(r'C:\work\EV3-NU-POGODI\sources\volk\vl1.bmp','BMP')
73 |
74 | for i in range(2,5):
75 | im = Image.open(r'C:\work\EV3-NU-POGODI\sources\volk\nu_pogodi volk {0}.jpg'.format(i))
76 | im.save(r'C:\work\EV3-NU-POGODI\sources\volk\vl{0}.bmp'.format(i),'BMP')
77 |
78 |
79 | logo = Image.open('pics/parkrun_tree_178x128.bmp')
80 | lcd.image.paste(logo, (0,0))
81 | lcd.update()
82 | sleep(5)
83 | sudo chvt 6
84 | robot maker
85 | sudo chvt 1
86 |
87 | chmod +x myprogram.py
88 | need #!/usr/bin/env python3
89 |
90 | http://www.mindsensors.com/stem-with-robotics/13-pistorms-v2-base-kit-raspberry-pi-brain-for-lego-robot
91 | https://www.smashingrobotics.com/evb-alternative-mindstorms-ev3-intelligent-brick/ evb
92 | https://flybrix.com/ drones lego
93 |
94 |
95 | chmod u+x job.sh
96 |
--------------------------------------------------------------------------------
/run.sh:
--------------------------------------------------------------------------------
1 | python3 beep.py
--------------------------------------------------------------------------------
/run_rpyc.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 | python3 `which rpyc_classic.py`
--------------------------------------------------------------------------------
/sounds/r2d2.wav:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sshopov/pyconau2017/e492e284a5afa5115f81fddf83546168b128591c/sounds/r2d2.wav
--------------------------------------------------------------------------------
/starwars.py:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env python3
2 | '''
3 | Source name: starwars.py
4 | Author(s): Stoyan Shopov
5 |
6 | Python Version: 2.7, 3.* 32-bit or 64-bit
7 | License: LGPL
8 |
9 | Description:
10 | This program was run on the EV3D4 (R2D2 look-a-like) at Mount Barker parkrun 175.
11 | The droid help deliver the welcome speech.
12 | It had queued lines and they were delivered when the remote control was pressed (to allow
13 | for interaction with the presenter).
14 | The photo album can be found here:
15 | https://www.facebook.com/mountbarkerparkrun/posts/1603265023049154
16 |
17 | Preconditions:
18 | The program has been loaded on to EV3 running ev3dev
19 |
20 | Postcoditions:
21 | Program exits when back button is pressed.
22 |
23 | References:
24 | http://www.ev3dev.org/
25 | https://sites.google.com/site/ev3python/
26 | The WAVs came from http://www.moviewavs.com/Movies/Star_Wars.html
27 |
28 | Release history:
29 | ----------------------------------------------------
30 | 0.0.1 - 01/07/2017:
31 | Initial release
32 | '''
33 |
34 | import os
35 | import time
36 |
37 | from ev3dev.ev3 import *
38 |
39 | Sound.beep()
40 |
41 | rc = RemoteControl()
42 |
43 | mB = LargeMotor('outB')
44 | mC = LargeMotor('outC')
45 |
46 | counter = -1
47 | script = [ 'My name is R2 D2 and I come from a galaxy far far away!',
48 | '''It is a period of civil war. Rebel spaceships, striking from a hidden base, have won their first victory against the evil Galactic Empire.
49 | During the battle, Rebel spies managed to steal secret plans to the Empire's ultimate weapon, the DEATH STAR, an armo=red space station with enough power to destroy an entire planet.
50 | Unfortunately, the rebels have dropped the secret plans somewhere between here and the turn around flag near Bald Hills Road. I call for heros to look for them, find them and bring them back here to the start line.''',
51 | 'Are there any visitors or first timers?',
52 | 'That is good! You can go first and act as decoy for the storm troopers.',
53 | 'Wait, wait!',
54 | '''I feel a disturbance in the force. There is someone here who has reached 50 parkruns.
55 | He has a personal best of 26 22. He runs and volunteers with his wife Melissa and his sons Bailey and Sam. The force is strong with this one. His name is Leon.''',
56 | '/home/robot/sounds/myonlyhope.wav',
57 | 'Yes, I meant Leon Wan Kenobi. Sorry!',
58 | 'Chancellor Brian Haddy will give you a voucher to take with you.',
59 | '/home/robot/sounds/lightsaber.wav',
60 | 'You must also take a young jedai with you to help you on your quest. Bryannan Coook has just done 10 park runs.',
61 | 'Farewell heros! Run fast!',
62 | 'Do not forget to thank our volunteer Jedai knights: Jo, Georgia, Andrew, Jackson, Martin and Sammy.',
63 | 'May the force be with you!',
64 | '/home/robot/sounds/starwars.wav',
65 | ]
66 |
67 | say = Sound.speak
68 | play = Sound.play
69 |
70 | def queue():
71 | print(counter)
72 | if counter in range(0, len(script)):
73 | line = script[counter]
74 | print(line)
75 | if os.path.exists(line):
76 | play(line)
77 | else:
78 | say(line)
79 |
80 | def next_line():
81 | print('next line')
82 | def on_press(state):
83 | print(state)
84 | global counter
85 | if state:
86 | if not counter > len(script) - 2:
87 | counter += 1
88 | queue()
89 | return on_press
90 |
91 | def test():
92 | for i in range(20):
93 | rc.process()
94 | time.sleep(0.01)
95 | Sound.beep()
96 |
97 | def previous_line():
98 | def on_press(state):
99 | global counter
100 | if state:
101 | if counter > 1:
102 | counter -= 1
103 | queue()
104 | return on_press
105 |
106 | def roll(duration, speed):
107 | def on_press(state):
108 | if state:
109 | mB.run_timed(time_sp=duration, speed_sp=speed)
110 | mC.run_timed(time_sp=duration, speed_sp=speed)
111 | play('/home/robot/sounds/r2d2-1.wav').wait()
112 | play('/home/robot/sounds/r2d2-2.wav').wait()
113 | play('/home/robot/sounds/r2d2-3.wav').wait()
114 | play('/home/robot/sounds/r2d2-4.wav').wait()
115 | play('/home/robot/sounds/r2d2-5.wav').wait()
116 | return on_press
117 |
118 | # Assign event handler to each of the remote buttons
119 | rc.on_red_up = next_line()
120 | rc.on_red_down = previous_line()
121 | rc.on_blue_up = roll(2000, -250)
122 | rc.on_blue_down = roll(2000, 250)
123 |
124 |
125 |
126 | ##mB.stop()
127 | ##mC.stop()
128 | ##
129 | ### to make extra sure the motors have stopped:
130 | ##mB.run_forever(speed_sp=0)
131 | ##mC.run_forever(speed_sp=0)
132 |
133 | while True: #replaces previous line so use Ctrl-C to exit
134 | rc.process()
135 | time.sleep(0.01)
136 |
137 | # Ctrl-C if on terminal or a long press on the back button if on Brickman
138 |
--------------------------------------------------------------------------------