Board-dat/SDR/SDR1048-dat/2025-06-15-14-05-01.png
... ...
Binary files /dev/null and b/Board-dat/SDR/SDR1048-dat/2025-06-15-14-05-01.png differ
Board-dat/SDR/SDR1048-dat/2025-06-15-14-23-37.png
... ...
Binary files /dev/null and b/Board-dat/SDR/SDR1048-dat/2025-06-15-14-23-37.png differ
Board-dat/SDR/SDR1048-dat/2025-06-15-14-24-22.png
... ...
Binary files /dev/null and b/Board-dat/SDR/SDR1048-dat/2025-06-15-14-24-22.png differ
Board-dat/SDR/SDR1048-dat/SDR1048-dat.md
... ...
@@ -9,8 +9,29 @@
9 9
10 10
- [[motor-driver-dat]]
11 11
12
+## SCH
13
+
14
+![](2025-06-15-14-24-22.png)
15
+
16
+## Jumper
17
+
18
+- CSA: Current sense pin for Motor A. A resistor can be connected in series here to sense current, or it can be directly jumpered to ground to disable current sensing.
19
+- CSB: Current sense pin for Motor B. A resistor can be connected in series here to sense current, or it can be directly jumpered to ground to disable current sensing.
20
+- 5V-EN: When the jumper is installed, the onboard 78M05 regulator operates, providing a 5V power output to supply the logic circuits. If the jumper is removed, an external 5V power supply is required to power the logic circuits.
21
+
22
+## wiring
23
+
24
+![](2025-06-15-14-05-01.png)
25
+
26
+## board map
27
+
28
+![](2025-06-15-14-23-37.png)
29
+
12 30
## Demo Code and Video
13
-
31
+
32
+- [[L298-dat]]
33
+
34
+
14 35
## ref
15 36
16 37
- [[SDR1048]]
Board-dat/SDR/SDR1090-dat/SDR1090-dat.md
... ...
@@ -26,9 +26,12 @@ chip == [[PCA9685-dat]]
26 26
- Stackable design for arduino
27 27
- 220ohm resistors for all the output, protective design for driving LEDs.
28 28
29
+## functions
30
+
31
+- [[PCA9685-dat]] - [[servo-dat]] - [[I2C-dat]] - [[arduino-shields-dat]] - [[motor-driver-dat]]
32
+
29 33
30 34
## ref
31 35
32 36
== [[DAS1072-dat]]
33 37
34
-- [[PCA9685-dat]] - [[servo-dat]] - [[I2C-dat]] - [[arduino-shields-dat]]
... ...
\ No newline at end of file
Board-dat/SIR/SIR1003-dat/2025-06-15-14-18-14.png
... ...
Binary files /dev/null and b/Board-dat/SIR/SIR1003-dat/2025-06-15-14-18-14.png differ
Board-dat/SIR/SIR1003-dat/SIR1003-dat.md
... ...
@@ -2,6 +2,14 @@
2 2
# SIR1003-dat
3 3
4 4
5
+[Infrared Dev Kit: Controller(NEC Type) and HX1838 Receiver](https://www.electrodragon.com/product/infrared-dev-kit-controllernec-type-and-hx1838-receiver/)
6
+
7
+
8
+## board map
9
+
10
+![](2025-06-15-14-18-14.png)
11
+
12
+
5 13
## receiver
6 14
7 15
- Remote control range: 8-10 meters (the quality of the infrared receiver itself, whether there are obstacles in the middle, etc. will affect the remote control distance)
... ...
@@ -10,6 +18,8 @@
10 18
- Surface material: 0.125mmPET
11 19
- Effective life: more than 20,000 times
12 20
21
+
22
+
13 23
## ref
14 24
15 25
- [[Infrared-dat]]
Chip-dat/Infineon-dat/BTS7960-dat/BTS7960-4x-sys.excalidraw
... ...
@@ -0,0 +1,966 @@
1
+{
2
+ "type": "excalidraw",
3
+ "version": 2,
4
+ "source": "https://marketplace.visualstudio.com/items?itemName=pomdtr.excalidraw-editor",
5
+ "elements": [
6
+ {
7
+ "id": "pO_QFrSFeiNizfLmEhZSl",
8
+ "type": "rectangle",
9
+ "x": 504,
10
+ "y": 284,
11
+ "width": 211,
12
+ "height": 35,
13
+ "angle": 0,
14
+ "strokeColor": "#1e1e1e",
15
+ "backgroundColor": "transparent",
16
+ "fillStyle": "solid",
17
+ "strokeWidth": 2,
18
+ "strokeStyle": "solid",
19
+ "roughness": 1,
20
+ "opacity": 100,
21
+ "groupIds": [],
22
+ "frameId": null,
23
+ "index": "a0",
24
+ "roundness": {
25
+ "type": 3
26
+ },
27
+ "seed": 2087804632,
28
+ "version": 127,
29
+ "versionNonce": 2109464232,
30
+ "isDeleted": false,
31
+ "boundElements": [
32
+ {
33
+ "type": "text",
34
+ "id": "B62ExtS62NCce-TUeM1CS"
35
+ },
36
+ {
37
+ "id": "RbOleX_kmus-7QyZWo9LG",
38
+ "type": "arrow"
39
+ }
40
+ ],
41
+ "updated": 1749967181428,
42
+ "link": null,
43
+ "locked": false
44
+ },
45
+ {
46
+ "id": "B62ExtS62NCce-TUeM1CS",
47
+ "type": "text",
48
+ "x": 515.1100463867188,
49
+ "y": 289,
50
+ "width": 188.7799072265625,
51
+ "height": 25,
52
+ "angle": 0,
53
+ "strokeColor": "#1e1e1e",
54
+ "backgroundColor": "transparent",
55
+ "fillStyle": "solid",
56
+ "strokeWidth": 2,
57
+ "strokeStyle": "solid",
58
+ "roughness": 1,
59
+ "opacity": 100,
60
+ "groupIds": [],
61
+ "frameId": null,
62
+ "index": "a1",
63
+ "roundness": null,
64
+ "seed": 597758936,
65
+ "version": 113,
66
+ "versionNonce": 2065287592,
67
+ "isDeleted": false,
68
+ "boundElements": null,
69
+ "updated": 1749967181428,
70
+ "link": null,
71
+ "locked": false,
72
+ "text": "Motor1 + BTS7960",
73
+ "fontSize": 20,
74
+ "fontFamily": 5,
75
+ "textAlign": "center",
76
+ "verticalAlign": "middle",
77
+ "containerId": "pO_QFrSFeiNizfLmEhZSl",
78
+ "originalText": "Motor1 + BTS7960",
79
+ "autoResize": true,
80
+ "lineHeight": 1.25
81
+ },
82
+ {
83
+ "id": "MNxjki1NI4P2u-LQmGLXG",
84
+ "type": "rectangle",
85
+ "x": 746.5,
86
+ "y": 433,
87
+ "width": 109,
88
+ "height": 38,
89
+ "angle": 0,
90
+ "strokeColor": "#1e1e1e",
91
+ "backgroundColor": "transparent",
92
+ "fillStyle": "solid",
93
+ "strokeWidth": 2,
94
+ "strokeStyle": "solid",
95
+ "roughness": 1,
96
+ "opacity": 100,
97
+ "groupIds": [],
98
+ "frameId": null,
99
+ "index": "a8",
100
+ "roundness": {
101
+ "type": 3
102
+ },
103
+ "seed": 2139152088,
104
+ "version": 226,
105
+ "versionNonce": 143369640,
106
+ "isDeleted": false,
107
+ "boundElements": [
108
+ {
109
+ "type": "text",
110
+ "id": "TMFO9lxRUZ_ddocYYgor7"
111
+ },
112
+ {
113
+ "id": "RbOleX_kmus-7QyZWo9LG",
114
+ "type": "arrow"
115
+ },
116
+ {
117
+ "id": "3yuRGps64EMbQ2kptmf01",
118
+ "type": "arrow"
119
+ },
120
+ {
121
+ "id": "2mqfro-SIt2cZPcwxZn9d",
122
+ "type": "arrow"
123
+ },
124
+ {
125
+ "id": "0Un6eF0AOpzdVClkeiDPu",
126
+ "type": "arrow"
127
+ },
128
+ {
129
+ "id": "hqaQlG2DKr-PE8-HQWkk-",
130
+ "type": "arrow"
131
+ }
132
+ ],
133
+ "updated": 1749967196738,
134
+ "link": null,
135
+ "locked": false
136
+ },
137
+ {
138
+ "id": "TMFO9lxRUZ_ddocYYgor7",
139
+ "type": "text",
140
+ "x": 756.0400466918945,
141
+ "y": 439.5,
142
+ "width": 89.91990661621094,
143
+ "height": 25,
144
+ "angle": 0,
145
+ "strokeColor": "#1e1e1e",
146
+ "backgroundColor": "transparent",
147
+ "fillStyle": "solid",
148
+ "strokeWidth": 2,
149
+ "strokeStyle": "solid",
150
+ "roughness": 1,
151
+ "opacity": 100,
152
+ "groupIds": [],
153
+ "frameId": null,
154
+ "index": "a9",
155
+ "roundness": null,
156
+ "seed": 112149464,
157
+ "version": 208,
158
+ "versionNonce": 542885544,
159
+ "isDeleted": false,
160
+ "boundElements": [],
161
+ "updated": 1749967149749,
162
+ "link": null,
163
+ "locked": false,
164
+ "text": "PCA9685",
165
+ "fontSize": 20,
166
+ "fontFamily": 5,
167
+ "textAlign": "center",
168
+ "verticalAlign": "middle",
169
+ "containerId": "MNxjki1NI4P2u-LQmGLXG",
170
+ "originalText": "PCA9685",
171
+ "autoResize": true,
172
+ "lineHeight": 1.25
173
+ },
174
+ {
175
+ "id": "r8u-NGolhfP21KQtxdJsl",
176
+ "type": "rectangle",
177
+ "x": 833.5,
178
+ "y": 282.5,
179
+ "width": 211,
180
+ "height": 35,
181
+ "angle": 0,
182
+ "strokeColor": "#1e1e1e",
183
+ "backgroundColor": "transparent",
184
+ "fillStyle": "solid",
185
+ "strokeWidth": 2,
186
+ "strokeStyle": "solid",
187
+ "roughness": 1,
188
+ "opacity": 100,
189
+ "groupIds": [],
190
+ "frameId": null,
191
+ "index": "aA",
192
+ "roundness": {
193
+ "type": 3
194
+ },
195
+ "seed": 785009880,
196
+ "version": 187,
197
+ "versionNonce": 971153064,
198
+ "isDeleted": false,
199
+ "boundElements": [
200
+ {
201
+ "type": "text",
202
+ "id": "va_5sHqkCQPBIiPYQBb4s"
203
+ },
204
+ {
205
+ "id": "3yuRGps64EMbQ2kptmf01",
206
+ "type": "arrow"
207
+ }
208
+ ],
209
+ "updated": 1749967183230,
210
+ "link": null,
211
+ "locked": false
212
+ },
213
+ {
214
+ "id": "va_5sHqkCQPBIiPYQBb4s",
215
+ "type": "text",
216
+ "x": 841.8800430297852,
217
+ "y": 287.5,
218
+ "width": 194.2399139404297,
219
+ "height": 25,
220
+ "angle": 0,
221
+ "strokeColor": "#1e1e1e",
222
+ "backgroundColor": "transparent",
223
+ "fillStyle": "solid",
224
+ "strokeWidth": 2,
225
+ "strokeStyle": "solid",
226
+ "roughness": 1,
227
+ "opacity": 100,
228
+ "groupIds": [],
229
+ "frameId": null,
230
+ "index": "aB",
231
+ "roundness": null,
232
+ "seed": 647688664,
233
+ "version": 174,
234
+ "versionNonce": 73959848,
235
+ "isDeleted": false,
236
+ "boundElements": [],
237
+ "updated": 1749967183230,
238
+ "link": null,
239
+ "locked": false,
240
+ "text": "Motor2 + BTS7960",
241
+ "fontSize": 20,
242
+ "fontFamily": 5,
243
+ "textAlign": "center",
244
+ "verticalAlign": "middle",
245
+ "containerId": "r8u-NGolhfP21KQtxdJsl",
246
+ "originalText": "Motor2 + BTS7960",
247
+ "autoResize": true,
248
+ "lineHeight": 1.25
249
+ },
250
+ {
251
+ "id": "I79Nmq_UYExwSOop6iw-G",
252
+ "type": "rectangle",
253
+ "x": 871.5,
254
+ "y": 647.5,
255
+ "width": 211,
256
+ "height": 35,
257
+ "angle": 0,
258
+ "strokeColor": "#1e1e1e",
259
+ "backgroundColor": "transparent",
260
+ "fillStyle": "solid",
261
+ "strokeWidth": 2,
262
+ "strokeStyle": "solid",
263
+ "roughness": 1,
264
+ "opacity": 100,
265
+ "groupIds": [],
266
+ "frameId": null,
267
+ "index": "aC",
268
+ "roundness": {
269
+ "type": 3
270
+ },
271
+ "seed": 1602052008,
272
+ "version": 225,
273
+ "versionNonce": 669072344,
274
+ "isDeleted": false,
275
+ "boundElements": [
276
+ {
277
+ "type": "text",
278
+ "id": "wOkvdVchiSvrGnbjJr3m2"
279
+ },
280
+ {
281
+ "id": "2mqfro-SIt2cZPcwxZn9d",
282
+ "type": "arrow"
283
+ }
284
+ ],
285
+ "updated": 1749967185715,
286
+ "link": null,
287
+ "locked": false
288
+ },
289
+ {
290
+ "id": "wOkvdVchiSvrGnbjJr3m2",
291
+ "type": "text",
292
+ "x": 880.800048828125,
293
+ "y": 652.5,
294
+ "width": 192.39990234375,
295
+ "height": 25,
296
+ "angle": 0,
297
+ "strokeColor": "#1e1e1e",
298
+ "backgroundColor": "transparent",
299
+ "fillStyle": "solid",
300
+ "strokeWidth": 2,
301
+ "strokeStyle": "solid",
302
+ "roughness": 1,
303
+ "opacity": 100,
304
+ "groupIds": [],
305
+ "frameId": null,
306
+ "index": "aD",
307
+ "roundness": null,
308
+ "seed": 184756904,
309
+ "version": 213,
310
+ "versionNonce": 1560019160,
311
+ "isDeleted": false,
312
+ "boundElements": [],
313
+ "updated": 1749967185715,
314
+ "link": null,
315
+ "locked": false,
316
+ "text": "Motor3 + BTS7960",
317
+ "fontSize": 20,
318
+ "fontFamily": 5,
319
+ "textAlign": "center",
320
+ "verticalAlign": "middle",
321
+ "containerId": "I79Nmq_UYExwSOop6iw-G",
322
+ "originalText": "Motor3 + BTS7960",
323
+ "autoResize": true,
324
+ "lineHeight": 1.25
325
+ },
326
+ {
327
+ "id": "WUqKrj0JlrDF2t8_Ozbdt",
328
+ "type": "rectangle",
329
+ "x": 498.5,
330
+ "y": 649.5,
331
+ "width": 211,
332
+ "height": 35,
333
+ "angle": 0,
334
+ "strokeColor": "#1e1e1e",
335
+ "backgroundColor": "transparent",
336
+ "fillStyle": "solid",
337
+ "strokeWidth": 2,
338
+ "strokeStyle": "solid",
339
+ "roughness": 1,
340
+ "opacity": 100,
341
+ "groupIds": [],
342
+ "frameId": null,
343
+ "index": "aE",
344
+ "roundness": {
345
+ "type": 3
346
+ },
347
+ "seed": 294615000,
348
+ "version": 247,
349
+ "versionNonce": 1241694120,
350
+ "isDeleted": false,
351
+ "boundElements": [
352
+ {
353
+ "type": "text",
354
+ "id": "wVBg1dRIb1eC2iSb1o4yR"
355
+ },
356
+ {
357
+ "id": "0Un6eF0AOpzdVClkeiDPu",
358
+ "type": "arrow"
359
+ }
360
+ ],
361
+ "updated": 1749967179893,
362
+ "link": null,
363
+ "locked": false
364
+ },
365
+ {
366
+ "id": "wVBg1dRIb1eC2iSb1o4yR",
367
+ "type": "text",
368
+ "x": 508.03004455566406,
369
+ "y": 654.5,
370
+ "width": 191.93991088867188,
371
+ "height": 25,
372
+ "angle": 0,
373
+ "strokeColor": "#1e1e1e",
374
+ "backgroundColor": "transparent",
375
+ "fillStyle": "solid",
376
+ "strokeWidth": 2,
377
+ "strokeStyle": "solid",
378
+ "roughness": 1,
379
+ "opacity": 100,
380
+ "groupIds": [],
381
+ "frameId": null,
382
+ "index": "aF",
383
+ "roundness": null,
384
+ "seed": 1837284568,
385
+ "version": 236,
386
+ "versionNonce": 1037863592,
387
+ "isDeleted": false,
388
+ "boundElements": [],
389
+ "updated": 1749967179893,
390
+ "link": null,
391
+ "locked": false,
392
+ "text": "Motor4 + BTS7960",
393
+ "fontSize": 20,
394
+ "fontFamily": 5,
395
+ "textAlign": "center",
396
+ "verticalAlign": "middle",
397
+ "containerId": "WUqKrj0JlrDF2t8_Ozbdt",
398
+ "originalText": "Motor4 + BTS7960",
399
+ "autoResize": true,
400
+ "lineHeight": 1.25
401
+ },
402
+ {
403
+ "id": "RbOleX_kmus-7QyZWo9LG",
404
+ "type": "arrow",
405
+ "x": 751.6909401146502,
406
+ "y": 433.0281874697647,
407
+ "width": 150.3341602204398,
408
+ "height": 113.25751441298269,
409
+ "angle": 0,
410
+ "strokeColor": "#1e1e1e",
411
+ "backgroundColor": "transparent",
412
+ "fillStyle": "solid",
413
+ "strokeWidth": 2,
414
+ "strokeStyle": "solid",
415
+ "roughness": 1,
416
+ "opacity": 100,
417
+ "groupIds": [],
418
+ "frameId": null,
419
+ "index": "aG",
420
+ "roundness": {
421
+ "type": 2
422
+ },
423
+ "seed": 1835689896,
424
+ "version": 48,
425
+ "versionNonce": 472637352,
426
+ "isDeleted": false,
427
+ "boundElements": [
428
+ {
429
+ "type": "text",
430
+ "id": "1J7H6eaC4q_Fdbf58f0Rn"
431
+ }
432
+ ],
433
+ "updated": 1749967220707,
434
+ "link": null,
435
+ "locked": false,
436
+ "points": [
437
+ [
438
+ 0,
439
+ 0
440
+ ],
441
+ [
442
+ -150.3341602204398,
443
+ -113.25751441298269
444
+ ]
445
+ ],
446
+ "lastCommittedPoint": null,
447
+ "startBinding": {
448
+ "elementId": "MNxjki1NI4P2u-LQmGLXG",
449
+ "focus": -0.30498031832962624,
450
+ "gap": 1
451
+ },
452
+ "endBinding": {
453
+ "elementId": "pO_QFrSFeiNizfLmEhZSl",
454
+ "focus": 0.2511347252629885,
455
+ "gap": 4
456
+ },
457
+ "startArrowhead": null,
458
+ "endArrowhead": "arrow",
459
+ "elbowed": false
460
+ },
461
+ {
462
+ "id": "1J7H6eaC4q_Fdbf58f0Rn",
463
+ "type": "text",
464
+ "x": 587.8639250068717,
465
+ "y": 363.89943026327336,
466
+ "width": 177.3198699951172,
467
+ "height": 25,
468
+ "angle": 0,
469
+ "strokeColor": "#1e1e1e",
470
+ "backgroundColor": "transparent",
471
+ "fillStyle": "solid",
472
+ "strokeWidth": 2,
473
+ "strokeStyle": "solid",
474
+ "roughness": 1,
475
+ "opacity": 100,
476
+ "groupIds": [],
477
+ "frameId": null,
478
+ "index": "aH",
479
+ "roundness": null,
480
+ "seed": 1794243544,
481
+ "version": 23,
482
+ "versionNonce": 1756538072,
483
+ "isDeleted": false,
484
+ "boundElements": null,
485
+ "updated": 1749967219453,
486
+ "link": null,
487
+ "locked": false,
488
+ "text": "4x pwm, 8pin cable",
489
+ "fontSize": 20,
490
+ "fontFamily": 5,
491
+ "textAlign": "center",
492
+ "verticalAlign": "middle",
493
+ "containerId": "RbOleX_kmus-7QyZWo9LG",
494
+ "originalText": "4x pwm, 8pin cable",
495
+ "autoResize": true,
496
+ "lineHeight": 1.25
497
+ },
498
+ {
499
+ "id": "3yuRGps64EMbQ2kptmf01",
500
+ "type": "arrow",
501
+ "x": 849.3222798570843,
502
+ "y": 432.05751960041425,
503
+ "width": 91.2659121040839,
504
+ "height": 113.50988890606106,
505
+ "angle": 0,
506
+ "strokeColor": "#1e1e1e",
507
+ "backgroundColor": "transparent",
508
+ "fillStyle": "solid",
509
+ "strokeWidth": 2,
510
+ "strokeStyle": "solid",
511
+ "roughness": 1,
512
+ "opacity": 100,
513
+ "groupIds": [],
514
+ "frameId": null,
515
+ "index": "aI",
516
+ "roundness": {
517
+ "type": 2
518
+ },
519
+ "seed": 860098984,
520
+ "version": 122,
521
+ "versionNonce": 1048994984,
522
+ "isDeleted": false,
523
+ "boundElements": [
524
+ {
525
+ "type": "text",
526
+ "id": "iwJYClPBkSfY2txaKLFTE"
527
+ }
528
+ ],
529
+ "updated": 1749967226449,
530
+ "link": null,
531
+ "locked": false,
532
+ "points": [
533
+ [
534
+ 0,
535
+ 0
536
+ ],
537
+ [
538
+ 91.2659121040839,
539
+ -113.50988890606106
540
+ ]
541
+ ],
542
+ "lastCommittedPoint": null,
543
+ "startBinding": {
544
+ "elementId": "MNxjki1NI4P2u-LQmGLXG",
545
+ "focus": 0.45947999461143546,
546
+ "gap": 2.705415150600885
547
+ },
548
+ "endBinding": {
549
+ "elementId": "r8u-NGolhfP21KQtxdJsl",
550
+ "focus": -0.1377880982301879,
551
+ "gap": 5.212966015934967
552
+ },
553
+ "startArrowhead": null,
554
+ "endArrowhead": "arrow",
555
+ "elbowed": false
556
+ },
557
+ {
558
+ "id": "iwJYClPBkSfY2txaKLFTE",
559
+ "type": "text",
560
+ "x": 806.2953009115677,
561
+ "y": 362.8025751473837,
562
+ "width": 177.3198699951172,
563
+ "height": 25,
564
+ "angle": 0,
565
+ "strokeColor": "#1e1e1e",
566
+ "backgroundColor": "transparent",
567
+ "fillStyle": "solid",
568
+ "strokeWidth": 2,
569
+ "strokeStyle": "solid",
570
+ "roughness": 1,
571
+ "opacity": 100,
572
+ "groupIds": [],
573
+ "frameId": null,
574
+ "index": "aJ",
575
+ "roundness": null,
576
+ "seed": 1461951656,
577
+ "version": 13,
578
+ "versionNonce": 99987416,
579
+ "isDeleted": false,
580
+ "boundElements": [],
581
+ "updated": 1749967226222,
582
+ "link": null,
583
+ "locked": false,
584
+ "text": "4x pwm, 8pin cable",
585
+ "fontSize": 20,
586
+ "fontFamily": 5,
587
+ "textAlign": "center",
588
+ "verticalAlign": "middle",
589
+ "containerId": "3yuRGps64EMbQ2kptmf01",
590
+ "originalText": "4x pwm, 8pin cable",
591
+ "autoResize": true,
592
+ "lineHeight": 1.25
593
+ },
594
+ {
595
+ "id": "0Un6eF0AOpzdVClkeiDPu",
596
+ "type": "arrow",
597
+ "x": 789.3860679582413,
598
+ "y": 474.27192862682017,
599
+ "width": 202.4377809803134,
600
+ "height": 174.39487776007144,
601
+ "angle": 0,
602
+ "strokeColor": "#1e1e1e",
603
+ "backgroundColor": "transparent",
604
+ "fillStyle": "solid",
605
+ "strokeWidth": 2,
606
+ "strokeStyle": "solid",
607
+ "roughness": 1,
608
+ "opacity": 100,
609
+ "groupIds": [],
610
+ "frameId": null,
611
+ "index": "aK",
612
+ "roundness": {
613
+ "type": 2
614
+ },
615
+ "seed": 739724200,
616
+ "version": 195,
617
+ "versionNonce": 1602426536,
618
+ "isDeleted": false,
619
+ "boundElements": [
620
+ {
621
+ "type": "text",
622
+ "id": "42cl3dJXb1wln6Q21tEwB"
623
+ }
624
+ ],
625
+ "updated": 1749967222807,
626
+ "link": null,
627
+ "locked": false,
628
+ "points": [
629
+ [
630
+ 0,
631
+ 0
632
+ ],
633
+ [
634
+ -202.4377809803134,
635
+ 174.39487776007144
636
+ ]
637
+ ],
638
+ "lastCommittedPoint": null,
639
+ "startBinding": {
640
+ "elementId": "MNxjki1NI4P2u-LQmGLXG",
641
+ "focus": -0.18753596570032358,
642
+ "gap": 8.218709422578058
643
+ },
644
+ "endBinding": {
645
+ "elementId": "WUqKrj0JlrDF2t8_Ozbdt",
646
+ "focus": -0.30454173263215417,
647
+ "gap": 4.281290577421942
648
+ },
649
+ "startArrowhead": null,
650
+ "endArrowhead": "arrow",
651
+ "elbowed": false
652
+ },
653
+ {
654
+ "id": "42cl3dJXb1wln6Q21tEwB",
655
+ "type": "text",
656
+ "x": 599.507242470526,
657
+ "y": 548.9693675068559,
658
+ "width": 177.3198699951172,
659
+ "height": 25,
660
+ "angle": 0,
661
+ "strokeColor": "#1e1e1e",
662
+ "backgroundColor": "transparent",
663
+ "fillStyle": "solid",
664
+ "strokeWidth": 2,
665
+ "strokeStyle": "solid",
666
+ "roughness": 1,
667
+ "opacity": 100,
668
+ "groupIds": [],
669
+ "frameId": null,
670
+ "index": "aL",
671
+ "roundness": null,
672
+ "seed": 92247720,
673
+ "version": 17,
674
+ "versionNonce": 54042072,
675
+ "isDeleted": false,
676
+ "boundElements": [],
677
+ "updated": 1749967222353,
678
+ "link": null,
679
+ "locked": false,
680
+ "text": "4x pwm, 8pin cable",
681
+ "fontSize": 20,
682
+ "fontFamily": 5,
683
+ "textAlign": "center",
684
+ "verticalAlign": "middle",
685
+ "containerId": "0Un6eF0AOpzdVClkeiDPu",
686
+ "originalText": "4x pwm, 8pin cable",
687
+ "autoResize": true,
688
+ "lineHeight": 1.25
689
+ },
690
+ {
691
+ "id": "2mqfro-SIt2cZPcwxZn9d",
692
+ "type": "arrow",
693
+ "x": 807.6447554378491,
694
+ "y": 473.8224599341972,
695
+ "width": 190.76076263198388,
696
+ "height": 172.37045868480294,
697
+ "angle": 0,
698
+ "strokeColor": "#1e1e1e",
699
+ "backgroundColor": "transparent",
700
+ "fillStyle": "solid",
701
+ "strokeWidth": 2,
702
+ "strokeStyle": "solid",
703
+ "roughness": 1,
704
+ "opacity": 100,
705
+ "groupIds": [],
706
+ "frameId": null,
707
+ "index": "aM",
708
+ "roundness": {
709
+ "type": 2
710
+ },
711
+ "seed": 895081432,
712
+ "version": 246,
713
+ "versionNonce": 1920462248,
714
+ "isDeleted": false,
715
+ "boundElements": [
716
+ {
717
+ "type": "text",
718
+ "id": "usq4dO9_D8wZ83Dola1Qb"
719
+ }
720
+ ],
721
+ "updated": 1749967224640,
722
+ "link": null,
723
+ "locked": false,
724
+ "points": [
725
+ [
726
+ 0,
727
+ 0
728
+ ],
729
+ [
730
+ 190.76076263198388,
731
+ 172.37045868480294
732
+ ]
733
+ ],
734
+ "lastCommittedPoint": null,
735
+ "startBinding": {
736
+ "elementId": "MNxjki1NI4P2u-LQmGLXG",
737
+ "focus": 0.23303504530406935,
738
+ "gap": 7.218709422578058
739
+ },
740
+ "endBinding": {
741
+ "elementId": "I79Nmq_UYExwSOop6iw-G",
742
+ "focus": 0.33800384566025815,
743
+ "gap": 6.281290577421942
744
+ },
745
+ "startArrowhead": null,
746
+ "endArrowhead": "arrow",
747
+ "elbowed": false
748
+ },
749
+ {
750
+ "id": "usq4dO9_D8wZ83Dola1Qb",
751
+ "type": "text",
752
+ "x": 814.3652017562824,
753
+ "y": 547.5076892765986,
754
+ "width": 177.3198699951172,
755
+ "height": 25,
756
+ "angle": 0,
757
+ "strokeColor": "#1e1e1e",
758
+ "backgroundColor": "transparent",
759
+ "fillStyle": "solid",
760
+ "strokeWidth": 2,
761
+ "strokeStyle": "solid",
762
+ "roughness": 1,
763
+ "opacity": 100,
764
+ "groupIds": [],
765
+ "frameId": null,
766
+ "index": "aN",
767
+ "roundness": null,
768
+ "seed": 1918935256,
769
+ "version": 17,
770
+ "versionNonce": 232978136,
771
+ "isDeleted": false,
772
+ "boundElements": [],
773
+ "updated": 1749967224323,
774
+ "link": null,
775
+ "locked": false,
776
+ "text": "4x pwm, 8pin cable",
777
+ "fontSize": 20,
778
+ "fontFamily": 5,
779
+ "textAlign": "center",
780
+ "verticalAlign": "middle",
781
+ "containerId": "2mqfro-SIt2cZPcwxZn9d",
782
+ "originalText": "4x pwm, 8pin cable",
783
+ "autoResize": true,
784
+ "lineHeight": 1.25
785
+ },
786
+ {
787
+ "id": "TiqbkV8-8-LGghvgWcI0W",
788
+ "type": "rectangle",
789
+ "x": 1274.5,
790
+ "y": 431,
791
+ "width": 109,
792
+ "height": 38,
793
+ "angle": 0,
794
+ "strokeColor": "#1e1e1e",
795
+ "backgroundColor": "transparent",
796
+ "fillStyle": "solid",
797
+ "strokeWidth": 2,
798
+ "strokeStyle": "solid",
799
+ "roughness": 1,
800
+ "opacity": 100,
801
+ "groupIds": [],
802
+ "frameId": null,
803
+ "index": "aO",
804
+ "roundness": {
805
+ "type": 3
806
+ },
807
+ "seed": 1205699752,
808
+ "version": 301,
809
+ "versionNonce": 203748056,
810
+ "isDeleted": false,
811
+ "boundElements": [
812
+ {
813
+ "type": "text",
814
+ "id": "5-v_1sMQryDLRa2c56SgU"
815
+ },
816
+ {
817
+ "id": "hqaQlG2DKr-PE8-HQWkk-",
818
+ "type": "arrow"
819
+ }
820
+ ],
821
+ "updated": 1749967242282,
822
+ "link": null,
823
+ "locked": false
824
+ },
825
+ {
826
+ "id": "5-v_1sMQryDLRa2c56SgU",
827
+ "type": "text",
828
+ "x": 1282.5700302124023,
829
+ "y": 437.5,
830
+ "width": 92.85993957519531,
831
+ "height": 25,
832
+ "angle": 0,
833
+ "strokeColor": "#1e1e1e",
834
+ "backgroundColor": "transparent",
835
+ "fillStyle": "solid",
836
+ "strokeWidth": 2,
837
+ "strokeStyle": "solid",
838
+ "roughness": 1,
839
+ "opacity": 100,
840
+ "groupIds": [],
841
+ "frameId": null,
842
+ "index": "aP",
843
+ "roundness": null,
844
+ "seed": 504803240,
845
+ "version": 290,
846
+ "versionNonce": 229693400,
847
+ "isDeleted": false,
848
+ "boundElements": [],
849
+ "updated": 1749967242282,
850
+ "link": null,
851
+ "locked": false,
852
+ "text": "ESP8266",
853
+ "fontSize": 20,
854
+ "fontFamily": 5,
855
+ "textAlign": "center",
856
+ "verticalAlign": "middle",
857
+ "containerId": "TiqbkV8-8-LGghvgWcI0W",
858
+ "originalText": "ESP8266",
859
+ "autoResize": true,
860
+ "lineHeight": 1.25
861
+ },
862
+ {
863
+ "id": "hqaQlG2DKr-PE8-HQWkk-",
864
+ "type": "arrow",
865
+ "x": 1272.3101122653882,
866
+ "y": 453.64453071884697,
867
+ "width": 413.7653613256149,
868
+ "height": 1.9586451461569254,
869
+ "angle": 0,
870
+ "strokeColor": "#1e1e1e",
871
+ "backgroundColor": "transparent",
872
+ "fillStyle": "solid",
873
+ "strokeWidth": 2,
874
+ "strokeStyle": "solid",
875
+ "roughness": 1,
876
+ "opacity": 100,
877
+ "groupIds": [],
878
+ "frameId": null,
879
+ "index": "aQ",
880
+ "roundness": {
881
+ "type": 2
882
+ },
883
+ "seed": 1688794792,
884
+ "version": 79,
885
+ "versionNonce": 511188184,
886
+ "isDeleted": false,
887
+ "boundElements": [
888
+ {
889
+ "type": "text",
890
+ "id": "-x08b7RlIXRp7MDwjzskC"
891
+ }
892
+ ],
893
+ "updated": 1749967242283,
894
+ "link": null,
895
+ "locked": false,
896
+ "points": [
897
+ [
898
+ 0,
899
+ 0
900
+ ],
901
+ [
902
+ -413.7653613256149,
903
+ -1.9586451461569254
904
+ ]
905
+ ],
906
+ "lastCommittedPoint": null,
907
+ "startBinding": {
908
+ "elementId": "TiqbkV8-8-LGghvgWcI0W",
909
+ "focus": -0.20317935001695797,
910
+ "gap": 2.339132155052539
911
+ },
912
+ "endBinding": {
913
+ "elementId": "MNxjki1NI4P2u-LQmGLXG",
914
+ "focus": -0.030562402859277735,
915
+ "gap": 3.263071035370558
916
+ },
917
+ "startArrowhead": null,
918
+ "endArrowhead": "arrow",
919
+ "elbowed": false
920
+ },
921
+ {
922
+ "id": "-x08b7RlIXRp7MDwjzskC",
923
+ "type": "text",
924
+ "x": 897.262018268284,
925
+ "y": 439.14690976353984,
926
+ "width": 144.39990234375,
927
+ "height": 25,
928
+ "angle": 0,
929
+ "strokeColor": "#1e1e1e",
930
+ "backgroundColor": "transparent",
931
+ "fillStyle": "solid",
932
+ "strokeWidth": 2,
933
+ "strokeStyle": "solid",
934
+ "roughness": 1,
935
+ "opacity": 100,
936
+ "groupIds": [],
937
+ "frameId": null,
938
+ "index": "aR",
939
+ "roundness": null,
940
+ "seed": 407795672,
941
+ "version": 20,
942
+ "versionNonce": 1736254632,
943
+ "isDeleted": false,
944
+ "boundElements": null,
945
+ "updated": 1749967240120,
946
+ "link": null,
947
+ "locked": false,
948
+ "text": "I2C, 4pin cable",
949
+ "fontSize": 20,
950
+ "fontFamily": 5,
951
+ "textAlign": "center",
952
+ "verticalAlign": "middle",
953
+ "containerId": "hqaQlG2DKr-PE8-HQWkk-",
954
+ "originalText": "I2C, 4pin cable",
955
+ "autoResize": true,
956
+ "lineHeight": 1.25
957
+ }
958
+ ],
959
+ "appState": {
960
+ "gridSize": 20,
961
+ "gridStep": 5,
962
+ "gridModeEnabled": false,
963
+ "viewBackgroundColor": "#ffffff"
964
+ },
965
+ "files": {}
966
+}
... ...
\ No newline at end of file
Chip-dat/Infineon-dat/BTS7960-dat/BTS7960-dat.md
... ...
@@ -22,7 +22,9 @@ Product Features:
22 22
![](2025-06-03-01-04-03.png)
23 23
24 24
25
-## Wiring
25
+## Wiring == 2x4 == 8pin
26
+
27
+except feedback R_IS and L_IS and power supply , actual control is 4 pin
26 28
27 29
- 1. R_PWM: Forward rotation level or PWM signal input, high level active
28 30
- 2. L_PWM: Reverse rotation level or PWM signal input, high level active
Chip-dat/ST-dat/L298-dat/2025-06-15-14-30-14.png
... ...
Binary files /dev/null and b/Chip-dat/ST-dat/L298-dat/2025-06-15-14-30-14.png differ
Chip-dat/ST-dat/L298-dat/L298-dat.md
... ...
@@ -13,6 +13,12 @@ chip info, datasheet, etc.
13 13
![](2025-04-01-14-38-39.png)
14 14
15 15
16
+## SCH
17
+
18
+SCH with [[LM2596-dat]]
19
+
20
+![](2025-06-15-14-30-14.png)
21
+
16 22
## App.
17 23
18 24
- [[SDR1093-dat]] - [[SDR1034-dat]] - [[SDR1048-dat]] - [[SDR1053-dat]]
Chip-dat/sharp-dat/GP2D12-dat/GP2D12-dat.md
... ...
@@ -0,0 +1,21 @@
1
+
2
+# GP2D12-dat
3
+
4
+- [[IR-distance-measurer-dat]]
5
+
6
+== MiniSumo
7
+
8
+- Sharp GP2D12 的主要技术参数如下:(摘自上述应用指南)
9
+- Range 范围: 10 to 80cm
10
+- Update frequency / period 刷新频率/周期: 25Hz / 40ms
11
+- Direction of the measured distance 测距方向性: Very directional, due to the IR LED
12
+- Max admissible angle on flat surface 最大允许角度: > 40°
13
+- Power supply voltage 电源电压: 4.5 to 5.5V
14
+- Noise on the analog output 模拟输出噪音: < 200mV
15
+- Mean consumption 平均功耗: 35mA
16
+- Peak consumption 峰值功耗: about 200mA
17
+
18
+
19
+## ref
20
+
21
+- [[sensor-dat]] - [[motion-sensor-dat]]
... ...
\ No newline at end of file
Tech-dat/MCU-dat/mcu-dat.md
... ...
@@ -9,6 +9,8 @@
9 9
10 10
- [[STC-dat]] - [[PIC-dat]] - [[nuvoton-dat]] - [[WCH-dat]]
11 11
12
+- [[8051-dat]]
13
+
12 14
## Common-used MCU
13 15
14 16
| model | price | category | footprint | features | boards |
Tech-dat/Network-dat/Infrared-dat/IR-rover-rc.ino
... ...
@@ -0,0 +1,50 @@
1
+
2
+/*
3
+ * IRRemote 红外遥控码测试
4
+ * 範例 1.2: 顯示紅外線協定種類,如 NEC, Sony SIRC, Philips RC5, Philips RC6 等協定
5
+ */
6
+#include <IRremote.h> // 引用 IRRemote 函式庫
7
+const int irReceiverPin = 2; // 紅外線接收器 OUTPUT 訊號接在 pin 2
8
+IRrecv irrecv(irReceiverPin); // 定義 IRrecv 物件來接收紅外線訊號
9
+decode_results results; // 解碼結果將放在 decode_results 結構的 result 變數裏
10
+void setup()
11
+{
12
+ Serial.begin(9600); // 開啟 Serial port, 通訊速率為 9600 bps
13
+ irrecv.enableIRIn(); // 啟動紅外線解碼
14
+}
15
+// 顯示紅外線協定種類
16
+void showIRProtocol(decode_results *results)
17
+{
18
+ Serial.print("Protocol: ");
19
+
20
+ // 判斷紅外線協定種類
21
+ switch(results->decode_type) {
22
+ case NEC:
23
+ Serial.print("NEC");
24
+ break;
25
+ case SONY:
26
+ Serial.print("SONY");
27
+ break;
28
+ case RC5:
29
+ Serial.print("RC5");
30
+ break;
31
+ case RC6:
32
+
33
+ Serial.print("RC6");
34
+ break;
35
+ default:
36
+ Serial.print("Unknown encoding");
37
+ }
38
+ // 把紅外線編碼印到 Serial port
39
+ Serial.print(", irCode: ");
40
+ Serial.print(results->value, HEX); // 紅外線編碼
41
+ Serial.print(", bits: ");
42
+ Serial.println(results->bits); // 紅外線編碼位元數
43
+}
44
+void loop()
45
+{
46
+ if (irrecv.decode(&results)) { // 解碼成功,收到一組紅外線訊號
47
+ showIRProtocol(&results); // 顯示紅外線協定種類
48
+ irrecv.resume(); // 繼續收下一組紅外線訊號
49
+ }
50
+}
... ...
\ No newline at end of file
Tech-dat/Network-dat/Infrared-dat/Infrared-dat.md
... ...
@@ -2,7 +2,9 @@
2 2
# Infrared
3 3
4 4
5
+## APP
5 6
7
+- [[IR-distance-measurer-dat]] - [[line-finder-dat]]
6 8
7 9
## Boards
8 10
... ...
@@ -10,6 +12,7 @@
10 12
11 13
arduino shield - [[DAS1013-dat]]
12 14
15
+controller - [[SIR1003-dat]]
13 16
14 17
## RPI-SCH
15 18
... ...
@@ -38,6 +41,9 @@ legacy wiki page - [Infrared for RPI](https://www.electrodragon.com/w/index.php?
38 41
39 42
- https://github.com/Edragon/Infrared
40 43
44
+- [[IR-rover-rc.ino]]
45
+
46
+
41 47
## ref
42 48
43 49
- [[infrared-dat]]
Tech-dat/Sensor-dat/Motion-sensor-dat/motion-sensor-dat.md
... ...
@@ -36,8 +36,11 @@ most simple motion sensor
36 36
| [[SMO1013-dat]] | [[MAX30102-dat]] | [[pulse-rate-dat]] | | |
37 37
38 38
39
+## other
39 40
41
+Principle of Tilt Sensors
40 42
43
+Tilt sensors are often used for horizontal measurement in systems. Based on their working principles, they can be divided into three types: "solid pendulum" type, "liquid pendulum" type, and "gas pendulum" type tilt sensors. Their working principles are introduced below.
41 44
42 45
43 46
Tech-dat/acturator-dat/motor-dat/servo-dat/2025-06-15-14-21-31.png
... ...
Binary files /dev/null and b/Tech-dat/acturator-dat/motor-dat/servo-dat/2025-06-15-14-21-31.png differ
Tech-dat/acturator-dat/motor-dat/servo-dat/servo-dat.md
... ...
@@ -56,7 +56,7 @@ Taking the 180-degree angle servo as an example, the corresponding control relat
56 56
57 57
![](47-08-17-21-06-2023.png)
58 58
59
-
59
+![](2025-06-15-14-21-31.png)
60 60
61 61
## code
62 62
Tech-dat/interactive-dat/display-dat/LCD-12864-dat/2024-02-17-17-52-18.png
... ...
Binary files a/Tech-dat/interactive-dat/display-dat/LCD-12864-dat/2024-02-17-17-52-18.png and /dev/null differ
Tech-dat/interactive-dat/display-dat/LCD-12864-dat/2024-09-05-17-24-29.png
... ...
Binary files a/Tech-dat/interactive-dat/display-dat/LCD-12864-dat/2024-09-05-17-24-29.png and /dev/null differ
Tech-dat/interactive-dat/display-dat/LCD-12864-dat/LCD-12864-dat.md
... ...
@@ -1,45 +0,0 @@
1
-
2
-# LCD-12864-dat
3
-
4
-## specs
5
-- Product name LCD module
6
-- Model 12864G
7
-- Appearance (L*W*H) 43.5*33.0*3.5
8
-- Viewing area (L*W) 39.8*25.5
9
-- Point (L*W)mm 0.26*0.33
10
-- Point (L*W)MM 0.29*0.36
11
-- IC model UC1701X
12
-- 5V/3.3V 3.3V
13
-- PCB board FPC interface, no PCB
14
-- Parallel/Serial Serial
15
-
16
-![](2024-02-17-17-52-18.png)
17
-
18
-legacy wiki page - https://www.electrodragon.com/w/12864min_LCD
19
-
20
-
21
-
22
-## schematic wiring
23
-
24
-### with arduino
25
-
26
-- CS - D10
27
-- CD - D9
28
-- RST - D8
29
-- SCK - D13
30
-- MISO - D12
31
-- MOSI - D11
32
-
33
-
34
-
35
-![](2024-09-05-17-24-29.png)
36
-
37
-
38
-## ref
39
-
40
-
41
-- [[ILC1007-dat]] - [[ILC1008-dat]]
42
-
43
-- [[chars-dat]]
44
-
45
-- [[UC1701X-dat]]
... ...
\ No newline at end of file
Tech-dat/interactive-dat/display-dat/LCD-dat/LCD-12864-dat/2024-02-17-17-52-18.png
... ...
Binary files /dev/null and b/Tech-dat/interactive-dat/display-dat/LCD-dat/LCD-12864-dat/2024-02-17-17-52-18.png differ
Tech-dat/interactive-dat/display-dat/LCD-dat/LCD-12864-dat/2024-09-05-17-24-29.png
... ...
Binary files /dev/null and b/Tech-dat/interactive-dat/display-dat/LCD-dat/LCD-12864-dat/2024-09-05-17-24-29.png differ
Tech-dat/interactive-dat/display-dat/LCD-dat/LCD-12864-dat/LCD-12864-dat.md
... ...
@@ -0,0 +1,45 @@
1
+
2
+# LCD-12864-dat
3
+
4
+## specs
5
+- Product name LCD module
6
+- Model 12864G
7
+- Appearance (L*W*H) 43.5*33.0*3.5
8
+- Viewing area (L*W) 39.8*25.5
9
+- Point (L*W)mm 0.26*0.33
10
+- Point (L*W)MM 0.29*0.36
11
+- IC model UC1701X
12
+- 5V/3.3V 3.3V
13
+- PCB board FPC interface, no PCB
14
+- Parallel/Serial Serial
15
+
16
+![](2024-02-17-17-52-18.png)
17
+
18
+legacy wiki page - https://www.electrodragon.com/w/12864min_LCD
19
+
20
+
21
+
22
+## schematic wiring
23
+
24
+### with arduino
25
+
26
+- CS - D10
27
+- CD - D9
28
+- RST - D8
29
+- SCK - D13
30
+- MISO - D12
31
+- MOSI - D11
32
+
33
+
34
+
35
+![](2024-09-05-17-24-29.png)
36
+
37
+
38
+## ref
39
+
40
+
41
+- [[ILC1007-dat]] - [[ILC1008-dat]]
42
+
43
+- [[chars-dat]]
44
+
45
+- [[UC1701X-dat]]
... ...
\ No newline at end of file
Tech-dat/interactive-dat/display-dat/LCD-dat/LCD1602-dat/2025-06-15-14-07-39.png
... ...
Binary files /dev/null and b/Tech-dat/interactive-dat/display-dat/LCD-dat/LCD1602-dat/2025-06-15-14-07-39.png differ
Tech-dat/interactive-dat/display-dat/LCD-dat/LCD1602-dat/2025-06-15-14-08-52.png
... ...
Binary files /dev/null and b/Tech-dat/interactive-dat/display-dat/LCD-dat/LCD1602-dat/2025-06-15-14-08-52.png differ
Tech-dat/interactive-dat/display-dat/LCD-dat/LCD1602-dat/LCD1602-dat.md
... ...
@@ -0,0 +1,30 @@
1
+
2
+# LCD1602-dat
3
+
4
+
5
+## wiring
6
+
7
+![](2025-06-15-14-07-39.png)
8
+
9
+## demo code
10
+
11
+code 1
12
+
13
+ #include <Wire.h>
14
+ #include <LiquidCrystal_I2C.h>
15
+
16
+ LiquidCrystal_I2C lcd(0x27,16,2); // set the LCD address to 0x27 for a 16 chars and 2 line display
17
+
18
+ void setup()
19
+ {
20
+ lcd.init();
21
+ // Print a message to the LCD.
22
+ lcd.backlight();
23
+ lcd.print("www.electrodragon.com");
24
+ }
25
+ void loop()
26
+ {
27
+
28
+ }
29
+
30
+![](2025-06-15-14-08-52.png)
... ...
\ No newline at end of file
Tech-dat/interactive-dat/interactive-dat.md
app-dat/IR-distance-measurer-dat/2025-06-15-14-34-52.png
... ...
Binary files /dev/null and b/app-dat/IR-distance-measurer-dat/2025-06-15-14-34-52.png differ
app-dat/IR-distance-measurer-dat/IR-distance-measurer-dat.md
... ...
@@ -0,0 +1,26 @@
1
+
2
+# IR-distance-measurer-dat
3
+
4
+based on [[infrared-dat]] tech
5
+
6
+
7
+My understanding of the working principle of the [[GP2D12-dat]] is as follows (for reference only, corrections are welcome):
8
+
9
+It consists of an infrared emitting diode, a PSD (Position Sensing Device), and corresponding calculation circuitry. Sharp's PSD is quite unique; it can detect minute displacements of a light spot falling on it, with a resolution reaching micrometers. The GP2D12 utilizes this characteristic to achieve distance measurement through geometric means.
10
+
11
+The light beam emitted by the infrared emitting diode encounters an obstacle and is reflected back, falling onto the PSD. This forms an isosceles triangle. With the help of the PSD, the base of the triangle can be measured. The two base angles are fixed, determined by the emitting diode. At this point, the height of the triangle, which is the distance we want, can be calculated from the base. As shown in the figure below:
12
+
13
+![](2025-06-15-14-34-52.png)
14
+
15
+From the figure, it can be seen that this is an isosceles triangle with a very acute apex angle. The base is only 2cm, while the height needs to be 10 – 80cm. Therefore, the resolution of the PSD must be extremely high; otherwise, even a tiny deviation will lead to a huge error in the distance measurement. From this point, it can also be concluded that its distance measurement results are difficult to stabilize and make precise, as the ratio is too large.
16
+
17
+Because the size of the PSD is limited, it is easy to understand from the figure why its measurement data becomes invalid when the distance is out of range; even a trend cannot be obtained.
18
+
19
+From the description of the principle above, it can also be known that it is not a continuous measurement. After obtaining the length of the base, it must be calculated to get the distance value, which is then converted into an analog signal output.
20
+
21
+These two inferences are corroborated in the "Sharp GP2D12 applicationNote." Specifically, this is manifested in its strong directionality of distance measurement and the uncertainty of its output (noise up to 200mV, which is 5% relative to the 2.4V full-scale output). This article seems to have been written by an enthusiast abroad who conducted extensive tests, which is extremely helpful for users to understand the performance of the GP2D12 and use it reasonably.
22
+
23
+
24
+## ref
25
+
26
+- [[infrared-dat]]
... ...
\ No newline at end of file
app-dat/RC-dat/RC-code-dat/RC-code-dat.md
... ...
@@ -1,6 +1,10 @@
1 1
2 2
# RC-code-dat
3 3
4
+
5
+basic code == [[basic-code-1.ino]], or [[ultrasonic car-1602.pde]]
6
+
7
+
4 8
## working for
5 9
6 10
- [[SDR1064-dat]] - [[nodemcu-dat]]
app-dat/RC-dat/RC-code-dat/basic-code-1.ino
... ...
@@ -0,0 +1,403 @@
1
+
2
+
3
+*******************************************************************************
4
+遥控超声波测距智能车程序(ARDUINO)
5
+#include <IRremote.h>
6
+#include <Servo.h>
7
+#include <Wire.h>
8
+#include <LiquidCrystal_I2C.h>
9
+//***********************定義馬達腳位*************************
10
+int MotorRight1=6;
11
+int MotorRight2=9;
12
+int MotorLeft1=10;
13
+int MotorLeft2=11;
14
+
15
+int counter=0;
16
+const int irReceiverPin = 3; //紅外線接收器 OUTPUT 訊號接在 pin 3
17
+//***********************設定所偵測到的 IRcode*************************
18
+long IRfront= 0x00FF629D; //前進碼
19
+long IRback=0x00FFA857; //後退
20
+long IRturnright=0x00FF22DD; //右轉
21
+long IRturnleft= 0x00FFC23D; //左轉
22
+long IRstop=0x00FF02FD; //停止
23
+long IRAutorun=0x00FF6897; //超音波自走模式
24
+long IRturnsmallleft= 0x00FFB04F;
25
+IRrecv irrecv(irReceiverPin); // 定義 IRrecv 物件來接收紅外線訊號
26
+decode_results results;
27
+//*************************定義超音波腳位******************************
28
+int inputPin =A0 ; // 定義超音波信號接收腳位 rx
29
+int outputPin =A1; // 定義超音波信號發射腳位'tx
30
+int Fspeedd = 0; // 前方距離
31
+int Rspeedd = 0; // 右方距離
32
+int Lspeedd = 0; // 左方距離
33
+int directionn = 0; // 前=8 後=2 左=4 右=6
34
+Servo myservo; // 設 myservo
35
+int delay_time = 250; // 伺服馬達轉向後的穩定時間
36
+int Fgo = 8; // 前進
37
+int Rgo = 6; // 右轉
38
+int Lgo = 4; // 左轉
39
+int Bgo = 2; // 倒車
40
+//********************************************************************(SETUP)
41
+LiquidCrystal_I2C lcd(0x27,16,2); // set the LCD address to 0x27 for a 16 chars and 2 line
42
+display
43
+void setup()
44
+{
45
+ Serial.begin(9600);
46
+ pinMode(MotorRight1, OUTPUT); // 腳位 8 (PWM)
47
+ pinMode(MotorRight2, OUTPUT); // 腳位 9 (PWM)
48
+ pinMode(MotorLeft1, OUTPUT); // 腳位 10 (PWM)
49
+ pinMode(MotorLeft2, OUTPUT); // 腳位 11 (PWM)
50
+ irrecv.enableIRIn(); // 啟動紅外線解碼
51
+ digitalWrite(3,HIGH);
52
+ pinMode(inputPin, INPUT); // 定義超音波輸入腳位
53
+ pinMode(outputPin, OUTPUT); // 定義超音波輸出腳位
54
+ myservo.attach(5); // 定義伺服馬達輸出第 5 腳位(PWM)
55
+ lcd.init(); // initialize the lcd
56
+ lcd.init();
57
+ // Print a message to the LCD.
58
+
59
+ lcd.backlight();
60
+ }
61
+//******************************************************************(Void)
62
+void advance(int a) // 前進
63
+{
64
+ digitalWrite(MotorRight1,LOW);
65
+ digitalWrite(MotorRight2,HIGH);
66
+ digitalWrite(MotorLeft1,LOW);
67
+ digitalWrite(MotorLeft2,HIGH);
68
+ delay(a * 100);
69
+}
70
+void right(int b) //右轉(單輪)
71
+{
72
+ digitalWrite(MotorLeft1,LOW);
73
+ digitalWrite(MotorLeft2,HIGH);
74
+ digitalWrite(MotorRight1,LOW);
75
+ digitalWrite(MotorRight2,LOW);
76
+ delay(b * 100);
77
+}
78
+void left(int c) //左轉(單輪)
79
+{
80
+ digitalWrite(MotorRight1,LOW);
81
+ digitalWrite(MotorRight2,HIGH);
82
+ digitalWrite(MotorLeft1,LOW);
83
+ digitalWrite(MotorLeft2,LOW);
84
+ delay(c * 100);
85
+}
86
+void turnR(int d) //右轉(雙輪)
87
+{
88
+ digitalWrite(MotorRight1,HIGH);
89
+ digitalWrite(MotorRight2,LOW);
90
+ digitalWrite(MotorLeft1,LOW);
91
+ digitalWrite(MotorLeft2,HIGH);
92
+ delay(d * 100);
93
+}
94
+void turnL(int e) //左轉(雙輪)
95
+{
96
+ digitalWrite(MotorRight1,LOW);
97
+ digitalWrite(MotorRight2,HIGH);
98
+ digitalWrite(MotorLeft1,HIGH);
99
+ digitalWrite(MotorLeft2,LOW);
100
+
101
+ delay(e * 100);
102
+}
103
+void stopp(int f) //停止
104
+{
105
+ digitalWrite(MotorRight1,LOW);
106
+ digitalWrite(MotorRight2,LOW);
107
+ digitalWrite(MotorLeft1,LOW);
108
+ digitalWrite(MotorLeft2,LOW);
109
+ delay(f * 100);
110
+}
111
+void back(int g) //後退
112
+{
113
+ digitalWrite(MotorRight1,HIGH);
114
+ digitalWrite(MotorRight2,LOW);
115
+ digitalWrite(MotorLeft1,HIGH);
116
+ digitalWrite(MotorLeft2,LOW);;
117
+ delay(g * 100);
118
+}
119
+void detection() //測量 3 個角度(前.左.右)
120
+{
121
+ int delay_time = 250; // 伺服馬達轉向後的穩定時間
122
+ ask_pin_F(); // 讀取前方距離
123
+ if(Fspeedd < 10) // 假如前方距離小於 10 公分
124
+ {
125
+ stopp(1); // 清除輸出資料
126
+ back(2); // 後退 0.2 秒
127
+
128
+ }
129
+ if(Fspeedd < 25) // 假如前方距離小於 25 公分
130
+ {
131
+ stopp(1); // 清除輸出資料
132
+ ask_pin_L(); // 讀取左方距離
133
+ delay(delay_time); // 等待伺服馬達穩定
134
+ ask_pin_R(); // 讀取右方距離
135
+ delay(delay_time); // 等待伺服馬達穩定
136
+ if(Lspeedd > Rspeedd) //假如 左邊距離大於右邊距離
137
+ {
138
+ directionn = Lgo; //向左走
139
+ }
140
+ if(Lspeedd <= Rspeedd) //假如 左邊距離小於或等於右邊距離
141
+
142
+ {
143
+ directionn = Rgo; //向右走
144
+ }
145
+ if (Lspeedd < 15 && Rspeedd < 15) //假如 左邊距離和右邊距離皆小於 10 公分
146
+ {
147
+ directionn = Bgo; //向後走
148
+ }
149
+ }
150
+ else //加如前方大於 25 公分
151
+ {
152
+ directionn = Fgo; //向前走
153
+ }
154
+}
155
+//*****************************************************************************
156
+****
157
+void ask_pin_F() // 量出前方距離
158
+{
159
+myservo.write(90);
160
+digitalWrite(outputPin, LOW); // 讓超聲波發射低電壓 2μs
161
+delayMicroseconds(2);
162
+digitalWrite(outputPin, HIGH); // 讓超聲波發射高電壓 10μs,這裡至少是 10μs
163
+delayMicroseconds(10);
164
+digitalWrite(outputPin, LOW); // 維持超聲波發射低電壓
165
+float Fdistance = pulseIn(inputPin, HIGH); // 讀差相差時間
166
+Fdistance= Fdistance/5.8/10; // 將時間轉為距離距离(單位:公分)
167
+Fspeedd = Fdistance; // 將距離 讀入 Fspeedd(前速)
168
+}
169
+//*****************************************************************************
170
+***
171
+void ask_pin_L() // 量出左邊距離
172
+{
173
+myservo.write(177);
174
+delay(delay_time);
175
+digitalWrite(outputPin, LOW); // 讓超聲波發射低電壓 2μs
176
+delayMicroseconds(2);
177
+digitalWrite(outputPin, HIGH); // 讓超聲波發射高電壓 10μs,這裡至少是 10μs
178
+delayMicroseconds(10);
179
+digitalWrite(outputPin, LOW); // 維持超聲波發射低電壓
180
+float Ldistance = pulseIn(inputPin, HIGH); // 讀差相差時間
181
+Ldistance= Ldistance/5.8/10; // 將時間轉為距離距离(單位:公分)
182
+Lspeedd = Ldistance; // 將距離 讀入 Lspeedd(左速)
183
+
184
+}
185
+//*****************************************************************************
186
+*
187
+void ask_pin_R() // 量出右邊距離
188
+{
189
+myservo.write(5);
190
+delay(delay_time);
191
+digitalWrite(outputPin, LOW); // 讓超聲波發射低電壓 2μs
192
+delayMicroseconds(2);
193
+digitalWrite(outputPin, HIGH); // 讓超聲波發射高電壓 10μs,這裡至少是 10μs
194
+delayMicroseconds(10);
195
+digitalWrite(outputPin, LOW); // 維持超聲波發射低電壓
196
+float Rdistance = pulseIn(inputPin, HIGH); // 讀差相差時間
197
+Rdistance= Rdistance/5.8/10; // 將時間轉為距離距离(單位:公分)
198
+Rspeedd = Rdistance; // 將距離 讀入 Rspeedd(右速)
199
+}
200
+//*****************************************************************************
201
+*(LOOP)
202
+void loop()
203
+{
204
+
205
+//***************************************************************************正
206
+常遙控模式
207
+ if (irrecv.decode(&results))
208
+ { // 解碼成功,收到一組紅外線訊號
209
+/***********************************************************************/
210
+ if (results.value == IRfront)//前進
211
+ {
212
+
213
+ lcd.setCursor(0,0);
214
+ lcd.print(" IR mode");
215
+ lcd.setCursor(0,1);
216
+ lcd.print(" advance ");
217
+ advance(20);//前進
218
+ }
219
+/***********************************************************************/
220
+ if (results.value == IRback)//後退
221
+ {
222
+
223
+ lcd.setCursor(0,0);
224
+ lcd.print(" IR mode");
225
+ lcd.setCursor(0,1);
226
+ lcd.print(" back ");
227
+
228
+ back(20);//後退
229
+ }
230
+/***********************************************************************/
231
+ if (results.value == IRturnright)//右轉
232
+ {
233
+
234
+ lcd.setCursor(0,0);
235
+ lcd.print(" IR mode");
236
+ lcd.setCursor(0,1);
237
+ lcd.print(" right ");
238
+ right(10); // 右轉
239
+
240
+ }
241
+/***********************************************************************/
242
+ if (results.value == IRturnleft)//左轉
243
+ {
244
+
245
+ lcd.setCursor(0,0);
246
+ lcd.print(" IR mode");
247
+ lcd.setCursor(0,1);
248
+ lcd.print(" left ");
249
+ left(10); // 左轉);
250
+ }
251
+/***********************************************************************/
252
+ if (results.value == IRstop)//停止
253
+ {
254
+ lcd.setCursor(0,0);
255
+ lcd.print(" IR mode");
256
+ lcd.setCursor(0,1);
257
+ lcd.print(" stop ");
258
+ digitalWrite(MotorRight1,LOW);
259
+ digitalWrite(MotorRight2,LOW);
260
+ digitalWrite(MotorLeft1,LOW);
261
+ digitalWrite(MotorLeft2,LOW);
262
+
263
+
264
+ }
265
+//***********************************************************************超音波
266
+自走模式
267
+ if (results.value ==IRAutorun )
268
+ {
269
+ while(IRAutorun)
270
+ {
271
+
272
+ myservo.write(90); //讓伺服馬達回歸 預備位置 準備下一次的測量
273
+ detection(); //測量角度 並且判斷要往哪一方向移動
274
+ if(directionn == 8) //假如 directionn(方向) = 8(前進)
275
+ {
276
+ if (irrecv.decode(&results))
277
+ {
278
+ irrecv.resume();
279
+ Serial.println(results.value,HEX);
280
+ if(results.value ==IRstop)
281
+ {
282
+ digitalWrite(MotorRight1,LOW);
283
+ digitalWrite(MotorRight2,LOW);
284
+ digitalWrite(MotorLeft1,LOW);
285
+ digitalWrite(MotorLeft2,LOW);
286
+ break;
287
+ }
288
+ }
289
+ results.value=0;
290
+
291
+
292
+ lcd.setCursor(0,0);
293
+ lcd.print(" aoto mode");
294
+ lcd.setCursor(0,1);
295
+ lcd.print(" Advance ");
296
+ advance(1); // 正常前進
297
+ }
298
+ if(directionn == 2) //假如 directionn(方向) = 2(倒車)
299
+ {
300
+ if (irrecv.decode(&results))
301
+ {
302
+ irrecv.resume();
303
+ Serial.println(results.value,HEX);
304
+ if(results.value ==IRstop)
305
+ {
306
+ digitalWrite(MotorRight1,LOW);
307
+ digitalWrite(MotorRight2,LOW);
308
+ digitalWrite(MotorLeft1,LOW);
309
+ digitalWrite(MotorLeft2,LOW);
310
+ break;
311
+ }
312
+ }
313
+ results.value=0;
314
+
315
+ lcd.setCursor(0,0);
316
+ lcd.print(" aoto mode");
317
+ lcd.setCursor(0,1);
318
+ lcd.print(" Reverse ");
319
+ back(8); // 倒退(車)
320
+ turnL(3); //些微向左方移動(防止卡在死巷裡)
321
+ }
322
+ if(directionn == 6) //假如 directionn(方向) = 6(右轉)
323
+ {
324
+ if (irrecv.decode(&results))
325
+ {
326
+ irrecv.resume();
327
+ Serial.println(results.value,HEX);
328
+ if(results.value ==IRstop)
329
+ {
330
+ digitalWrite(MotorRight1,LOW);
331
+ digitalWrite(MotorRight2,LOW);
332
+ digitalWrite(MotorLeft1,LOW);
333
+ digitalWrite(MotorLeft2,LOW);
334
+ break;
335
+ }
336
+ }
337
+ results.value=0;
338
+
339
+
340
+ lcd.setCursor(0,0);
341
+ lcd.print(" aoto mode");
342
+ lcd.setCursor(0,1);
343
+ lcd.print(" Right ");
344
+ back(1);
345
+ turnR(3); // 右轉
346
+ }
347
+ if(directionn == 4) //假如 directionn(方向) = 4(左轉)
348
+ {
349
+ if (irrecv.decode(&results))
350
+ {
351
+ irrecv.resume();
352
+ Serial.println(results.value,HEX);
353
+ if(results.value ==IRstop)
354
+ {
355
+ digitalWrite(MotorRight1,LOW);
356
+ digitalWrite(MotorRight2,LOW);
357
+ digitalWrite(MotorLeft1,LOW);
358
+ digitalWrite(MotorLeft2,LOW);
359
+
360
+ break;
361
+ }
362
+ }
363
+ results.value=0;
364
+
365
+ lcd.setCursor(0,0);
366
+ lcd.print(" aoto mode");
367
+ lcd.setCursor(0,1);
368
+ lcd.print(" Left ");
369
+ back(1);
370
+ turnL(3); // 左轉
371
+
372
+ }
373
+
374
+ if (irrecv.decode(&results))
375
+ {
376
+ irrecv.resume();
377
+ Serial.println(results.value,HEX);
378
+ if(results.value ==IRstop)
379
+ {
380
+ digitalWrite(MotorRight1,LOW);
381
+ digitalWrite(MotorRight2,LOW);
382
+ digitalWrite(MotorLeft1,LOW);
383
+ digitalWrite(MotorLeft2,LOW);
384
+ break;
385
+ }
386
+ }
387
+ }
388
+ results.value=0;
389
+ }
390
+/***********************************************************************/
391
+ else
392
+ {
393
+ digitalWrite(MotorRight1,LOW);
394
+ digitalWrite(MotorRight2,LOW);
395
+ digitalWrite(MotorLeft1,LOW);
396
+ digitalWrite(MotorLeft2,LOW);
397
+ }
398
+
399
+ irrecv.resume(); // 繼續收下一組紅外線訊號
400
+ }
401
+}
402
+
403
+*******************************************************************************
... ...
\ No newline at end of file
app-dat/RC-dat/RC-code-dat/ultrasonic car-1602.pde
... ...
@@ -0,0 +1,399 @@
1
+#include <IRremote.h>
2
+#include <Servo.h>
3
+#include <Wire.h>
4
+#include <LiquidCrystal_I2C.h>
5
+
6
+//***********************定義馬達腳位*************************
7
+int MotorRight1=6;
8
+int MotorRight2=9;
9
+int MotorLeft1=10;
10
+int MotorLeft2=11;
11
+int counter=0;
12
+const int irReceiverPin = 3; //紅外線接收器 OUTPUT 訊號接在 pin 2
13
+
14
+//***********************設定所偵測到的IRcode*************************
15
+long IRfront= 0x00FF629D; //前進碼
16
+long IRback=0x00FFA857; //後退
17
+long IRturnright=0x00FF22DD; //右轉
18
+long IRturnleft= 0x00FFC23D; //左轉
19
+long IRstop=0x00FF02FD; //停止
20
+long IRAutorun=0x00FF6897; //超音波自走模式
21
+long IRturnsmallleft= 0x00FFB04F;
22
+IRrecv irrecv(irReceiverPin); // 定義 IRrecv 物件來接收紅外線訊號
23
+decode_results results;
24
+//*************************定義超音波腳位******************************
25
+int inputPin =A0 ; // 定義超音波信號接收腳位rx
26
+int outputPin =A1; // 定義超音波信號發射腳位'tx
27
+int Fspeedd = 0; // 前方距離
28
+int Rspeedd = 0; // 右方距離
29
+int Lspeedd = 0; // 左方距離
30
+int directionn = 0; // 前=8 後=2 左=4 右=6
31
+Servo myservo; // 設 myservo
32
+int delay_time = 250; // 伺服馬達轉向後的穩定時間
33
+int Fgo = 8; // 前進
34
+int Rgo = 6; // 右轉
35
+int Lgo = 4; // 左轉
36
+int Bgo = 2; // 倒車
37
+//********************************************************************(SETUP)
38
+LiquidCrystal_I2C lcd(0x27,16,2); // set the LCD address to 0x27 for a 16 chars and 2 line display
39
+void setup()
40
+{
41
+ Serial.begin(9600);
42
+ pinMode(MotorRight1, OUTPUT); // 腳位 8 (PWM)
43
+ pinMode(MotorRight2, OUTPUT); // 腳位 9 (PWM)
44
+ pinMode(MotorLeft1, OUTPUT); // 腳位 10 (PWM)
45
+ pinMode(MotorLeft2, OUTPUT); // 腳位 11 (PWM)
46
+ irrecv.enableIRIn(); // 啟動紅外線解碼
47
+ digitalWrite(3,HIGH);
48
+ pinMode(inputPin, INPUT); // 定義超音波輸入腳位
49
+ pinMode(outputPin, OUTPUT); // 定義超音波輸出腳位
50
+ myservo.attach(5); // 定義伺服馬達輸出第5腳位(PWM)
51
+ lcd.init(); // initialize the lcd
52
+ lcd.init();
53
+ // Print a message to the LCD.
54
+ lcd.backlight();
55
+
56
+
57
+
58
+ }
59
+//******************************************************************(Void)
60
+void advance(int a) // 前進
61
+{
62
+ digitalWrite(MotorRight1,LOW);
63
+ digitalWrite(MotorRight2,HIGH);
64
+ digitalWrite(MotorLeft1,LOW);
65
+ digitalWrite(MotorLeft2,HIGH);
66
+ delay(a * 100);
67
+}
68
+void right(int b) //右轉(單輪)
69
+{
70
+ digitalWrite(MotorLeft1,LOW);
71
+ digitalWrite(MotorLeft2,HIGH);
72
+ digitalWrite(MotorRight1,LOW);
73
+ digitalWrite(MotorRight2,LOW);
74
+ delay(b * 100);
75
+}
76
+void left(int c) //左轉(單輪)
77
+{
78
+ digitalWrite(MotorRight1,LOW);
79
+ digitalWrite(MotorRight2,HIGH);
80
+ digitalWrite(MotorLeft1,LOW);
81
+ digitalWrite(MotorLeft2,LOW);
82
+ delay(c * 100);
83
+}
84
+void turnR(int d) //右轉(雙輪)
85
+{
86
+ digitalWrite(MotorRight1,HIGH);
87
+ digitalWrite(MotorRight2,LOW);
88
+ digitalWrite(MotorLeft1,LOW);
89
+ digitalWrite(MotorLeft2,HIGH);
90
+ delay(d * 100);
91
+}
92
+void turnL(int e) //左轉(雙輪)
93
+{
94
+ digitalWrite(MotorRight1,LOW);
95
+ digitalWrite(MotorRight2,HIGH);
96
+ digitalWrite(MotorLeft1,HIGH);
97
+ digitalWrite(MotorLeft2,LOW);
98
+ delay(e * 100);
99
+}
100
+void stopp(int f) //停止
101
+{
102
+ digitalWrite(MotorRight1,LOW);
103
+ digitalWrite(MotorRight2,LOW);
104
+ digitalWrite(MotorLeft1,LOW);
105
+ digitalWrite(MotorLeft2,LOW);
106
+ delay(f * 100);
107
+}
108
+void back(int g) //後退
109
+{
110
+ digitalWrite(MotorRight1,HIGH);
111
+ digitalWrite(MotorRight2,LOW);
112
+ digitalWrite(MotorLeft1,HIGH);
113
+ digitalWrite(MotorLeft2,LOW);;
114
+ delay(g * 100);
115
+}
116
+void detection() //測量3個角度(前.左.右)
117
+{
118
+ int delay_time = 250; // 伺服馬達轉向後的穩定時間
119
+ ask_pin_F(); // 讀取前方距離
120
+
121
+ if(Fspeedd < 10) // 假如前方距離小於10公分
122
+ {
123
+ stopp(1); // 清除輸出資料
124
+ back(2); // 後退 0.2秒
125
+
126
+
127
+ }
128
+ if(Fspeedd < 25) // 假如前方距離小於25公分
129
+ {
130
+ stopp(1); // 清除輸出資料
131
+ ask_pin_L(); // 讀取左方距離
132
+ delay(delay_time); // 等待伺服馬達穩定
133
+ ask_pin_R(); // 讀取右方距離
134
+ delay(delay_time); // 等待伺服馬達穩定
135
+
136
+ if(Lspeedd > Rspeedd) //假如 左邊距離大於右邊距離
137
+ {
138
+ directionn = Lgo; //向左走
139
+ }
140
+
141
+ if(Lspeedd <= Rspeedd) //假如 左邊距離小於或等於右邊距離
142
+ {
143
+ directionn = Rgo; //向右走
144
+ }
145
+
146
+ if (Lspeedd < 15 && Rspeedd < 15) //假如 左邊距離和右邊距離皆小於10公分
147
+ {
148
+ directionn = Bgo; //向後走
149
+ }
150
+ }
151
+ else //加如前方大於25公分
152
+ {
153
+ directionn = Fgo; //向前走
154
+ }
155
+}
156
+//*********************************************************************************
157
+void ask_pin_F() // 量出前方距離
158
+{
159
+myservo.write(90);
160
+digitalWrite(outputPin, LOW); // 讓超聲波發射低電壓2μs
161
+delayMicroseconds(2);
162
+digitalWrite(outputPin, HIGH); // 讓超聲波發射高電壓10μs,這裡至少是10μs
163
+delayMicroseconds(10);
164
+digitalWrite(outputPin, LOW); // 維持超聲波發射低電壓
165
+float Fdistance = pulseIn(inputPin, HIGH); // 讀差相差時間
166
+Fdistance= Fdistance/5.8/10; // 將時間轉為距離距离(單位:公分)
167
+
168
+Fspeedd = Fdistance; // 將距離 讀入Fspeedd(前速)
169
+}
170
+//********************************************************************************
171
+void ask_pin_L() // 量出左邊距離
172
+{
173
+myservo.write(177);
174
+delay(delay_time);
175
+digitalWrite(outputPin, LOW); // 讓超聲波發射低電壓2μs
176
+delayMicroseconds(2);
177
+digitalWrite(outputPin, HIGH); // 讓超聲波發射高電壓10μs,這裡至少是10μs
178
+delayMicroseconds(10);
179
+digitalWrite(outputPin, LOW); // 維持超聲波發射低電壓
180
+float Ldistance = pulseIn(inputPin, HIGH); // 讀差相差時間
181
+Ldistance= Ldistance/5.8/10; // 將時間轉為距離距离(單位:公分)
182
+
183
+Lspeedd = Ldistance; // 將距離 讀入Lspeedd(左速)
184
+}
185
+//******************************************************************************
186
+void ask_pin_R() // 量出右邊距離
187
+{
188
+myservo.write(5);
189
+delay(delay_time);
190
+digitalWrite(outputPin, LOW); // 讓超聲波發射低電壓2μs
191
+delayMicroseconds(2);
192
+digitalWrite(outputPin, HIGH); // 讓超聲波發射高電壓10μs,這裡至少是10μs
193
+delayMicroseconds(10);
194
+digitalWrite(outputPin, LOW); // 維持超聲波發射低電壓
195
+float Rdistance = pulseIn(inputPin, HIGH); // 讀差相差時間
196
+Rdistance= Rdistance/5.8/10; // 將時間轉為距離距离(單位:公分)
197
+
198
+Rspeedd = Rdistance; // 將距離 讀入Rspeedd(右速)
199
+}
200
+//******************************************************************************(LOOP)
201
+void loop()
202
+{
203
+
204
+//***************************************************************************正常遙控模式
205
+ if (irrecv.decode(&results))
206
+ { // 解碼成功,收到一組紅外線訊號
207
+/***********************************************************************/
208
+ if (results.value == IRfront)//前進
209
+ {
210
+
211
+ lcd.setCursor(0,0);
212
+ lcd.print(" IR mode");
213
+ lcd.setCursor(0,1);
214
+ lcd.print(" advance ");
215
+ advance(20);//前進
216
+ }
217
+/***********************************************************************/
218
+ if (results.value == IRback)//後退
219
+ {
220
+
221
+ lcd.setCursor(0,0);
222
+ lcd.print(" IR mode");
223
+ lcd.setCursor(0,1);
224
+ lcd.print(" back ");
225
+ back(20);//後退
226
+ }
227
+/***********************************************************************/
228
+ if (results.value == IRturnright)//右轉
229
+ {
230
+
231
+ lcd.setCursor(0,0);
232
+ lcd.print(" IR mode");
233
+ lcd.setCursor(0,1);
234
+ lcd.print(" right ");
235
+ right(10); // 右轉
236
+
237
+ }
238
+/***********************************************************************/
239
+ if (results.value == IRturnleft)//左轉
240
+ {
241
+
242
+ lcd.setCursor(0,0);
243
+ lcd.print(" IR mode");
244
+ lcd.setCursor(0,1);
245
+ lcd.print(" left ");
246
+ left(10); // 左轉);
247
+ }
248
+/***********************************************************************/
249
+ if (results.value == IRstop)//停止
250
+ {
251
+ lcd.setCursor(0,0);
252
+ lcd.print(" IR mode");
253
+ lcd.setCursor(0,1);
254
+ lcd.print(" stop ");
255
+ digitalWrite(MotorRight1,LOW);
256
+ digitalWrite(MotorRight2,LOW);
257
+ digitalWrite(MotorLeft1,LOW);
258
+ digitalWrite(MotorLeft2,LOW);
259
+
260
+
261
+ }
262
+
263
+//***********************************************************************超音波自走模式
264
+ if (results.value ==IRAutorun )
265
+ {
266
+ while(IRAutorun)
267
+ {
268
+ myservo.write(90); //讓伺服馬達回歸 預備位置 準備下一次的測量
269
+ detection(); //測量角度 並且判斷要往哪一方向移動
270
+ if(directionn == 8) //假如directionn(方向) = 8(前進)
271
+ {
272
+ if (irrecv.decode(&results))
273
+ {
274
+ irrecv.resume();
275
+ Serial.println(results.value,HEX);
276
+ if(results.value ==IRstop)
277
+ {
278
+ digitalWrite(MotorRight1,LOW);
279
+ digitalWrite(MotorRight2,LOW);
280
+ digitalWrite(MotorLeft1,LOW);
281
+ digitalWrite(MotorLeft2,LOW);
282
+ break;
283
+ }
284
+ }
285
+ results.value=0;
286
+
287
+
288
+ lcd.setCursor(0,0);
289
+ lcd.print(" aoto mode");
290
+ lcd.setCursor(0,1);
291
+ lcd.print(" Advance ");
292
+ advance(1); // 正常前進
293
+ }
294
+ if(directionn == 2) //假如directionn(方向) = 2(倒車)
295
+ {
296
+ if (irrecv.decode(&results))
297
+ {
298
+ irrecv.resume();
299
+ Serial.println(results.value,HEX);
300
+ if(results.value ==IRstop)
301
+ {
302
+ digitalWrite(MotorRight1,LOW);
303
+ digitalWrite(MotorRight2,LOW);
304
+ digitalWrite(MotorLeft1,LOW);
305
+ digitalWrite(MotorLeft2,LOW);
306
+ break;
307
+ }
308
+ }
309
+ results.value=0;
310
+
311
+
312
+ lcd.setCursor(0,0);
313
+ lcd.print(" aoto mode");
314
+ lcd.setCursor(0,1);
315
+ lcd.print(" Reverse ");
316
+ back(8); // 倒退(車)
317
+ turnL(3); //些微向左方移動(防止卡在死巷裡)
318
+ }
319
+ if(directionn == 6) //假如directionn(方向) = 6(右轉)
320
+ {
321
+ if (irrecv.decode(&results))
322
+ {
323
+ irrecv.resume();
324
+ Serial.println(results.value,HEX);
325
+ if(results.value ==IRstop)
326
+ {
327
+ digitalWrite(MotorRight1,LOW);
328
+ digitalWrite(MotorRight2,LOW);
329
+ digitalWrite(MotorLeft1,LOW);
330
+ digitalWrite(MotorLeft2,LOW);
331
+ break;
332
+ }
333
+ }
334
+ results.value=0;
335
+
336
+
337
+ lcd.setCursor(0,0);
338
+ lcd.print(" aoto mode");
339
+ lcd.setCursor(0,1);
340
+ lcd.print(" Right ");
341
+ back(1);
342
+ turnR(3); // 右轉
343
+ }
344
+ if(directionn == 4) //假如directionn(方向) = 4(左轉)
345
+ {
346
+ if (irrecv.decode(&results))
347
+ {
348
+ irrecv.resume();
349
+ Serial.println(results.value,HEX);
350
+ if(results.value ==IRstop)
351
+ {
352
+ digitalWrite(MotorRight1,LOW);
353
+ digitalWrite(MotorRight2,LOW);
354
+ digitalWrite(MotorLeft1,LOW);
355
+ digitalWrite(MotorLeft2,LOW);
356
+ break;
357
+ }
358
+ }
359
+ results.value=0;
360
+
361
+ lcd.setCursor(0,0);
362
+ lcd.print(" aoto mode");
363
+ lcd.setCursor(0,1);
364
+ lcd.print(" Left ");
365
+ back(1);
366
+ turnL(3); // 左轉
367
+
368
+ }
369
+
370
+ if (irrecv.decode(&results))
371
+ {
372
+ irrecv.resume();
373
+ Serial.println(results.value,HEX);
374
+ if(results.value ==IRstop)
375
+ {
376
+ digitalWrite(MotorRight1,LOW);
377
+ digitalWrite(MotorRight2,LOW);
378
+ digitalWrite(MotorLeft1,LOW);
379
+ digitalWrite(MotorLeft2,LOW);
380
+ break;
381
+ }
382
+ }
383
+ }
384
+ results.value=0;
385
+ }
386
+/***********************************************************************/
387
+ else
388
+ {
389
+ digitalWrite(MotorRight1,LOW);
390
+ digitalWrite(MotorRight2,LOW);
391
+ digitalWrite(MotorLeft1,LOW);
392
+ digitalWrite(MotorLeft2,LOW);
393
+ }
394
+
395
+
396
+ irrecv.resume(); // 繼續收下一組紅外線訊號
397
+ }
398
+}
399
+
app-dat/RC-dat/rover-dat/2025-06-15-14-10-56.png
... ...
Binary files /dev/null and b/app-dat/RC-dat/rover-dat/2025-06-15-14-10-56.png differ
app-dat/RC-dat/rover-dat/2025-06-15-14-22-34.png
... ...
Binary files /dev/null and b/app-dat/RC-dat/rover-dat/2025-06-15-14-22-34.png differ
app-dat/RC-dat/rover-dat/rover-dat.md
... ...
@@ -22,18 +22,28 @@ https://ardupilot.org/rover/index.html
22 22
23 23
Very basic version
24 24
25
+including functions == [[ultrasonic-sensor-dat]], [[interactive-dat]] - [[infrared-dat]] - [[line-finder-dat]] - [[MCU-dat]]
26
+
25 27
![](2025-06-15-12-56-47.png)
26 28
27 29
plastic chassis 4WD
28 30
29 31
![](2025-06-15-13-03-31.png)
30 32
33
+![](2025-06-15-14-10-56.png)
34
+
35
+![](2025-06-15-14-22-34.png)
36
+basic demo code 1 here == [[RC-code-dat]]
37
+
38
+## code
39
+
40
+- [[RC-code-dat]]
31 41
## 3D printed
32 42
33 43
- [[markus-rover-dat]]
34 44
35 45
36
-## 3D files
46
+### 3D files
37 47
38 48
![](2025-05-23-15-11-02.png)
39 49
... ...
@@ -48,10 +58,14 @@ plastic chassis 4WD
48 58
49 59
- [[SDR1064-dat]]
50 60
61
+chip based [[PCA9685-dat]], [[L293-dat]], [[L298-dat]], [[TB6612-dat]] see more at [[motor-driver-dat]]
62
+
51 63
Parts - [[TT-motor-dat]] - [[mecanum-wheel-dat]]
52 64
65
+
66
+
53 67
## ref
54 68
55
-- [[dc-motor-dat]] - [[motor-driver-dat]]
69
+- [[dc-motor-dat]] - [[motor-driver-dat]] - [[motor-dat]] - [[servo-dat]]
56 70
57 71
- [[rc-car]] - [[maker]]
... ...
\ No newline at end of file
app-dat/line-finder-dat/2025-06-15-14-20-13.png
... ...
Binary files /dev/null and b/app-dat/line-finder-dat/2025-06-15-14-20-13.png differ
app-dat/line-finder-dat/line-finder-dat.md
... ...
@@ -0,0 +1,6 @@
1
+
2
+# line-finder-dat
3
+
4
+based on [[infrared-dat]] tech
5
+
6
+![](2025-06-15-14-20-13.png)
... ...
\ No newline at end of file