-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathOpen_Source_Components_Documentation.html
More file actions
1337 lines (1201 loc) · 54.9 KB
/
Copy pathOpen_Source_Components_Documentation.html
File metadata and controls
1337 lines (1201 loc) · 54.9 KB
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
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
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
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>SmartCity Pulse - Open Source Components Documentation | AutomataNexus LLC</title>
<style>
@page {
size: letter;
margin: 0.5in;
}
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
body {
font-family: 'Georgia', 'Times New Roman', serif;
background: #f0f0f0;
color: #1a1a1a;
line-height: 1.6;
}
.document {
width: 95%;
max-width: 1400px;
margin: 0 auto;
background: white;
position: relative;
padding: 20px;
min-height: 11in;
}
.border {
border: 3px solid #808080;
border-radius: 15px;
height: 100%;
position: relative;
padding: 20px;
}
.watermark {
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%) rotate(-45deg);
font-size: 120px;
color: rgba(224, 247, 250, 0.3);
font-weight: bold;
z-index: 0;
white-space: nowrap;
}
.content {
position: relative;
z-index: 1;
}
.header {
text-align: center;
margin-bottom: 25px;
padding-bottom: 15px;
border-bottom: 2px solid #808080;
}
.company {
font-size: 22px;
font-weight: bold;
color: #808080;
letter-spacing: 2px;
margin-bottom: 8px;
}
.title {
font-size: 36px;
color: #1a1a1a;
margin-bottom: 8px;
font-weight: bold;
}
.subtitle {
font-size: 16px;
color: #808080;
font-style: italic;
}
.theory-banner {
background: linear-gradient(135deg, #e0f7fa, #ffffff);
border-left: 6px solid #808080;
padding: 20px;
margin: 25px 0;
border-radius: 8px;
}
.theory-text {
font-size: 18px;
font-weight: bold;
text-align: center;
color: #1a1a1a;
}
.section {
margin-bottom: 30px;
page-break-inside: avoid;
}
.section-title {
font-size: 22px;
color: #1a1a1a;
margin-bottom: 15px;
padding-bottom: 5px;
border-bottom: 2px solid #808080;
font-weight: bold;
}
.subsection-title {
font-size: 18px;
color: #808080;
margin: 20px 0 10px 0;
font-weight: bold;
}
.component-card {
background: white;
border: 2px solid #808080;
border-radius: 8px;
padding: 20px;
margin: 20px 0;
box-shadow: 0 2px 5px rgba(128, 128, 128, 0.1);
}
.component-header {
display: flex;
align-items: center;
justify-content: space-between;
margin-bottom: 15px;
padding-bottom: 10px;
border-bottom: 1px solid #e0e0e0;
}
.component-name {
font-size: 20px;
font-weight: bold;
color: #1a1a1a;
}
.license-badge {
display: inline-block;
background: linear-gradient(135deg, #e0f7fa, #ffffff);
border: 1px solid #808080;
border-radius: 20px;
padding: 5px 15px;
font-size: 12px;
}
.spec-table {
width: 100%;
border-collapse: collapse;
margin: 15px 0;
}
.spec-table th {
background: linear-gradient(135deg, #e0f7fa, #f0f0f0);
border: 1px solid #808080;
padding: 10px;
text-align: left;
font-weight: bold;
}
.spec-table td {
border: 1px solid #e0e0e0;
padding: 8px;
}
.hardware-grid {
display: grid;
grid-template-columns: repeat(2, 1fr);
gap: 20px;
margin: 20px 0;
}
.hardware-card {
background: linear-gradient(135deg, #f0f0f0, #ffffff);
border: 2px solid #808080;
border-radius: 8px;
padding: 15px;
}
.feature-list {
margin-left: 20px;
margin-top: 10px;
}
.feature-list li {
margin: 8px 0;
color: #1a1a1a;
}
.code-block {
background: #f5f5f5;
border: 1px solid #808080;
border-radius: 5px;
padding: 15px;
margin: 10px 0;
font-family: 'Courier New', monospace;
font-size: 14px;
overflow-x: auto;
white-space: pre;
}
.info-box {
background: linear-gradient(to bottom, #e0f7fa, white);
border: 2px solid #808080;
border-radius: 8px;
padding: 20px;
margin: 20px 0;
}
.warning-box {
background: #fff3cd;
border: 2px solid #856404;
border-radius: 8px;
padding: 20px;
margin: 20px 0;
color: #856404;
}
.footer {
text-align: center;
margin-top: 40px;
padding-top: 20px;
border-top: 2px solid #808080;
color: #808080;
font-style: italic;
}
@media print {
.document {
width: 100%;
max-width: 100%;
margin: 0;
}
.section {
page-break-inside: avoid;
}
}
</style>
</head>
<body>
<div class="document">
<div class="border">
<div class="watermark">OPEN SOURCE</div>
<div class="content">
<div class="header">
<div class="company">AUTOMATANEXUS LLC</div>
<div class="title">SmartCity Pulse</div>
<div class="subtitle">Open Source Components & Hardware Documentation</div>
</div>
<div class="theory-banner">
<div class="theory-text">
"Building on the Shoulders of Giants: Open Source Excellence"
</div>
</div>
<div class="info-box">
<h3 class="subsection-title">Open Source Commitment</h3>
<p>SmartCity Pulse leverages the power of open source software and hardware to create a robust, scalable urban intelligence platform. This document provides comprehensive attribution and documentation for all open source components used in the project.</p>
</div>
<div class="section">
<h2 class="section-title">Core Software Frameworks</h2>
<div class="component-card">
<div class="component-header">
<span class="component-name">Tauri Framework</span>
<span class="license-badge">MIT License</span>
</div>
<p style="margin-bottom: 15px;">Build smaller, faster, and more secure desktop applications with a web frontend.</p>
<table class="spec-table">
<thead>
<tr>
<th>Property</th>
<th>Value</th>
</tr>
</thead>
<tbody>
<tr>
<td>Version</td>
<td>1.5.0+</td>
</tr>
<tr>
<td>Website</td>
<td>https://tauri.app</td>
</tr>
<tr>
<td>Repository</td>
<td>https://github.com/tauri-apps/tauri</td>
</tr>
<tr>
<td>License</td>
<td>MIT or Apache 2.0</td>
</tr>
<tr>
<td>Use Case</td>
<td>Native desktop application framework</td>
</tr>
</tbody>
</table>
</div>
<div class="component-card">
<div class="component-header">
<span class="component-name">React</span>
<span class="license-badge">MIT License</span>
</div>
<p style="margin-bottom: 15px;">A JavaScript library for building user interfaces, maintained by Meta.</p>
<table class="spec-table">
<thead>
<tr>
<th>Property</th>
<th>Value</th>
</tr>
</thead>
<tbody>
<tr>
<td>Version</td>
<td>18.2.0</td>
</tr>
<tr>
<td>Website</td>
<td>https://react.dev</td>
</tr>
<tr>
<td>Repository</td>
<td>https://github.com/facebook/react</td>
</tr>
<tr>
<td>License</td>
<td>MIT</td>
</tr>
<tr>
<td>Use Case</td>
<td>Frontend UI framework</td>
</tr>
</tbody>
</table>
</div>
<div class="component-card">
<div class="component-header">
<span class="component-name">Node.js</span>
<span class="license-badge">MIT License</span>
</div>
<p style="margin-bottom: 15px;">JavaScript runtime built on Chrome's V8 JavaScript engine.</p>
<table class="spec-table">
<thead>
<tr>
<th>Property</th>
<th>Value</th>
</tr>
</thead>
<tbody>
<tr>
<td>Version</td>
<td>20.x LTS</td>
</tr>
<tr>
<td>Website</td>
<td>https://nodejs.org</td>
</tr>
<tr>
<td>Repository</td>
<td>https://github.com/nodejs/node</td>
</tr>
<tr>
<td>License</td>
<td>MIT</td>
</tr>
<tr>
<td>Use Case</td>
<td>Backend runtime and tooling</td>
</tr>
</tbody>
</table>
</div>
<div class="component-card">
<div class="component-header">
<span class="component-name">Rust</span>
<span class="license-badge">MIT/Apache 2.0</span>
</div>
<p style="margin-bottom: 15px;">A language empowering everyone to build reliable and efficient software.</p>
<table class="spec-table">
<thead>
<tr>
<th>Property</th>
<th>Value</th>
</tr>
</thead>
<tbody>
<tr>
<td>Version</td>
<td>Latest stable</td>
</tr>
<tr>
<td>Website</td>
<td>https://www.rust-lang.org</td>
</tr>
<tr>
<td>Repository</td>
<td>https://github.com/rust-lang/rust</td>
</tr>
<tr>
<td>License</td>
<td>MIT or Apache 2.0</td>
</tr>
<tr>
<td>Use Case</td>
<td>Backend services and Tauri backend</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="section">
<h2 class="section-title">Visualization & UI Libraries</h2>
<div class="component-card">
<div class="component-header">
<span class="component-name">Cesium</span>
<span class="license-badge">Apache 2.0</span>
</div>
<p style="margin-bottom: 15px;">An open platform for 3D geospatial visualization.</p>
<table class="spec-table">
<thead>
<tr>
<th>Property</th>
<th>Value</th>
</tr>
</thead>
<tbody>
<tr>
<td>Version</td>
<td>1.111.0</td>
</tr>
<tr>
<td>Website</td>
<td>https://cesium.com</td>
</tr>
<tr>
<td>Repository</td>
<td>https://github.com/CesiumGS/cesium</td>
</tr>
<tr>
<td>License</td>
<td>Apache 2.0</td>
</tr>
<tr>
<td>Use Case</td>
<td>3D city visualization and mapping</td>
</tr>
</tbody>
</table>
</div>
<div class="component-card">
<div class="component-header">
<span class="component-name">Recharts</span>
<span class="license-badge">MIT License</span>
</div>
<p style="margin-bottom: 15px;">A composable charting library built on React components.</p>
<table class="spec-table">
<thead>
<tr>
<th>Property</th>
<th>Value</th>
</tr>
</thead>
<tbody>
<tr>
<td>Version</td>
<td>2.8.0</td>
</tr>
<tr>
<td>Website</td>
<td>https://recharts.org</td>
</tr>
<tr>
<td>Repository</td>
<td>https://github.com/recharts/recharts</td>
</tr>
<tr>
<td>License</td>
<td>MIT</td>
</tr>
<tr>
<td>Use Case</td>
<td>Data visualization and charts</td>
</tr>
</tbody>
</table>
</div>
<div class="component-card">
<div class="component-header">
<span class="component-name">TypeScript</span>
<span class="license-badge">Apache 2.0</span>
</div>
<p style="margin-bottom: 15px;">TypeScript is a strongly typed programming language that builds on JavaScript.</p>
<table class="spec-table">
<thead>
<tr>
<th>Property</th>
<th>Value</th>
</tr>
</thead>
<tbody>
<tr>
<td>Version</td>
<td>5.0.0+</td>
</tr>
<tr>
<td>Website</td>
<td>https://www.typescriptlang.org</td>
</tr>
<tr>
<td>Repository</td>
<td>https://github.com/microsoft/TypeScript</td>
</tr>
<tr>
<td>License</td>
<td>Apache 2.0</td>
</tr>
<tr>
<td>Use Case</td>
<td>Type-safe JavaScript development</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="section">
<h2 class="section-title">Hardware Components</h2>
<div class="component-card">
<div class="component-header">
<span class="component-name">Raspberry Pi 5</span>
<span class="license-badge">Open Hardware</span>
</div>
<p style="margin-bottom: 15px;">High-performance single-board computer for edge computing.</p>
<div class="hardware-grid">
<div class="hardware-card">
<h4>Specifications</h4>
<ul class="feature-list">
<li>CPU: 2.4GHz quad-core ARM Cortex-A76</li>
<li>RAM: 4GB/8GB LPDDR4X</li>
<li>Storage: MicroSD + PCIe 2.0</li>
<li>GPIO: 40-pin header</li>
<li>Networking: Gigabit Ethernet, WiFi 5</li>
</ul>
</div>
<div class="hardware-card">
<h4>SmartCity Use Cases</h4>
<ul class="feature-list">
<li>Edge computing node</li>
<li>IoT gateway</li>
<li>Local AI inference</li>
<li>Sensor data collection</li>
<li>Real-time processing</li>
</ul>
</div>
</div>
<p style="margin-top: 15px;"><strong>Documentation:</strong> https://www.raspberrypi.com/documentation/</p>
</div>
<div class="component-card">
<div class="component-header">
<span class="component-name">Hailo-8 AI Processor</span>
<span class="license-badge">Proprietary Hardware</span>
</div>
<p style="margin-bottom: 15px;">Edge AI processor providing 26 TOPS for neural network inference.</p>
<table class="spec-table">
<thead>
<tr>
<th>Specification</th>
<th>Value</th>
</tr>
</thead>
<tbody>
<tr>
<td>Performance</td>
<td>26 TOPS @ INT8</td>
</tr>
<tr>
<td>Power Consumption</td>
<td>2.5W typical, 7W peak</td>
</tr>
<tr>
<td>Interface</td>
<td>PCIe Gen3 x4 / M.2 2280</td>
</tr>
<tr>
<td>Memory</td>
<td>Integrated 2GB DDR</td>
</tr>
<tr>
<td>SDK</td>
<td>HailoRT (Apache 2.0)</td>
</tr>
</tbody>
</table>
</div>
<div class="component-card">
<div class="component-header">
<span class="component-name">Sequent Microsystems Boards</span>
<span class="license-badge">Open Hardware</span>
</div>
<p style="margin-bottom: 15px;">Professional-grade I/O expansion boards for Raspberry Pi.</p>
<h4 class="subsection-title">MegaBAS (Building Automation)</h4>
<ul class="feature-list">
<li>8x Relay outputs (10A)</li>
<li>8x Universal inputs (0-10V/4-20mA/Digital)</li>
<li>8x 0-10V analog outputs</li>
<li>1-Wire and RS485 interfaces</li>
<li>GitHub: https://github.com/SequentMicrosystems/megabas-rpi</li>
</ul>
<h4 class="subsection-title">16-INPUTS Board</h4>
<ul class="feature-list">
<li>16x Universal analog/digital inputs</li>
<li>0-10V or 4-20mA configurable</li>
<li>24-bit ADC resolution</li>
<li>GitHub: https://github.com/SequentMicrosystems/16univin-rpi</li>
</ul>
<h4 class="subsection-title">16-RELAYS Board</h4>
<ul class="feature-list">
<li>16x SPDT relay outputs</li>
<li>LED status indicators</li>
<li>Optical isolation</li>
<li>GitHub: https://github.com/SequentMicrosystems/16relind-rpi</li>
</ul>
<h4 class="subsection-title">Software Support</h4>
<div class="code-block"># Python libraries (MIT License)
pip install SMmegabas
pip install SM16univin
pip install SM16relind
# Command-line tools
megabas -help
16univin -help
16relind -help</div>
</div>
<div class="component-card">
<div class="component-header">
<span class="component-name">Raspberry Pi High Quality Camera</span>
<span class="license-badge">Open Hardware</span>
</div>
<p style="margin-bottom: 15px;">Professional-grade camera module with Sony IMX477 sensor for high-resolution urban monitoring.</p>
<table class="spec-table">
<thead>
<tr>
<th>Feature</th>
<th>Specification</th>
</tr>
</thead>
<tbody>
<tr>
<td>Sensor</td>
<td>Sony IMX477 (12.3 megapixels)</td>
</tr>
<tr>
<td>Sensor Size</td>
<td>7.9mm diagonal (1/2.3")</td>
</tr>
<tr>
<td>Architecture</td>
<td>Back-illuminated (BSI)</td>
</tr>
<tr>
<td>Resolution</td>
<td>4056 × 3040 pixels</td>
</tr>
<tr>
<td>Pixel Size</td>
<td>1.55μm × 1.55μm</td>
</tr>
<tr>
<td>Video</td>
<td>1080p @ 50fps, 720p @ 180fps</td>
</tr>
<tr>
<td>Lens Mount</td>
<td>C/CS mount (adjustable back focus)</td>
</tr>
<tr>
<td>Interface</td>
<td>CSI-2 (MIPI)</td>
</tr>
</tbody>
</table>
<h4 class="subsection-title">SmartCity Applications</h4>
<ul class="feature-list">
<li>High-resolution traffic monitoring and vehicle identification</li>
<li>License plate recognition (with appropriate lens)</li>
<li>Crowd density analysis with AI</li>
<li>Infrastructure inspection and monitoring</li>
<li>Environmental monitoring (air quality visualization)</li>
<li>Public safety and security surveillance</li>
<li>Time-lapse construction monitoring</li>
</ul>
<h4 class="subsection-title">Python Integration Example</h4>
<div class="code-block">#!/usr/bin/env python3
from picamera2 import Picamera2
import numpy as np
import cv2
# Initialize camera
picam2 = Picamera2()
# Configure for high quality capture
camera_config = picam2.create_still_configuration(
main={"size": (4056, 3040)}, # Full resolution
lores={"size": (1920, 1080)}, # Preview/streaming
display="lores"
)
picam2.configure(camera_config)
# Set camera controls
picam2.set_controls({
"ExposureTime": 10000, # 10ms
"AnalogueGain": 1.0,
"ColourGains": (1.4, 1.5), # Red, Blue
"Sharpness": 1.2
})
# Start camera
picam2.start()
# Capture and process
while True:
# Get frame for AI processing
frame = picam2.capture_array("lores")
# Convert to OpenCV format
image = cv2.cvtColor(frame, cv2.COLOR_RGB2BGR)
# AI inference here (object detection, etc.)
# results = model.predict(image)
# Display or stream
cv2.imshow("SmartCity Monitor", image)
if cv2.waitKey(1) & 0xFF == ord('q'):
break
picam2.stop()
cv2.destroyAllWindows()</div>
<h4 class="subsection-title">Lens Options</h4>
<ul class="feature-list">
<li><strong>6mm Wide Angle:</strong> 63° FoV - Intersection monitoring</li>
<li><strong>16mm Telephoto:</strong> 24° FoV - License plate capture</li>
<li><strong>6-12mm Varifocal:</strong> Adjustable FoV - Versatile deployment</li>
<li><strong>25mm Telephoto:</strong> 15° FoV - Long-distance monitoring</li>
</ul>
<h4 class="subsection-title">Installation Commands</h4>
<div class="code-block"># Enable camera interface
sudo raspi-config nonint do_camera 0
# Install camera libraries
sudo apt update
sudo apt install -y python3-picamera2 python3-opencv
sudo apt install -y libcamera-apps libcamera-dev
# Install AI libraries for camera
pip3 install opencv-python numpy pillow
pip3 install tflite-runtime # For edge AI inference
# Test camera
libcamera-hello --list-cameras
libcamera-still -o test.jpg --width 4056 --height 3040</div>
</div>
<div class="component-card">
<div class="component-header">
<span class="component-name">Raspberry Pi Zero 2 W</span>
<span class="license-badge">Hardware Platform</span>
</div>
<p style="margin-bottom: 15px;">Compact wireless single-board computer for distributed camera nodes in SmartCity Pulse deployments.</p>
<table class="spec-table">
<thead>
<tr>
<th>Specification</th>
<th>Details</th>
</tr>
</thead>
<tbody>
<tr>
<td>SoC</td>
<td>Broadcom BCM2710A1 (RP3A0-AU)</td>
</tr>
<tr>
<td>CPU</td>
<td>Quad-core ARM Cortex-A53 @ 1GHz</td>
</tr>
<tr>
<td>RAM</td>
<td>512MB LPDDR2</td>
</tr>
<tr>
<td>Wireless</td>
<td>2.4GHz 802.11b/g/n WiFi, Bluetooth 4.2/BLE</td>
</tr>
<tr>
<td>GPIO</td>
<td>40-pin header (unpopulated)</td>
</tr>
<tr>
<td>Camera</td>
<td>CSI camera connector (supports HQ Camera)</td>
</tr>
<tr>
<td>Power</td>
<td>5V via micro USB, ~0.4A idle, ~1A under load</td>
</tr>
<tr>
<td>Size</td>
<td>65mm × 30mm × 13mm</td>
</tr>
</tbody>
</table>
<h4 class="subsection-title">SmartCity Camera Node Architecture</h4>
<div class="architecture-box">
<p><strong>Pi Zero 2 W + HQ Camera Configuration:</strong></p>
<ul class="feature-list">
<li>Distributed edge camera nodes throughout city infrastructure</li>
<li>Local image capture and pre-processing</li>
<li>WiFi connectivity to edge servers (RPi 5)</li>
<li>Low power consumption for solar/battery operation</li>
<li>Compact form factor for discrete installation</li>
</ul>
</div>
<h4 class="subsection-title">Camera Node Setup Script</h4>
<div class="code-block">#!/bin/bash
# SmartCity Pulse Camera Node Setup for Pi Zero 2 W
echo "Setting up Pi Zero 2 W as camera node..."
# Update system
sudo apt update && sudo apt upgrade -y
# Install minimal dependencies
sudo apt install -y python3-picamera2 python3-pip
sudo apt install -y libcamera-apps-lite python3-opencv
sudo apt install -y python3-zmq # For network streaming
# Create camera service
sudo tee /etc/systemd/system/smartcity-camera.service << EOF
[Unit]
Description=SmartCity Pulse Camera Node
After=network.target
[Service]
Type=simple
User=pi
WorkingDirectory=/home/pi/smartcity-camera
ExecStart=/usr/bin/python3 /home/pi/smartcity-camera/camera_node.py
Restart=always
RestartSec=10
[Install]
WantedBy=multi-user.target
EOF
# Enable service
sudo systemctl daemon-reload
sudo systemctl enable smartcity-camera.service</div>
<h4 class="subsection-title">Camera Node Python Script</h4>
<div class="code-block">#!/usr/bin/env python3
"""
SmartCity Pulse Camera Node for Pi Zero 2 W
Efficient streaming to edge server (RPi 5)
"""
import zmq
import numpy as np
import time
from picamera2 import Picamera2
import cv2
# Configuration
EDGE_SERVER = "192.168.1.100" # RPi 5 IP
STREAM_PORT = 5555
NODE_ID = "cam-node-001"
# Initialize camera for Pi Zero 2 W (optimized settings)
picam2 = Picamera2()
config = picam2.create_video_configuration(
main={"size": (1920, 1080)}, # Lower res for Zero 2 W
controls={
"FrameDurationLimits": (33333, 33333) # 30 FPS
}
)
picam2.configure(config)
# Setup ZMQ publisher
context = zmq.Context()
socket = context.socket(zmq.PUB)
socket.connect(f"tcp://{EDGE_SERVER}:{STREAM_PORT}")
print(f"Camera node {NODE_ID} starting...")
picam2.start()
try:
while True:
# Capture frame
frame = picam2.capture_array()
# Basic preprocessing on Zero 2 W
# Keep it light due to 512MB RAM limitation
frame_rgb = cv2.cvtColor(frame, cv2.COLOR_YUV420p2RGB)
# Compress for network transmission
_, buffer = cv2.imencode('.jpg', frame_rgb,
[cv2.IMWRITE_JPEG_QUALITY, 80])
# Send to edge server
message = {
"node_id": NODE_ID,
"timestamp": time.time(),
"frame": buffer.tobytes()
}
socket.send_pyobj(message)
# Status every 100 frames
if int(time.time()) % 10 == 0:
print(f"Node {NODE_ID} streaming...")
except KeyboardInterrupt:
print("Stopping camera node...")
finally:
picam2.stop()
socket.close()
context.term()</div>
<h4 class="subsection-title">Power Optimization for Battery/Solar</h4>
<div class="code-block"># Disable unnecessary services for power saving
sudo systemctl disable bluetooth
sudo systemctl disable avahi-daemon
sudo systemctl disable triggerhappy
# Disable HDMI to save ~25mA
sudo tvservice -o
# Configure CPU governor for power saving
echo "powersave" | sudo tee /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
# Disable activity LED
echo 0 | sudo tee /sys/class/leds/led0/brightness
# Enable WiFi power management
sudo iwconfig wlan0 power on</div>
<h4 class="subsection-title">Deployment Configurations</h4>
<ul class="feature-list">
<li><strong>Traffic Monitoring:</strong> Mount at intersections with 6mm lens</li>
<li><strong>Parking Management:</strong> Overhead mounting with wide-angle lens</li>
<li><strong>Security Surveillance:</strong> Weather-proof enclosure with IR illumination</li>
<li><strong>Environmental Monitoring:</strong> Solar-powered with air quality sensors</li>
<li><strong>Crowd Analysis:</strong> High-traffic areas with edge AI processing</li>
</ul>
<h4 class="subsection-title">Network Architecture</h4>