<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Kristofer Forsell Blog</title>
	<atom:link href="http://kristoferforsell.com/blog/feed/" rel="self" type="application/rss+xml" />
	<link>http://kristoferforsell.com/blog</link>
	<description></description>
	<lastBuildDate>Thu, 25 Feb 2010 21:48:02 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Raster</title>
		<link>http://kristoferforsell.com/blog/2010/02/25/raster/</link>
		<comments>http://kristoferforsell.com/blog/2010/02/25/raster/#comments</comments>
		<pubDate>Thu, 25 Feb 2010 21:48:02 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[play]]></category>
		<category><![CDATA[As3]]></category>
		<category><![CDATA[math]]></category>

		<guid isPermaLink="false">http://kristoferforsell.com/blog/?p=383</guid>
		<description><![CDATA[











]]></description>
			<content:encoded><![CDATA[<div class="grid_6">
<img src="http://kristoferforsell.com/blog/wp-content/2010/02/raster04.png" alt="" title="raster04" width="460" height="394" class="alignnone size-full wp-image-384" />
</div>
<div class="grid_6">
<img src="http://kristoferforsell.com/blog/wp-content/2010/02/raster03.png" alt="" title="raster04" width="460" height="394" class="alignnone size-full wp-image-384" />
</div>
<div class="grid_6">
<img src="http://kristoferforsell.com/blog/wp-content/2010/02/raster02.png" alt="" title="raster04" width="460" height="394" class="alignnone size-full wp-image-384" />
</div>
<div class="grid_6">
<img src="http://kristoferforsell.com/blog/wp-content/2010/02/raster01.png" alt="" title="raster04" width="460" height="394" class="alignnone size-full wp-image-384" />
</div>
]]></content:encoded>
			<wfw:commentRss>http://kristoferforsell.com/blog/2010/02/25/raster/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Prickar</title>
		<link>http://kristoferforsell.com/blog/2010/02/25/prickar/</link>
		<comments>http://kristoferforsell.com/blog/2010/02/25/prickar/#comments</comments>
		<pubDate>Thu, 25 Feb 2010 02:34:09 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[play]]></category>
		<category><![CDATA[As3]]></category>
		<category><![CDATA[math]]></category>

		<guid isPermaLink="false">http://kristoferforsell.com/blog/?p=379</guid>
		<description><![CDATA[


]]></description>
			<content:encoded><![CDATA[<div class="grid_12">
<img src="http://kristoferforsell.com/blog/wp-content/2010/02/prickar.png" alt="" title="prickar" width="940" height="538" class="alignnone size-full wp-image-380" />
</div>
]]></content:encoded>
			<wfw:commentRss>http://kristoferforsell.com/blog/2010/02/25/prickar/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Mattematik 2</title>
		<link>http://kristoferforsell.com/blog/2010/02/24/mattematik-2/</link>
		<comments>http://kristoferforsell.com/blog/2010/02/24/mattematik-2/#comments</comments>
		<pubDate>Wed, 24 Feb 2010 20:47:55 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[play]]></category>
		<category><![CDATA[As3]]></category>
		<category><![CDATA[Flash]]></category>
		<category><![CDATA[math]]></category>

		<guid isPermaLink="false">http://kristoferforsell.com/blog/?p=365</guid>
		<description><![CDATA[





]]></description>
			<content:encoded><![CDATA[<div class="grid_12">
<img src="http://kristoferforsell.com/blog/wp-content/2010/02/matte03.png" alt="" title="matte03" width="620" height="357" class="alignnone size-full wp-image-366" />
</div>
<div class="grid_12 prefix_4">
<img src="http://kristoferforsell.com/blog/wp-content/2010/02/matte04.png" alt="" title="matte04" width="620" height="357" class="alignnone size-full wp-image-366" />
</div>
]]></content:encoded>
			<wfw:commentRss>http://kristoferforsell.com/blog/2010/02/24/mattematik-2/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Mattematik</title>
		<link>http://kristoferforsell.com/blog/2010/02/24/mattematik/</link>
		<comments>http://kristoferforsell.com/blog/2010/02/24/mattematik/#comments</comments>
		<pubDate>Wed, 24 Feb 2010 19:16:52 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[play]]></category>
		<category><![CDATA[random]]></category>
		<category><![CDATA[As3]]></category>
		<category><![CDATA[generatives]]></category>
		<category><![CDATA[math]]></category>

		<guid isPermaLink="false">http://kristoferforsell.com/blog/?p=356</guid>
		<description><![CDATA[





]]></description>
			<content:encoded><![CDATA[<div class="grid_6">
<img src="http://kristoferforsell.com/blog/wp-content/2010/02/math01.png" alt="" title="math01" width="460" height="700" class="alignnone size-full wp-image-357" />
</div>
<div class="grid_6">
<img src="http://kristoferforsell.com/blog/wp-content/2010/02/math02.png" alt="" title="math02" width="460" height="700" class="alignnone size-full wp-image-358" />
</div>
]]></content:encoded>
			<wfw:commentRss>http://kristoferforsell.com/blog/2010/02/24/mattematik/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Think Bloomberg</title>
		<link>http://kristoferforsell.com/blog/2010/02/24/think-bloomberg/</link>
		<comments>http://kristoferforsell.com/blog/2010/02/24/think-bloomberg/#comments</comments>
		<pubDate>Wed, 24 Feb 2010 17:15:29 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[work]]></category>
		<category><![CDATA[3d]]></category>
		<category><![CDATA[Flash]]></category>
		<category><![CDATA[papervision]]></category>

		<guid isPermaLink="false">http://kristoferforsell.com/blog/?p=329</guid>
		<description><![CDATA[
First project released as a developer squire at Your Majesty.














]]></description>
			<content:encoded><![CDATA[<div class="grid_4">
First project released as a developer squire at Your Majesty.
</div>
<div class="clear"></div>
<div class="grid_12">
<a href="http://about.bloomberg.com/thinktechnologysolutions/"><img src="http://kristoferforsell.com/blog/wp-content/2010/02/bloomBig.png" alt="" title="bloomBig" width="940" height="524" class="alignnone size-full wp-image-341" /></a>
</div>
<div class="grid_6">
<a href="http://about.bloomberg.com/thinktechnologysolutions/"><img src="http://kristoferforsell.com/blog/wp-content/2010/02/bloomberg__02.jpg" alt="" title="bloomberg__02" width="460" height="274" class="alignnone size-full wp-image-337" /></a>
</div>
<div class="grid_6">
<a href="http://about.bloomberg.com/thinktechnologysolutions/"><img src="http://kristoferforsell.com/blog/wp-content/2010/02/bloomberg__03.jpg" alt="" title="bloomberg__03" width="460" height="274" class="alignnone size-full wp-image-338" /></a>
</div>
<div class="grid_6">
<a href="http://about.bloomberg.com/thinktechnologysolutions/"><img src="http://kristoferforsell.com/blog/wp-content/2010/02/bloomberg__04.jpg" alt="" title="bloomberg__04" width="460" height="274" class="alignnone size-full wp-image-337" /></a>
</div>
]]></content:encoded>
			<wfw:commentRss>http://kristoferforsell.com/blog/2010/02/24/think-bloomberg/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>The Digital Business Card</title>
		<link>http://kristoferforsell.com/blog/2008/12/07/the-digital-business-card/</link>
		<comments>http://kristoferforsell.com/blog/2008/12/07/the-digital-business-card/#comments</comments>
		<pubDate>Sun, 07 Dec 2008 20:21:56 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[news]]></category>
		<category><![CDATA[work]]></category>
		<category><![CDATA[3d]]></category>
		<category><![CDATA[augmented reality]]></category>
		<category><![CDATA[augmented reality business card]]></category>
		<category><![CDATA[Business Card]]></category>
		<category><![CDATA[Flash]]></category>
		<category><![CDATA[papervision]]></category>

		<guid isPermaLink="false">http://kristoferforsell.com/blog/?p=153</guid>
		<description><![CDATA[
Yes, this post is all about how awesome my business card is. If you show the card for your webcamera while on www.kristoferforsell.com/card , as the instructions on the backside suggests, flash recognizes  a symbol printed on the card and  projects a papervision scene on top of the video, extending its function a [...]]]></description>
			<content:encoded><![CDATA[<div class="grid_6">
Yes, this post is all about how awesome my business card is. If you show the card for your webcamera while on www.kristoferforsell.com/card , as the instructions on the backside suggests, flash recognizes  a symbol printed on the card and  projects a papervision scene on top of the video, extending its function a bit further than a regular card.</p>
<p>You can try it out for your self, print the <a href="http://kristoferforsell.com/blog/wp-content/2008/12/card_backside.pdf">backside of the card</a> and log on to <a href="http://www.kristoferforsell.com/card" target="_blank">www.kristoferforsell.com/card</a> and play around.</p>
<p><img class="alignnone size-medium wp-image-177" title="card_01" src="http://kristoferforsell.com/blog/wp-content/2008/12/card_01-600x450.jpg" alt="" width="420" height="345" />
</div>
]]></content:encoded>
			<wfw:commentRss>http://kristoferforsell.com/blog/2008/12/07/the-digital-business-card/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Archive: Arduino</title>
		<link>http://kristoferforsell.com/blog/2008/10/26/arduino-ultrasonic-sensors-and-creativity/</link>
		<comments>http://kristoferforsell.com/blog/2008/10/26/arduino-ultrasonic-sensors-and-creativity/#comments</comments>
		<pubDate>Sun, 26 Oct 2008 13:05:47 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[article]]></category>
		<category><![CDATA[hyper island]]></category>
		<category><![CDATA[Arduino]]></category>
		<category><![CDATA[As3]]></category>
		<category><![CDATA[Flash]]></category>
		<category><![CDATA[Glue]]></category>
		<category><![CDATA[Ping Sensors]]></category>
		<category><![CDATA[Ultrasonic]]></category>

		<guid isPermaLink="false">http://kristoferforsell.com/blog/?p=124</guid>
		<description><![CDATA[
Victory! Our prototype is completed, ready and all set to go on exhibition this weekend. I feels weird not to be all stressed this last day of development, we even have time to write a small rundown on the project and hopefully give you a look into what problems we faced and how we tackled [...]]]></description>
			<content:encoded><![CDATA[<div class="grid_5">
<span>Victory! Our prototype is completed, ready and all set to go on exhibition this weekend. I feels weird not to be all stressed this last day of development, we even have time to write a small rundown on the project and hopefully give you a look into what problems we faced and how we tackled them.</span></p>
<p><span><strong>The Concept<br />
<span style="font-weight: normal;">Our vision was to give the user the feel of orchestrating light and sound by the sole movements of his or her hands. Design wise we came up with the idea to control cubes of light and a deep base sound, the cubes were to respond on four channels: red, green, blue and alpha.</span></strong></span></p>
<p><span><strong>The Tools<br />
<span style="font-weight: normal;">At our service we had the really flexible Arduino Decimilia card, Erik Sjödins AS3 Library called Glue and as a proxy we used Arduino2Flash.</span></strong></span></p>
<p><span>Why? We quickly saw the weakneses of Arduino, it only had a really small amount of memory to play with so all the calculations was to be made by flash and Ardunio had to feed flash with values. We could not use the proxy that came with the AS3 Glue since it had problem communicating with Intel MacBooks, instead our savior went by the name Arduino2Flash.</span></p>
<p>We found out that the standard firmata did not support our ultrasonic ping sensors so we had to modify the standard firmata a bit and create a mashup between the standard firmata and <a href="http://jamesalliban.wordpress.com/2008/06/06/arduino-flash-range-sensor-experiment/" target="blank">this</a> solution by James Alliban. This way we could read the values of the pingsensors separately and still communicate with our LEDs via AS3 Glue and keep our deadline.</p>
<p><a href="http://kristoferforsell.com/dev/arduino/CubesnledsFinal.zip" target="blank">Feel free do download our source code and have a look.</a></p>
<p>And have a look at <a href="http://sannawickman.se/" target="blank">Sanna Wickmans</a> photos of <a href="http://www.flickr.com/photos/sannalicious/2966082265/" target="blank">our prototype</a><br />
<span id="more-124"></span>
</div>
<div class="grid_5">

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
</pre></td><td class="code"><pre class="actionscript3" style="font-family:monospace;"><span style="color: #3f5fbf;">/*
Light and sound installation in October 2008 by the Hyper Island Students of Digital Media 2010 Stockholm:
Kristofer Forsell
Sanna Wickman
Fred Bergman
Fred Weinestad
Harald Hammar
&nbsp;
Check out the project on:
http://techexp2.wordpress.com
http://kristoferforsell.com/blog
&nbsp;
Thanks to:
Erik Sjödin
Hannes Netzell
*/</span>
&nbsp;
<span style="color: #9900cc; font-weight: bold;">package</span>
<span style="color: #000000;">&#123;</span>
	<span style="color: #009900;">// Import as3Glue</span>
	<span style="color: #0033ff; font-weight: bold;">import</span> net.eriksjodin.arduino.events.ArduinoEvent;
	<span style="color: #0033ff; font-weight: bold;">import</span> net.eriksjodin.arduino.Arduino;
	<span style="color: #009900;">// Import Flash classes</span>
	<span style="color: #0033ff; font-weight: bold;">import</span> <span style="color: #004993;">flash.display</span>.<span style="color: #004993;">Sprite</span>;
	<span style="color: #0033ff; font-weight: bold;">import</span> <span style="color: #004993;">flash.display</span>.<span style="color: #004993;">MovieClip</span>;
	<span style="color: #0033ff; font-weight: bold;">import</span> <span style="color: #004993;">flash.display</span>.<span style="color: #004993;">Stage</span>;
	<span style="color: #0033ff; font-weight: bold;">import</span> <span style="color: #004993;">flash.text</span>.<span style="color: #004993;">TextField</span>;
	<span style="color: #0033ff; font-weight: bold;">import</span> <span style="color: #004993;">flash.net</span>.<span style="color: #004993;">Socket</span>;
	<span style="color: #0033ff; font-weight: bold;">import</span> <span style="color: #004993;">flash.media</span>.<span style="color: #004993;">Sound</span>;
    <span style="color: #0033ff; font-weight: bold;">import</span> <span style="color: #004993;">flash.media</span>.<span style="color: #004993;">SoundChannel</span>;
	<span style="color: #0033ff; font-weight: bold;">import</span> <span style="color: #004993;">flash.net</span>.<span style="color: #004993;">URLRequest</span>;
	<span style="color: #009900;">// Import Flash classes (events)</span>
	<span style="color: #0033ff; font-weight: bold;">import</span> <span style="color: #004993;">flash.events</span>.<span style="color: #004993;">MouseEvent</span>;
	<span style="color: #0033ff; font-weight: bold;">import</span> <span style="color: #004993;">flash.events</span>.<span style="color: #004993;">TimerEvent</span>;
	<span style="color: #0033ff; font-weight: bold;">import</span> <span style="color: #004993;">flash.events</span>.<span style="color: #004993;">Event</span>;
	<span style="color: #0033ff; font-weight: bold;">import</span> <span style="color: #004993;">flash.events</span>.<span style="color: #004993;">ProgressEvent</span>;
	<span style="color: #009900;">// Import Utils &amp; Timer</span>
	<span style="color: #0033ff; font-weight: bold;">import</span> <span style="color: #004993;">flash.utils</span>.<span style="color: #000000; font-weight: bold;">*</span>;
	<span style="color: #009900;">// Import TweenMax and easing</span>
	<span style="color: #0033ff; font-weight: bold;">import</span> gs.TweenMax;
	<span style="color: #0033ff; font-weight: bold;">import</span> gs.easing.<span style="color: #000000; font-weight: bold;">*</span>;
&nbsp;
	<span style="color: #0033ff; font-weight: bold;">public</span> <span style="color: #9900cc; font-weight: bold;">class</span> lightController extends <span style="color: #004993;">Sprite</span>
	<span style="color: #000000;">&#123;</span>
		<span style="color: #009900;">//Define as3Glue Arduino variable</span>
		<span style="color: #0033ff; font-weight: bold;">private</span> <span style="color: #6699cc; font-weight: bold;">var</span> a<span style="color: #000000; font-weight: bold;">:</span>Arduino;
&nbsp;
		<span style="color: #009900;">// General variables</span>
		<span style="color: #0033ff; font-weight: bold;">public</span> <span style="color: #6699cc; font-weight: bold;">var</span> s01_var<span style="color: #000000; font-weight: bold;">:</span><span style="color: #004993;">Number</span>;
		<span style="color: #0033ff; font-weight: bold;">public</span> <span style="color: #6699cc; font-weight: bold;">var</span> s02_var<span style="color: #000000; font-weight: bold;">:</span><span style="color: #004993;">Number</span>;
		<span style="color: #0033ff; font-weight: bold;">public</span> <span style="color: #6699cc; font-weight: bold;">var</span> sens01Var<span style="color: #000000; font-weight: bold;">:</span><span style="color: #004993;">Number</span>;
		<span style="color: #0033ff; font-weight: bold;">public</span> <span style="color: #6699cc; font-weight: bold;">var</span> sens02Var<span style="color: #000000; font-weight: bold;">:</span><span style="color: #004993;">Number</span>;
		<span style="color: #0033ff; font-weight: bold;">public</span> <span style="color: #6699cc; font-weight: bold;">var</span> sens01VarMax<span style="color: #000000; font-weight: bold;">:</span><span style="color: #004993;">Number</span>;
		<span style="color: #0033ff; font-weight: bold;">public</span> <span style="color: #6699cc; font-weight: bold;">var</span> sens02VarMax<span style="color: #000000; font-weight: bold;">:</span><span style="color: #004993;">Number</span>;
		<span style="color: #0033ff; font-weight: bold;">public</span> <span style="color: #6699cc; font-weight: bold;">var</span> randomNr<span style="color: #000000; font-weight: bold;">:</span><span style="color: #004993;">int</span> = <span style="color: #004993;">Math</span>.<span style="color: #004993;">random</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>;
		<span style="color: #0033ff; font-weight: bold;">public</span> <span style="color: #6699cc; font-weight: bold;">var</span> pulsewidth<span style="color: #000000; font-weight: bold;">:</span><span style="color: #004993;">Number</span>;
&nbsp;
		<span style="color: #009900;">// as3Glue define LED sockets</span>
		<span style="color: #0033ff; font-weight: bold;">public</span> <span style="color: #6699cc; font-weight: bold;">var</span> blue2<span style="color: #000000; font-weight: bold;">:</span><span style="color: #004993;">int</span> = <span style="color: #000000; font-weight:bold;">11</span>;
		<span style="color: #0033ff; font-weight: bold;">public</span> <span style="color: #6699cc; font-weight: bold;">var</span> blue1<span style="color: #000000; font-weight: bold;">:</span><span style="color: #004993;">int</span> = <span style="color: #000000; font-weight:bold;">10</span>;
		<span style="color: #0033ff; font-weight: bold;">public</span> <span style="color: #6699cc; font-weight: bold;">var</span> green2<span style="color: #000000; font-weight: bold;">:</span><span style="color: #004993;">int</span> = <span style="color: #000000; font-weight:bold;">9</span>;
		<span style="color: #0033ff; font-weight: bold;">public</span> <span style="color: #6699cc; font-weight: bold;">var</span> green1<span style="color: #000000; font-weight: bold;">:</span><span style="color: #004993;">int</span> = <span style="color: #000000; font-weight:bold;">6</span>;
		<span style="color: #0033ff; font-weight: bold;">public</span> <span style="color: #6699cc; font-weight: bold;">var</span> red2<span style="color: #000000; font-weight: bold;">:</span><span style="color: #004993;">int</span> = <span style="color: #000000; font-weight:bold;">5</span>;
		<span style="color: #0033ff; font-weight: bold;">public</span> <span style="color: #6699cc; font-weight: bold;">var</span> red1<span style="color: #000000; font-weight: bold;">:</span><span style="color: #004993;">int</span> = <span style="color: #000000; font-weight:bold;">3</span>;
&nbsp;
		<span style="color: #009900;">// Define seperate connection and values for the Ping sensors</span>
		<span style="color: #0033ff; font-weight: bold;">public</span> <span style="color: #6699cc; font-weight: bold;">var</span> s<span style="color: #000000; font-weight: bold;">:</span><span style="color: #004993;">Socket</span>;
		<span style="color: #0033ff; font-weight: bold;">public</span> <span style="color: #6699cc; font-weight: bold;">var</span> prevInput1<span style="color: #000000; font-weight: bold;">:</span><span style="color: #004993;">String</span> = <span style="color: #990000;">&quot;0&quot;</span>;		<span style="color: #009900;">// The previously processed input (returned value)</span>
		<span style="color: #0033ff; font-weight: bold;">public</span> <span style="color: #6699cc; font-weight: bold;">var</span> currInput1<span style="color: #000000; font-weight: bold;">:</span><span style="color: #004993;">String</span> = <span style="color: #990000;">&quot;0&quot;</span>;		<span style="color: #009900;">// The currently processed input</span>
		<span style="color: #0033ff; font-weight: bold;">public</span> <span style="color: #6699cc; font-weight: bold;">var</span> finalInput1<span style="color: #000000; font-weight: bold;">:</span><span style="color: #004993;">String</span> = <span style="color: #990000;">&quot;0&quot;</span>;		<span style="color: #009900;">// The input after processing</span>
		<span style="color: #0033ff; font-weight: bold;">public</span> <span style="color: #6699cc; font-weight: bold;">var</span> prevInput2<span style="color: #000000; font-weight: bold;">:</span><span style="color: #004993;">String</span> = <span style="color: #990000;">&quot;0&quot;</span>;		<span style="color: #009900;">// The previously processed input (returned value)</span>
		<span style="color: #0033ff; font-weight: bold;">public</span> <span style="color: #6699cc; font-weight: bold;">var</span> currInput2<span style="color: #000000; font-weight: bold;">:</span><span style="color: #004993;">String</span> = <span style="color: #990000;">&quot;0&quot;</span>;		<span style="color: #009900;">// The currently processed input</span>
		<span style="color: #0033ff; font-weight: bold;">public</span> <span style="color: #6699cc; font-weight: bold;">var</span> finalInput2<span style="color: #000000; font-weight: bold;">:</span><span style="color: #004993;">String</span> = <span style="color: #990000;">&quot;0&quot;</span>;		<span style="color: #009900;">// The input after processing</span>
&nbsp;
		<span style="color: #009900;">// LED values</span>
		<span style="color: #0033ff; font-weight: bold;">public</span> <span style="color: #6699cc; font-weight: bold;">var</span> r1_var<span style="color: #000000; font-weight: bold;">:</span><span style="color: #004993;">int</span>;
		<span style="color: #0033ff; font-weight: bold;">public</span> <span style="color: #6699cc; font-weight: bold;">var</span> g1_var<span style="color: #000000; font-weight: bold;">:</span><span style="color: #004993;">int</span>;
		<span style="color: #0033ff; font-weight: bold;">public</span> <span style="color: #6699cc; font-weight: bold;">var</span> b1_var<span style="color: #000000; font-weight: bold;">:</span><span style="color: #004993;">int</span>;
		<span style="color: #0033ff; font-weight: bold;">public</span> <span style="color: #6699cc; font-weight: bold;">var</span> r2_var<span style="color: #000000; font-weight: bold;">:</span><span style="color: #004993;">int</span>;
		<span style="color: #0033ff; font-weight: bold;">public</span> <span style="color: #6699cc; font-weight: bold;">var</span> g2_var<span style="color: #000000; font-weight: bold;">:</span><span style="color: #004993;">int</span>;
		<span style="color: #0033ff; font-weight: bold;">public</span> <span style="color: #6699cc; font-weight: bold;">var</span> b2_var<span style="color: #000000; font-weight: bold;">:</span><span style="color: #004993;">int</span>;
&nbsp;
		<span style="color: #009900;">// Define sound variables</span>
		<span style="color: #0033ff; font-weight: bold;">public</span> <span style="color: #6699cc; font-weight: bold;">var</span> MusicPlayer<span style="color: #000000; font-weight: bold;">:</span><span style="color: #004993;">Sound</span> = <span style="color: #0033ff; font-weight: bold;">new</span> <span style="color: #004993;">Sound</span> <span style="color: #000000;">&#40;</span><span style="color: #0033ff; font-weight: bold;">new</span> <span style="color: #004993;">URLRequest</span> <span style="color: #000000;">&#40;</span><span style="color: #990000;">&quot;loop.mp3&quot;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span>;
		<span style="color: #0033ff; font-weight: bold;">public</span> <span style="color: #6699cc; font-weight: bold;">var</span> songChannel<span style="color: #000000; font-weight: bold;">:</span><span style="color: #004993;">SoundChannel</span>;
		<span style="color: #0033ff; font-weight: bold;">public</span> <span style="color: #6699cc; font-weight: bold;">var</span> musicplayed<span style="color: #000000; font-weight: bold;">:</span><span style="color: #004993;">int</span> = <span style="color: #000000; font-weight:bold;">0</span>;
&nbsp;
		<span style="color: #0033ff; font-weight: bold;">public</span> <span style="color: #339966; font-weight: bold;">function</span> lightController<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>
		<span style="color: #000000;">&#123;</span>
			<span style="color: #009900;">// Setup as3Glue</span>
			<span style="color: #0033ff; font-weight: bold;">this</span>.setupArduino<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>;
		<span style="color: #000000;">&#125;</span>
&nbsp;
		<span style="color: #0033ff; font-weight: bold;">private</span> <span style="color: #339966; font-weight: bold;">function</span> setupArduino<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000000; font-weight: bold;">:</span> <span style="color: #0033ff; font-weight: bold;">void</span>
		<span style="color: #000000;">&#123;</span>	
			<span style="color: #009900;">// Connect to a serial proxy on port 5331</span>
		 	a = <span style="color: #0033ff; font-weight: bold;">new</span> Arduino<span style="color: #000000;">&#40;</span><span style="color: #990000;">&quot;127.0.0.1&quot;</span>, <span style="color: #000000; font-weight:bold;">5331</span><span style="color: #000000;">&#41;</span>;
			s = <span style="color: #0033ff; font-weight: bold;">new</span> <span style="color: #004993;">Socket</span><span style="color: #000000;">&#40;</span><span style="color: #990000;">&quot;127.0.0.1&quot;</span>, <span style="color: #000000; font-weight:bold;">5331</span><span style="color: #000000;">&#41;</span>; <span style="color: #009900;">// Connect to the Ping sensors</span>
&nbsp;
		 	<span style="color: #009900;">// Listen for connection </span>
		 	a.<span style="color: #004993;">addEventListener</span><span style="color: #000000;">&#40;</span><span style="color: #004993;">Event</span>.<span style="color: #004993;">CONNECT</span>,onSocketConnect<span style="color: #000000;">&#41;</span>; 
			a.<span style="color: #004993;">addEventListener</span><span style="color: #000000;">&#40;</span><span style="color: #004993;">Event</span>.<span style="color: #004993;">CLOSE</span>,onSocketClose<span style="color: #000000;">&#41;</span>;
&nbsp;
		 	<span style="color: #009900;">// Listen for data</span>
		 	a.<span style="color: #004993;">addEventListener</span><span style="color: #000000;">&#40;</span>ArduinoEvent.FIRMWARE_VERSION, onReceiveFirmwareVersion<span style="color: #000000;">&#41;</span>;
		 	a.<span style="color: #004993;">addEventListener</span><span style="color: #000000;">&#40;</span>ArduinoEvent.DIGITAL_DATA, onReceiveDigitalData<span style="color: #000000;">&#41;</span>;
		 	a.<span style="color: #004993;">addEventListener</span><span style="color: #000000;">&#40;</span>ArduinoEvent.ANALOG_DATA, onReceiveAnalogData<span style="color: #000000;">&#41;</span>;
&nbsp;
			<span style="color: #009900;">// Flash listners on enter frame</span>
			<span style="color: #004993;">stage</span>.<span style="color: #004993;">addEventListener</span><span style="color: #000000;">&#40;</span><span style="color: #004993;">Event</span>.<span style="color: #004993;">ENTER_FRAME</span>,loopFunction<span style="color: #000000;">&#41;</span>;
		<span style="color: #000000;">&#125;</span>
&nbsp;
		<span style="color: #009900;">// Triggered when a serial socket connection has been established</span>
		<span style="color: #0033ff; font-weight: bold;">public</span> <span style="color: #339966; font-weight: bold;">function</span> onSocketConnect<span style="color: #000000;">&#40;</span>e<span style="color: #000000; font-weight: bold;">:</span><span style="color: #004993;">Object</span><span style="color: #000000;">&#41;</span><span style="color: #000000; font-weight: bold;">:</span><span style="color: #0033ff; font-weight: bold;">void</span> <span style="color: #000000;">&#123;</span>
			<span style="color: #004993;">trace</span><span style="color: #000000;">&#40;</span><span style="color: #990000;">&quot;Socket connected!&quot;</span><span style="color: #000000;">&#41;</span>;
&nbsp;
			<span style="color: #009900;">// Request the firmware version</span>
			a.requestFirmwareVersion<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>;
		<span style="color: #000000;">&#125;</span>
&nbsp;
		<span style="color: #009900;">// Triggered when a serial socket connection has been closed</span>
		<span style="color: #0033ff; font-weight: bold;">public</span> <span style="color: #339966; font-weight: bold;">function</span> onSocketClose<span style="color: #000000;">&#40;</span>e<span style="color: #000000; font-weight: bold;">:</span><span style="color: #004993;">Object</span><span style="color: #000000;">&#41;</span><span style="color: #000000; font-weight: bold;">:</span><span style="color: #0033ff; font-weight: bold;">void</span> <span style="color: #000000;">&#123;</span>
			<span style="color: #004993;">trace</span><span style="color: #000000;">&#40;</span><span style="color: #990000;">&quot;Socket closed!&quot;</span><span style="color: #000000;">&#41;</span>;
		<span style="color: #000000;">&#125;</span>
&nbsp;
		<span style="color: #009900;">// Trace out data when it arrives</span>
		<span style="color: #0033ff; font-weight: bold;">public</span> <span style="color: #339966; font-weight: bold;">function</span> onReceiveAnalogData<span style="color: #000000;">&#40;</span>e<span style="color: #000000; font-weight: bold;">:</span>ArduinoEvent<span style="color: #000000;">&#41;</span><span style="color: #000000; font-weight: bold;">:</span><span style="color: #0033ff; font-weight: bold;">void</span> <span style="color: #000000;">&#123;</span>
			<span style="color: #009900;">//trace(&quot;Analog pin &quot; + e.pin + &quot; on port: &quot; + e.port +&quot; = &quot; + e.value);</span>
		<span style="color: #000000;">&#125;</span>
&nbsp;
		<span style="color: #009900;">// Trace out data when it arrives</span>
		<span style="color: #0033ff; font-weight: bold;">public</span> <span style="color: #339966; font-weight: bold;">function</span> onReceiveDigitalData<span style="color: #000000;">&#40;</span>e<span style="color: #000000; font-weight: bold;">:</span>ArduinoEvent<span style="color: #000000;">&#41;</span><span style="color: #000000; font-weight: bold;">:</span><span style="color: #0033ff; font-weight: bold;">void</span> <span style="color: #000000;">&#123;</span>
			<span style="color: #009900;">//trace(&quot;Digital pin &quot; + e.pin + &quot; on port: &quot; + e.port +&quot; = &quot; + e.value);</span>
		<span style="color: #000000;">&#125;</span>
&nbsp;
		<span style="color: #009900;">// The firmware version is requested when the Arduino class has made a socket connection.</span>
		<span style="color: #009900;">// When we receive this event we know that the Arduino has been successfully connected.</span>
		<span style="color: #0033ff; font-weight: bold;">public</span> <span style="color: #339966; font-weight: bold;">function</span> onReceiveFirmwareVersion<span style="color: #000000;">&#40;</span>e<span style="color: #000000; font-weight: bold;">:</span>ArduinoEvent<span style="color: #000000;">&#41;</span><span style="color: #000000; font-weight: bold;">:</span><span style="color: #0033ff; font-weight: bold;">void</span> <span style="color: #000000;">&#123;</span>
			<span style="color: #004993;">trace</span><span style="color: #000000;">&#40;</span><span style="color: #990000;">&quot;Firmware version: &quot;</span> <span style="color: #000000; font-weight: bold;">+</span> e.<span style="color: #004993;">value</span><span style="color: #000000;">&#41;</span>;
&nbsp;
			<span style="color: #009900;">// The port value of an event can be used to determine which board the event was dispatched from.</span>
			<span style="color: #009900;">// This is one way of dealing with multiple boards, another is to add different listener methods.</span>
			<span style="color: #004993;">trace</span><span style="color: #000000;">&#40;</span><span style="color: #990000;">&quot;Port: &quot;</span> <span style="color: #000000; font-weight: bold;">+</span> e.port<span style="color: #000000;">&#41;</span>;
&nbsp;
			<span style="color: #009900;">// Do some stuff on the Arduino.</span>
			initArduino<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>;
		<span style="color: #000000;">&#125;</span>
&nbsp;
		<span style="color: #0033ff; font-weight: bold;">public</span> <span style="color: #339966; font-weight: bold;">function</span> initArduino<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000000; font-weight: bold;">:</span><span style="color: #0033ff; font-weight: bold;">void</span> <span style="color: #000000;">&#123;</span>
			<span style="color: #009900;">// Setup Arduino outputs</span>
&nbsp;
			<span style="color: #009900;">// Output green 1</span>
			a.setPinMode<span style="color: #000000;">&#40;</span>green1, Arduino.PWM<span style="color: #000000;">&#41;</span>;
			a.writeDigitalPin<span style="color: #000000;">&#40;</span>green1, Arduino.<span style="color: #004993;">HIGH</span><span style="color: #000000;">&#41;</span>;
			<span style="color: #009900;">// Output blue 1</span>
			a.setPinMode<span style="color: #000000;">&#40;</span>blue1, Arduino.PWM<span style="color: #000000;">&#41;</span>;
			a.writeDigitalPin<span style="color: #000000;">&#40;</span>blue1, Arduino.<span style="color: #004993;">HIGH</span><span style="color: #000000;">&#41;</span>;
			<span style="color: #009900;">// Output red 1</span>
			a.setPinMode<span style="color: #000000;">&#40;</span>red1, Arduino.PWM<span style="color: #000000;">&#41;</span>;
			a.writeDigitalPin<span style="color: #000000;">&#40;</span>red1, Arduino.<span style="color: #004993;">HIGH</span><span style="color: #000000;">&#41;</span>;
&nbsp;
			<span style="color: #009900;">// Output green 2</span>
			a.setPinMode<span style="color: #000000;">&#40;</span>green2, Arduino.PWM<span style="color: #000000;">&#41;</span>;
			a.writeDigitalPin<span style="color: #000000;">&#40;</span>green2, Arduino.<span style="color: #004993;">HIGH</span><span style="color: #000000;">&#41;</span>;
			<span style="color: #009900;">// Output blue 2</span>
			a.setPinMode<span style="color: #000000;">&#40;</span>blue2, Arduino.PWM<span style="color: #000000;">&#41;</span>;
			a.writeDigitalPin<span style="color: #000000;">&#40;</span>blue2, Arduino.<span style="color: #004993;">HIGH</span><span style="color: #000000;">&#41;</span>;
			<span style="color: #009900;">// Output red 2</span>
			a.setPinMode<span style="color: #000000;">&#40;</span>red2, Arduino.PWM<span style="color: #000000;">&#41;</span>;
			a.writeDigitalPin<span style="color: #000000;">&#40;</span>red2, Arduino.<span style="color: #004993;">HIGH</span><span style="color: #000000;">&#41;</span>;
&nbsp;
			<span style="color: #009900;">// Init UI</span>
			initUI<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>;
		<span style="color: #000000;">&#125;</span>
&nbsp;
		<span style="color: #0033ff; font-weight: bold;">public</span> <span style="color: #339966; font-weight: bold;">function</span> initUI<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000000; font-weight: bold;">:</span><span style="color: #0033ff; font-weight: bold;">void</span> <span style="color: #000000;">&#123;</span>
&nbsp;
			<span style="color: #009900;">// Start a 1 second timer</span>
			<span style="color: #6699cc; font-weight: bold;">var</span> myTimer<span style="color: #000000; font-weight: bold;">:</span><span style="color: #004993;">Timer</span> = <span style="color: #0033ff; font-weight: bold;">new</span> <span style="color: #004993;">Timer</span><span style="color: #000000;">&#40;</span><span style="color: #000000; font-weight:bold;">1000</span><span style="color: #000000;">&#41;</span>;
			myTimer.<span style="color: #004993;">addEventListener</span><span style="color: #000000;">&#40;</span><span style="color: #990000;">&quot;timer&quot;</span>, timedFunction<span style="color: #000000;">&#41;</span>;
			myTimer.<span style="color: #004993;">start</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>;
&nbsp;
			<span style="color: #009900;">// Play sound</span>
			songChannel = MusicPlayer.<span style="color: #004993;">play</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>;
			songChannel.<span style="color: #004993;">addEventListener</span><span style="color: #000000;">&#40;</span><span style="color: #004993;">Event</span>.<span style="color: #004993;">SOUND_COMPLETE</span>, loopMusic<span style="color: #000000;">&#41;</span>;
			musicplayed = <span style="color: #000000; font-weight:bold;">1</span>;
&nbsp;
		<span style="color: #000000;">&#125;</span>	
&nbsp;
		<span style="color: #0033ff; font-weight: bold;">public</span> <span style="color: #339966; font-weight: bold;">function</span> loopMusic<span style="color: #000000;">&#40;</span>event<span style="color: #000000; font-weight: bold;">:</span><span style="color: #004993;">Event</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#123;</span>
			<span style="color: #009900;">// Loop music</span>
			songChannel = MusicPlayer.<span style="color: #004993;">play</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>;
			songChannel.<span style="color: #004993;">addEventListener</span><span style="color: #000000;">&#40;</span><span style="color: #004993;">Event</span>.<span style="color: #004993;">SOUND_COMPLETE</span>, loopMusic<span style="color: #000000;">&#41;</span>;
		<span style="color: #000000;">&#125;</span>
&nbsp;
		<span style="color: #0033ff; font-weight: bold;">public</span> <span style="color: #339966; font-weight: bold;">function</span> loopFunction<span style="color: #000000;">&#40;</span>e<span style="color: #000000; font-weight: bold;">:</span><span style="color: #004993;">Event</span><span style="color: #000000;">&#41;</span><span style="color: #000000; font-weight: bold;">:</span><span style="color: #0033ff; font-weight: bold;">void</span> <span style="color: #000000;">&#123;</span>
&nbsp;
			<span style="color: #009900;">// Sensor values</span>
			s01_var = <span style="color: #004993;">Number</span><span style="color: #000000;">&#40;</span>s01_value.<span style="color: #004993;">text</span><span style="color: #000000;">&#41;</span>;
			s02_var = <span style="color: #004993;">Number</span><span style="color: #000000;">&#40;</span>s02_value.<span style="color: #004993;">text</span><span style="color: #000000;">&#41;</span><span style="color: #000000; font-weight: bold;">/</span><span style="color: #000000; font-weight:bold;">100</span>;
			<span style="color: #009900;">// Sensor bars</span>
			s1_mc.<span style="color: #004993;">height</span> = s01_var<span style="color: #000000; font-weight: bold;">*</span><span style="color: #000000; font-weight:bold;">2.55</span>;
			s2_mc.<span style="color: #004993;">height</span> = s02_var<span style="color: #000000; font-weight: bold;">*</span><span style="color: #000000; font-weight:bold;">255</span>;
&nbsp;
			<span style="color: #009900;">// Get values from sensors</span>
			sens01VarMax = <span style="color: #004993;">Number</span><span style="color: #000000;">&#40;</span>s01_MaxValue.<span style="color: #004993;">text</span><span style="color: #000000;">&#41;</span>;
			sens02VarMax = <span style="color: #004993;">Number</span><span style="color: #000000;">&#40;</span>s02_MaxValue.<span style="color: #004993;">text</span><span style="color: #000000;">&#41;</span>;
			sData<span style="color: #000000;">&#40;</span><span style="color: #0033ff; font-weight: bold;">null</span><span style="color: #000000;">&#41;</span>;
&nbsp;
			<span style="color: #009900;">// Values for bar tweens</span>
			r1_var = <span style="color: #000000; font-weight:bold;">255</span> <span style="color: #000000; font-weight: bold;">-</span> r1_mc.<span style="color: #004993;">height</span>;
			r2_var = <span style="color: #000000; font-weight:bold;">255</span> <span style="color: #000000; font-weight: bold;">-</span> r2_mc.<span style="color: #004993;">height</span>;
			g1_var = <span style="color: #000000; font-weight:bold;">255</span> <span style="color: #000000; font-weight: bold;">-</span> g1_mc.<span style="color: #004993;">height</span>;
			g2_var = <span style="color: #000000; font-weight:bold;">255</span> <span style="color: #000000; font-weight: bold;">-</span> g2_mc.<span style="color: #004993;">height</span>;
			b1_var = <span style="color: #000000; font-weight:bold;">255</span> <span style="color: #000000; font-weight: bold;">-</span> b1_mc.<span style="color: #004993;">height</span>;
			b2_var = <span style="color: #000000; font-weight:bold;">255</span> <span style="color: #000000; font-weight: bold;">-</span> b2_mc.<span style="color: #004993;">height</span>;
&nbsp;
		<span style="color: #000000;">&#125;</span>
&nbsp;
		<span style="color: #0033ff; font-weight: bold;">public</span> <span style="color: #339966; font-weight: bold;">function</span> timedFunction<span style="color: #000000;">&#40;</span>e<span style="color: #000000; font-weight: bold;">:</span><span style="color: #004993;">TimerEvent</span><span style="color: #000000;">&#41;</span>
		<span style="color: #000000;">&#123;</span>
			<span style="color: #009900;">// This function is called once every second</span>
&nbsp;
			<span style="color: #009900;">// Patterns</span>
			<span style="color: #0033ff; font-weight: bold;">if</span><span style="color: #000000;">&#40;</span>s01_var <span style="color: #000000; font-weight: bold;">&gt;</span>= <span style="color: #000000; font-weight:bold;">0</span> <span style="color: #000000; font-weight: bold;">&amp;&amp;</span> s01_var <span style="color: #000000; font-weight: bold;">&lt;</span>= <span style="color: #000000; font-weight:bold;">20</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#123;</span> 
			    <span style="color: #009900;">// 0-20</span>
				TweenMax.to<span style="color: #000000;">&#40;</span>r1_mc, <span style="color: #000000; font-weight:bold;">0.9</span>, <span style="color: #000000;">&#123;</span><span style="color: #004993;">height</span><span style="color: #000000; font-weight: bold;">:</span><span style="color: #000000; font-weight:bold;">255</span><span style="color: #000000; font-weight: bold;">*</span>s02_var, ease<span style="color: #000000; font-weight: bold;">:</span>Quad.easeInOut, onUpdate<span style="color: #000000; font-weight: bold;">:</span>updateLEDs<span style="color: #000000;">&#125;</span><span style="color: #000000;">&#41;</span>;
				TweenMax.to<span style="color: #000000;">&#40;</span>g1_mc, <span style="color: #000000; font-weight:bold;">0.9</span>, <span style="color: #000000;">&#123;</span><span style="color: #004993;">height</span><span style="color: #000000; font-weight: bold;">:</span><span style="color: #000000; font-weight:bold;">255</span><span style="color: #000000; font-weight: bold;">*</span>s02_var, ease<span style="color: #000000; font-weight: bold;">:</span>Quad.easeInOut<span style="color: #000000;">&#125;</span><span style="color: #000000;">&#41;</span>;
				TweenMax.to<span style="color: #000000;">&#40;</span>b1_mc, <span style="color: #000000; font-weight:bold;">0.9</span>, <span style="color: #000000;">&#123;</span><span style="color: #004993;">height</span><span style="color: #000000; font-weight: bold;">:</span><span style="color: #000000; font-weight:bold;">255</span><span style="color: #000000; font-weight: bold;">*</span>s02_var, ease<span style="color: #000000; font-weight: bold;">:</span>Quad.easeInOut<span style="color: #000000;">&#125;</span><span style="color: #000000;">&#41;</span>;
				TweenMax.to<span style="color: #000000;">&#40;</span>r2_mc, <span style="color: #000000; font-weight:bold;">0.9</span>, <span style="color: #000000;">&#123;</span><span style="color: #004993;">height</span><span style="color: #000000; font-weight: bold;">:</span><span style="color: #000000; font-weight:bold;">255</span><span style="color: #000000; font-weight: bold;">*</span>s02_var, ease<span style="color: #000000; font-weight: bold;">:</span>Quad.easeInOut<span style="color: #000000;">&#125;</span><span style="color: #000000;">&#41;</span>;
				TweenMax.to<span style="color: #000000;">&#40;</span>g2_mc, <span style="color: #000000; font-weight:bold;">0.9</span>, <span style="color: #000000;">&#123;</span><span style="color: #004993;">height</span><span style="color: #000000; font-weight: bold;">:</span><span style="color: #000000; font-weight:bold;">255</span><span style="color: #000000; font-weight: bold;">*</span>s02_var, ease<span style="color: #000000; font-weight: bold;">:</span>Quad.easeInOut<span style="color: #000000;">&#125;</span><span style="color: #000000;">&#41;</span>;
				TweenMax.to<span style="color: #000000;">&#40;</span>b2_mc, <span style="color: #000000; font-weight:bold;">0.9</span>, <span style="color: #000000;">&#123;</span><span style="color: #004993;">height</span><span style="color: #000000; font-weight: bold;">:</span><span style="color: #000000; font-weight:bold;">255</span><span style="color: #000000; font-weight: bold;">*</span>s02_var, ease<span style="color: #000000; font-weight: bold;">:</span>Quad.easeInOut<span style="color: #000000;">&#125;</span><span style="color: #000000;">&#41;</span>;
			<span style="color: #000000;">&#125;</span><span style="color: #0033ff; font-weight: bold;">else</span> <span style="color: #0033ff; font-weight: bold;">if</span><span style="color: #000000;">&#40;</span>s01_var <span style="color: #000000; font-weight: bold;">&gt;</span>= <span style="color: #000000; font-weight:bold;">21</span> <span style="color: #000000; font-weight: bold;">&amp;&amp;</span> s01_var <span style="color: #000000; font-weight: bold;">&lt;</span>= <span style="color: #000000; font-weight:bold;">30</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#123;</span>
				<span style="color: #009900;">// 21-30</span>
				TweenMax.to<span style="color: #000000;">&#40;</span>r1_mc, <span style="color: #000000; font-weight:bold;">0.9</span>, <span style="color: #000000;">&#123;</span><span style="color: #004993;">height</span><span style="color: #000000; font-weight: bold;">:</span><span style="color: #000000; font-weight:bold;">255</span><span style="color: #000000; font-weight: bold;">*</span>s02_var, ease<span style="color: #000000; font-weight: bold;">:</span>Quad.easeInOut, onUpdate<span style="color: #000000; font-weight: bold;">:</span>updateLEDs<span style="color: #000000;">&#125;</span><span style="color: #000000;">&#41;</span>;
				TweenMax.to<span style="color: #000000;">&#40;</span>g1_mc, <span style="color: #000000; font-weight:bold;">0.9</span>, <span style="color: #000000;">&#123;</span><span style="color: #004993;">height</span><span style="color: #000000; font-weight: bold;">:</span><span style="color: #000000; font-weight:bold;">0</span><span style="color: #000000; font-weight: bold;">*</span>s02_var, ease<span style="color: #000000; font-weight: bold;">:</span>Quad.easeInOut<span style="color: #000000;">&#125;</span><span style="color: #000000;">&#41;</span>;
				TweenMax.to<span style="color: #000000;">&#40;</span>b1_mc, <span style="color: #000000; font-weight:bold;">0.9</span>, <span style="color: #000000;">&#123;</span><span style="color: #004993;">height</span><span style="color: #000000; font-weight: bold;">:</span><span style="color: #000000; font-weight:bold;">0</span><span style="color: #000000; font-weight: bold;">*</span>s02_var, ease<span style="color: #000000; font-weight: bold;">:</span>Quad.easeInOut<span style="color: #000000;">&#125;</span><span style="color: #000000;">&#41;</span>;
				TweenMax.to<span style="color: #000000;">&#40;</span>r2_mc, <span style="color: #000000; font-weight:bold;">0.9</span>, <span style="color: #000000;">&#123;</span><span style="color: #004993;">height</span><span style="color: #000000; font-weight: bold;">:</span><span style="color: #000000; font-weight:bold;">255</span><span style="color: #000000; font-weight: bold;">*</span>s02_var, ease<span style="color: #000000; font-weight: bold;">:</span>Quad.easeInOut<span style="color: #000000;">&#125;</span><span style="color: #000000;">&#41;</span>;
				TweenMax.to<span style="color: #000000;">&#40;</span>g2_mc, <span style="color: #000000; font-weight:bold;">0.9</span>, <span style="color: #000000;">&#123;</span><span style="color: #004993;">height</span><span style="color: #000000; font-weight: bold;">:</span><span style="color: #000000; font-weight:bold;">0</span><span style="color: #000000; font-weight: bold;">*</span>s02_var, ease<span style="color: #000000; font-weight: bold;">:</span>Quad.easeInOut<span style="color: #000000;">&#125;</span><span style="color: #000000;">&#41;</span>;
				TweenMax.to<span style="color: #000000;">&#40;</span>b2_mc, <span style="color: #000000; font-weight:bold;">0.9</span>, <span style="color: #000000;">&#123;</span><span style="color: #004993;">height</span><span style="color: #000000; font-weight: bold;">:</span><span style="color: #000000; font-weight:bold;">0</span><span style="color: #000000; font-weight: bold;">*</span>s02_var, ease<span style="color: #000000; font-weight: bold;">:</span>Quad.easeInOut<span style="color: #000000;">&#125;</span><span style="color: #000000;">&#41;</span>;
			<span style="color: #000000;">&#125;</span><span style="color: #0033ff; font-weight: bold;">else</span> <span style="color: #0033ff; font-weight: bold;">if</span><span style="color: #000000;">&#40;</span>s01_var <span style="color: #000000; font-weight: bold;">&gt;</span>= <span style="color: #000000; font-weight:bold;">31</span> <span style="color: #000000; font-weight: bold;">&amp;&amp;</span> s01_var <span style="color: #000000; font-weight: bold;">&lt;</span>= <span style="color: #000000; font-weight:bold;">40</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#123;</span>
				<span style="color: #009900;">// 31-40</span>
				TweenMax.to<span style="color: #000000;">&#40;</span>r1_mc, <span style="color: #000000; font-weight:bold;">0.9</span>, <span style="color: #000000;">&#123;</span><span style="color: #004993;">height</span><span style="color: #000000; font-weight: bold;">:</span><span style="color: #000000; font-weight:bold;">255</span><span style="color: #000000; font-weight: bold;">*</span>s02_var, ease<span style="color: #000000; font-weight: bold;">:</span>Quad.easeInOut, onUpdate<span style="color: #000000; font-weight: bold;">:</span>updateLEDs<span style="color: #000000;">&#125;</span><span style="color: #000000;">&#41;</span>;
				TweenMax.to<span style="color: #000000;">&#40;</span>g1_mc, <span style="color: #000000; font-weight:bold;">0.9</span>, <span style="color: #000000;">&#123;</span><span style="color: #004993;">height</span><span style="color: #000000; font-weight: bold;">:</span><span style="color: #000000; font-weight:bold;">0</span><span style="color: #000000; font-weight: bold;">*</span>s02_var, ease<span style="color: #000000; font-weight: bold;">:</span>Quad.easeInOut<span style="color: #000000;">&#125;</span><span style="color: #000000;">&#41;</span>;
				TweenMax.to<span style="color: #000000;">&#40;</span>b1_mc, <span style="color: #000000; font-weight:bold;">0.9</span>, <span style="color: #000000;">&#123;</span><span style="color: #004993;">height</span><span style="color: #000000; font-weight: bold;">:</span><span style="color: #000000; font-weight:bold;">0</span><span style="color: #000000; font-weight: bold;">*</span>s02_var, ease<span style="color: #000000; font-weight: bold;">:</span>Quad.easeInOut<span style="color: #000000;">&#125;</span><span style="color: #000000;">&#41;</span>;
				TweenMax.to<span style="color: #000000;">&#40;</span>r2_mc, <span style="color: #000000; font-weight:bold;">0.9</span>, <span style="color: #000000;">&#123;</span><span style="color: #004993;">height</span><span style="color: #000000; font-weight: bold;">:</span><span style="color: #000000; font-weight:bold;">255</span><span style="color: #000000; font-weight: bold;">*</span>s02_var, ease<span style="color: #000000; font-weight: bold;">:</span>Quad.easeInOut<span style="color: #000000;">&#125;</span><span style="color: #000000;">&#41;</span>;
				TweenMax.to<span style="color: #000000;">&#40;</span>g2_mc, <span style="color: #000000; font-weight:bold;">0.9</span>, <span style="color: #000000;">&#123;</span><span style="color: #004993;">height</span><span style="color: #000000; font-weight: bold;">:</span><span style="color: #000000; font-weight:bold;">0</span><span style="color: #000000; font-weight: bold;">*</span>s02_var, ease<span style="color: #000000; font-weight: bold;">:</span>Quad.easeInOut<span style="color: #000000;">&#125;</span><span style="color: #000000;">&#41;</span>;
				TweenMax.to<span style="color: #000000;">&#40;</span>b2_mc, <span style="color: #000000; font-weight:bold;">0.9</span>, <span style="color: #000000;">&#123;</span><span style="color: #004993;">height</span><span style="color: #000000; font-weight: bold;">:</span><span style="color: #000000; font-weight:bold;">0</span><span style="color: #000000; font-weight: bold;">*</span>s02_var, ease<span style="color: #000000; font-weight: bold;">:</span>Quad.easeInOut<span style="color: #000000;">&#125;</span><span style="color: #000000;">&#41;</span>;
			<span style="color: #000000;">&#125;</span><span style="color: #0033ff; font-weight: bold;">else</span> <span style="color: #0033ff; font-weight: bold;">if</span><span style="color: #000000;">&#40;</span>s01_var <span style="color: #000000; font-weight: bold;">&gt;</span>= <span style="color: #000000; font-weight:bold;">41</span> <span style="color: #000000; font-weight: bold;">&amp;&amp;</span> s01_var <span style="color: #000000; font-weight: bold;">&lt;</span>= <span style="color: #000000; font-weight:bold;">50</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#123;</span>
				<span style="color: #009900;">// 41-50</span>
				TweenMax.to<span style="color: #000000;">&#40;</span>r1_mc, <span style="color: #000000; font-weight:bold;">0.9</span>, <span style="color: #000000;">&#123;</span><span style="color: #004993;">height</span><span style="color: #000000; font-weight: bold;">:</span><span style="color: #000000; font-weight:bold;">255</span><span style="color: #000000; font-weight: bold;">*</span><span style="color: #004993;">Math</span>.<span style="color: #004993;">random</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000000; font-weight: bold;">*</span>s02_var, ease<span style="color: #000000; font-weight: bold;">:</span>Quad.easeInOut, onUpdate<span style="color: #000000; font-weight: bold;">:</span>updateLEDs<span style="color: #000000;">&#125;</span><span style="color: #000000;">&#41;</span>;
				TweenMax.to<span style="color: #000000;">&#40;</span>g1_mc, <span style="color: #000000; font-weight:bold;">0.9</span>, <span style="color: #000000;">&#123;</span><span style="color: #004993;">height</span><span style="color: #000000; font-weight: bold;">:</span><span style="color: #000000; font-weight:bold;">255</span><span style="color: #000000; font-weight: bold;">*</span><span style="color: #004993;">Math</span>.<span style="color: #004993;">random</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000000; font-weight: bold;">*</span>s02_var, ease<span style="color: #000000; font-weight: bold;">:</span>Quad.easeInOut<span style="color: #000000;">&#125;</span><span style="color: #000000;">&#41;</span>;
				TweenMax.to<span style="color: #000000;">&#40;</span>b1_mc, <span style="color: #000000; font-weight:bold;">0.9</span>, <span style="color: #000000;">&#123;</span><span style="color: #004993;">height</span><span style="color: #000000; font-weight: bold;">:</span><span style="color: #000000; font-weight:bold;">255</span><span style="color: #000000; font-weight: bold;">*</span><span style="color: #004993;">Math</span>.<span style="color: #004993;">random</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000000; font-weight: bold;">*</span>s02_var, ease<span style="color: #000000; font-weight: bold;">:</span>Quad.easeInOut<span style="color: #000000;">&#125;</span><span style="color: #000000;">&#41;</span>;
				TweenMax.to<span style="color: #000000;">&#40;</span>r2_mc, <span style="color: #000000; font-weight:bold;">0.9</span>, <span style="color: #000000;">&#123;</span><span style="color: #004993;">height</span><span style="color: #000000; font-weight: bold;">:</span><span style="color: #000000; font-weight:bold;">255</span><span style="color: #000000; font-weight: bold;">*</span><span style="color: #004993;">Math</span>.<span style="color: #004993;">random</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000000; font-weight: bold;">*</span>s02_var, ease<span style="color: #000000; font-weight: bold;">:</span>Quad.easeInOut<span style="color: #000000;">&#125;</span><span style="color: #000000;">&#41;</span>;
				TweenMax.to<span style="color: #000000;">&#40;</span>g2_mc, <span style="color: #000000; font-weight:bold;">0.9</span>, <span style="color: #000000;">&#123;</span><span style="color: #004993;">height</span><span style="color: #000000; font-weight: bold;">:</span><span style="color: #000000; font-weight:bold;">255</span><span style="color: #000000; font-weight: bold;">*</span><span style="color: #004993;">Math</span>.<span style="color: #004993;">random</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000000; font-weight: bold;">*</span>s02_var, ease<span style="color: #000000; font-weight: bold;">:</span>Quad.easeInOut<span style="color: #000000;">&#125;</span><span style="color: #000000;">&#41;</span>;
				TweenMax.to<span style="color: #000000;">&#40;</span>b2_mc, <span style="color: #000000; font-weight:bold;">0.9</span>, <span style="color: #000000;">&#123;</span><span style="color: #004993;">height</span><span style="color: #000000; font-weight: bold;">:</span><span style="color: #000000; font-weight:bold;">255</span><span style="color: #000000; font-weight: bold;">*</span><span style="color: #004993;">Math</span>.<span style="color: #004993;">random</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000000; font-weight: bold;">*</span>s02_var, ease<span style="color: #000000; font-weight: bold;">:</span>Quad.easeInOut<span style="color: #000000;">&#125;</span><span style="color: #000000;">&#41;</span>;
			<span style="color: #000000;">&#125;</span><span style="color: #0033ff; font-weight: bold;">else</span> <span style="color: #0033ff; font-weight: bold;">if</span><span style="color: #000000;">&#40;</span>s01_var <span style="color: #000000; font-weight: bold;">&gt;</span>= <span style="color: #000000; font-weight:bold;">51</span> <span style="color: #000000; font-weight: bold;">&amp;&amp;</span> s01_var <span style="color: #000000; font-weight: bold;">&lt;</span>= <span style="color: #000000; font-weight:bold;">60</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#123;</span>
				<span style="color: #009900;">// 51-60</span>
				TweenMax.to<span style="color: #000000;">&#40;</span>r1_mc, <span style="color: #000000; font-weight:bold;">0.9</span>, <span style="color: #000000;">&#123;</span><span style="color: #004993;">height</span><span style="color: #000000; font-weight: bold;">:</span><span style="color: #000000; font-weight:bold;">0</span><span style="color: #000000; font-weight: bold;">*</span>s02_var, ease<span style="color: #000000; font-weight: bold;">:</span>Quad.easeInOut, onUpdate<span style="color: #000000; font-weight: bold;">:</span>updateLEDs<span style="color: #000000;">&#125;</span><span style="color: #000000;">&#41;</span>;
				TweenMax.to<span style="color: #000000;">&#40;</span>g1_mc, <span style="color: #000000; font-weight:bold;">0.9</span>, <span style="color: #000000;">&#123;</span><span style="color: #004993;">height</span><span style="color: #000000; font-weight: bold;">:</span><span style="color: #000000; font-weight:bold;">255</span><span style="color: #000000; font-weight: bold;">*</span>s02_var, ease<span style="color: #000000; font-weight: bold;">:</span>Quad.easeInOut<span style="color: #000000;">&#125;</span><span style="color: #000000;">&#41;</span>;
				TweenMax.to<span style="color: #000000;">&#40;</span>b1_mc, <span style="color: #000000; font-weight:bold;">0.9</span>, <span style="color: #000000;">&#123;</span><span style="color: #004993;">height</span><span style="color: #000000; font-weight: bold;">:</span><span style="color: #000000; font-weight:bold;">0</span><span style="color: #000000; font-weight: bold;">*</span>s02_var, ease<span style="color: #000000; font-weight: bold;">:</span>Quad.easeInOut<span style="color: #000000;">&#125;</span><span style="color: #000000;">&#41;</span>;
				TweenMax.to<span style="color: #000000;">&#40;</span>r2_mc, <span style="color: #000000; font-weight:bold;">0.9</span>, <span style="color: #000000;">&#123;</span><span style="color: #004993;">height</span><span style="color: #000000; font-weight: bold;">:</span><span style="color: #000000; font-weight:bold;">0</span><span style="color: #000000; font-weight: bold;">*</span>s02_var, ease<span style="color: #000000; font-weight: bold;">:</span>Quad.easeInOut<span style="color: #000000;">&#125;</span><span style="color: #000000;">&#41;</span>;
				TweenMax.to<span style="color: #000000;">&#40;</span>g2_mc, <span style="color: #000000; font-weight:bold;">0.9</span>, <span style="color: #000000;">&#123;</span><span style="color: #004993;">height</span><span style="color: #000000; font-weight: bold;">:</span><span style="color: #000000; font-weight:bold;">255</span><span style="color: #000000; font-weight: bold;">*</span>s02_var, ease<span style="color: #000000; font-weight: bold;">:</span>Quad.easeInOut<span style="color: #000000;">&#125;</span><span style="color: #000000;">&#41;</span>;
				TweenMax.to<span style="color: #000000;">&#40;</span>b2_mc, <span style="color: #000000; font-weight:bold;">0.9</span>, <span style="color: #000000;">&#123;</span><span style="color: #004993;">height</span><span style="color: #000000; font-weight: bold;">:</span><span style="color: #000000; font-weight:bold;">0</span><span style="color: #000000; font-weight: bold;">*</span>s02_var, ease<span style="color: #000000; font-weight: bold;">:</span>Quad.easeInOut<span style="color: #000000;">&#125;</span><span style="color: #000000;">&#41;</span>;
			<span style="color: #000000;">&#125;</span><span style="color: #0033ff; font-weight: bold;">else</span> <span style="color: #0033ff; font-weight: bold;">if</span><span style="color: #000000;">&#40;</span>s01_var <span style="color: #000000; font-weight: bold;">&gt;</span>= <span style="color: #000000; font-weight:bold;">61</span> <span style="color: #000000; font-weight: bold;">&amp;&amp;</span> s01_var <span style="color: #000000; font-weight: bold;">&lt;</span>= <span style="color: #000000; font-weight:bold;">70</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#123;</span>
				<span style="color: #009900;">// 61-70</span>
				TweenMax.to<span style="color: #000000;">&#40;</span>r1_mc, <span style="color: #000000; font-weight:bold;">0.9</span>, <span style="color: #000000;">&#123;</span><span style="color: #004993;">height</span><span style="color: #000000; font-weight: bold;">:</span><span style="color: #000000; font-weight:bold;">255</span><span style="color: #000000; font-weight: bold;">*</span><span style="color: #004993;">Math</span>.<span style="color: #004993;">random</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000000; font-weight: bold;">*</span>s02_var, ease<span style="color: #000000; font-weight: bold;">:</span>Quad.easeInOut, onUpdate<span style="color: #000000; font-weight: bold;">:</span>updateLEDs<span style="color: #000000;">&#125;</span><span style="color: #000000;">&#41;</span>;
				TweenMax.to<span style="color: #000000;">&#40;</span>g1_mc, <span style="color: #000000; font-weight:bold;">0.9</span>, <span style="color: #000000;">&#123;</span><span style="color: #004993;">height</span><span style="color: #000000; font-weight: bold;">:</span><span style="color: #000000; font-weight:bold;">255</span><span style="color: #000000; font-weight: bold;">*</span><span style="color: #004993;">Math</span>.<span style="color: #004993;">random</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000000; font-weight: bold;">*</span>s02_var, ease<span style="color: #000000; font-weight: bold;">:</span>Quad.easeInOut<span style="color: #000000;">&#125;</span><span style="color: #000000;">&#41;</span>;
				TweenMax.to<span style="color: #000000;">&#40;</span>b1_mc, <span style="color: #000000; font-weight:bold;">0.9</span>, <span style="color: #000000;">&#123;</span><span style="color: #004993;">height</span><span style="color: #000000; font-weight: bold;">:</span><span style="color: #000000; font-weight:bold;">255</span><span style="color: #000000; font-weight: bold;">*</span><span style="color: #004993;">Math</span>.<span style="color: #004993;">random</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000000; font-weight: bold;">*</span>s02_var, ease<span style="color: #000000; font-weight: bold;">:</span>Quad.easeInOut<span style="color: #000000;">&#125;</span><span style="color: #000000;">&#41;</span>;
				TweenMax.to<span style="color: #000000;">&#40;</span>r2_mc, <span style="color: #000000; font-weight:bold;">0.9</span>, <span style="color: #000000;">&#123;</span><span style="color: #004993;">height</span><span style="color: #000000; font-weight: bold;">:</span><span style="color: #000000; font-weight:bold;">255</span><span style="color: #000000; font-weight: bold;">*</span><span style="color: #004993;">Math</span>.<span style="color: #004993;">random</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000000; font-weight: bold;">*</span>s02_var, ease<span style="color: #000000; font-weight: bold;">:</span>Quad.easeInOut<span style="color: #000000;">&#125;</span><span style="color: #000000;">&#41;</span>;
				TweenMax.to<span style="color: #000000;">&#40;</span>g2_mc, <span style="color: #000000; font-weight:bold;">0.9</span>, <span style="color: #000000;">&#123;</span><span style="color: #004993;">height</span><span style="color: #000000; font-weight: bold;">:</span><span style="color: #000000; font-weight:bold;">255</span><span style="color: #000000; font-weight: bold;">*</span><span style="color: #004993;">Math</span>.<span style="color: #004993;">random</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000000; font-weight: bold;">*</span>s02_var, ease<span style="color: #000000; font-weight: bold;">:</span>Quad.easeInOut<span style="color: #000000;">&#125;</span><span style="color: #000000;">&#41;</span>;
				TweenMax.to<span style="color: #000000;">&#40;</span>b2_mc, <span style="color: #000000; font-weight:bold;">0.9</span>, <span style="color: #000000;">&#123;</span><span style="color: #004993;">height</span><span style="color: #000000; font-weight: bold;">:</span><span style="color: #000000; font-weight:bold;">255</span><span style="color: #000000; font-weight: bold;">*</span><span style="color: #004993;">Math</span>.<span style="color: #004993;">random</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000000; font-weight: bold;">*</span>s02_var, ease<span style="color: #000000; font-weight: bold;">:</span>Quad.easeInOut<span style="color: #000000;">&#125;</span><span style="color: #000000;">&#41;</span>;
			<span style="color: #000000;">&#125;</span><span style="color: #0033ff; font-weight: bold;">else</span> <span style="color: #0033ff; font-weight: bold;">if</span><span style="color: #000000;">&#40;</span>s01_var <span style="color: #000000; font-weight: bold;">&gt;</span>= <span style="color: #000000; font-weight:bold;">71</span> <span style="color: #000000; font-weight: bold;">&amp;&amp;</span> s01_var <span style="color: #000000; font-weight: bold;">&lt;</span>= <span style="color: #000000; font-weight:bold;">80</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#123;</span>
				<span style="color: #009900;">// 71-80</span>
				TweenMax.to<span style="color: #000000;">&#40;</span>r1_mc, <span style="color: #000000; font-weight:bold;">0.9</span>, <span style="color: #000000;">&#123;</span><span style="color: #004993;">height</span><span style="color: #000000; font-weight: bold;">:</span><span style="color: #000000; font-weight:bold;">0</span><span style="color: #000000; font-weight: bold;">*</span>s02_var, ease<span style="color: #000000; font-weight: bold;">:</span>Quad.easeInOut, onUpdate<span style="color: #000000; font-weight: bold;">:</span>updateLEDs<span style="color: #000000;">&#125;</span><span style="color: #000000;">&#41;</span>;
				TweenMax.to<span style="color: #000000;">&#40;</span>g1_mc, <span style="color: #000000; font-weight:bold;">0.9</span>, <span style="color: #000000;">&#123;</span><span style="color: #004993;">height</span><span style="color: #000000; font-weight: bold;">:</span><span style="color: #000000; font-weight:bold;">0</span><span style="color: #000000; font-weight: bold;">*</span>s02_var, ease<span style="color: #000000; font-weight: bold;">:</span>Quad.easeInOut<span style="color: #000000;">&#125;</span><span style="color: #000000;">&#41;</span>;
				TweenMax.to<span style="color: #000000;">&#40;</span>b1_mc, <span style="color: #000000; font-weight:bold;">0.9</span>, <span style="color: #000000;">&#123;</span><span style="color: #004993;">height</span><span style="color: #000000; font-weight: bold;">:</span><span style="color: #000000; font-weight:bold;">255</span><span style="color: #000000; font-weight: bold;">*</span>s02_var, ease<span style="color: #000000; font-weight: bold;">:</span>Quad.easeInOut<span style="color: #000000;">&#125;</span><span style="color: #000000;">&#41;</span>;
				TweenMax.to<span style="color: #000000;">&#40;</span>r2_mc, <span style="color: #000000; font-weight:bold;">0.9</span>, <span style="color: #000000;">&#123;</span><span style="color: #004993;">height</span><span style="color: #000000; font-weight: bold;">:</span><span style="color: #000000; font-weight:bold;">0</span><span style="color: #000000; font-weight: bold;">*</span>s02_var, ease<span style="color: #000000; font-weight: bold;">:</span>Quad.easeInOut<span style="color: #000000;">&#125;</span><span style="color: #000000;">&#41;</span>;
				TweenMax.to<span style="color: #000000;">&#40;</span>g2_mc, <span style="color: #000000; font-weight:bold;">0.9</span>, <span style="color: #000000;">&#123;</span><span style="color: #004993;">height</span><span style="color: #000000; font-weight: bold;">:</span><span style="color: #000000; font-weight:bold;">0</span><span style="color: #000000; font-weight: bold;">*</span>s02_var, ease<span style="color: #000000; font-weight: bold;">:</span>Quad.easeInOut<span style="color: #000000;">&#125;</span><span style="color: #000000;">&#41;</span>;
				TweenMax.to<span style="color: #000000;">&#40;</span>b2_mc, <span style="color: #000000; font-weight:bold;">0.9</span>, <span style="color: #000000;">&#123;</span><span style="color: #004993;">height</span><span style="color: #000000; font-weight: bold;">:</span><span style="color: #000000; font-weight:bold;">255</span><span style="color: #000000; font-weight: bold;">*</span>s02_var, ease<span style="color: #000000; font-weight: bold;">:</span>Quad.easeInOut<span style="color: #000000;">&#125;</span><span style="color: #000000;">&#41;</span>;
			<span style="color: #000000;">&#125;</span><span style="color: #0033ff; font-weight: bold;">else</span> <span style="color: #0033ff; font-weight: bold;">if</span><span style="color: #000000;">&#40;</span>s01_var <span style="color: #000000; font-weight: bold;">&gt;</span>= <span style="color: #000000; font-weight:bold;">81</span> <span style="color: #000000; font-weight: bold;">&amp;&amp;</span> s01_var <span style="color: #000000; font-weight: bold;">&lt;</span>= <span style="color: #000000; font-weight:bold;">90</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#123;</span>
				<span style="color: #009900;">// 81-90</span>
				TweenMax.to<span style="color: #000000;">&#40;</span>r1_mc, <span style="color: #000000; font-weight:bold;">0.9</span>, <span style="color: #000000;">&#123;</span><span style="color: #004993;">height</span><span style="color: #000000; font-weight: bold;">:</span><span style="color: #000000; font-weight:bold;">255</span>, ease<span style="color: #000000; font-weight: bold;">:</span>Quad.easeInOut, onUpdate<span style="color: #000000; font-weight: bold;">:</span>updateLEDs<span style="color: #000000;">&#125;</span><span style="color: #000000;">&#41;</span>;
				TweenMax.to<span style="color: #000000;">&#40;</span>g1_mc, <span style="color: #000000; font-weight:bold;">0.9</span>, <span style="color: #000000;">&#123;</span><span style="color: #004993;">height</span><span style="color: #000000; font-weight: bold;">:</span><span style="color: #000000; font-weight:bold;">255</span>, ease<span style="color: #000000; font-weight: bold;">:</span>Quad.easeInOut<span style="color: #000000;">&#125;</span><span style="color: #000000;">&#41;</span>;
				TweenMax.to<span style="color: #000000;">&#40;</span>b1_mc, <span style="color: #000000; font-weight:bold;">0.9</span>, <span style="color: #000000;">&#123;</span><span style="color: #004993;">height</span><span style="color: #000000; font-weight: bold;">:</span><span style="color: #000000; font-weight:bold;">255</span>, ease<span style="color: #000000; font-weight: bold;">:</span>Quad.easeInOut<span style="color: #000000;">&#125;</span><span style="color: #000000;">&#41;</span>;
				TweenMax.to<span style="color: #000000;">&#40;</span>r2_mc, <span style="color: #000000; font-weight:bold;">0.9</span>, <span style="color: #000000;">&#123;</span><span style="color: #004993;">height</span><span style="color: #000000; font-weight: bold;">:</span><span style="color: #000000; font-weight:bold;">255</span>, ease<span style="color: #000000; font-weight: bold;">:</span>Quad.easeInOut<span style="color: #000000;">&#125;</span><span style="color: #000000;">&#41;</span>;
				TweenMax.to<span style="color: #000000;">&#40;</span>g2_mc, <span style="color: #000000; font-weight:bold;">0.9</span>, <span style="color: #000000;">&#123;</span><span style="color: #004993;">height</span><span style="color: #000000; font-weight: bold;">:</span><span style="color: #000000; font-weight:bold;">255</span>, ease<span style="color: #000000; font-weight: bold;">:</span>Quad.easeInOut<span style="color: #000000;">&#125;</span><span style="color: #000000;">&#41;</span>;
				TweenMax.to<span style="color: #000000;">&#40;</span>b2_mc, <span style="color: #000000; font-weight:bold;">0.9</span>, <span style="color: #000000;">&#123;</span><span style="color: #004993;">height</span><span style="color: #000000; font-weight: bold;">:</span><span style="color: #000000; font-weight:bold;">255</span>, ease<span style="color: #000000; font-weight: bold;">:</span>Quad.easeInOut<span style="color: #000000;">&#125;</span><span style="color: #000000;">&#41;</span>;
			<span style="color: #000000;">&#125;</span><span style="color: #0033ff; font-weight: bold;">else</span> <span style="color: #0033ff; font-weight: bold;">if</span><span style="color: #000000;">&#40;</span>s01_var <span style="color: #000000; font-weight: bold;">&gt;</span>= <span style="color: #000000; font-weight:bold;">91</span> <span style="color: #000000; font-weight: bold;">&amp;&amp;</span> s01_var <span style="color: #000000; font-weight: bold;">&lt;</span>= <span style="color: #000000; font-weight:bold;">100</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#123;</span>
				<span style="color: #009900;">// 91-100</span>
				TweenMax.to<span style="color: #000000;">&#40;</span>r1_mc, <span style="color: #000000; font-weight:bold;">0.9</span>, <span style="color: #000000;">&#123;</span><span style="color: #004993;">height</span><span style="color: #000000; font-weight: bold;">:</span><span style="color: #000000; font-weight:bold;">0</span><span style="color: #000000; font-weight: bold;">*</span>s02_var, ease<span style="color: #000000; font-weight: bold;">:</span>Quad.easeInOut, onUpdate<span style="color: #000000; font-weight: bold;">:</span>updateLEDs<span style="color: #000000;">&#125;</span><span style="color: #000000;">&#41;</span>;
				TweenMax.to<span style="color: #000000;">&#40;</span>g1_mc, <span style="color: #000000; font-weight:bold;">0.9</span>, <span style="color: #000000;">&#123;</span><span style="color: #004993;">height</span><span style="color: #000000; font-weight: bold;">:</span><span style="color: #000000; font-weight:bold;">0</span><span style="color: #000000; font-weight: bold;">*</span>s02_var, ease<span style="color: #000000; font-weight: bold;">:</span>Quad.easeInOut<span style="color: #000000;">&#125;</span><span style="color: #000000;">&#41;</span>;
				TweenMax.to<span style="color: #000000;">&#40;</span>b1_mc, <span style="color: #000000; font-weight:bold;">0.9</span>, <span style="color: #000000;">&#123;</span><span style="color: #004993;">height</span><span style="color: #000000; font-weight: bold;">:</span><span style="color: #000000; font-weight:bold;">0</span><span style="color: #000000; font-weight: bold;">*</span>s02_var, ease<span style="color: #000000; font-weight: bold;">:</span>Quad.easeInOut<span style="color: #000000;">&#125;</span><span style="color: #000000;">&#41;</span>;
				TweenMax.to<span style="color: #000000;">&#40;</span>r2_mc, <span style="color: #000000; font-weight:bold;">0.9</span>, <span style="color: #000000;">&#123;</span><span style="color: #004993;">height</span><span style="color: #000000; font-weight: bold;">:</span><span style="color: #000000; font-weight:bold;">0</span><span style="color: #000000; font-weight: bold;">*</span>s02_var, ease<span style="color: #000000; font-weight: bold;">:</span>Quad.easeInOut<span style="color: #000000;">&#125;</span><span style="color: #000000;">&#41;</span>;
				TweenMax.to<span style="color: #000000;">&#40;</span>g2_mc, <span style="color: #000000; font-weight:bold;">0.9</span>, <span style="color: #000000;">&#123;</span><span style="color: #004993;">height</span><span style="color: #000000; font-weight: bold;">:</span><span style="color: #000000; font-weight:bold;">0</span><span style="color: #000000; font-weight: bold;">*</span>s02_var, ease<span style="color: #000000; font-weight: bold;">:</span>Quad.easeInOut<span style="color: #000000;">&#125;</span><span style="color: #000000;">&#41;</span>;
				TweenMax.to<span style="color: #000000;">&#40;</span>b2_mc, <span style="color: #000000; font-weight:bold;">0.9</span>, <span style="color: #000000;">&#123;</span><span style="color: #004993;">height</span><span style="color: #000000; font-weight: bold;">:</span><span style="color: #000000; font-weight:bold;">0</span><span style="color: #000000; font-weight: bold;">*</span>s02_var, ease<span style="color: #000000; font-weight: bold;">:</span>Quad.easeInOut<span style="color: #000000;">&#125;</span><span style="color: #000000;">&#41;</span>;
			<span style="color: #000000;">&#125;</span><span style="color: #0033ff; font-weight: bold;">else</span> <span style="color: #0033ff; font-weight: bold;">if</span><span style="color: #000000;">&#40;</span>s01_var <span style="color: #000000; font-weight: bold;">&gt;</span>= <span style="color: #000000; font-weight:bold;">100</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#123;</span>
				<span style="color: #009900;">// Stop values greater than 100</span>
				s01_value.<span style="color: #004993;">text</span> = <span style="color: #004993;">String</span><span style="color: #000000;">&#40;</span><span style="color: #000000; font-weight:bold;">100</span><span style="color: #000000;">&#41;</span>;
			<span style="color: #000000;">&#125;</span><span style="color: #0033ff; font-weight: bold;">else</span> <span style="color: #000000;">&#123;</span>
				<span style="color: #009900;">// Nothing happens?</span>
			<span style="color: #000000;">&#125;</span>
&nbsp;
			<span style="color: #009900;">//Volume</span>
			TweenMax.to<span style="color: #000000;">&#40;</span>songChannel, <span style="color: #000000; font-weight:bold;">0.9</span>, <span style="color: #000000;">&#123;</span><span style="color: #004993;">volume</span><span style="color: #000000; font-weight: bold;">:</span><span style="color: #004993;">Number</span><span style="color: #000000;">&#40;</span>sens01Var<span style="color: #000000;">&#41;</span><span style="color: #000000; font-weight: bold;">/</span><span style="color: #000000; font-weight:bold;">100</span><span style="color: #000000;">&#125;</span><span style="color: #000000;">&#41;</span>;
&nbsp;
			<span style="color: #009900;">// Values for LEDs</span>
			r1_text.<span style="color: #004993;">text</span> = <span style="color: #004993;">String</span><span style="color: #000000;">&#40;</span>r1_var<span style="color: #000000;">&#41;</span>;
			g1_text.<span style="color: #004993;">text</span> = <span style="color: #004993;">String</span><span style="color: #000000;">&#40;</span>g1_var<span style="color: #000000;">&#41;</span>;
			b1_text.<span style="color: #004993;">text</span> = <span style="color: #004993;">String</span><span style="color: #000000;">&#40;</span>b1_var<span style="color: #000000;">&#41;</span>;
			r2_text.<span style="color: #004993;">text</span> = <span style="color: #004993;">String</span><span style="color: #000000;">&#40;</span>r2_var<span style="color: #000000;">&#41;</span>;
			g2_text.<span style="color: #004993;">text</span> = <span style="color: #004993;">String</span><span style="color: #000000;">&#40;</span>g2_var<span style="color: #000000;">&#41;</span>;
			b2_text.<span style="color: #004993;">text</span> = <span style="color: #004993;">String</span><span style="color: #000000;">&#40;</span>b2_var<span style="color: #000000;">&#41;</span>;
&nbsp;
&nbsp;
		<span style="color: #000000;">&#125;</span>
&nbsp;
		<span style="color: #0033ff; font-weight: bold;">public</span> <span style="color: #339966; font-weight: bold;">function</span> updateLEDs<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#123;</span>
			a.writeAnalogPin<span style="color: #000000;">&#40;</span>red1, r1_var<span style="color: #000000;">&#41;</span>;
			a.writeAnalogPin<span style="color: #000000;">&#40;</span>red2, r2_var<span style="color: #000000;">&#41;</span>;
			a.writeAnalogPin<span style="color: #000000;">&#40;</span>green1, g1_var<span style="color: #000000;">&#41;</span>;
			a.writeAnalogPin<span style="color: #000000;">&#40;</span>green2, g2_var<span style="color: #000000;">&#41;</span>;
			a.writeAnalogPin<span style="color: #000000;">&#40;</span>blue1, b1_var<span style="color: #000000;">&#41;</span>;
			a.writeAnalogPin<span style="color: #000000;">&#40;</span>blue2, b2_var<span style="color: #000000;">&#41;</span>;
		<span style="color: #000000;">&#125;</span>
&nbsp;
		<span style="color: #0033ff; font-weight: bold;">public</span> <span style="color: #339966; font-weight: bold;">function</span> sData<span style="color: #000000;">&#40;</span> e<span style="color: #000000; font-weight: bold;">:</span><span style="color: #004993;">ProgressEvent</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000; font-weight: bold;">:</span> <span style="color: #0033ff; font-weight: bold;">void</span>
		<span style="color: #000000;">&#123;</span>
&nbsp;
			<span style="color: #009900;">// Read the correct data from the socket.</span>
			<span style="color: #009900;">// Preceeded by &quot;A&quot; and &quot;B&quot;.</span>
			<span style="color: #6699cc; font-weight: bold;">var</span> sData<span style="color: #000000; font-weight: bold;">:</span><span style="color: #004993;">String</span> = s.<span style="color: #004993;">readUTFBytes</span><span style="color: #000000;">&#40;</span> s.<span style="color: #004993;">bytesAvailable</span> <span style="color: #000000;">&#41;</span>;
			<span style="color: #0033ff; font-weight: bold;">if</span> <span style="color: #000000;">&#40;</span>isDataCorrect<span style="color: #000000;">&#40;</span>sData<span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#123;</span>
&nbsp;
				<span style="color: #009900;">// Catch all values preceeded by the letter &quot;A&quot; and strip it from the indicating letter.</span>
				<span style="color: #0033ff; font-weight: bold;">if</span> <span style="color: #000000;">&#40;</span>sData.<span style="color: #004993;">indexOf</span><span style="color: #000000;">&#40;</span> <span style="color: #990000;">&quot;A&quot;</span> <span style="color: #000000;">&#41;</span> == <span style="color: #000000; font-weight:bold;">0</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#123;</span>
					prevInput1 = currInput1;
					currInput1 = sData.<span style="color: #004993;">substr</span><span style="color: #000000;">&#40;</span> <span style="color: #000000; font-weight:bold;">1</span> <span style="color: #000000;">&#41;</span>;
				<span style="color: #000000;">&#125;</span> <span style="color: #0033ff; font-weight: bold;">else</span> <span style="color: #000000;">&#123;</span>
					currInput1 <span style="color: #000000; font-weight: bold;">+</span>= sData;
				<span style="color: #000000;">&#125;</span>
				<span style="color: #009900;">// Catch all values preceeded by the letter &quot;B&quot; and strip it from the indicating letter.</span>
				<span style="color: #0033ff; font-weight: bold;">if</span> <span style="color: #000000;">&#40;</span>sData.<span style="color: #004993;">indexOf</span><span style="color: #000000;">&#40;</span> <span style="color: #990000;">&quot;B&quot;</span> <span style="color: #000000;">&#41;</span> == <span style="color: #000000; font-weight:bold;">0</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#123;</span>
					prevInput2 = currInput2;
					currInput2 = sData.<span style="color: #004993;">substr</span><span style="color: #000000;">&#40;</span> <span style="color: #000000; font-weight:bold;">1</span> <span style="color: #000000;">&#41;</span>;
				<span style="color: #000000;">&#125;</span> <span style="color: #0033ff; font-weight: bold;">else</span> <span style="color: #000000;">&#123;</span>
					currInput2 <span style="color: #000000; font-weight: bold;">+</span>= sData;
				<span style="color: #000000;">&#125;</span>
&nbsp;
				<span style="color: #009900;">// Raw number values</span>
				s01_Ard.<span style="color: #004993;">text</span> = <span style="color: #004993;">String</span><span style="color: #000000;">&#40;</span>currInput1<span style="color: #000000;">&#41;</span>;
				s02_Ard.<span style="color: #004993;">text</span> = <span style="color: #004993;">String</span><span style="color: #000000;">&#40;</span>currInput2<span style="color: #000000;">&#41;</span>;
&nbsp;
				<span style="color: #009900;">// Strip out bad values from sensor 1</span>
				<span style="color: #0033ff; font-weight: bold;">if</span><span style="color: #000000;">&#40;</span><span style="color: #004993;">isNaN</span><span style="color: #000000;">&#40;</span><span style="color: #004993;">Number</span><span style="color: #000000;">&#40;</span>currInput1<span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#123;</span>
					s01_value.<span style="color: #004993;">text</span> = <span style="color: #004993;">String</span><span style="color: #000000;">&#40;</span>sens01Var<span style="color: #000000;">&#41;</span>;
				<span style="color: #000000;">&#125;</span><span style="color: #0033ff; font-weight: bold;">else</span> <span style="color: #000000;">&#123;</span>
					sens01Var = <span style="color: #000000;">&#40;</span><span style="color: #004993;">Number</span><span style="color: #000000;">&#40;</span>currInput1<span style="color: #000000;">&#41;</span><span style="color: #000000; font-weight: bold;">/</span>sens01VarMax<span style="color: #000000;">&#41;</span><span style="color: #000000; font-weight: bold;">*</span><span style="color: #000000; font-weight:bold;">100</span>;
					s01_value.<span style="color: #004993;">text</span> = <span style="color: #004993;">String</span><span style="color: #000000;">&#40;</span>sens01Var<span style="color: #000000;">&#41;</span>;
				<span style="color: #000000;">&#125;</span>
&nbsp;
				<span style="color: #009900;">// Strip out bad values from sensor 2</span>
				<span style="color: #0033ff; font-weight: bold;">if</span><span style="color: #000000;">&#40;</span><span style="color: #004993;">isNaN</span><span style="color: #000000;">&#40;</span><span style="color: #004993;">Number</span><span style="color: #000000;">&#40;</span>currInput2<span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#123;</span>
					s02_value.<span style="color: #004993;">text</span> = <span style="color: #004993;">String</span><span style="color: #000000;">&#40;</span>sens02Var<span style="color: #000000;">&#41;</span>;
				<span style="color: #000000;">&#125;</span><span style="color: #0033ff; font-weight: bold;">else</span> <span style="color: #000000;">&#123;</span>
					sens02Var = <span style="color: #000000;">&#40;</span><span style="color: #004993;">Number</span><span style="color: #000000;">&#40;</span>currInput2<span style="color: #000000;">&#41;</span><span style="color: #000000; font-weight: bold;">/</span>sens02VarMax<span style="color: #000000;">&#41;</span><span style="color: #000000; font-weight: bold;">*</span><span style="color: #000000; font-weight:bold;">10</span>;
					s02_value.<span style="color: #004993;">text</span> = <span style="color: #004993;">String</span><span style="color: #000000;">&#40;</span>sens02Var<span style="color: #000000;">&#41;</span>;
				<span style="color: #000000;">&#125;</span>
&nbsp;
			<span style="color: #000000;">&#125;</span>
		<span style="color: #000000;">&#125;</span>
&nbsp;
&nbsp;
		<span style="color: #339966; font-weight: bold;">function</span> isDataCorrect<span style="color: #000000;">&#40;</span> sData<span style="color: #000000; font-weight: bold;">:</span><span style="color: #004993;">String</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000; font-weight: bold;">:</span> <span style="color: #004993;">Boolean</span>
		<span style="color: #000000;">&#123;</span>
			<span style="color: #009900;">// Occasionally, between real results the data returned consists of a carriage return less than zero.</span>
			<span style="color: #0033ff; font-weight: bold;">if</span> <span style="color: #000000;">&#40;</span><span style="color: #004993;">parseInt</span><span style="color: #000000;">&#40;</span>sData<span style="color: #000000;">&#41;</span> == <span style="color: #000000; font-weight:bold;">0</span> <span style="color: #000000; font-weight: bold;">&amp;&amp;</span> sData.<span style="color: #004993;">length</span> <span style="color: #000000; font-weight: bold;">&gt;</span> <span style="color: #000000; font-weight:bold;">1</span><span style="color: #000000;">&#41;</span> <span style="color: #0033ff; font-weight: bold;">return</span> <span style="color: #0033ff; font-weight: bold;">false</span>;
			<span style="color: #009900;">// Another occasional unwanted reult</span>
			<span style="color: #0033ff; font-weight: bold;">if</span> <span style="color: #000000;">&#40;</span>sData == <span style="color: #990000;">&quot;&quot;</span><span style="color: #000000;">&#41;</span> <span style="color: #0033ff; font-weight: bold;">return</span> <span style="color: #0033ff; font-weight: bold;">false</span>;
			<span style="color: #0033ff; font-weight: bold;">if</span> <span style="color: #000000;">&#40;</span>sData == <span style="color: #990000;">&quot;0&quot;</span><span style="color: #000000;">&#41;</span> <span style="color: #0033ff; font-weight: bold;">return</span> <span style="color: #0033ff; font-weight: bold;">false</span>;
			<span style="color: #0033ff; font-weight: bold;">if</span> <span style="color: #000000;">&#40;</span>sData == <span style="color: #990000;">&quot;1&quot;</span><span style="color: #000000;">&#41;</span> <span style="color: #0033ff; font-weight: bold;">return</span> <span style="color: #0033ff; font-weight: bold;">false</span>;
&nbsp;
			<span style="color: #0033ff; font-weight: bold;">return</span> <span style="color: #0033ff; font-weight: bold;">true</span>;
		<span style="color: #000000;">&#125;</span>
&nbsp;
	<span style="color: #000000;">&#125;</span>
<span style="color: #000000;">&#125;</span></pre></td></tr></table></div>

</div>
]]></content:encoded>
			<wfw:commentRss>http://kristoferforsell.com/blog/2008/10/26/arduino-ultrasonic-sensors-and-creativity/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>
