├── .gitattributes
├── .gitignore
├── Diagrams
├── Board.pdf
├── Diagram.pdf
├── Ultraschall Sensoren_85_SMD.brd
└── Ultraschall Sensoren_85_SMD.sch
├── README.md
├── ThreeSensors_Mega
└── ThreeSensors_Mega.ino
└── ThreeSensors_Tiny
└── ThreeSensors_Tiny.ino
/.gitattributes:
--------------------------------------------------------------------------------
1 | # Auto detect text files and perform LF normalization
2 | * text=auto
3 |
4 | # Custom for Visual Studio
5 | *.cs diff=csharp
6 |
7 | # Standard to msysgit
8 | *.doc diff=astextplain
9 | *.DOC diff=astextplain
10 | *.docx diff=astextplain
11 | *.DOCX diff=astextplain
12 | *.dot diff=astextplain
13 | *.DOT diff=astextplain
14 | *.pdf diff=astextplain
15 | *.PDF diff=astextplain
16 | *.rtf diff=astextplain
17 | *.RTF diff=astextplain
18 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | # Windows image file caches
2 | Thumbs.db
3 | ehthumbs.db
4 |
5 | # Folder config file
6 | Desktop.ini
7 |
8 | # Recycle Bin used on file shares
9 | $RECYCLE.BIN/
10 |
11 | # Windows Installer files
12 | *.cab
13 | *.msi
14 | *.msm
15 | *.msp
16 |
17 | # Windows shortcuts
18 | *.lnk
19 |
20 | # =========================
21 | # Operating System Files
22 | # =========================
23 |
24 | # OSX
25 | # =========================
26 |
27 | .DS_Store
28 | .AppleDouble
29 | .LSOverride
30 |
31 | # Thumbnails
32 | ._*
33 |
34 | # Files that might appear in the root of a volume
35 | .DocumentRevisions-V100
36 | .fseventsd
37 | .Spotlight-V100
38 | .TemporaryItems
39 | .Trashes
40 | .VolumeIcon.icns
41 |
42 | # Directories potentially created on remote AFP share
43 | .AppleDB
44 | .AppleDesktop
45 | Network Trash Folder
46 | Temporary Items
47 | .apdisk
48 |
--------------------------------------------------------------------------------
/Diagrams/Board.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SensorsIot/ThreeSensorsTiny/7c503aa3d9ab44ac071f87a1d4b28cd4ddbe405d/Diagrams/Board.pdf
--------------------------------------------------------------------------------
/Diagrams/Diagram.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SensorsIot/ThreeSensorsTiny/7c503aa3d9ab44ac071f87a1d4b28cd4ddbe405d/Diagrams/Diagram.pdf
--------------------------------------------------------------------------------
/Diagrams/Ultraschall Sensoren_85_SMD.brd:
--------------------------------------------------------------------------------
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 | >Name
176 |
177 |
178 |
179 |
180 |
181 |
182 |
183 |
184 | <b>Small Outline IC</b>
185 |
186 |
187 |
188 |
189 |
190 |
191 |
192 |
193 |
194 | >NAME
195 | >VALUE
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 | >Name
223 |
224 |
225 |
226 |
227 |
228 | <h3>SparkFun Electronics' preferred foot prints</h3>
229 | In this library you'll find all manner of retired footprints for resistors, capacitors, board names, ICs, etc., that are no longer used in our catalog.<br><br>
230 | We've spent an enormous amount of time creating and checking these footprints and parts, but it is the end user's responsibility to ensure correctness and suitablity for a given componet or application. If you enjoy using this library, please buy one of our products at www.sparkfun.com.
231 | <br><br>
232 | <b>Licensing:</b>Creative Commons ShareAlike 4.0 International - https://creativecommons.org/licenses/by-sa/4.0/
233 | <br><br>
234 | You are welcome to use this library for commercial purposes. For attribution, we ask that when you begin to sell your device using our footprint, you email us with a link to the product being sold. We want bragging rights that we helped (in a very small part) to create your 8th world wonder. We would like the opportunity to feature your device on our homepage.
235 |
236 |
237 |
238 |
239 |
240 |
241 |
242 |
243 |
244 |
245 |
246 |
247 |
248 | >NAME
249 | >VALUE
250 |
251 |
252 |
253 |
254 |
255 |
256 |
257 |
258 |
259 |
260 |
261 |
262 |
263 | <b>EAGLE Design Rules</b>
264 | <p>
265 | Die Standard-Design-Rules sind so gewählt, dass sie für
266 | die meisten Anwendungen passen. Sollte ihre Platine
267 | besondere Anforderungen haben, treffen Sie die erforderlichen
268 | Einstellungen hier und speichern die Design Rules unter
269 | einem neuen Namen ab.
270 | <b>EAGLE Design Rules</b>
271 | <p>
272 | The default Design Rules have been set to cover
273 | a wide range of applications. Your particular design
274 | may have different requirements, so please make the
275 | necessary adjustments and save your customized
276 | design rules under a new name.
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 |
388 |
389 |
390 |
391 |
392 |
393 |
394 |
395 |
396 |
397 |
398 |
399 |
400 |
401 |
402 |
403 |
404 |
405 |
406 |
407 |
408 |
409 |
410 |
411 |
412 |
413 |
414 |
415 |
416 |
417 |
418 |
419 |
420 |
421 |
422 |
423 |
424 |
425 |
426 |
427 |
428 |
429 |
430 |
431 |
432 |
433 |
434 |
435 |
436 |
437 |
438 |
439 |
440 |
441 |
442 |
443 |
444 |
445 |
446 |
447 |
448 |
449 |
450 |
451 |
452 |
453 |
454 |
455 |
456 |
457 |
458 |
459 |
460 |
461 |
462 |
463 |
464 |
465 |
466 |
467 |
468 |
469 |
470 |
471 |
472 |
473 |
474 |
475 |
476 |
477 |
478 |
479 |
480 |
481 |
482 |
483 |
484 |
485 |
486 |
487 |
488 |
489 |
490 |
491 |
492 |
493 |
494 |
495 |
496 |
497 |
498 |
499 |
500 |
501 |
502 |
503 |
504 |
505 |
506 |
507 |
508 |
509 |
510 |
511 |
512 |
513 |
514 |
515 |
516 |
517 |
518 |
519 |
520 |
521 |
522 |
523 |
524 |
525 |
526 |
527 |
528 |
529 |
530 |
531 |
532 |
533 |
534 |
535 |
536 |
537 |
538 |
539 |
540 |
541 |
542 |
543 |
544 |
545 |
546 |
547 |
548 |
549 |
550 |
551 |
552 |
553 |
554 |
555 |
556 |
557 |
558 |
559 |
560 |
561 |
562 |
563 |
564 |
565 |
566 |
567 |
568 |
569 |
570 |
571 |
572 |
573 |
574 |
575 |
576 |
577 |
578 |
579 |
580 |
581 |
582 |
583 |
584 |
585 |
586 |
587 |
588 |
589 |
590 |
591 |
592 |
593 |
594 |
595 |
596 |
597 |
598 |
599 |
600 |
601 |
602 |
--------------------------------------------------------------------------------
/Diagrams/Ultraschall Sensoren_85_SMD.sch:
--------------------------------------------------------------------------------
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 | >Name
166 |
167 |
168 |
169 |
170 |
171 |
172 |
173 |
174 | <b>Small Outline IC</b>
175 |
176 |
177 |
178 |
179 |
180 |
181 |
182 |
183 |
184 | >NAME
185 | >VALUE
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 | >Name
213 |
214 |
215 |
216 |
217 |
218 |
219 |
220 |
221 |
222 |
223 |
224 |
225 |
226 | SR-04
227 | >VALUE
228 |
229 |
230 |
231 |
232 |
233 |
234 |
235 |
236 |
237 |
238 | >VALUE
239 |
240 |
241 |
242 |
243 |
244 |
245 | >NAME
246 | >VALUE
247 |
248 |
249 |
250 |
251 |
252 |
253 |
254 |
255 |
256 |
257 |
258 |
259 |
260 |
261 |
262 |
263 |
264 |
265 | SRF-05
266 | >VALUE
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 | <b>Supply Symbols</b><p>
352 | GND, VCC, 0V, +5V, -5V, etc.<p>
353 | Please keep in mind, that these devices are necessary for the
354 | automatic wiring of the supply signals.<p>
355 | The pin name defined in the symbol is identical to the net which is to be wired automatically.<p>
356 | In this library the device names are the same as the pin names of the symbols, therefore the correct signal names appear next to the supply symbols in the schematic.<p>
357 | <author>Created by librarian@cadsoft.de</author>
358 |
359 |
360 |
361 |
362 |
363 |
364 | >VALUE
365 |
366 |
367 |
368 |
369 |
370 | <b>SUPPLY SYMBOL</b>
371 |
372 |
373 |
374 |
375 |
376 |
377 |
378 |
379 |
380 |
381 |
382 |
383 |
384 |
385 | <h3>SparkFun Electronics' preferred foot prints</h3>
386 | In this library you'll find non-functional items- supply symbols, logos, notations, frame blocks, etc.<br><br>
387 | We've spent an enormous amount of time creating and checking these footprints and parts, but it is the end user's responsibility to ensure correctness and suitablity for a given componet or application. If you enjoy using this library, please buy one of our products at www.sparkfun.com.
388 | <br><br>
389 | <b>Licensing:</b> Creative Commons ShareAlike 4.0 International - https://creativecommons.org/licenses/by-sa/4.0/
390 | <br><br>
391 | You are welcome to use this library for commercial purposes. For attribution, we ask that when you begin to sell your device using our footprint, you email us with a link to the product being sold. We want bragging rights that we helped (in a very small part) to create your 8th world wonder. We would like the opportunity to feature your device on our homepage.
392 |
393 |
394 |
395 |
396 |
397 | >VALUE
398 |
399 |
400 |
401 |
402 |
403 | <b>SUPPLY SYMBOL</b>
404 |
405 |
406 |
407 |
408 |
409 |
410 |
411 |
412 |
413 |
414 |
415 |
416 |
417 |
418 | <h3>SparkFun Electronics' preferred foot prints</h3>
419 | In this library you'll find all manner of retired footprints for resistors, capacitors, board names, ICs, etc., that are no longer used in our catalog.<br><br>
420 | We've spent an enormous amount of time creating and checking these footprints and parts, but it is the end user's responsibility to ensure correctness and suitablity for a given componet or application. If you enjoy using this library, please buy one of our products at www.sparkfun.com.
421 | <br><br>
422 | <b>Licensing:</b>Creative Commons ShareAlike 4.0 International - https://creativecommons.org/licenses/by-sa/4.0/
423 | <br><br>
424 | You are welcome to use this library for commercial purposes. For attribution, we ask that when you begin to sell your device using our footprint, you email us with a link to the product being sold. We want bragging rights that we helped (in a very small part) to create your 8th world wonder. We would like the opportunity to feature your device on our homepage.
425 |
426 |
427 |
428 |
429 |
430 |
431 |
432 |
433 |
434 |
435 |
436 |
437 |
438 | >NAME
439 | >VALUE
440 |
441 |
442 |
443 |
444 |
445 |
446 |
447 |
448 | >NAME
449 | >VALUE
450 |
451 |
452 |
453 |
454 |
455 |
456 |
457 |
458 | 10uF Tantalum SMT<br>
459 | CAP-00811- 16V 10% (EIA-3216)
460 |
461 |
462 |
463 |
464 |
465 |
466 |
467 |
468 |
469 |
470 |
471 |
472 |
473 |
474 |
475 |
476 |
477 |
478 |
479 |
480 |
481 |
482 |
483 |
484 |
485 |
486 |
487 |
488 |
489 |
490 |
491 |
492 |
493 |
494 |
495 |
496 |
497 |
498 |
499 |
500 |
501 |
502 |
503 |
504 |
505 |
506 |
507 |
508 |
509 | PB1 Rechts
510 | PB3 Mitte
511 | PB4 Links
512 |
513 |
514 |
515 |
516 |
517 |
518 |
519 |
520 |
521 |
522 |
523 |
524 |
525 |
526 |
527 |
528 |
529 |
530 |
531 |
532 |
533 |
534 |
535 |
536 |
537 |
538 |
539 |
540 |
541 |
542 |
543 |
544 |
545 |
546 |
547 |
548 |
549 |
550 |
551 |
552 |
553 |
554 |
555 |
556 |
557 |
558 |
559 |
560 |
561 |
562 |
563 |
564 |
565 |
566 |
567 |
568 |
569 |
570 |
571 |
572 |
573 |
574 |
575 |
576 |
577 |
578 |
579 |
580 |
581 |
582 |
583 |
584 |
585 |
586 |
587 |
588 |
589 |
590 |
591 |
592 |
593 |
594 |
595 |
596 |
597 |
598 |
599 |
600 |
601 |
602 |
603 |
604 |
605 |
606 |
607 |
608 |
609 |
610 |
611 |
612 |
613 |
614 |
615 |
616 |
617 |
618 |
619 |
620 |
621 |
622 |
623 |
624 |
625 |
626 |
627 |
628 |
629 |
630 |
631 |
632 |
633 |
634 |
635 |
636 |
637 |
638 |
639 |
640 |
641 |
642 |
643 |
644 |
645 |
646 |
647 |
648 |
649 |
650 |
651 |
652 |
653 |
654 |
655 |
656 |
657 |
658 |
659 |
660 |
661 |
662 |
663 |
664 |
665 |
666 |
667 |
668 |
669 |
670 |
671 |
672 |
673 |
674 |
675 |
676 |
677 |
678 |
679 |
680 |
681 |
682 |
683 |
684 |
685 |
686 |
687 |
688 |
689 |
690 |
691 |
692 |
693 |
694 |
695 |
696 |
697 |
698 |
699 |
700 |
701 |
702 | Since Version 6.2.2 text objects can contain more than one line,
703 | which will not be processed correctly with this version.
704 |
705 |
706 |
707 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # ThreeSensorsTiny
2 | Three Ultrasonic sensors connected to a ATtiny and connected through I2C
3 |
4 | These are the sketches for the YouTube video: https://youtu.be/vj0SUYo8f_A
5 |
6 | They might include some errors.
7 |
--------------------------------------------------------------------------------
/ThreeSensors_Mega/ThreeSensors_Mega.ino:
--------------------------------------------------------------------------------
1 | /*
2 |
3 | This sketch runs on an Arduino connected to an ATtiny85/45 running ThreeSensors_Tiny.ino
4 |
5 | The data received is HC-SR04 PING sensor data in centimeters
6 | */
7 |
8 |
9 | #include
10 |
11 | int place;
12 | byte dist[3];
13 | long entryP = 0;
14 |
15 | const int I2CSlaveAddress = 8; // I2C Address.
16 |
17 |
18 | void setup()
19 | {
20 | Wire.begin();
21 | Serial.begin(115200);
22 | Serial.println("Setup");
23 | }
24 |
25 |
26 |
27 | void loop()
28 | {
29 | Serial.print("L");
30 | while (readTiny(I2CSlaveAddress) < 255) {
31 | Serial.print("WT"); // wait for first byte
32 | }
33 | for (place = 0; place < 3; place++) {
34 | dist[place] = readTiny(I2CSlaveAddress);
35 | }
36 | for (int i = 0; i < 3; i++) {
37 | Serial.print(dist[i]);
38 | Serial.print(" ");
39 | }
40 | Serial.println();
41 | delay(200);
42 | }
43 |
44 | byte readTiny(int address) {
45 | byte hh ;
46 | long entry = millis();
47 | Wire.requestFrom(address, 1); // The TinyWire library only allows for one byte to be requested at a time
48 | while (Wire.available() == 0 && (millis() - entry) < 100) Serial.print("W");
49 | if (millis() - entry < 100) hh = Wire.read();
50 | return hh;
51 | }
52 |
--------------------------------------------------------------------------------
/ThreeSensors_Tiny/ThreeSensors_Tiny.ino:
--------------------------------------------------------------------------------
1 |
2 |
3 | /*
4 |
5 | This sketch runs on an ATtiny85 connected to an Arduino Mega running a receiver sketch
6 | This sketch gets distance data from three ultrasonic sensors and transmits it to the Arduino when requested
7 |
8 | Andreas Spiess, 2015
9 |
10 | */
11 |
12 | #include // Requires fork by Rambo with onRequest support
13 | #include // NewPing version 1.7
14 | #include // watchdog
15 |
16 | #define SLEFT 0
17 | #define SRIGHT 2
18 | #define SMIDDLE 1
19 |
20 |
21 | #define LEFT_T PB1
22 | #define LEFT_E PB1
23 |
24 | #define MIDDLE_T PB3
25 | #define MIDDLE_E PB3
26 |
27 | #define RIGHT_T PB4
28 | #define RIGHT_E PB4
29 |
30 | #define MAX_DISTANCE 270 // Maximum distance we want to ping for (in centimeters). Maximum sensor distance is rated at 400-500cm.
31 |
32 | NewPing SensorLeft (LEFT_T, LEFT_E, MAX_DISTANCE); // Define left Sensor
33 | NewPing SensorMiddle (MIDDLE_T, MIDDLE_E, MAX_DISTANCE); // Define middle Sensor
34 | NewPing SensorRight (RIGHT_T, RIGHT_E, MAX_DISTANCE); // Define right Sensor
35 |
36 |
37 | const int I2CSlaveAddress = 8; // I2C Address.
38 |
39 | int distance[3]; // Where the Distance is stored (8 bit unsigned)
40 | int place = 0;
41 | unsigned long start;
42 |
43 |
44 |
45 |
46 | void setup()
47 | {
48 | TinyWireS.begin(I2CSlaveAddress); // Begin I2C Communication
49 | TinyWireS.onRequest(transmit); // When requested, call function transmit()
50 |
51 | wdt_enable(WDTO_500MS); // Watchdog
52 | }
53 |
54 |
55 | void loop()
56 | {
57 | readDistance();
58 | wdt_reset(); // feed the watchdog
59 | }
60 |
61 |
62 | //-------------------------------------------------------------------
63 |
64 | void transmit()
65 | {
66 | byte hh;
67 | switch (place) {
68 | case 0:
69 | hh = 255; // start byte
70 | break;
71 | case 1:
72 | hh = distance[SLEFT]; // Send last recorded distance for current sensor
73 | break;
74 | case 2:
75 | hh = distance[SMIDDLE]; // Send last recorded distance for current sensor
76 | break;
77 | case 3:
78 | hh = distance[SRIGHT]; // Send last recorded distance for current sensor
79 | break;
80 | }
81 | TinyWireS.send(hh);
82 | place = place + 1;
83 | if (place > 3) place = 0;
84 | }
85 |
86 | void readDistance()
87 | {
88 | distance[SLEFT] = SensorLeft.ping_cm();
89 | if (distance[SLEFT] > 254 ) {
90 | distance[SLEFT] = 254;
91 | }
92 | delay(20);
93 | distance[SMIDDLE] = SensorMiddle.ping_cm();
94 | if (distance[SMIDDLE] > 254 ) {
95 | distance[SMIDDLE] = 254;
96 | }
97 | delay(20);
98 | distance[SRIGHT] = SensorRight.ping_cm();
99 | if (distance[SRIGHT] > 254 ) {
100 | distance[SRIGHT] = 254;
101 | }
102 | delay(20);
103 | }
104 |
105 |
106 |
107 |
108 |
--------------------------------------------------------------------------------