<?xml version="1.0" encoding="UTF-8"?> <rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"> <channel> <title>Escogitare</title> <description>Apps for iOS, Android and Windows. </description> <link>https://www.escogitare.com/</link> <atom:link href="https://www.escogitare.com/feed.xml" rel="self" type="application/rss+xml"/> <pubDate>Wed, 18 Sep 2024 09:39:55 +0200</pubDate> <lastBuildDate>Wed, 18 Sep 2024 09:39:55 +0200</lastBuildDate> <generator>Jekyll v4.3.3</generator> <item> <title>Raspberry Pi: i pin di GPIO</title> <description> &lt;table style=&quot;width: 60mm;&quot;&gt; &lt;colgroup&gt; &lt;col span=&quot;1&quot; style=&quot;width: 25mm;text-align: right;&quot; /&gt; &lt;col span=&quot;1&quot; style=&quot;width: 4mm;text-align: center;&quot; /&gt; &lt;col span=&quot;1&quot; style=&quot;width: 4mm;text-align: center;&quot; /&gt; &lt;col span=&quot;1&quot; style=&quot;width: 25mm;&quot; /&gt; &lt;/colgroup&gt; &lt;tbody&gt; &lt;tr&gt; &lt;td align=&quot;right&quot;&gt;1: 3.3 V&lt;/td&gt; &lt;td&gt; &lt;svg height=&quot;5mm&quot; viewBox=&quot;0 0 64 64&quot; width=&quot;5mm&quot; xmlns=&quot;http://www.w3.org/2000/svg&quot; xmlns:xlink=&quot;http://www.w3.org/1999/xlink&quot;&gt; &lt;radialGradient id=&quot;a&quot; cx=&quot;31.184135&quot; cy=&quot;30.640226&quot; gradientTransform=&quot;matrix(.96373938 .23569405 -.23756086 .97137266 8.409675 -6.472767)&quot; gradientUnits=&quot;userSpaceOnUse&quot; r=&quot;5&quot;&gt;&lt;stop offset=&quot;0&quot; stop-color=&quot;#ccc&quot; /&gt;&lt;stop offset=&quot;1&quot; stop-color=&quot;#ccc&quot; stop-opacity=&quot;0&quot; /&gt;&lt;/radialGradient&gt; &lt;path d=&quot;m0 0h64v64h-64z&quot; fill=&quot;#292929&quot; stroke-width=&quot;.826225&quot; /&gt; &lt;circle cx=&quot;32&quot; cy=&quot;32&quot; fill=&quot;#f2f2f2&quot; r=&quot;24&quot; stroke-width=&quot;1.40989&quot; /&gt; &lt;circle cx=&quot;32&quot; cy=&quot;32&quot; fill=&quot;url(#a)&quot; r=&quot;5&quot; stroke-width=&quot;.580602&quot; /&gt; &lt;/svg&gt; &lt;/td&gt; &lt;td&gt; &lt;svg height=&quot;5mm&quot; viewBox=&quot;0 0 64 64&quot; width=&quot;5mm&quot; xmlns=&quot;http://www.w3.org/2000/svg&quot; xmlns:xlink=&quot;http://www.w3.org/1999/xlink&quot;&gt; &lt;radialGradient id=&quot;a&quot; cx=&quot;31.184135&quot; cy=&quot;30.640226&quot; gradientTransform=&quot;matrix(.96373938 .23569405 -.23756086 .97137266 8.409675 -6.472767)&quot; gradientUnits=&quot;userSpaceOnUse&quot; r=&quot;5&quot;&gt;&lt;stop offset=&quot;0&quot; stop-color=&quot;#ccc&quot; /&gt;&lt;stop offset=&quot;1&quot; stop-color=&quot;#ccc&quot; stop-opacity=&quot;0&quot; /&gt;&lt;/radialGradient&gt; &lt;path d=&quot;m0 0h64v64h-64z&quot; fill=&quot;#292929&quot; stroke-width=&quot;.826225&quot; /&gt; &lt;circle cx=&quot;32&quot; cy=&quot;32&quot; fill=&quot;#f2f2f2&quot; r=&quot;24&quot; stroke-width=&quot;1.40989&quot; /&gt; &lt;circle cx=&quot;32&quot; cy=&quot;32&quot; fill=&quot;url(#a)&quot; r=&quot;5&quot; stroke-width=&quot;.580602&quot; /&gt; &lt;/svg&gt; &lt;/td&gt; &lt;td&gt;2: 5 V&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td align=&quot;right&quot;&gt;3: GPIO 2&lt;/td&gt; &lt;td&gt; &lt;svg height=&quot;5mm&quot; viewBox=&quot;0 0 64 64&quot; width=&quot;5mm&quot; xmlns=&quot;http://www.w3.org/2000/svg&quot; xmlns:xlink=&quot;http://www.w3.org/1999/xlink&quot;&gt; &lt;radialGradient id=&quot;a&quot; cx=&quot;31.184135&quot; cy=&quot;30.640226&quot; gradientTransform=&quot;matrix(.96373938 .23569405 -.23756086 .97137266 8.409675 -6.472767)&quot; gradientUnits=&quot;userSpaceOnUse&quot; r=&quot;5&quot;&gt;&lt;stop offset=&quot;0&quot; stop-color=&quot;#ccc&quot; /&gt;&lt;stop offset=&quot;1&quot; stop-color=&quot;#ccc&quot; stop-opacity=&quot;0&quot; /&gt;&lt;/radialGradient&gt; &lt;path d=&quot;m0 0h64v64h-64z&quot; fill=&quot;#292929&quot; stroke-width=&quot;.826225&quot; /&gt; &lt;circle cx=&quot;32&quot; cy=&quot;32&quot; fill=&quot;#f2f2f2&quot; r=&quot;24&quot; stroke-width=&quot;1.40989&quot; /&gt; &lt;circle cx=&quot;32&quot; cy=&quot;32&quot; fill=&quot;url(#a)&quot; r=&quot;5&quot; stroke-width=&quot;.580602&quot; /&gt; &lt;/svg&gt; &lt;/td&gt; &lt;td&gt; &lt;svg height=&quot;5mm&quot; viewBox=&quot;0 0 64 64&quot; width=&quot;5mm&quot; xmlns=&quot;http://www.w3.org/2000/svg&quot; xmlns:xlink=&quot;http://www.w3.org/1999/xlink&quot;&gt; &lt;radialGradient id=&quot;a&quot; cx=&quot;31.184135&quot; cy=&quot;30.640226&quot; gradientTransform=&quot;matrix(.96373938 .23569405 -.23756086 .97137266 8.409675 -6.472767)&quot; gradientUnits=&quot;userSpaceOnUse&quot; r=&quot;5&quot;&gt;&lt;stop offset=&quot;0&quot; stop-color=&quot;#ccc&quot; /&gt;&lt;stop offset=&quot;1&quot; stop-color=&quot;#ccc&quot; stop-opacity=&quot;0&quot; /&gt;&lt;/radialGradient&gt; &lt;path d=&quot;m0 0h64v64h-64z&quot; fill=&quot;#292929&quot; stroke-width=&quot;.826225&quot; /&gt; &lt;circle cx=&quot;32&quot; cy=&quot;32&quot; fill=&quot;#f2f2f2&quot; r=&quot;24&quot; stroke-width=&quot;1.40989&quot; /&gt; &lt;circle cx=&quot;32&quot; cy=&quot;32&quot; fill=&quot;url(#a)&quot; r=&quot;5&quot; stroke-width=&quot;.580602&quot; /&gt; &lt;/svg&gt; &lt;/td&gt; &lt;td&gt;4: 5 V&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td align=&quot;right&quot;&gt;5: GPIO 3&lt;/td&gt; &lt;td&gt; &lt;svg height=&quot;5mm&quot; viewBox=&quot;0 0 64 64&quot; width=&quot;5mm&quot; xmlns=&quot;http://www.w3.org/2000/svg&quot; xmlns:xlink=&quot;http://www.w3.org/1999/xlink&quot;&gt; &lt;radialGradient id=&quot;a&quot; cx=&quot;31.184135&quot; cy=&quot;30.640226&quot; gradientTransform=&quot;matrix(.96373938 .23569405 -.23756086 .97137266 8.409675 -6.472767)&quot; gradientUnits=&quot;userSpaceOnUse&quot; r=&quot;5&quot;&gt;&lt;stop offset=&quot;0&quot; stop-color=&quot;#ccc&quot; /&gt;&lt;stop offset=&quot;1&quot; stop-color=&quot;#ccc&quot; stop-opacity=&quot;0&quot; /&gt;&lt;/radialGradient&gt; &lt;path d=&quot;m0 0h64v64h-64z&quot; fill=&quot;#292929&quot; stroke-width=&quot;.826225&quot; /&gt; &lt;circle cx=&quot;32&quot; cy=&quot;32&quot; fill=&quot;#f2f2f2&quot; r=&quot;24&quot; stroke-width=&quot;1.40989&quot; /&gt; &lt;circle cx=&quot;32&quot; cy=&quot;32&quot; fill=&quot;url(#a)&quot; r=&quot;5&quot; stroke-width=&quot;.580602&quot; /&gt; &lt;/svg&gt; &lt;/td&gt; &lt;td&gt; &lt;svg height=&quot;5mm&quot; viewBox=&quot;0 0 64 64&quot; width=&quot;5mm&quot; xmlns=&quot;http://www.w3.org/2000/svg&quot; xmlns:xlink=&quot;http://www.w3.org/1999/xlink&quot;&gt; &lt;radialGradient id=&quot;a&quot; cx=&quot;31.184135&quot; cy=&quot;30.640226&quot; gradientTransform=&quot;matrix(.96373938 .23569405 -.23756086 .97137266 8.409675 -6.472767)&quot; gradientUnits=&quot;userSpaceOnUse&quot; r=&quot;5&quot;&gt;&lt;stop offset=&quot;0&quot; stop-color=&quot;#ccc&quot; /&gt;&lt;stop offset=&quot;1&quot; stop-color=&quot;#ccc&quot; stop-opacity=&quot;0&quot; /&gt;&lt;/radialGradient&gt; &lt;path d=&quot;m0 0h64v64h-64z&quot; fill=&quot;#292929&quot; stroke-width=&quot;.826225&quot; /&gt; &lt;circle cx=&quot;32&quot; cy=&quot;32&quot; fill=&quot;#f2f2f2&quot; r=&quot;24&quot; stroke-width=&quot;1.40989&quot; /&gt; &lt;circle cx=&quot;32&quot; cy=&quot;32&quot; fill=&quot;url(#a)&quot; r=&quot;5&quot; stroke-width=&quot;.580602&quot; /&gt; &lt;/svg&gt; &lt;/td&gt; &lt;td&gt;6: massa&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td align=&quot;right&quot;&gt;7: GPIO 4&lt;/td&gt; &lt;td&gt; &lt;svg height=&quot;5mm&quot; viewBox=&quot;0 0 64 64&quot; width=&quot;5mm&quot; xmlns=&quot;http://www.w3.org/2000/svg&quot; xmlns:xlink=&quot;http://www.w3.org/1999/xlink&quot;&gt; &lt;radialGradient id=&quot;a&quot; cx=&quot;31.184135&quot; cy=&quot;30.640226&quot; gradientTransform=&quot;matrix(.96373938 .23569405 -.23756086 .97137266 8.409675 -6.472767)&quot; gradientUnits=&quot;userSpaceOnUse&quot; r=&quot;5&quot;&gt;&lt;stop offset=&quot;0&quot; stop-color=&quot;#ccc&quot; /&gt;&lt;stop offset=&quot;1&quot; stop-color=&quot;#ccc&quot; stop-opacity=&quot;0&quot; /&gt;&lt;/radialGradient&gt; &lt;path d=&quot;m0 0h64v64h-64z&quot; fill=&quot;#292929&quot; stroke-width=&quot;.826225&quot; /&gt; &lt;circle cx=&quot;32&quot; cy=&quot;32&quot; fill=&quot;#f2f2f2&quot; r=&quot;24&quot; stroke-width=&quot;1.40989&quot; /&gt; &lt;circle cx=&quot;32&quot; cy=&quot;32&quot; fill=&quot;url(#a)&quot; r=&quot;5&quot; stroke-width=&quot;.580602&quot; /&gt; &lt;/svg&gt; &lt;/td&gt; &lt;td&gt; &lt;svg height=&quot;5mm&quot; viewBox=&quot;0 0 64 64&quot; width=&quot;5mm&quot; xmlns=&quot;http://www.w3.org/2000/svg&quot; xmlns:xlink=&quot;http://www.w3.org/1999/xlink&quot;&gt; &lt;radialGradient id=&quot;a&quot; cx=&quot;31.184135&quot; cy=&quot;30.640226&quot; gradientTransform=&quot;matrix(.96373938 .23569405 -.23756086 .97137266 8.409675 -6.472767)&quot; gradientUnits=&quot;userSpaceOnUse&quot; r=&quot;5&quot;&gt;&lt;stop offset=&quot;0&quot; stop-color=&quot;#ccc&quot; /&gt;&lt;stop offset=&quot;1&quot; stop-color=&quot;#ccc&quot; stop-opacity=&quot;0&quot; /&gt;&lt;/radialGradient&gt; &lt;path d=&quot;m0 0h64v64h-64z&quot; fill=&quot;#292929&quot; stroke-width=&quot;.826225&quot; /&gt; &lt;circle cx=&quot;32&quot; cy=&quot;32&quot; fill=&quot;#f2f2f2&quot; r=&quot;24&quot; stroke-width=&quot;1.40989&quot; /&gt; &lt;circle cx=&quot;32&quot; cy=&quot;32&quot; fill=&quot;url(#a)&quot; r=&quot;5&quot; stroke-width=&quot;.580602&quot; /&gt; &lt;/svg&gt; &lt;/td&gt; &lt;td&gt;8: UART trasmissione&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td align=&quot;right&quot;&gt;9: massa&lt;/td&gt; &lt;td&gt; &lt;svg height=&quot;5mm&quot; viewBox=&quot;0 0 64 64&quot; width=&quot;5mm&quot; xmlns=&quot;http://www.w3.org/2000/svg&quot; xmlns:xlink=&quot;http://www.w3.org/1999/xlink&quot;&gt; &lt;radialGradient id=&quot;a&quot; cx=&quot;31.184135&quot; cy=&quot;30.640226&quot; gradientTransform=&quot;matrix(.96373938 .23569405 -.23756086 .97137266 8.409675 -6.472767)&quot; gradientUnits=&quot;userSpaceOnUse&quot; r=&quot;5&quot;&gt;&lt;stop offset=&quot;0&quot; stop-color=&quot;#ccc&quot; /&gt;&lt;stop offset=&quot;1&quot; stop-color=&quot;#ccc&quot; stop-opacity=&quot;0&quot; /&gt;&lt;/radialGradient&gt; &lt;path d=&quot;m0 0h64v64h-64z&quot; fill=&quot;#292929&quot; stroke-width=&quot;.826225&quot; /&gt; &lt;circle cx=&quot;32&quot; cy=&quot;32&quot; fill=&quot;#f2f2f2&quot; r=&quot;24&quot; stroke-width=&quot;1.40989&quot; /&gt; &lt;circle cx=&quot;32&quot; cy=&quot;32&quot; fill=&quot;url(#a)&quot; r=&quot;5&quot; stroke-width=&quot;.580602&quot; /&gt; &lt;/svg&gt; &lt;/td&gt; &lt;td&gt; &lt;svg height=&quot;5mm&quot; viewBox=&quot;0 0 64 64&quot; width=&quot;5mm&quot; xmlns=&quot;http://www.w3.org/2000/svg&quot; xmlns:xlink=&quot;http://www.w3.org/1999/xlink&quot;&gt; &lt;radialGradient id=&quot;a&quot; cx=&quot;31.184135&quot; cy=&quot;30.640226&quot; gradientTransform=&quot;matrix(.96373938 .23569405 -.23756086 .97137266 8.409675 -6.472767)&quot; gradientUnits=&quot;userSpaceOnUse&quot; r=&quot;5&quot;&gt;&lt;stop offset=&quot;0&quot; stop-color=&quot;#ccc&quot; /&gt;&lt;stop offset=&quot;1&quot; stop-color=&quot;#ccc&quot; stop-opacity=&quot;0&quot; /&gt;&lt;/radialGradient&gt; &lt;path d=&quot;m0 0h64v64h-64z&quot; fill=&quot;#292929&quot; stroke-width=&quot;.826225&quot; /&gt; &lt;circle cx=&quot;32&quot; cy=&quot;32&quot; fill=&quot;#f2f2f2&quot; r=&quot;24&quot; stroke-width=&quot;1.40989&quot; /&gt; &lt;circle cx=&quot;32&quot; cy=&quot;32&quot; fill=&quot;url(#a)&quot; r=&quot;5&quot; stroke-width=&quot;.580602&quot; /&gt; &lt;/svg&gt; &lt;/td&gt; &lt;td&gt;10: UART ricezione&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td align=&quot;right&quot;&gt;11: GPIO 17&lt;/td&gt; &lt;td&gt; &lt;svg height=&quot;5mm&quot; viewBox=&quot;0 0 64 64&quot; width=&quot;5mm&quot; xmlns=&quot;http://www.w3.org/2000/svg&quot; xmlns:xlink=&quot;http://www.w3.org/1999/xlink&quot;&gt; &lt;radialGradient id=&quot;a&quot; cx=&quot;31.184135&quot; cy=&quot;30.640226&quot; gradientTransform=&quot;matrix(.96373938 .23569405 -.23756086 .97137266 8.409675 -6.472767)&quot; gradientUnits=&quot;userSpaceOnUse&quot; r=&quot;5&quot;&gt;&lt;stop offset=&quot;0&quot; stop-color=&quot;#ccc&quot; /&gt;&lt;stop offset=&quot;1&quot; stop-color=&quot;#ccc&quot; stop-opacity=&quot;0&quot; /&gt;&lt;/radialGradient&gt; &lt;path d=&quot;m0 0h64v64h-64z&quot; fill=&quot;#292929&quot; stroke-width=&quot;.826225&quot; /&gt; &lt;circle cx=&quot;32&quot; cy=&quot;32&quot; fill=&quot;#f2f2f2&quot; r=&quot;24&quot; stroke-width=&quot;1.40989&quot; /&gt; &lt;circle cx=&quot;32&quot; cy=&quot;32&quot; fill=&quot;url(#a)&quot; r=&quot;5&quot; stroke-width=&quot;.580602&quot; /&gt; &lt;/svg&gt; &lt;/td&gt; &lt;td&gt; &lt;svg height=&quot;5mm&quot; viewBox=&quot;0 0 64 64&quot; width=&quot;5mm&quot; xmlns=&quot;http://www.w3.org/2000/svg&quot; xmlns:xlink=&quot;http://www.w3.org/1999/xlink&quot;&gt; &lt;radialGradient id=&quot;a&quot; cx=&quot;31.184135&quot; cy=&quot;30.640226&quot; gradientTransform=&quot;matrix(.96373938 .23569405 -.23756086 .97137266 8.409675 -6.472767)&quot; gradientUnits=&quot;userSpaceOnUse&quot; r=&quot;5&quot;&gt;&lt;stop offset=&quot;0&quot; stop-color=&quot;#ccc&quot; /&gt;&lt;stop offset=&quot;1&quot; stop-color=&quot;#ccc&quot; stop-opacity=&quot;0&quot; /&gt;&lt;/radialGradient&gt; &lt;path d=&quot;m0 0h64v64h-64z&quot; fill=&quot;#292929&quot; stroke-width=&quot;.826225&quot; /&gt; &lt;circle cx=&quot;32&quot; cy=&quot;32&quot; fill=&quot;#f2f2f2&quot; r=&quot;24&quot; stroke-width=&quot;1.40989&quot; /&gt; &lt;circle cx=&quot;32&quot; cy=&quot;32&quot; fill=&quot;url(#a)&quot; r=&quot;5&quot; stroke-width=&quot;.580602&quot; /&gt; &lt;/svg&gt; &lt;/td&gt; &lt;td&gt;12: GPIO 18&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td align=&quot;right&quot;&gt;13: GPIO 27&lt;/td&gt; &lt;td&gt; &lt;svg height=&quot;5mm&quot; viewBox=&quot;0 0 64 64&quot; width=&quot;5mm&quot; xmlns=&quot;http://www.w3.org/2000/svg&quot; xmlns:xlink=&quot;http://www.w3.org/1999/xlink&quot;&gt; &lt;radialGradient id=&quot;a&quot; cx=&quot;31.184135&quot; cy=&quot;30.640226&quot; gradientTransform=&quot;matrix(.96373938 .23569405 -.23756086 .97137266 8.409675 -6.472767)&quot; gradientUnits=&quot;userSpaceOnUse&quot; r=&quot;5&quot;&gt;&lt;stop offset=&quot;0&quot; stop-color=&quot;#ccc&quot; /&gt;&lt;stop offset=&quot;1&quot; stop-color=&quot;#ccc&quot; stop-opacity=&quot;0&quot; /&gt;&lt;/radialGradient&gt; &lt;path d=&quot;m0 0h64v64h-64z&quot; fill=&quot;#292929&quot; stroke-width=&quot;.826225&quot; /&gt; &lt;circle cx=&quot;32&quot; cy=&quot;32&quot; fill=&quot;#f2f2f2&quot; r=&quot;24&quot; stroke-width=&quot;1.40989&quot; /&gt; &lt;circle cx=&quot;32&quot; cy=&quot;32&quot; fill=&quot;url(#a)&quot; r=&quot;5&quot; stroke-width=&quot;.580602&quot; /&gt; &lt;/svg&gt; &lt;/td&gt; &lt;td&gt; &lt;svg height=&quot;5mm&quot; viewBox=&quot;0 0 64 64&quot; width=&quot;5mm&quot; xmlns=&quot;http://www.w3.org/2000/svg&quot; xmlns:xlink=&quot;http://www.w3.org/1999/xlink&quot;&gt; &lt;radialGradient id=&quot;a&quot; cx=&quot;31.184135&quot; cy=&quot;30.640226&quot; gradientTransform=&quot;matrix(.96373938 .23569405 -.23756086 .97137266 8.409675 -6.472767)&quot; gradientUnits=&quot;userSpaceOnUse&quot; r=&quot;5&quot;&gt;&lt;stop offset=&quot;0&quot; stop-color=&quot;#ccc&quot; /&gt;&lt;stop offset=&quot;1&quot; stop-color=&quot;#ccc&quot; stop-opacity=&quot;0&quot; /&gt;&lt;/radialGradient&gt; &lt;path d=&quot;m0 0h64v64h-64z&quot; fill=&quot;#292929&quot; stroke-width=&quot;.826225&quot; /&gt; &lt;circle cx=&quot;32&quot; cy=&quot;32&quot; fill=&quot;#f2f2f2&quot; r=&quot;24&quot; stroke-width=&quot;1.40989&quot; /&gt; &lt;circle cx=&quot;32&quot; cy=&quot;32&quot; fill=&quot;url(#a)&quot; r=&quot;5&quot; stroke-width=&quot;.580602&quot; /&gt; &lt;/svg&gt; &lt;/td&gt; &lt;td&gt;14: massa&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td align=&quot;right&quot;&gt;15: GPIO 22&lt;/td&gt; &lt;td&gt; &lt;svg height=&quot;5mm&quot; viewBox=&quot;0 0 64 64&quot; width=&quot;5mm&quot; xmlns=&quot;http://www.w3.org/2000/svg&quot; xmlns:xlink=&quot;http://www.w3.org/1999/xlink&quot;&gt; &lt;radialGradient id=&quot;a&quot; cx=&quot;31.184135&quot; cy=&quot;30.640226&quot; gradientTransform=&quot;matrix(.96373938 .23569405 -.23756086 .97137266 8.409675 -6.472767)&quot; gradientUnits=&quot;userSpaceOnUse&quot; r=&quot;5&quot;&gt;&lt;stop offset=&quot;0&quot; stop-color=&quot;#ccc&quot; /&gt;&lt;stop offset=&quot;1&quot; stop-color=&quot;#ccc&quot; stop-opacity=&quot;0&quot; /&gt;&lt;/radialGradient&gt; &lt;path d=&quot;m0 0h64v64h-64z&quot; fill=&quot;#292929&quot; stroke-width=&quot;.826225&quot; /&gt; &lt;circle cx=&quot;32&quot; cy=&quot;32&quot; fill=&quot;#f2f2f2&quot; r=&quot;24&quot; stroke-width=&quot;1.40989&quot; /&gt; &lt;circle cx=&quot;32&quot; cy=&quot;32&quot; fill=&quot;url(#a)&quot; r=&quot;5&quot; stroke-width=&quot;.580602&quot; /&gt; &lt;/svg&gt; &lt;/td&gt; &lt;td&gt; &lt;svg height=&quot;5mm&quot; viewBox=&quot;0 0 64 64&quot; width=&quot;5mm&quot; xmlns=&quot;http://www.w3.org/2000/svg&quot; xmlns:xlink=&quot;http://www.w3.org/1999/xlink&quot;&gt; &lt;radialGradient id=&quot;a&quot; cx=&quot;31.184135&quot; cy=&quot;30.640226&quot; gradientTransform=&quot;matrix(.96373938 .23569405 -.23756086 .97137266 8.409675 -6.472767)&quot; gradientUnits=&quot;userSpaceOnUse&quot; r=&quot;5&quot;&gt;&lt;stop offset=&quot;0&quot; stop-color=&quot;#ccc&quot; /&gt;&lt;stop offset=&quot;1&quot; stop-color=&quot;#ccc&quot; stop-opacity=&quot;0&quot; /&gt;&lt;/radialGradient&gt; &lt;path d=&quot;m0 0h64v64h-64z&quot; fill=&quot;#292929&quot; stroke-width=&quot;.826225&quot; /&gt; &lt;circle cx=&quot;32&quot; cy=&quot;32&quot; fill=&quot;#f2f2f2&quot; r=&quot;24&quot; stroke-width=&quot;1.40989&quot; /&gt; &lt;circle cx=&quot;32&quot; cy=&quot;32&quot; fill=&quot;url(#a)&quot; r=&quot;5&quot; stroke-width=&quot;.580602&quot; /&gt; &lt;/svg&gt; &lt;/td&gt; &lt;td&gt;16: GPIO 23&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td align=&quot;right&quot;&gt;17: 3.3 V&lt;/td&gt; &lt;td&gt; &lt;svg height=&quot;5mm&quot; viewBox=&quot;0 0 64 64&quot; width=&quot;5mm&quot; xmlns=&quot;http://www.w3.org/2000/svg&quot; xmlns:xlink=&quot;http://www.w3.org/1999/xlink&quot;&gt; &lt;radialGradient id=&quot;a&quot; cx=&quot;31.184135&quot; cy=&quot;30.640226&quot; gradientTransform=&quot;matrix(.96373938 .23569405 -.23756086 .97137266 8.409675 -6.472767)&quot; gradientUnits=&quot;userSpaceOnUse&quot; r=&quot;5&quot;&gt;&lt;stop offset=&quot;0&quot; stop-color=&quot;#ccc&quot; /&gt;&lt;stop offset=&quot;1&quot; stop-color=&quot;#ccc&quot; stop-opacity=&quot;0&quot; /&gt;&lt;/radialGradient&gt; &lt;path d=&quot;m0 0h64v64h-64z&quot; fill=&quot;#292929&quot; stroke-width=&quot;.826225&quot; /&gt; &lt;circle cx=&quot;32&quot; cy=&quot;32&quot; fill=&quot;#f2f2f2&quot; r=&quot;24&quot; stroke-width=&quot;1.40989&quot; /&gt; &lt;circle cx=&quot;32&quot; cy=&quot;32&quot; fill=&quot;url(#a)&quot; r=&quot;5&quot; stroke-width=&quot;.580602&quot; /&gt; &lt;/svg&gt; &lt;/td&gt; &lt;td&gt; &lt;svg height=&quot;5mm&quot; viewBox=&quot;0 0 64 64&quot; width=&quot;5mm&quot; xmlns=&quot;http://www.w3.org/2000/svg&quot; xmlns:xlink=&quot;http://www.w3.org/1999/xlink&quot;&gt; &lt;radialGradient id=&quot;a&quot; cx=&quot;31.184135&quot; cy=&quot;30.640226&quot; gradientTransform=&quot;matrix(.96373938 .23569405 -.23756086 .97137266 8.409675 -6.472767)&quot; gradientUnits=&quot;userSpaceOnUse&quot; r=&quot;5&quot;&gt;&lt;stop offset=&quot;0&quot; stop-color=&quot;#ccc&quot; /&gt;&lt;stop offset=&quot;1&quot; stop-color=&quot;#ccc&quot; stop-opacity=&quot;0&quot; /&gt;&lt;/radialGradient&gt; &lt;path d=&quot;m0 0h64v64h-64z&quot; fill=&quot;#292929&quot; stroke-width=&quot;.826225&quot; /&gt; &lt;circle cx=&quot;32&quot; cy=&quot;32&quot; fill=&quot;#f2f2f2&quot; r=&quot;24&quot; stroke-width=&quot;1.40989&quot; /&gt; &lt;circle cx=&quot;32&quot; cy=&quot;32&quot; fill=&quot;url(#a)&quot; r=&quot;5&quot; stroke-width=&quot;.580602&quot; /&gt; &lt;/svg&gt; &lt;/td&gt; &lt;td&gt;18: GPIO 24&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td align=&quot;right&quot;&gt;19: GPIO 10&lt;/td&gt; &lt;td&gt; &lt;svg height=&quot;5mm&quot; viewBox=&quot;0 0 64 64&quot; width=&quot;5mm&quot; xmlns=&quot;http://www.w3.org/2000/svg&quot; xmlns:xlink=&quot;http://www.w3.org/1999/xlink&quot;&gt; &lt;radialGradient id=&quot;a&quot; cx=&quot;31.184135&quot; cy=&quot;30.640226&quot; gradientTransform=&quot;matrix(.96373938 .23569405 -.23756086 .97137266 8.409675 -6.472767)&quot; gradientUnits=&quot;userSpaceOnUse&quot; r=&quot;5&quot;&gt;&lt;stop offset=&quot;0&quot; stop-color=&quot;#ccc&quot; /&gt;&lt;stop offset=&quot;1&quot; stop-color=&quot;#ccc&quot; stop-opacity=&quot;0&quot; /&gt;&lt;/radialGradient&gt; &lt;path d=&quot;m0 0h64v64h-64z&quot; fill=&quot;#292929&quot; stroke-width=&quot;.826225&quot; /&gt; &lt;circle cx=&quot;32&quot; cy=&quot;32&quot; fill=&quot;#f2f2f2&quot; r=&quot;24&quot; stroke-width=&quot;1.40989&quot; /&gt; &lt;circle cx=&quot;32&quot; cy=&quot;32&quot; fill=&quot;url(#a)&quot; r=&quot;5&quot; stroke-width=&quot;.580602&quot; /&gt; &lt;/svg&gt; &lt;/td&gt; &lt;td&gt; &lt;svg height=&quot;5mm&quot; viewBox=&quot;0 0 64 64&quot; width=&quot;5mm&quot; xmlns=&quot;http://www.w3.org/2000/svg&quot; xmlns:xlink=&quot;http://www.w3.org/1999/xlink&quot;&gt; &lt;radialGradient id=&quot;a&quot; cx=&quot;31.184135&quot; cy=&quot;30.640226&quot; gradientTransform=&quot;matrix(.96373938 .23569405 -.23756086 .97137266 8.409675 -6.472767)&quot; gradientUnits=&quot;userSpaceOnUse&quot; r=&quot;5&quot;&gt;&lt;stop offset=&quot;0&quot; stop-color=&quot;#ccc&quot; /&gt;&lt;stop offset=&quot;1&quot; stop-color=&quot;#ccc&quot; stop-opacity=&quot;0&quot; /&gt;&lt;/radialGradient&gt; &lt;path d=&quot;m0 0h64v64h-64z&quot; fill=&quot;#292929&quot; stroke-width=&quot;.826225&quot; /&gt; &lt;circle cx=&quot;32&quot; cy=&quot;32&quot; fill=&quot;#f2f2f2&quot; r=&quot;24&quot; stroke-width=&quot;1.40989&quot; /&gt; &lt;circle cx=&quot;32&quot; cy=&quot;32&quot; fill=&quot;url(#a)&quot; r=&quot;5&quot; stroke-width=&quot;.580602&quot; /&gt; &lt;/svg&gt; &lt;/td&gt; &lt;td&gt;20: massa&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td align=&quot;right&quot;&gt;21: GPIO 9&lt;/td&gt; &lt;td&gt; &lt;svg height=&quot;5mm&quot; viewBox=&quot;0 0 64 64&quot; width=&quot;5mm&quot; xmlns=&quot;http://www.w3.org/2000/svg&quot; xmlns:xlink=&quot;http://www.w3.org/1999/xlink&quot;&gt; &lt;radialGradient id=&quot;a&quot; cx=&quot;31.184135&quot; cy=&quot;30.640226&quot; gradientTransform=&quot;matrix(.96373938 .23569405 -.23756086 .97137266 8.409675 -6.472767)&quot; gradientUnits=&quot;userSpaceOnUse&quot; r=&quot;5&quot;&gt;&lt;stop offset=&quot;0&quot; stop-color=&quot;#ccc&quot; /&gt;&lt;stop offset=&quot;1&quot; stop-color=&quot;#ccc&quot; stop-opacity=&quot;0&quot; /&gt;&lt;/radialGradient&gt; &lt;path d=&quot;m0 0h64v64h-64z&quot; fill=&quot;#292929&quot; stroke-width=&quot;.826225&quot; /&gt; &lt;circle cx=&quot;32&quot; cy=&quot;32&quot; fill=&quot;#f2f2f2&quot; r=&quot;24&quot; stroke-width=&quot;1.40989&quot; /&gt; &lt;circle cx=&quot;32&quot; cy=&quot;32&quot; fill=&quot;url(#a)&quot; r=&quot;5&quot; stroke-width=&quot;.580602&quot; /&gt; &lt;/svg&gt; &lt;/td&gt; &lt;td&gt; &lt;svg height=&quot;5mm&quot; viewBox=&quot;0 0 64 64&quot; width=&quot;5mm&quot; xmlns=&quot;http://www.w3.org/2000/svg&quot; xmlns:xlink=&quot;http://www.w3.org/1999/xlink&quot;&gt; &lt;radialGradient id=&quot;a&quot; cx=&quot;31.184135&quot; cy=&quot;30.640226&quot; gradientTransform=&quot;matrix(.96373938 .23569405 -.23756086 .97137266 8.409675 -6.472767)&quot; gradientUnits=&quot;userSpaceOnUse&quot; r=&quot;5&quot;&gt;&lt;stop offset=&quot;0&quot; stop-color=&quot;#ccc&quot; /&gt;&lt;stop offset=&quot;1&quot; stop-color=&quot;#ccc&quot; stop-opacity=&quot;0&quot; /&gt;&lt;/radialGradient&gt; &lt;path d=&quot;m0 0h64v64h-64z&quot; fill=&quot;#292929&quot; stroke-width=&quot;.826225&quot; /&gt; &lt;circle cx=&quot;32&quot; cy=&quot;32&quot; fill=&quot;#f2f2f2&quot; r=&quot;24&quot; stroke-width=&quot;1.40989&quot; /&gt; &lt;circle cx=&quot;32&quot; cy=&quot;32&quot; fill=&quot;url(#a)&quot; r=&quot;5&quot; stroke-width=&quot;.580602&quot; /&gt; &lt;/svg&gt; &lt;/td&gt; &lt;td&gt;22: GPIO 25&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td align=&quot;right&quot;&gt;23: GPIO 11&lt;/td&gt; &lt;td&gt; &lt;svg height=&quot;5mm&quot; viewBox=&quot;0 0 64 64&quot; width=&quot;5mm&quot; xmlns=&quot;http://www.w3.org/2000/svg&quot; xmlns:xlink=&quot;http://www.w3.org/1999/xlink&quot;&gt; &lt;radialGradient id=&quot;a&quot; cx=&quot;31.184135&quot; cy=&quot;30.640226&quot; gradientTransform=&quot;matrix(.96373938 .23569405 -.23756086 .97137266 8.409675 -6.472767)&quot; gradientUnits=&quot;userSpaceOnUse&quot; r=&quot;5&quot;&gt;&lt;stop offset=&quot;0&quot; stop-color=&quot;#ccc&quot; /&gt;&lt;stop offset=&quot;1&quot; stop-color=&quot;#ccc&quot; stop-opacity=&quot;0&quot; /&gt;&lt;/radialGradient&gt; &lt;path d=&quot;m0 0h64v64h-64z&quot; fill=&quot;#292929&quot; stroke-width=&quot;.826225&quot; /&gt; &lt;circle cx=&quot;32&quot; cy=&quot;32&quot; fill=&quot;#f2f2f2&quot; r=&quot;24&quot; stroke-width=&quot;1.40989&quot; /&gt; &lt;circle cx=&quot;32&quot; cy=&quot;32&quot; fill=&quot;url(#a)&quot; r=&quot;5&quot; stroke-width=&quot;.580602&quot; /&gt; &lt;/svg&gt; &lt;/td&gt; &lt;td&gt; &lt;svg height=&quot;5mm&quot; viewBox=&quot;0 0 64 64&quot; width=&quot;5mm&quot; xmlns=&quot;http://www.w3.org/2000/svg&quot; xmlns:xlink=&quot;http://www.w3.org/1999/xlink&quot;&gt; &lt;radialGradient id=&quot;a&quot; cx=&quot;31.184135&quot; cy=&quot;30.640226&quot; gradientTransform=&quot;matrix(.96373938 .23569405 -.23756086 .97137266 8.409675 -6.472767)&quot; gradientUnits=&quot;userSpaceOnUse&quot; r=&quot;5&quot;&gt;&lt;stop offset=&quot;0&quot; stop-color=&quot;#ccc&quot; /&gt;&lt;stop offset=&quot;1&quot; stop-color=&quot;#ccc&quot; stop-opacity=&quot;0&quot; /&gt;&lt;/radialGradient&gt; &lt;path d=&quot;m0 0h64v64h-64z&quot; fill=&quot;#292929&quot; stroke-width=&quot;.826225&quot; /&gt; &lt;circle cx=&quot;32&quot; cy=&quot;32&quot; fill=&quot;#f2f2f2&quot; r=&quot;24&quot; stroke-width=&quot;1.40989&quot; /&gt; &lt;circle cx=&quot;32&quot; cy=&quot;32&quot; fill=&quot;url(#a)&quot; r=&quot;5&quot; stroke-width=&quot;.580602&quot; /&gt; &lt;/svg&gt; &lt;/td&gt; &lt;td&gt;24: GPIO 8&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td align=&quot;right&quot;&gt;25: massa&lt;/td&gt; &lt;td&gt; &lt;svg height=&quot;5mm&quot; viewBox=&quot;0 0 64 64&quot; width=&quot;5mm&quot; xmlns=&quot;http://www.w3.org/2000/svg&quot; xmlns:xlink=&quot;http://www.w3.org/1999/xlink&quot;&gt; &lt;radialGradient id=&quot;a&quot; cx=&quot;31.184135&quot; cy=&quot;30.640226&quot; gradientTransform=&quot;matrix(.96373938 .23569405 -.23756086 .97137266 8.409675 -6.472767)&quot; gradientUnits=&quot;userSpaceOnUse&quot; r=&quot;5&quot;&gt;&lt;stop offset=&quot;0&quot; stop-color=&quot;#ccc&quot; /&gt;&lt;stop offset=&quot;1&quot; stop-color=&quot;#ccc&quot; stop-opacity=&quot;0&quot; /&gt;&lt;/radialGradient&gt; &lt;path d=&quot;m0 0h64v64h-64z&quot; fill=&quot;#292929&quot; stroke-width=&quot;.826225&quot; /&gt; &lt;circle cx=&quot;32&quot; cy=&quot;32&quot; fill=&quot;#f2f2f2&quot; r=&quot;24&quot; stroke-width=&quot;1.40989&quot; /&gt; &lt;circle cx=&quot;32&quot; cy=&quot;32&quot; fill=&quot;url(#a)&quot; r=&quot;5&quot; stroke-width=&quot;.580602&quot; /&gt; &lt;/svg&gt; &lt;/td&gt; &lt;td&gt; &lt;svg height=&quot;5mm&quot; viewBox=&quot;0 0 64 64&quot; width=&quot;5mm&quot; xmlns=&quot;http://www.w3.org/2000/svg&quot; xmlns:xlink=&quot;http://www.w3.org/1999/xlink&quot;&gt; &lt;radialGradient id=&quot;a&quot; cx=&quot;31.184135&quot; cy=&quot;30.640226&quot; gradientTransform=&quot;matrix(.96373938 .23569405 -.23756086 .97137266 8.409675 -6.472767)&quot; gradientUnits=&quot;userSpaceOnUse&quot; r=&quot;5&quot;&gt;&lt;stop offset=&quot;0&quot; stop-color=&quot;#ccc&quot; /&gt;&lt;stop offset=&quot;1&quot; stop-color=&quot;#ccc&quot; stop-opacity=&quot;0&quot; /&gt;&lt;/radialGradient&gt; &lt;path d=&quot;m0 0h64v64h-64z&quot; fill=&quot;#292929&quot; stroke-width=&quot;.826225&quot; /&gt; &lt;circle cx=&quot;32&quot; cy=&quot;32&quot; fill=&quot;#f2f2f2&quot; r=&quot;24&quot; stroke-width=&quot;1.40989&quot; /&gt; &lt;circle cx=&quot;32&quot; cy=&quot;32&quot; fill=&quot;url(#a)&quot; r=&quot;5&quot; stroke-width=&quot;.580602&quot; /&gt; &lt;/svg&gt; &lt;/td&gt; &lt;td&gt;26: GPIO 7&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td align=&quot;right&quot;&gt;27: riservato&lt;/td&gt; &lt;td&gt; &lt;svg height=&quot;5mm&quot; viewBox=&quot;0 0 64 64&quot; width=&quot;5mm&quot; xmlns=&quot;http://www.w3.org/2000/svg&quot; xmlns:xlink=&quot;http://www.w3.org/1999/xlink&quot;&gt; &lt;radialGradient id=&quot;a&quot; cx=&quot;31.184135&quot; cy=&quot;30.640226&quot; gradientTransform=&quot;matrix(.96373938 .23569405 -.23756086 .97137266 8.409675 -6.472767)&quot; gradientUnits=&quot;userSpaceOnUse&quot; r=&quot;5&quot;&gt;&lt;stop offset=&quot;0&quot; stop-color=&quot;#ccc&quot; /&gt;&lt;stop offset=&quot;1&quot; stop-color=&quot;#ccc&quot; stop-opacity=&quot;0&quot; /&gt;&lt;/radialGradient&gt; &lt;path d=&quot;m0 0h64v64h-64z&quot; fill=&quot;#292929&quot; stroke-width=&quot;.826225&quot; /&gt; &lt;circle cx=&quot;32&quot; cy=&quot;32&quot; fill=&quot;#f2f2f2&quot; r=&quot;24&quot; stroke-width=&quot;1.40989&quot; /&gt; &lt;circle cx=&quot;32&quot; cy=&quot;32&quot; fill=&quot;url(#a)&quot; r=&quot;5&quot; stroke-width=&quot;.580602&quot; /&gt; &lt;/svg&gt; &lt;/td&gt; &lt;td&gt; &lt;svg height=&quot;5mm&quot; viewBox=&quot;0 0 64 64&quot; width=&quot;5mm&quot; xmlns=&quot;http://www.w3.org/2000/svg&quot; xmlns:xlink=&quot;http://www.w3.org/1999/xlink&quot;&gt; &lt;radialGradient id=&quot;a&quot; cx=&quot;31.184135&quot; cy=&quot;30.640226&quot; gradientTransform=&quot;matrix(.96373938 .23569405 -.23756086 .97137266 8.409675 -6.472767)&quot; gradientUnits=&quot;userSpaceOnUse&quot; r=&quot;5&quot;&gt;&lt;stop offset=&quot;0&quot; stop-color=&quot;#ccc&quot; /&gt;&lt;stop offset=&quot;1&quot; stop-color=&quot;#ccc&quot; stop-opacity=&quot;0&quot; /&gt;&lt;/radialGradient&gt; &lt;path d=&quot;m0 0h64v64h-64z&quot; fill=&quot;#292929&quot; stroke-width=&quot;.826225&quot; /&gt; &lt;circle cx=&quot;32&quot; cy=&quot;32&quot; fill=&quot;#f2f2f2&quot; r=&quot;24&quot; stroke-width=&quot;1.40989&quot; /&gt; &lt;circle cx=&quot;32&quot; cy=&quot;32&quot; fill=&quot;url(#a)&quot; r=&quot;5&quot; stroke-width=&quot;.580602&quot; /&gt; &lt;/svg&gt; &lt;/td&gt; &lt;td&gt;28: riservato&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td align=&quot;right&quot;&gt;29: GPIO 5&lt;/td&gt; &lt;td&gt; &lt;svg height=&quot;5mm&quot; viewBox=&quot;0 0 64 64&quot; width=&quot;5mm&quot; xmlns=&quot;http://www.w3.org/2000/svg&quot; xmlns:xlink=&quot;http://www.w3.org/1999/xlink&quot;&gt; &lt;radialGradient id=&quot;a&quot; cx=&quot;31.184135&quot; cy=&quot;30.640226&quot; gradientTransform=&quot;matrix(.96373938 .23569405 -.23756086 .97137266 8.409675 -6.472767)&quot; gradientUnits=&quot;userSpaceOnUse&quot; r=&quot;5&quot;&gt;&lt;stop offset=&quot;0&quot; stop-color=&quot;#ccc&quot; /&gt;&lt;stop offset=&quot;1&quot; stop-color=&quot;#ccc&quot; stop-opacity=&quot;0&quot; /&gt;&lt;/radialGradient&gt; &lt;path d=&quot;m0 0h64v64h-64z&quot; fill=&quot;#292929&quot; stroke-width=&quot;.826225&quot; /&gt; &lt;circle cx=&quot;32&quot; cy=&quot;32&quot; fill=&quot;#f2f2f2&quot; r=&quot;24&quot; stroke-width=&quot;1.40989&quot; /&gt; &lt;circle cx=&quot;32&quot; cy=&quot;32&quot; fill=&quot;url(#a)&quot; r=&quot;5&quot; stroke-width=&quot;.580602&quot; /&gt; &lt;/svg&gt; &lt;/td&gt; &lt;td&gt; &lt;svg height=&quot;5mm&quot; viewBox=&quot;0 0 64 64&quot; width=&quot;5mm&quot; xmlns=&quot;http://www.w3.org/2000/svg&quot; xmlns:xlink=&quot;http://www.w3.org/1999/xlink&quot;&gt; &lt;radialGradient id=&quot;a&quot; cx=&quot;31.184135&quot; cy=&quot;30.640226&quot; gradientTransform=&quot;matrix(.96373938 .23569405 -.23756086 .97137266 8.409675 -6.472767)&quot; gradientUnits=&quot;userSpaceOnUse&quot; r=&quot;5&quot;&gt;&lt;stop offset=&quot;0&quot; stop-color=&quot;#ccc&quot; /&gt;&lt;stop offset=&quot;1&quot; stop-color=&quot;#ccc&quot; stop-opacity=&quot;0&quot; /&gt;&lt;/radialGradient&gt; &lt;path d=&quot;m0 0h64v64h-64z&quot; fill=&quot;#292929&quot; stroke-width=&quot;.826225&quot; /&gt; &lt;circle cx=&quot;32&quot; cy=&quot;32&quot; fill=&quot;#f2f2f2&quot; r=&quot;24&quot; stroke-width=&quot;1.40989&quot; /&gt; &lt;circle cx=&quot;32&quot; cy=&quot;32&quot; fill=&quot;url(#a)&quot; r=&quot;5&quot; stroke-width=&quot;.580602&quot; /&gt; &lt;/svg&gt; &lt;/td&gt; &lt;td&gt;30: massa&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td align=&quot;right&quot;&gt;31: GPIO 6&lt;/td&gt; &lt;td&gt; &lt;svg height=&quot;5mm&quot; viewBox=&quot;0 0 64 64&quot; width=&quot;5mm&quot; xmlns=&quot;http://www.w3.org/2000/svg&quot; xmlns:xlink=&quot;http://www.w3.org/1999/xlink&quot;&gt; &lt;radialGradient id=&quot;a&quot; cx=&quot;31.184135&quot; cy=&quot;30.640226&quot; gradientTransform=&quot;matrix(.96373938 .23569405 -.23756086 .97137266 8.409675 -6.472767)&quot; gradientUnits=&quot;userSpaceOnUse&quot; r=&quot;5&quot;&gt;&lt;stop offset=&quot;0&quot; stop-color=&quot;#ccc&quot; /&gt;&lt;stop offset=&quot;1&quot; stop-color=&quot;#ccc&quot; stop-opacity=&quot;0&quot; /&gt;&lt;/radialGradient&gt; &lt;path d=&quot;m0 0h64v64h-64z&quot; fill=&quot;#292929&quot; stroke-width=&quot;.826225&quot; /&gt; &lt;circle cx=&quot;32&quot; cy=&quot;32&quot; fill=&quot;#f2f2f2&quot; r=&quot;24&quot; stroke-width=&quot;1.40989&quot; /&gt; &lt;circle cx=&quot;32&quot; cy=&quot;32&quot; fill=&quot;url(#a)&quot; r=&quot;5&quot; stroke-width=&quot;.580602&quot; /&gt; &lt;/svg&gt; &lt;/td&gt; &lt;td&gt; &lt;svg height=&quot;5mm&quot; viewBox=&quot;0 0 64 64&quot; width=&quot;5mm&quot; xmlns=&quot;http://www.w3.org/2000/svg&quot; xmlns:xlink=&quot;http://www.w3.org/1999/xlink&quot;&gt; &lt;radialGradient id=&quot;a&quot; cx=&quot;31.184135&quot; cy=&quot;30.640226&quot; gradientTransform=&quot;matrix(.96373938 .23569405 -.23756086 .97137266 8.409675 -6.472767)&quot; gradientUnits=&quot;userSpaceOnUse&quot; r=&quot;5&quot;&gt;&lt;stop offset=&quot;0&quot; stop-color=&quot;#ccc&quot; /&gt;&lt;stop offset=&quot;1&quot; stop-color=&quot;#ccc&quot; stop-opacity=&quot;0&quot; /&gt;&lt;/radialGradient&gt; &lt;path d=&quot;m0 0h64v64h-64z&quot; fill=&quot;#292929&quot; stroke-width=&quot;.826225&quot; /&gt; &lt;circle cx=&quot;32&quot; cy=&quot;32&quot; fill=&quot;#f2f2f2&quot; r=&quot;24&quot; stroke-width=&quot;1.40989&quot; /&gt; &lt;circle cx=&quot;32&quot; cy=&quot;32&quot; fill=&quot;url(#a)&quot; r=&quot;5&quot; stroke-width=&quot;.580602&quot; /&gt; &lt;/svg&gt; &lt;/td&gt; &lt;td&gt;32: GPIO 12&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td align=&quot;right&quot;&gt;33: GPIO 13&lt;/td&gt; &lt;td&gt; &lt;svg height=&quot;5mm&quot; viewBox=&quot;0 0 64 64&quot; width=&quot;5mm&quot; xmlns=&quot;http://www.w3.org/2000/svg&quot; xmlns:xlink=&quot;http://www.w3.org/1999/xlink&quot;&gt; &lt;radialGradient id=&quot;a&quot; cx=&quot;31.184135&quot; cy=&quot;30.640226&quot; gradientTransform=&quot;matrix(.96373938 .23569405 -.23756086 .97137266 8.409675 -6.472767)&quot; gradientUnits=&quot;userSpaceOnUse&quot; r=&quot;5&quot;&gt;&lt;stop offset=&quot;0&quot; stop-color=&quot;#ccc&quot; /&gt;&lt;stop offset=&quot;1&quot; stop-color=&quot;#ccc&quot; stop-opacity=&quot;0&quot; /&gt;&lt;/radialGradient&gt; &lt;path d=&quot;m0 0h64v64h-64z&quot; fill=&quot;#292929&quot; stroke-width=&quot;.826225&quot; /&gt; &lt;circle cx=&quot;32&quot; cy=&quot;32&quot; fill=&quot;#f2f2f2&quot; r=&quot;24&quot; stroke-width=&quot;1.40989&quot; /&gt; &lt;circle cx=&quot;32&quot; cy=&quot;32&quot; fill=&quot;url(#a)&quot; r=&quot;5&quot; stroke-width=&quot;.580602&quot; /&gt; &lt;/svg&gt; &lt;/td&gt; &lt;td&gt; &lt;svg height=&quot;5mm&quot; viewBox=&quot;0 0 64 64&quot; width=&quot;5mm&quot; xmlns=&quot;http://www.w3.org/2000/svg&quot; xmlns:xlink=&quot;http://www.w3.org/1999/xlink&quot;&gt; &lt;radialGradient id=&quot;a&quot; cx=&quot;31.184135&quot; cy=&quot;30.640226&quot; gradientTransform=&quot;matrix(.96373938 .23569405 -.23756086 .97137266 8.409675 -6.472767)&quot; gradientUnits=&quot;userSpaceOnUse&quot; r=&quot;5&quot;&gt;&lt;stop offset=&quot;0&quot; stop-color=&quot;#ccc&quot; /&gt;&lt;stop offset=&quot;1&quot; stop-color=&quot;#ccc&quot; stop-opacity=&quot;0&quot; /&gt;&lt;/radialGradient&gt; &lt;path d=&quot;m0 0h64v64h-64z&quot; fill=&quot;#292929&quot; stroke-width=&quot;.826225&quot; /&gt; &lt;circle cx=&quot;32&quot; cy=&quot;32&quot; fill=&quot;#f2f2f2&quot; r=&quot;24&quot; stroke-width=&quot;1.40989&quot; /&gt; &lt;circle cx=&quot;32&quot; cy=&quot;32&quot; fill=&quot;url(#a)&quot; r=&quot;5&quot; stroke-width=&quot;.580602&quot; /&gt; &lt;/svg&gt; &lt;/td&gt; &lt;td&gt;34: massa&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td align=&quot;right&quot;&gt;35: GPIO 19&lt;/td&gt; &lt;td&gt; &lt;svg height=&quot;5mm&quot; viewBox=&quot;0 0 64 64&quot; width=&quot;5mm&quot; xmlns=&quot;http://www.w3.org/2000/svg&quot; xmlns:xlink=&quot;http://www.w3.org/1999/xlink&quot;&gt; &lt;radialGradient id=&quot;a&quot; cx=&quot;31.184135&quot; cy=&quot;30.640226&quot; gradientTransform=&quot;matrix(.96373938 .23569405 -.23756086 .97137266 8.409675 -6.472767)&quot; gradientUnits=&quot;userSpaceOnUse&quot; r=&quot;5&quot;&gt;&lt;stop offset=&quot;0&quot; stop-color=&quot;#ccc&quot; /&gt;&lt;stop offset=&quot;1&quot; stop-color=&quot;#ccc&quot; stop-opacity=&quot;0&quot; /&gt;&lt;/radialGradient&gt; &lt;path d=&quot;m0 0h64v64h-64z&quot; fill=&quot;#292929&quot; stroke-width=&quot;.826225&quot; /&gt; &lt;circle cx=&quot;32&quot; cy=&quot;32&quot; fill=&quot;#f2f2f2&quot; r=&quot;24&quot; stroke-width=&quot;1.40989&quot; /&gt; &lt;circle cx=&quot;32&quot; cy=&quot;32&quot; fill=&quot;url(#a)&quot; r=&quot;5&quot; stroke-width=&quot;.580602&quot; /&gt; &lt;/svg&gt; &lt;/td&gt; &lt;td&gt; &lt;svg height=&quot;5mm&quot; viewBox=&quot;0 0 64 64&quot; width=&quot;5mm&quot; xmlns=&quot;http://www.w3.org/2000/svg&quot; xmlns:xlink=&quot;http://www.w3.org/1999/xlink&quot;&gt; &lt;radialGradient id=&quot;a&quot; cx=&quot;31.184135&quot; cy=&quot;30.640226&quot; gradientTransform=&quot;matrix(.96373938 .23569405 -.23756086 .97137266 8.409675 -6.472767)&quot; gradientUnits=&quot;userSpaceOnUse&quot; r=&quot;5&quot;&gt;&lt;stop offset=&quot;0&quot; stop-color=&quot;#ccc&quot; /&gt;&lt;stop offset=&quot;1&quot; stop-color=&quot;#ccc&quot; stop-opacity=&quot;0&quot; /&gt;&lt;/radialGradient&gt; &lt;path d=&quot;m0 0h64v64h-64z&quot; fill=&quot;#292929&quot; stroke-width=&quot;.826225&quot; /&gt; &lt;circle cx=&quot;32&quot; cy=&quot;32&quot; fill=&quot;#f2f2f2&quot; r=&quot;24&quot; stroke-width=&quot;1.40989&quot; /&gt; &lt;circle cx=&quot;32&quot; cy=&quot;32&quot; fill=&quot;url(#a)&quot; r=&quot;5&quot; stroke-width=&quot;.580602&quot; /&gt; &lt;/svg&gt; &lt;/td&gt; &lt;td&gt;36: GPIO 16&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td align=&quot;right&quot;&gt;37: GPIO 26&lt;/td&gt; &lt;td&gt; &lt;svg height=&quot;5mm&quot; viewBox=&quot;0 0 64 64&quot; width=&quot;5mm&quot; xmlns=&quot;http://www.w3.org/2000/svg&quot; xmlns:xlink=&quot;http://www.w3.org/1999/xlink&quot;&gt; &lt;radialGradient id=&quot;a&quot; cx=&quot;31.184135&quot; cy=&quot;30.640226&quot; gradientTransform=&quot;matrix(.96373938 .23569405 -.23756086 .97137266 8.409675 -6.472767)&quot; gradientUnits=&quot;userSpaceOnUse&quot; r=&quot;5&quot;&gt;&lt;stop offset=&quot;0&quot; stop-color=&quot;#ccc&quot; /&gt;&lt;stop offset=&quot;1&quot; stop-color=&quot;#ccc&quot; stop-opacity=&quot;0&quot; /&gt;&lt;/radialGradient&gt; &lt;path d=&quot;m0 0h64v64h-64z&quot; fill=&quot;#292929&quot; stroke-width=&quot;.826225&quot; /&gt; &lt;circle cx=&quot;32&quot; cy=&quot;32&quot; fill=&quot;#f2f2f2&quot; r=&quot;24&quot; stroke-width=&quot;1.40989&quot; /&gt; &lt;circle cx=&quot;32&quot; cy=&quot;32&quot; fill=&quot;url(#a)&quot; r=&quot;5&quot; stroke-width=&quot;.580602&quot; /&gt; &lt;/svg&gt; &lt;/td&gt; &lt;td&gt; &lt;svg height=&quot;5mm&quot; viewBox=&quot;0 0 64 64&quot; width=&quot;5mm&quot; xmlns=&quot;http://www.w3.org/2000/svg&quot; xmlns:xlink=&quot;http://www.w3.org/1999/xlink&quot;&gt; &lt;radialGradient id=&quot;a&quot; cx=&quot;31.184135&quot; cy=&quot;30.640226&quot; gradientTransform=&quot;matrix(.96373938 .23569405 -.23756086 .97137266 8.409675 -6.472767)&quot; gradientUnits=&quot;userSpaceOnUse&quot; r=&quot;5&quot;&gt;&lt;stop offset=&quot;0&quot; stop-color=&quot;#ccc&quot; /&gt;&lt;stop offset=&quot;1&quot; stop-color=&quot;#ccc&quot; stop-opacity=&quot;0&quot; /&gt;&lt;/radialGradient&gt; &lt;path d=&quot;m0 0h64v64h-64z&quot; fill=&quot;#292929&quot; stroke-width=&quot;.826225&quot; /&gt; &lt;circle cx=&quot;32&quot; cy=&quot;32&quot; fill=&quot;#f2f2f2&quot; r=&quot;24&quot; stroke-width=&quot;1.40989&quot; /&gt; &lt;circle cx=&quot;32&quot; cy=&quot;32&quot; fill=&quot;url(#a)&quot; r=&quot;5&quot; stroke-width=&quot;.580602&quot; /&gt; &lt;/svg&gt; &lt;/td&gt; &lt;td&gt;38: GPIO 20&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td align=&quot;right&quot;&gt;39: massa&lt;/td&gt; &lt;td&gt; &lt;svg height=&quot;5mm&quot; viewBox=&quot;0 0 64 64&quot; width=&quot;5mm&quot; xmlns=&quot;http://www.w3.org/2000/svg&quot; xmlns:xlink=&quot;http://www.w3.org/1999/xlink&quot;&gt; &lt;radialGradient id=&quot;a&quot; cx=&quot;31.184135&quot; cy=&quot;30.640226&quot; gradientTransform=&quot;matrix(.96373938 .23569405 -.23756086 .97137266 8.409675 -6.472767)&quot; gradientUnits=&quot;userSpaceOnUse&quot; r=&quot;5&quot;&gt;&lt;stop offset=&quot;0&quot; stop-color=&quot;#ccc&quot; /&gt;&lt;stop offset=&quot;1&quot; stop-color=&quot;#ccc&quot; stop-opacity=&quot;0&quot; /&gt;&lt;/radialGradient&gt; &lt;path d=&quot;m0 0h64v64h-64z&quot; fill=&quot;#292929&quot; stroke-width=&quot;.826225&quot; /&gt; &lt;circle cx=&quot;32&quot; cy=&quot;32&quot; fill=&quot;#f2f2f2&quot; r=&quot;24&quot; stroke-width=&quot;1.40989&quot; /&gt; &lt;circle cx=&quot;32&quot; cy=&quot;32&quot; fill=&quot;url(#a)&quot; r=&quot;5&quot; stroke-width=&quot;.580602&quot; /&gt; &lt;/svg&gt; &lt;/td&gt; &lt;td&gt; &lt;svg height=&quot;5mm&quot; viewBox=&quot;0 0 64 64&quot; width=&quot;5mm&quot; xmlns=&quot;http://www.w3.org/2000/svg&quot; xmlns:xlink=&quot;http://www.w3.org/1999/xlink&quot;&gt; &lt;radialGradient id=&quot;a&quot; cx=&quot;31.184135&quot; cy=&quot;30.640226&quot; gradientTransform=&quot;matrix(.96373938 .23569405 -.23756086 .97137266 8.409675 -6.472767)&quot; gradientUnits=&quot;userSpaceOnUse&quot; r=&quot;5&quot;&gt;&lt;stop offset=&quot;0&quot; stop-color=&quot;#ccc&quot; /&gt;&lt;stop offset=&quot;1&quot; stop-color=&quot;#ccc&quot; stop-opacity=&quot;0&quot; /&gt;&lt;/radialGradient&gt; &lt;path d=&quot;m0 0h64v64h-64z&quot; fill=&quot;#292929&quot; stroke-width=&quot;.826225&quot; /&gt; &lt;circle cx=&quot;32&quot; cy=&quot;32&quot; fill=&quot;#f2f2f2&quot; r=&quot;24&quot; stroke-width=&quot;1.40989&quot; /&gt; &lt;circle cx=&quot;32&quot; cy=&quot;32&quot; fill=&quot;url(#a)&quot; r=&quot;5&quot; stroke-width=&quot;.580602&quot; /&gt; &lt;/svg&gt; &lt;/td&gt; &lt;td&gt;40: GPIO 21&lt;/td&gt; &lt;/tr&gt; &lt;/tbody&gt; &lt;/table&gt; &lt;h2 id=&quot;riferimenti&quot;&gt;Riferimenti&lt;/h2&gt; &lt;ul&gt; &lt;li&gt;Raspberry Pi 4 Model B Datasheet: &lt;a href=&quot;https://datasheets.raspberrypi.com/rpi4/raspberry-pi-4-datasheet.pdf&quot;&gt;datasheets.raspberrypi.com/rpi4/raspberry-pi-4-datasheet.pdf&lt;/a&gt;&lt;/li&gt; &lt;/ul&gt; </description> <pubDate>Sun, 02 Jul 2023 14:00:00 +0200</pubDate> <link>https://www.escogitare.com/blog/it/raspberry_pi_pins</link> <guid isPermaLink="true">https://www.escogitare.com/blog/it/raspberry_pi_pins</guid> <category>RaspberryPi</category> </item> <item> <title>Scattare foto con Picamera 2 e Raspberry PI usando le coroutine in Python</title> <description>&lt;p&gt;Usare la libreria Picamera2 e &lt;em&gt;Camera Module 3&lt;/em&gt; è uno dei tanti modi per scattare foto co Raspberry PI. Il modo più semplice per usarla da programma è in Python, usando la libreria Picamera2. Una volta installato il modulo si può provare il codice proposto dalla documentazione ufficiale (&lt;a href=&quot;https://datasheets.raspberrypi.com/camera/picamera2-manual.pdf&quot;&gt;The Picamera 2 Manual&lt;/a&gt;, cap 2.3):&lt;/p&gt; &lt;figure class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-python&quot; data-lang=&quot;python&quot;&gt;&lt;span class=&quot;kn&quot;&gt;from&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;picamera2&lt;/span&gt; &lt;span class=&quot;kn&quot;&gt;import&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;Picamera2&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;Preview&lt;/span&gt; &lt;span class=&quot;kn&quot;&gt;import&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;time&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;picam2&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;nc&quot;&gt;Picamera2&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;()&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;camera_config&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;picam2&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;create_preview_configuration&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;()&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;picam2&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;configure&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;camera_config&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;picam2&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;start_preview&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;Preview&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;QTGL&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;picam2&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;start&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;()&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;time&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;sleep&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;2&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;picam2&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;capture_file&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;test.jpg&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt; &lt;p&gt;Questo programma avvia una finestra di preview, quindi in una board Raspberry Pi 4 headless (senza monitor e tastiera) può essere semplificato:&lt;/p&gt; &lt;figure class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-python&quot; data-lang=&quot;python&quot;&gt;&lt;span class=&quot;kn&quot;&gt;from&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;picamera2&lt;/span&gt; &lt;span class=&quot;kn&quot;&gt;import&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;Picamera2&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;cam&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;nc&quot;&gt;Picamera2&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;()&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;cam&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;start&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;()&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;cam&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;capture_file&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;test_1.jpg&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt; &lt;p&gt;Se il programma è complesso e le elaborazioni sulle foto richiedono tempo, si può trarre vantaggio dall’esecuzione concorrente sui core del processore della scheda Raspberry. Python offre la libreria asyncio (&lt;a href=&quot;https://docs.python.org/3/library/asyncio.html&quot;&gt;Asynchronous I/O&lt;/a&gt;) che permette l’uso della sintassi &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;async/await&lt;/code&gt;.&lt;/p&gt; &lt;p&gt;Quando il programma deve svolgere un compito gravoso, lo lancia in parallelo, aspettando la fine dell’esecuzione solo quando avrà bisogno dei risultati, come in figura:&lt;/p&gt; &lt;svg height=&quot;5.636862in&quot; style=&quot;color-interpolation-filters:sRGB;fill:none;fill-rule:evenodd;font-size:10;stroke-linecap:square;stroke-miterlimit:3;display: block; margin: 0 auto&quot; viewBox=&quot;0 0 321.50258 405.85467&quot; width=&quot;4.465313in&quot; xmlns=&quot;http://www.w3.org/2000/svg&quot; xmlns:xlink=&quot;http://www.w3.org/1999/xlink&quot;&gt;&lt;marker id=&quot;a&quot; fill=&quot;#5592c9&quot; markerUnits=&quot;strokeWidth&quot; orient=&quot;auto&quot; overflow=&quot;visible&quot; refX=&quot;-12.08&quot; stroke=&quot;#5592c9&quot; stroke-width=&quot;.165563&quot;&gt;&lt;path d=&quot;m2 1-2-1 2-1z&quot; stroke=&quot;none&quot; transform=&quot;scale(-6.04)&quot; /&gt;&lt;/marker&gt;&lt;g transform=&quot;translate(99.46161 -753.765023)&quot;&gt;&lt;rect fill=&quot;#ac4201&quot; height=&quot;34.015701&quot; rx=&quot;8.50394&quot; stroke=&quot;#fff&quot; stroke-linecap=&quot;round&quot; stroke-linejoin=&quot;round&quot; stroke-width=&quot;.5&quot; width=&quot;113.386&quot; y=&quot;807.87402&quot; /&gt;&lt;text fill=&quot;#fff&quot; font-family=&quot;Helvetica, Arial, sans-serif&quot; font-size=&quot;0.70001em&quot; x=&quot;22.43&quot; y=&quot;828.47998&quot;&gt;picam2.start()&lt;/text&gt;&lt;/g&gt;&lt;g transform=&quot;translate(199.80861 -597.860023)&quot;&gt;&lt;rect fill=&quot;#ac4201&quot; height=&quot;34.015701&quot; rx=&quot;8.50394&quot; stroke=&quot;#fff&quot; stroke-linecap=&quot;round&quot; stroke-linejoin=&quot;round&quot; stroke-width=&quot;.5&quot; width=&quot;113.386&quot; y=&quot;807.87402&quot; /&gt;&lt;text fill=&quot;#fff&quot; font-family=&quot;Helvetica, Arial, sans-serif&quot; font-size=&quot;0.70001em&quot; x=&quot;4.4&quot; y=&quot;828.47998&quot;&gt;picam2.capture_file()&lt;/text&gt;&lt;/g&gt;&lt;g transform=&quot;translate(.24961 -569.513023)&quot;&gt;&lt;rect fill=&quot;#73ae42&quot; height=&quot;34.015701&quot; rx=&quot;8.50394&quot; stroke=&quot;#fff&quot; stroke-linecap=&quot;round&quot; stroke-linejoin=&quot;round&quot; stroke-width=&quot;.5&quot; width=&quot;113.386&quot; y=&quot;807.87402&quot; /&gt;&lt;text fill=&quot;#fff&quot; font-family=&quot;Helvetica, Arial, sans-serif&quot; font-size=&quot;0.70001em&quot; x=&quot;22.52&quot; y=&quot;828.47998&quot;&gt;altro codice ...&lt;/text&gt;&lt;/g&gt;&lt;g stroke-linecap=&quot;round&quot; stroke-linejoin=&quot;round&quot; stroke-width=&quot;.5&quot;&gt;&lt;path d=&quot;m120.72161 125.919997h70.866096v17.0079h-70.866096z&quot; fill=&quot;#4271c6&quot; stroke=&quot;#fff&quot; /&gt;&lt;path d=&quot;m120.72161 343.242997h70.866096v17.0079h-70.866096z&quot; fill=&quot;#4271c6&quot; stroke=&quot;#fff&quot; /&gt;&lt;path d=&quot;m7.09 841.89v31.76&quot; marker-end=&quot;url(#a)&quot; stroke=&quot;#5592c9&quot; transform=&quot;translate(149.06761 -753.765023)&quot; /&gt;&lt;path d=&quot;m0 841.89v33.57h-81.5v55.82&quot; marker-end=&quot;url(#a)&quot; stroke=&quot;#5592c9&quot; transform=&quot;translate(138.43761 -698.962023)&quot; /&gt;&lt;path d=&quot;m0 841.89v30.79h82.63v30.26&quot; marker-end=&quot;url(#a)&quot; stroke=&quot;#5592c9&quot; transform=&quot;translate(173.87161 -698.962023)&quot; /&gt;&lt;path d=&quot;m0 841.89v45.85h81.5v18.98&quot; marker-end=&quot;url(#a)&quot; stroke=&quot;#5592c9&quot; transform=&quot;translate(56.94161 -569.513023)&quot; /&gt;&lt;path d=&quot;m7.09 841.89v16.64&quot; marker-end=&quot;url(#a)&quot; stroke=&quot;#5592c9&quot; transform=&quot;translate(249.41461 -597.860023)&quot; /&gt;&lt;/g&gt;&lt;g transform=&quot;translate(99.46161 -807.624023)&quot;&gt;&lt;rect fill=&quot;#73ae42&quot; height=&quot;34.015701&quot; rx=&quot;8.50394&quot; stroke=&quot;#fff&quot; stroke-linecap=&quot;round&quot; stroke-linejoin=&quot;round&quot; stroke-width=&quot;.5&quot; width=&quot;113.386&quot; y=&quot;807.87402&quot; /&gt;&lt;text fill=&quot;#fff&quot; font-family=&quot;Helvetica, Arial, sans-serif&quot; font-size=&quot;0.70001em&quot; x=&quot;22.52&quot; y=&quot;828.47998&quot;&gt;codice ...&lt;/text&gt;&lt;/g&gt;&lt;path d=&quot;m7.09 841.89v13.8&quot; marker-end=&quot;url(#a)&quot; stroke=&quot;#5592c9&quot; stroke-linecap=&quot;round&quot; stroke-linejoin=&quot;round&quot; stroke-width=&quot;.5&quot; transform=&quot;translate(149.06761 -807.624023)&quot; /&gt;&lt;g transform=&quot;translate(191.74861 -541.167023)&quot;&gt;&lt;rect fill=&quot;#73ae42&quot; height=&quot;34.015701&quot; rx=&quot;8.50394&quot; stroke=&quot;#fff&quot; stroke-linecap=&quot;round&quot; stroke-linejoin=&quot;round&quot; stroke-width=&quot;.5&quot; width=&quot;129.504&quot; y=&quot;807.87402&quot; /&gt;&lt;text fill=&quot;#fff&quot; font-family=&quot;Helvetica, Arial, sans-serif&quot; font-size=&quot;0.70001em&quot; x=&quot;8.520001&quot; y=&quot;828.47998&quot;&gt;elaborazione ...&lt;/text&gt;&lt;/g&gt;&lt;g transform=&quot;translate(99.46161 -436.285023)&quot;&gt;&lt;rect fill=&quot;#73ae42&quot; height=&quot;34.015701&quot; rx=&quot;8.50394&quot; stroke=&quot;#fff&quot; stroke-linecap=&quot;round&quot; stroke-linejoin=&quot;round&quot; stroke-width=&quot;.5&quot; width=&quot;113.386&quot; y=&quot;807.87402&quot; /&gt;&lt;text fill=&quot;#fff&quot; font-family=&quot;Helvetica, Arial, sans-serif&quot; font-size=&quot;0.70001em&quot; x=&quot;22.52&quot; y=&quot;828.47998&quot;&gt;ancora codice ...&lt;/text&gt;&lt;/g&gt;&lt;path d=&quot;m0 841.89v18h-82.63v18.48&quot; marker-end=&quot;url(#a)&quot; stroke=&quot;#5592c9&quot; stroke-linecap=&quot;round&quot; stroke-linejoin=&quot;round&quot; stroke-width=&quot;.5&quot; transform=&quot;translate(256.50061 -541.167023)&quot; /&gt;&lt;path d=&quot;m7.09 843.31v5.3&quot; marker-end=&quot;url(#a)&quot; stroke=&quot;#5592c9&quot; stroke-linecap=&quot;round&quot; stroke-linejoin=&quot;round&quot; stroke-width=&quot;.5&quot; transform=&quot;translate(149.06761 -483.057023)&quot; /&gt;&lt;/svg&gt; &lt;p&gt;Nell’esempio seguente, uso solo le api di avvio e sincronizzazione delle &lt;a href=&quot;https://docs.python.org/3/library/asyncio-task.html&quot;&gt;coroutines&lt;/a&gt;: le funzioni concorrenti vengono dichiarate come async e vengono lanciate in parallelo con &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;asyncio.create_task()&lt;/code&gt;. Questo metodo restituisce un oggetto &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;Task&lt;/code&gt;, che poi può essere usato per una sincronizzazione successiva usando il comando &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;await&lt;/code&gt;:&lt;/p&gt; &lt;figure class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-python&quot; data-lang=&quot;python&quot;&gt;&lt;span class=&quot;c1&quot;&gt;#!/usr/bin/python3 &lt;/span&gt;&lt;span class=&quot;kn&quot;&gt;import&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;asyncio&lt;/span&gt; &lt;span class=&quot;kn&quot;&gt;from&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;picamera2&lt;/span&gt; &lt;span class=&quot;kn&quot;&gt;import&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;Picamera2&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;async&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;def&lt;/span&gt; &lt;span class=&quot;nf&quot;&gt;shot&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;camera&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;):&lt;/span&gt; &lt;span class=&quot;c1&quot;&gt;# … some more code … &lt;/span&gt; &lt;span class=&quot;n&quot;&gt;camera&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;capture_file&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;test_2.jpg&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;c1&quot;&gt;# … some more code … &lt;/span&gt; &lt;span class=&quot;k&quot;&gt;async&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;def&lt;/span&gt; &lt;span class=&quot;nf&quot;&gt;main&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;():&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;cam&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;nc&quot;&gt;Picamera2&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;()&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;cam&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;start&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;()&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;task1&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;asyncio&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;create_task&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;shot&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;cam&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;))&lt;/span&gt; &lt;span class=&quot;c1&quot;&gt;# … some more code … &lt;/span&gt; &lt;span class=&quot;k&quot;&gt;await&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;task1&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;asyncio&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;run&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;main&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;())&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt; &lt;h2 id=&quot;riferimenti&quot;&gt;Riferimenti&lt;/h2&gt; &lt;ul&gt; &lt;li&gt;The Picamera 2 Manual: &lt;a href=&quot;https://datasheets.raspberrypi.com/camera/picamera2-manual.pdf&quot;&gt;datasheets.raspberrypi.com/camera/picamera2-manual.pdf&lt;/a&gt;&lt;/li&gt; &lt;li&gt;Raspberry Pi Camera Module 3 : &lt;a href=&quot;https://datasheets.raspberrypi.com/camera/camera-module-3-product-brief.pdf&quot;&gt;datasheets.raspberrypi.com/camera/camera-module-3-product-brief.pdf&lt;/a&gt;&lt;/li&gt; &lt;li&gt;Raspberry Pi 4 Model B Datasheet: &lt;a href=&quot;https://datasheets.raspberrypi.com/rpi4/raspberry-pi-4-datasheet.pdf&quot;&gt;datasheets.raspberrypi.com/rpi4/raspberry-pi-4-datasheet.pdf&lt;/a&gt;&lt;/li&gt; &lt;li&gt;Python asyncio, Asynchronous I/O: &lt;a href=&quot;https://docs.python.org/3/library/asyncio.html&quot;&gt;docs.python.org/3/library/asyncio.html&lt;/a&gt;&lt;/li&gt; &lt;/ul&gt; </description> <pubDate>Mon, 27 Feb 2023 13:00:00 +0100</pubDate> <link>https://www.escogitare.com/blog/it/concurrent_camera_shots_on_raspberry</link> <guid isPermaLink="true">https://www.escogitare.com/blog/it/concurrent_camera_shots_on_raspberry</guid> <category>RaspberryPi</category> </item> <item> <title>Prendre des photos avec Picamera 2 et Raspberry Pi à l&apos;aide de coroutines en Python</title> <description>&lt;p&gt;L’utilisation de Picamera2 et du &lt;em&gt;Camera Module 3&lt;/em&gt; est l’une des nombreuses façons de prendre des photos avec Raspberry PI. Une fois installé le module hardware, vous pouvez essayer le code proposé par la documentation officielle (&lt;a href=&quot;https://datasheets.raspberrypi.com/camera/picamera2-manual.pdf&quot;&gt;The Picamera 2 Manual&lt;/a&gt;, cap 2.3) :&lt;/p&gt; &lt;figure class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-python&quot; data-lang=&quot;python&quot;&gt;&lt;span class=&quot;kn&quot;&gt;from&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;picamera2&lt;/span&gt; &lt;span class=&quot;kn&quot;&gt;import&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;Picamera2&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;Preview&lt;/span&gt; &lt;span class=&quot;kn&quot;&gt;import&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;time&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;picam2&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;nc&quot;&gt;Picamera2&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;()&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;camera_config&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;picam2&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;create_preview_configuration&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;()&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;picam2&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;configure&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;camera_config&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;picam2&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;start_preview&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;Preview&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;QTGL&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;picam2&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;start&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;()&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;time&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;sleep&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;2&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;picam2&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;capture_file&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;test.jpg&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt; &lt;p&gt;Ce programme lance une fenêtre de prévisualisation, donc dans une carte Raspberry Pi 4 headless (sans écran ni clavier) cela peut être simplifié :&lt;/p&gt; &lt;figure class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-python&quot; data-lang=&quot;python&quot;&gt;&lt;span class=&quot;kn&quot;&gt;from&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;picamera2&lt;/span&gt; &lt;span class=&quot;kn&quot;&gt;import&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;Picamera2&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;cam&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;nc&quot;&gt;Picamera2&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;()&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;cam&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;start&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;()&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;cam&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;capture_file&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;test_1.jpg&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt; &lt;p&gt;Si le programme est complexe et que le traitement des photos prend du temps, vous pouvez profiter d’une exécution simultanée sur les cores du processeur de la carte Raspberry. Python propose &lt;em&gt;asyncio&lt;/em&gt; (&lt;a href=&quot;https://docs.python.org/3/library/asyncio.html&quot;&gt;Asynchronous I/O&lt;/a&gt;) qui permet l’utilisation de la syntaxe &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;async/await&lt;/code&gt;.&lt;/p&gt; &lt;p&gt;Lorsque le programme doit effectuer une tâche lourde, il la lance en parallèle, n’attendant la fin de l’exécution que lorsqu’il a besoin des résultats, comme dans la figure suivante :&lt;/p&gt; &lt;svg height=&quot;5.636862in&quot; style=&quot;color-interpolation-filters:sRGB;fill:none;fill-rule:evenodd;font-size:10;stroke-linecap:square;stroke-miterlimit:3;display: block; margin: 0 auto&quot; viewBox=&quot;0 0 321.50258 405.85467&quot; width=&quot;4.465313in&quot; xmlns=&quot;http://www.w3.org/2000/svg&quot; xmlns:xlink=&quot;http://www.w3.org/1999/xlink&quot;&gt;&lt;marker id=&quot;a&quot; fill=&quot;#5592c9&quot; markerUnits=&quot;strokeWidth&quot; orient=&quot;auto&quot; overflow=&quot;visible&quot; refX=&quot;-12.08&quot; stroke=&quot;#5592c9&quot; stroke-width=&quot;.165563&quot;&gt;&lt;path d=&quot;m2 1-2-1 2-1z&quot; stroke=&quot;none&quot; transform=&quot;scale(-6.04)&quot; /&gt;&lt;/marker&gt;&lt;g transform=&quot;translate(99.46161 -753.765023)&quot;&gt;&lt;rect fill=&quot;#ac4201&quot; height=&quot;34.015701&quot; rx=&quot;8.50394&quot; stroke=&quot;#fff&quot; stroke-linecap=&quot;round&quot; stroke-linejoin=&quot;round&quot; stroke-width=&quot;.5&quot; width=&quot;113.386&quot; y=&quot;807.87402&quot; /&gt;&lt;text fill=&quot;#fff&quot; font-family=&quot;Helvetica, Arial, sans-serif&quot; font-size=&quot;0.70001em&quot; x=&quot;22.43&quot; y=&quot;828.47998&quot;&gt;picam2.start()&lt;/text&gt;&lt;/g&gt;&lt;g transform=&quot;translate(199.80861 -597.860023)&quot;&gt;&lt;rect fill=&quot;#ac4201&quot; height=&quot;34.015701&quot; rx=&quot;8.50394&quot; stroke=&quot;#fff&quot; stroke-linecap=&quot;round&quot; stroke-linejoin=&quot;round&quot; stroke-width=&quot;.5&quot; width=&quot;113.386&quot; y=&quot;807.87402&quot; /&gt;&lt;text fill=&quot;#fff&quot; font-family=&quot;Helvetica, Arial, sans-serif&quot; font-size=&quot;0.70001em&quot; x=&quot;4.4&quot; y=&quot;828.47998&quot;&gt;picam2.capture_file()&lt;/text&gt;&lt;/g&gt;&lt;g transform=&quot;translate(.24961 -569.513023)&quot;&gt;&lt;rect fill=&quot;#73ae42&quot; height=&quot;34.015701&quot; rx=&quot;8.50394&quot; stroke=&quot;#fff&quot; stroke-linecap=&quot;round&quot; stroke-linejoin=&quot;round&quot; stroke-width=&quot;.5&quot; width=&quot;113.386&quot; y=&quot;807.87402&quot; /&gt;&lt;text fill=&quot;#fff&quot; font-family=&quot;Helvetica, Arial, sans-serif&quot; font-size=&quot;0.70001em&quot; x=&quot;22.52&quot; y=&quot;828.47998&quot;&gt;... app code ...&lt;/text&gt;&lt;/g&gt;&lt;g stroke-linecap=&quot;round&quot; stroke-linejoin=&quot;round&quot; stroke-width=&quot;.5&quot;&gt;&lt;path d=&quot;m120.72161 125.919997h70.866096v17.0079h-70.866096z&quot; fill=&quot;#4271c6&quot; stroke=&quot;#fff&quot; /&gt;&lt;path d=&quot;m120.72161 343.242997h70.866096v17.0079h-70.866096z&quot; fill=&quot;#4271c6&quot; stroke=&quot;#fff&quot; /&gt;&lt;path d=&quot;m7.09 841.89v31.76&quot; marker-end=&quot;url(#a)&quot; stroke=&quot;#5592c9&quot; transform=&quot;translate(149.06761 -753.765023)&quot; /&gt;&lt;path d=&quot;m0 841.89v33.57h-81.5v55.82&quot; marker-end=&quot;url(#a)&quot; stroke=&quot;#5592c9&quot; transform=&quot;translate(138.43761 -698.962023)&quot; /&gt;&lt;path d=&quot;m0 841.89v30.79h82.63v30.26&quot; marker-end=&quot;url(#a)&quot; stroke=&quot;#5592c9&quot; transform=&quot;translate(173.87161 -698.962023)&quot; /&gt;&lt;path d=&quot;m0 841.89v45.85h81.5v18.98&quot; marker-end=&quot;url(#a)&quot; stroke=&quot;#5592c9&quot; transform=&quot;translate(56.94161 -569.513023)&quot; /&gt;&lt;path d=&quot;m7.09 841.89v16.64&quot; marker-end=&quot;url(#a)&quot; stroke=&quot;#5592c9&quot; transform=&quot;translate(249.41461 -597.860023)&quot; /&gt;&lt;/g&gt;&lt;g transform=&quot;translate(99.46161 -807.624023)&quot;&gt;&lt;rect fill=&quot;#73ae42&quot; height=&quot;34.015701&quot; rx=&quot;8.50394&quot; stroke=&quot;#fff&quot; stroke-linecap=&quot;round&quot; stroke-linejoin=&quot;round&quot; stroke-width=&quot;.5&quot; width=&quot;113.386&quot; y=&quot;807.87402&quot; /&gt;&lt;text fill=&quot;#fff&quot; font-family=&quot;Helvetica, Arial, sans-serif&quot; font-size=&quot;0.70001em&quot; x=&quot;22.52&quot; y=&quot;828.47998&quot;&gt;... app code ...&lt;/text&gt;&lt;/g&gt;&lt;path d=&quot;m7.09 841.89v13.8&quot; marker-end=&quot;url(#a)&quot; stroke=&quot;#5592c9&quot; stroke-linecap=&quot;round&quot; stroke-linejoin=&quot;round&quot; stroke-width=&quot;.5&quot; transform=&quot;translate(149.06761 -807.624023)&quot; /&gt;&lt;g transform=&quot;translate(191.74861 -541.167023)&quot;&gt;&lt;rect fill=&quot;#73ae42&quot; height=&quot;34.015701&quot; rx=&quot;8.50394&quot; stroke=&quot;#fff&quot; stroke-linecap=&quot;round&quot; stroke-linejoin=&quot;round&quot; stroke-width=&quot;.5&quot; width=&quot;129.504&quot; y=&quot;807.87402&quot; /&gt;&lt;text fill=&quot;#fff&quot; font-family=&quot;Helvetica, Arial, sans-serif&quot; font-size=&quot;0.70001em&quot; x=&quot;8.520001&quot; y=&quot;828.47998&quot;&gt;... image elaboration ...&lt;/text&gt;&lt;/g&gt;&lt;g transform=&quot;translate(99.46161 -436.285023)&quot;&gt;&lt;rect fill=&quot;#73ae42&quot; height=&quot;34.015701&quot; rx=&quot;8.50394&quot; stroke=&quot;#fff&quot; stroke-linecap=&quot;round&quot; stroke-linejoin=&quot;round&quot; stroke-width=&quot;.5&quot; width=&quot;113.386&quot; y=&quot;807.87402&quot; /&gt;&lt;text fill=&quot;#fff&quot; font-family=&quot;Helvetica, Arial, sans-serif&quot; font-size=&quot;0.70001em&quot; x=&quot;22.52&quot; y=&quot;828.47998&quot;&gt;... app code ...&lt;/text&gt;&lt;/g&gt;&lt;path d=&quot;m0 841.89v18h-82.63v18.48&quot; marker-end=&quot;url(#a)&quot; stroke=&quot;#5592c9&quot; stroke-linecap=&quot;round&quot; stroke-linejoin=&quot;round&quot; stroke-width=&quot;.5&quot; transform=&quot;translate(256.50061 -541.167023)&quot; /&gt;&lt;path d=&quot;m7.09 843.31v5.3&quot; marker-end=&quot;url(#a)&quot; stroke=&quot;#5592c9&quot; stroke-linecap=&quot;round&quot; stroke-linejoin=&quot;round&quot; stroke-width=&quot;.5&quot; transform=&quot;translate(149.06761 -483.057023)&quot; /&gt;&lt;/svg&gt; &lt;p&gt;Dans l’exemple suivant, j’utilise uniquement les functions de démarrage et de synchronisation des &lt;a href=&quot;https://docs.python.org/3/library/asyncio-task.html&quot;&gt;coroutines&lt;/a&gt; : les fonctions concurrentes sont déclarées comme&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt; async&lt;/code&gt; et sont lancées en parallèle avec &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;asyncio.create_task()&lt;/code&gt;. Cette méthode renvoie un objet &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;Task&lt;/code&gt; qui peut ensuite être utilisé pour une synchronisation ultérieure à l’aide de la commande &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;await&lt;/code&gt; :&lt;/p&gt; &lt;figure class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-python&quot; data-lang=&quot;python&quot;&gt;&lt;span class=&quot;c1&quot;&gt;#!/usr/bin/python3 &lt;/span&gt;&lt;span class=&quot;kn&quot;&gt;import&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;asyncio&lt;/span&gt; &lt;span class=&quot;kn&quot;&gt;from&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;picamera2&lt;/span&gt; &lt;span class=&quot;kn&quot;&gt;import&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;Picamera2&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;async&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;def&lt;/span&gt; &lt;span class=&quot;nf&quot;&gt;shot&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;camera&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;):&lt;/span&gt; &lt;span class=&quot;c1&quot;&gt;# … some more code … &lt;/span&gt; &lt;span class=&quot;n&quot;&gt;camera&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;capture_file&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;test_2.jpg&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;c1&quot;&gt;# … some more code … &lt;/span&gt; &lt;span class=&quot;k&quot;&gt;async&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;def&lt;/span&gt; &lt;span class=&quot;nf&quot;&gt;main&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;():&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;cam&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;nc&quot;&gt;Picamera2&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;()&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;cam&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;start&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;()&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;task1&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;asyncio&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;create_task&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;shot&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;cam&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;))&lt;/span&gt; &lt;span class=&quot;c1&quot;&gt;# … some more code … &lt;/span&gt; &lt;span class=&quot;k&quot;&gt;await&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;task1&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;asyncio&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;run&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;main&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;())&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt; &lt;h2 id=&quot;références&quot;&gt;Références&lt;/h2&gt; &lt;ul&gt; &lt;li&gt;The Picamera 2 Manual : &lt;a href=&quot;https://datasheets.raspberrypi.com/camera/picamera2-manual.pdf&quot;&gt;datasheets.raspberrypi.com/camera/picamera2-manual.pdf&lt;/a&gt;&lt;/li&gt; &lt;li&gt;Raspberry Pi Camera Module 3 : &lt;a href=&quot;https://datasheets.raspberrypi.com/camera/camera-module-3-product-brief.pdf&quot;&gt;datasheets.raspberrypi.com/camera/camera-module-3-product-brief.pdf&lt;/a&gt;&lt;/li&gt; &lt;li&gt;Raspberry Pi 4 Model B Datasheet : &lt;a href=&quot;https://datasheets.raspberrypi.com/rpi4/raspberry-pi-4-datasheet.pdf&quot;&gt;datasheets.raspberrypi.com/rpi4/raspberry-pi-4-datasheet.pdf&lt;/a&gt;&lt;/li&gt; &lt;li&gt;Python asyncio, Asynchronous I/O : &lt;a href=&quot;https://docs.python.org/3/library/asyncio.html&quot;&gt;docs.python.org/3/library/asyncio.html&lt;/a&gt;&lt;/li&gt; &lt;/ul&gt; </description> <pubDate>Mon, 27 Feb 2023 13:00:00 +0100</pubDate> <link>https://www.escogitare.com/blog/fr/concurrent_camera_shots_on_raspberry</link> <guid isPermaLink="true">https://www.escogitare.com/blog/fr/concurrent_camera_shots_on_raspberry</guid> <category>RaspberryPi</category> </item> <item> <title>Taking pictures with Picamera 2 and Raspberry Pi using coroutines in Python</title> <description>&lt;p&gt;Using the Picamera2 library and &lt;em&gt;Camera Module 3&lt;/em&gt; is one of the many ways to take pictures with Raspberry PI. Once the hardware module is installed you can try the code proposed by the official documentation (&lt;a href=&quot;https://datasheets.raspberrypi.com/camera/picamera2-manual.pdf&quot;&gt;The Picamera 2 Manual&lt;/a&gt;, cap 2.3):&lt;/p&gt; &lt;figure class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-python&quot; data-lang=&quot;python&quot;&gt;&lt;span class=&quot;kn&quot;&gt;from&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;picamera2&lt;/span&gt; &lt;span class=&quot;kn&quot;&gt;import&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;Picamera2&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;Preview&lt;/span&gt; &lt;span class=&quot;kn&quot;&gt;import&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;time&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;picam2&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;nc&quot;&gt;Picamera2&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;()&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;camera_config&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;picam2&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;create_preview_configuration&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;()&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;picam2&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;configure&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;camera_config&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;picam2&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;start_preview&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;Preview&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;QTGL&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;picam2&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;start&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;()&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;time&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;sleep&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;2&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;picam2&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;capture_file&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;test.jpg&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt; &lt;p&gt;This program launches a preview window, so in a headless Raspberry Pi 4 board (without monitor and keyboard) it can be simplified:&lt;/p&gt; &lt;figure class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-python&quot; data-lang=&quot;python&quot;&gt;&lt;span class=&quot;kn&quot;&gt;from&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;picamera2&lt;/span&gt; &lt;span class=&quot;kn&quot;&gt;import&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;Picamera2&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;cam&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;nc&quot;&gt;Picamera2&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;()&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;cam&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;start&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;()&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;cam&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;capture_file&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;test_1.jpg&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt; &lt;p&gt;If the program is complex and photo processing takes time, you can take advantage of concurrent execution on the processor cores of the Raspberry board. Python offers the &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;asyncio&lt;/code&gt; library (&lt;a href=&quot;https://docs.python.org/3/library/asyncio.html&quot;&gt;Asynchronous I/O&lt;/a&gt;) which allows the use of the &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;async/await&lt;/code&gt; syntax.&lt;/p&gt; &lt;p&gt;When the program has to carry out some heavy tasks, it launches them in parallel, waiting for the end of the execution only when it needs the results, as in the figure:&lt;/p&gt; &lt;svg height=&quot;5.636862in&quot; style=&quot;color-interpolation-filters:sRGB;fill:none;fill-rule:evenodd;font-size:10;stroke-linecap:square;stroke-miterlimit:3;display: block; margin: 0 auto&quot; viewBox=&quot;0 0 321.50258 405.85467&quot; width=&quot;4.465313in&quot; xmlns=&quot;http://www.w3.org/2000/svg&quot; xmlns:xlink=&quot;http://www.w3.org/1999/xlink&quot;&gt;&lt;marker id=&quot;a&quot; fill=&quot;#5592c9&quot; markerUnits=&quot;strokeWidth&quot; orient=&quot;auto&quot; overflow=&quot;visible&quot; refX=&quot;-12.08&quot; stroke=&quot;#5592c9&quot; stroke-width=&quot;.165563&quot;&gt;&lt;path d=&quot;m2 1-2-1 2-1z&quot; stroke=&quot;none&quot; transform=&quot;scale(-6.04)&quot; /&gt;&lt;/marker&gt;&lt;g transform=&quot;translate(99.46161 -753.765023)&quot;&gt;&lt;rect fill=&quot;#ac4201&quot; height=&quot;34.015701&quot; rx=&quot;8.50394&quot; stroke=&quot;#fff&quot; stroke-linecap=&quot;round&quot; stroke-linejoin=&quot;round&quot; stroke-width=&quot;.5&quot; width=&quot;113.386&quot; y=&quot;807.87402&quot; /&gt;&lt;text fill=&quot;#fff&quot; font-family=&quot;Helvetica, Arial, sans-serif&quot; font-size=&quot;0.70001em&quot; x=&quot;22.43&quot; y=&quot;828.47998&quot;&gt;picam2.start()&lt;/text&gt;&lt;/g&gt;&lt;g transform=&quot;translate(199.80861 -597.860023)&quot;&gt;&lt;rect fill=&quot;#ac4201&quot; height=&quot;34.015701&quot; rx=&quot;8.50394&quot; stroke=&quot;#fff&quot; stroke-linecap=&quot;round&quot; stroke-linejoin=&quot;round&quot; stroke-width=&quot;.5&quot; width=&quot;113.386&quot; y=&quot;807.87402&quot; /&gt;&lt;text fill=&quot;#fff&quot; font-family=&quot;Helvetica, Arial, sans-serif&quot; font-size=&quot;0.70001em&quot; x=&quot;4.4&quot; y=&quot;828.47998&quot;&gt;picam2.capture_file()&lt;/text&gt;&lt;/g&gt;&lt;g transform=&quot;translate(.24961 -569.513023)&quot;&gt;&lt;rect fill=&quot;#73ae42&quot; height=&quot;34.015701&quot; rx=&quot;8.50394&quot; stroke=&quot;#fff&quot; stroke-linecap=&quot;round&quot; stroke-linejoin=&quot;round&quot; stroke-width=&quot;.5&quot; width=&quot;113.386&quot; y=&quot;807.87402&quot; /&gt;&lt;text fill=&quot;#fff&quot; font-family=&quot;Helvetica, Arial, sans-serif&quot; font-size=&quot;0.70001em&quot; x=&quot;22.52&quot; y=&quot;828.47998&quot;&gt;more code ...&lt;/text&gt;&lt;/g&gt;&lt;g stroke-linecap=&quot;round&quot; stroke-linejoin=&quot;round&quot; stroke-width=&quot;.5&quot;&gt;&lt;path d=&quot;m120.72161 125.919997h70.866096v17.0079h-70.866096z&quot; fill=&quot;#4271c6&quot; stroke=&quot;#fff&quot; /&gt;&lt;path d=&quot;m120.72161 343.242997h70.866096v17.0079h-70.866096z&quot; fill=&quot;#4271c6&quot; stroke=&quot;#fff&quot; /&gt;&lt;path d=&quot;m7.09 841.89v31.76&quot; marker-end=&quot;url(#a)&quot; stroke=&quot;#5592c9&quot; transform=&quot;translate(149.06761 -753.765023)&quot; /&gt;&lt;path d=&quot;m0 841.89v33.57h-81.5v55.82&quot; marker-end=&quot;url(#a)&quot; stroke=&quot;#5592c9&quot; transform=&quot;translate(138.43761 -698.962023)&quot; /&gt;&lt;path d=&quot;m0 841.89v30.79h82.63v30.26&quot; marker-end=&quot;url(#a)&quot; stroke=&quot;#5592c9&quot; transform=&quot;translate(173.87161 -698.962023)&quot; /&gt;&lt;path d=&quot;m0 841.89v45.85h81.5v18.98&quot; marker-end=&quot;url(#a)&quot; stroke=&quot;#5592c9&quot; transform=&quot;translate(56.94161 -569.513023)&quot; /&gt;&lt;path d=&quot;m7.09 841.89v16.64&quot; marker-end=&quot;url(#a)&quot; stroke=&quot;#5592c9&quot; transform=&quot;translate(249.41461 -597.860023)&quot; /&gt;&lt;/g&gt;&lt;g transform=&quot;translate(99.46161 -807.624023)&quot;&gt;&lt;rect fill=&quot;#73ae42&quot; height=&quot;34.015701&quot; rx=&quot;8.50394&quot; stroke=&quot;#fff&quot; stroke-linecap=&quot;round&quot; stroke-linejoin=&quot;round&quot; stroke-width=&quot;.5&quot; width=&quot;113.386&quot; y=&quot;807.87402&quot; /&gt;&lt;text fill=&quot;#fff&quot; font-family=&quot;Helvetica, Arial, sans-serif&quot; font-size=&quot;0.70001em&quot; x=&quot;22.52&quot; y=&quot;828.47998&quot;&gt;code ...&lt;/text&gt;&lt;/g&gt;&lt;path d=&quot;m7.09 841.89v13.8&quot; marker-end=&quot;url(#a)&quot; stroke=&quot;#5592c9&quot; stroke-linecap=&quot;round&quot; stroke-linejoin=&quot;round&quot; stroke-width=&quot;.5&quot; transform=&quot;translate(149.06761 -807.624023)&quot; /&gt;&lt;g transform=&quot;translate(191.74861 -541.167023)&quot;&gt;&lt;rect fill=&quot;#73ae42&quot; height=&quot;34.015701&quot; rx=&quot;8.50394&quot; stroke=&quot;#fff&quot; stroke-linecap=&quot;round&quot; stroke-linejoin=&quot;round&quot; stroke-width=&quot;.5&quot; width=&quot;129.504&quot; y=&quot;807.87402&quot; /&gt;&lt;text fill=&quot;#fff&quot; font-family=&quot;Helvetica, Arial, sans-serif&quot; font-size=&quot;0.70001em&quot; x=&quot;8.520001&quot; y=&quot;828.47998&quot;&gt;image elaboration ...&lt;/text&gt;&lt;/g&gt;&lt;g transform=&quot;translate(99.46161 -436.285023)&quot;&gt;&lt;rect fill=&quot;#73ae42&quot; height=&quot;34.015701&quot; rx=&quot;8.50394&quot; stroke=&quot;#fff&quot; stroke-linecap=&quot;round&quot; stroke-linejoin=&quot;round&quot; stroke-width=&quot;.5&quot; width=&quot;113.386&quot; y=&quot;807.87402&quot; /&gt;&lt;text fill=&quot;#fff&quot; font-family=&quot;Helvetica, Arial, sans-serif&quot; font-size=&quot;0.70001em&quot; x=&quot;22.52&quot; y=&quot;828.47998&quot;&gt;always code ...&lt;/text&gt;&lt;/g&gt;&lt;path d=&quot;m0 841.89v18h-82.63v18.48&quot; marker-end=&quot;url(#a)&quot; stroke=&quot;#5592c9&quot; stroke-linecap=&quot;round&quot; stroke-linejoin=&quot;round&quot; stroke-width=&quot;.5&quot; transform=&quot;translate(256.50061 -541.167023)&quot; /&gt;&lt;path d=&quot;m7.09 843.31v5.3&quot; marker-end=&quot;url(#a)&quot; stroke=&quot;#5592c9&quot; stroke-linecap=&quot;round&quot; stroke-linejoin=&quot;round&quot; stroke-width=&quot;.5&quot; transform=&quot;translate(149.06761 -483.057023)&quot; /&gt;&lt;/svg&gt; &lt;p&gt;In the following example, I only use the &lt;a href=&quot;https://docs.python.org/3/library/asyncio-task.html&quot;&gt;coroutines&lt;/a&gt; startup and sync apis: concurrent functions are declared as &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;async&lt;/code&gt; and are launched in parallel with &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;asyncio.create_task()&lt;/code&gt;. This method returns a &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;Task&lt;/code&gt; object, which can then be used for a later sync using the &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;await&lt;/code&gt; command:&lt;/p&gt; &lt;figure class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-python&quot; data-lang=&quot;python&quot;&gt;&lt;span class=&quot;c1&quot;&gt;#!/usr/bin/python3 &lt;/span&gt;&lt;span class=&quot;kn&quot;&gt;import&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;asyncio&lt;/span&gt; &lt;span class=&quot;kn&quot;&gt;from&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;picamera2&lt;/span&gt; &lt;span class=&quot;kn&quot;&gt;import&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;Picamera2&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;async&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;def&lt;/span&gt; &lt;span class=&quot;nf&quot;&gt;shot&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;camera&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;):&lt;/span&gt; &lt;span class=&quot;c1&quot;&gt;# … some more code … &lt;/span&gt; &lt;span class=&quot;n&quot;&gt;camera&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;capture_file&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;test_2.jpg&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;c1&quot;&gt;# … some more code … &lt;/span&gt; &lt;span class=&quot;k&quot;&gt;async&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;def&lt;/span&gt; &lt;span class=&quot;nf&quot;&gt;main&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;():&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;cam&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;nc&quot;&gt;Picamera2&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;()&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;cam&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;start&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;()&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;task1&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;asyncio&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;create_task&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;shot&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;cam&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;))&lt;/span&gt; &lt;span class=&quot;c1&quot;&gt;# … some more code … &lt;/span&gt; &lt;span class=&quot;k&quot;&gt;await&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;task1&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;asyncio&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;run&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;main&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;())&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt; &lt;p&gt;Note that asyncio requires to launch the main function with &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;asyncio.run(...)&lt;/code&gt;.&lt;/p&gt; &lt;h2 id=&quot;references&quot;&gt;References&lt;/h2&gt; &lt;ul&gt; &lt;li&gt;The Picamera 2 Manual: &lt;a href=&quot;https://datasheets.raspberrypi.com/camera/picamera2-manual.pdf&quot;&gt;datasheets.raspberrypi.com/camera/picamera2-manual.pdf&lt;/a&gt;&lt;/li&gt; &lt;li&gt;Raspberry Pi Camera Module 3 : &lt;a href=&quot;https://datasheets.raspberrypi.com/camera/camera-module-3-product-brief.pdf&quot;&gt;datasheets.raspberrypi.com/camera/camera-module-3-product-brief.pdf&lt;/a&gt;&lt;/li&gt; &lt;li&gt;Raspberry Pi 4 Model B Datasheet: &lt;a href=&quot;https://datasheets.raspberrypi.com/rpi4/raspberry-pi-4-datasheet.pdf&quot;&gt;datasheets.raspberrypi.com/rpi4/raspberry-pi-4-datasheet.pdf&lt;/a&gt;&lt;/li&gt; &lt;li&gt;Python asyncio, Asynchronous I/O: &lt;a href=&quot;https://docs.python.org/3/library/asyncio.html&quot;&gt;docs.python.org/3/library/asyncio.html&lt;/a&gt;&lt;/li&gt; &lt;/ul&gt; </description> <pubDate>Mon, 27 Feb 2023 13:00:00 +0100</pubDate> <link>https://www.escogitare.com/blog/en/concurrent_camera_shots_on_raspberry</link> <guid isPermaLink="true">https://www.escogitare.com/blog/en/concurrent_camera_shots_on_raspberry</guid> <category>RaspberryPi</category> </item> <item> <title>Camera Module 3: come connetterla a Raspberry Pi 4</title> <description>&lt;p&gt;&lt;em&gt;Camera Module 3&lt;/em&gt; è la terza generazione dell’obiettivo fotografico per Raspberry Pi. Usa un sensore Sony IMX708 con autofocus e HDR. Queste sono le caratteristiche principali:&lt;/p&gt; &lt;ul&gt; &lt;li&gt;Risoluzione: 11.9 Megapixels&lt;/li&gt; &lt;li&gt;Dimensioni: 4608 x 2592 pixels&lt;/li&gt; &lt;li&gt;Profondità di campo minima: 10 cm (5 cm per la Camera Module 3 Wide)&lt;/li&gt; &lt;li&gt;Lunghezza focale: 4.74 mm (2.75 mm per la Camera Module 3 Wide)&lt;/li&gt; &lt;li&gt;Rapport focale: F1.8 (F2.2 per la Camera Module 3 Wide)&lt;/li&gt; &lt;li&gt;Tempo di esposizione massimo: 112 s&lt;/li&gt; &lt;/ul&gt; &lt;p style=&quot;text-align: center;&quot;&gt; &lt;!-- ************************************** Italiano ************************************** --&gt; &lt;iframe loading=&quot;lazy&quot; width=&quot;360&quot; height=&quot;640&quot; src=&quot;https://www.youtube.com/embed/gqKGdxw1eIc&quot; title=&quot;Lettore video di YouTube&quot; frameborder=&quot;0&quot; modestbranding=&quot;1&quot; controls=&quot;2&quot; showinfo=&quot;0&quot; hl=&quot;it&quot; rel=&quot;0&quot; allow=&quot;accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture&quot; allowfullscreen=&quot;&quot; itemprop=&quot;video&quot;&gt;&lt;/iframe&gt; &lt;/p&gt; &lt;p&gt;&lt;em&gt;Camera Module 3&lt;/em&gt; si collega al &lt;a href=&quot;https://datasheets.raspberrypi.com/rpi4/raspberry-pi-4-datasheet.pdf&quot;&gt;Raspberry Pi&lt;/a&gt; tramite il connettore &lt;em&gt;CSI&lt;/em&gt; (&lt;a href=&quot;https://en.wikipedia.org/wiki/Camera_Serial_Interface&quot;&gt;Camera Serial Interface&lt;/a&gt;). Attenzione: la porta è molto simile a quella usata dal display, occorre fare attenzione alla posizione e alle scritte sulla scheda.&lt;/p&gt; &lt;p style=&quot;text-align: center;&quot;&gt; &lt;picture&gt; &lt;source srcset=&quot;/blog/imgs/2023-02-20/raspberrypi-300x429.avif, /blog/imgs/2023-02-20/raspberrypi-600x858.avif 2x&quot; type=&quot;image/avif&quot; /&gt; &lt;source srcset=&quot;/blog/imgs/2023-02-20/raspberrypi-300x429.webp&quot; type=&quot;image/webp&quot; /&gt; &lt;img src=&quot;/blog/imgs/2023-02-20/raspberrypi-300x429.jpg&quot; alt=&quot;Scheda Raspberry Pi 4&quot; style=&quot;width:300px;height429px&quot; /&gt; &lt;/picture&gt; &lt;/p&gt; &lt;p&gt;Per aprire il connettore è necessario afferrarlo ai lati più stretti e sollevarlo dolcemente. Quindi si inserisce il cavo con la parte blu rivolta verso la porta Ethernet in modo che i contatti metallici del cavo tocchino quelli del connettore.&lt;/p&gt; &lt;p style=&quot;text-align: center;&quot;&gt; &lt;picture&gt; &lt;source srcset=&quot;/blog/imgs/2023-02-20/raspberrypi_csi_1-300x200.avif, /blog/imgs/2023-02-20/raspberrypi_csi_1-600x400.avif 2x&quot; type=&quot;image/avif&quot; /&gt; &lt;source srcset=&quot;/blog/imgs/2023-02-20/raspberrypi_csi_1-300x200.webp&quot; type=&quot;image/webp&quot; /&gt; &lt;img src=&quot;/blog/imgs/2023-02-20/raspberrypi_csi_1-300x200.jpg&quot; alt=&quot;Connettore CSI su Raspberry Pi 4&quot; style=&quot;width:300px;height429px;border-radius:8px&quot; /&gt; &lt;/picture&gt; &lt;/p&gt; &lt;p&gt;Infine si deve chiudere il connettore spingendolo in basso.&lt;/p&gt; &lt;p style=&quot;text-align: center;&quot;&gt; &lt;picture&gt; &lt;source srcset=&quot;/blog/imgs/2023-02-20/raspberrypi_csi_2-300x200.avif, /blog/imgs/2023-02-20/raspberrypi_csi_2-600x400.avif 2x&quot; type=&quot;image/avif&quot; /&gt; &lt;source srcset=&quot;/blog/imgs/2023-02-20/raspberrypi_csi_2-300x200.webp&quot; type=&quot;image/webp&quot; /&gt; &lt;img src=&quot;/blog/imgs/2023-02-20/raspberrypi_csi_2-300x200.jpg&quot; alt=&quot;Connettore CSI su Raspberry Pi 4&quot; style=&quot;width:300px;height429px;border-radius:8px&quot; /&gt; &lt;/picture&gt; &lt;/p&gt; &lt;p&gt;Per verificare il funzionamento si possono usare le applicazioni &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;libcamera-jpeg&lt;/code&gt; e &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;libcamera-vid&lt;/code&gt; da shell, anche con una connessione ssh. Ad esempio &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;libcamera-jpeg --list-cameras&lt;/code&gt; mostra le fotocamere installate:&lt;/p&gt; &lt;figure class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-bash&quot; data-lang=&quot;bash&quot;&gt;pi@raspberrypi:~ &lt;span class=&quot;nv&quot;&gt;$ &lt;/span&gt;libcamera-jpeg &lt;span class=&quot;nt&quot;&gt;--list-cameras&lt;/span&gt; Available cameras &lt;span class=&quot;nt&quot;&gt;-----------------&lt;/span&gt; 0 : imx708 &lt;span class=&quot;o&quot;&gt;[&lt;/span&gt;4608x2592] &lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;/base/soc/i2c0mux/i2c@1/imx708@1a&lt;span class=&quot;o&quot;&gt;)&lt;/span&gt; Modes: &lt;span class=&quot;s1&quot;&gt;&apos;SRGGB10_CSI2P&apos;&lt;/span&gt; : 1536x864 &lt;span class=&quot;o&quot;&gt;[&lt;/span&gt;120.13 fps - &lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;0, 0&lt;span class=&quot;o&quot;&gt;)&lt;/span&gt;/4608x2592 crop] 2304x1296 &lt;span class=&quot;o&quot;&gt;[&lt;/span&gt;56.03 fps - &lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;0, 0&lt;span class=&quot;o&quot;&gt;)&lt;/span&gt;/4608x2592 crop] 4608x2592 &lt;span class=&quot;o&quot;&gt;[&lt;/span&gt;14.35 fps - &lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;0, 0&lt;span class=&quot;o&quot;&gt;)&lt;/span&gt;/4608x2592 crop]&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt; &lt;p&gt;Per catturare un’immagine invece si può usare il comando:&lt;/p&gt; &lt;figure class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-bash&quot; data-lang=&quot;bash&quot;&gt;libcamera-jpeg &lt;span class=&quot;nt&quot;&gt;-o&lt;/span&gt; test.jpg –immediate&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt; &lt;p&gt;La fotografia seguente mostra il risultato del comando: un selfie della scheda Raspberry Pi.&lt;/p&gt; &lt;p style=&quot;text-align: center;&quot;&gt; &lt;picture&gt; &lt;source srcset=&quot;/blog/imgs/2023-02-20/raspberri_selfie-300x169.avif, /blog/imgs/2023-02-20/raspberri_selfie-600x338.avif 2x&quot; type=&quot;image/avif&quot; /&gt; &lt;source srcset=&quot;/blog/imgs/2023-02-20/raspberri_selfie-300x169.webp&quot; type=&quot;image/webp&quot; /&gt; &lt;img src=&quot;/blog/imgs/2023-02-20/raspberri_selfie-300x169.jpg&quot; alt=&quot;Camera Module 3 example&quot; style=&quot;width:300px;height169px;border-radius:8px&quot; /&gt; &lt;/picture&gt; &lt;/p&gt; &lt;h2 id=&quot;riferimenti&quot;&gt;Riferimenti&lt;/h2&gt; &lt;ul&gt; &lt;li&gt;Raspberry Pi Camera Module 3 : &lt;a href=&quot;https://datasheets.raspberrypi.com/camera/camera-module-3-product-brief.pdf&quot;&gt;datasheets.raspberrypi.com/camera/camera-module-3-product-brief.pdf&lt;/a&gt;&lt;/li&gt; &lt;li&gt;Raspberry Pi 4 Model B Datasheet: &lt;a href=&quot;https://datasheets.raspberrypi.com/rpi4/raspberry-pi-4-datasheet.pdf&quot;&gt;datasheets.raspberrypi.com/rpi4/raspberry-pi-4-datasheet.pdf&lt;/a&gt;&lt;/li&gt; &lt;li&gt;Camera Serial Interface, pagina su Wikipedia: &lt;a href=&quot;https://en.wikipedia.org/wiki/Camera_Serial_Interface&quot;&gt;en.wikipedia.org/wiki/Camera_Serial_Interface&lt;/a&gt;&lt;/li&gt; &lt;/ul&gt; </description> <pubDate>Mon, 20 Feb 2023 13:00:00 +0100</pubDate> <link>https://www.escogitare.com/blog/it/connect_camera_to_raspberry</link> <guid isPermaLink="true">https://www.escogitare.com/blog/it/connect_camera_to_raspberry</guid> <category>RaspberryPi</category> </item> <item> <title>Camera Module 3: comment le connecter à Raspberry Pi 4</title> <description>&lt;p&gt;&lt;em&gt;Camera Module 3&lt;/em&gt; est la troisième génération de l’objectif de la caméra pour Raspberry Pi. Il utilise un capteur Sony IMX708 avec autofocus et HDR. Voici les principales caractéristiques :&lt;/p&gt; &lt;ul&gt; &lt;li&gt;Résolution : 11,9 mégapixels&lt;/li&gt; &lt;li&gt;Taille : 4 608 x 2 592 pixels&lt;/li&gt; &lt;li&gt;Profondeur de champ minimale : 10 cm (5 cm pour le Camera Module 3 Wide)&lt;/li&gt; &lt;li&gt;Distance focale : 4,74 mm (2.75 mm pour le Camera Module 3 Wide)&lt;/li&gt; &lt;li&gt;Rapport focal : F1.8 (F2.2 pour le Camera Module 3 Wide)&lt;/li&gt; &lt;li&gt;Temps d’exposition maximal : 112 s&lt;/li&gt; &lt;/ul&gt; &lt;p style=&quot;text-align: center;&quot;&gt; &lt;!-- ************************************** Francese ************************************** --&gt; &lt;iframe loading=&quot;lazy&quot; width=&quot;360&quot; height=&quot;640&quot; src=&quot;https://www.youtube.com/embed/gqKGdxw1eIc&quot; title=&quot;Lecteur vidéo YouTube&quot; frameborder=&quot;0&quot; modestbranding=&quot;1&quot; controls=&quot;2&quot; showinfo=&quot;0&quot; hl=&quot;fr&quot; rel=&quot;0&quot; allow=&quot;accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture&quot; allowfullscreen=&quot;&quot; itemprop=&quot;video&quot;&gt;&lt;/iframe&gt; &lt;/p&gt; &lt;p&gt;La &lt;em&gt;Camera Module 3&lt;/em&gt; se connecte au &lt;a href=&quot;https://www.raspberrypi.com/&quot;&gt;Raspberry Pi&lt;/a&gt; via le connecteur CSI (&lt;a href=&quot;https://fr.wikipedia.org/wiki/Camera_Serial_Interface&quot;&gt;Cameral Serial Interface&lt;/a&gt;). Attention : le port est très similaire à celui utilisé par l’écran, il faut faire attention à la position et à l’écriture sur la carte.&lt;/p&gt; &lt;p style=&quot;text-align: center;&quot;&gt; &lt;picture&gt; &lt;source srcset=&quot;/blog/imgs/2023-02-20/raspberrypi-300x429.avif, /blog/imgs/2023-02-20/raspberrypi-600x858.avif 2x&quot; type=&quot;image/avif&quot; /&gt; &lt;source srcset=&quot;/blog/imgs/2023-02-20/raspberrypi-300x429.webp&quot; type=&quot;image/webp&quot; /&gt; &lt;img src=&quot;/blog/imgs/2023-02-20/raspberrypi-300x429.jpg&quot; alt=&quot;Scheda Raspberry Pi 4&quot; style=&quot;width:300px;height429px&quot; /&gt; &lt;/picture&gt; &lt;/p&gt; &lt;p&gt;Pour ouvrir le connecteur, il est nécessaire de le saisir par les côtés les plus étroits, et de le soulever doucement. Ensuite, vous insérez le câble avec le côté bleu pointant vers le port Ethernet.&lt;/p&gt; &lt;p style=&quot;text-align: center;&quot;&gt; &lt;picture&gt; &lt;source srcset=&quot;/blog/imgs/2023-02-20/raspberrypi_csi_1-300x200.avif, /blog/imgs/2023-02-20/raspberrypi_csi_1-600x400.avif 2x&quot; type=&quot;image/avif&quot; /&gt; &lt;source srcset=&quot;/blog/imgs/2023-02-20/raspberrypi_csi_1-300x200.webp&quot; type=&quot;image/webp&quot; /&gt; &lt;img src=&quot;/blog/imgs/2023-02-20/raspberrypi_csi_1-300x200.jpg&quot; alt=&quot;Connettore CSI su Raspberry Pi 4&quot; style=&quot;width:300px;height429px;border-radius:8px&quot; /&gt; &lt;/picture&gt; &lt;/p&gt; &lt;p&gt;Enfin, le connecteur doit être fermé en le poussant doucement vers le bas.&lt;/p&gt; &lt;p style=&quot;text-align: center;&quot;&gt; &lt;picture&gt; &lt;source srcset=&quot;/blog/imgs/2023-02-20/raspberrypi_csi_2-300x200.avif, /blog/imgs/2023-02-20/raspberrypi_csi_2-600x400.avif 2x&quot; type=&quot;image/avif&quot; /&gt; &lt;source srcset=&quot;/blog/imgs/2023-02-20/raspberrypi_csi_2-300x200.webp&quot; type=&quot;image/webp&quot; /&gt; &lt;img src=&quot;/blog/imgs/2023-02-20/raspberrypi_csi_2-300x200.jpg&quot; alt=&quot;CSI connector on Raspberry Pi 4&quot; style=&quot;width:300px;height429px;border-radius:8px&quot; /&gt; &lt;/picture&gt; &lt;/p&gt; &lt;p&gt;Vous pouvez utiliser les applications &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;libcamera-jpeg&lt;/code&gt; et &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;libcamera-vid&lt;/code&gt; pour vérifier si la camera fonctionne. Par exemple, &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;libcamera-jpeg --list-cameras&lt;/code&gt; affiche les caméras installées :&lt;/p&gt; &lt;figure class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-bash&quot; data-lang=&quot;bash&quot;&gt;pi@raspberrypi:~ &lt;span class=&quot;nv&quot;&gt;$ &lt;/span&gt;libcamera-jpeg &lt;span class=&quot;nt&quot;&gt;--list-cameras&lt;/span&gt; Available cameras &lt;span class=&quot;nt&quot;&gt;-----------------&lt;/span&gt; 0 : imx708 &lt;span class=&quot;o&quot;&gt;[&lt;/span&gt;4608x2592] &lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;/base/soc/i2c0mux/i2c@1/imx708@1a&lt;span class=&quot;o&quot;&gt;)&lt;/span&gt; Modes: &lt;span class=&quot;s1&quot;&gt;&apos;SRGGB10_CSI2P&apos;&lt;/span&gt; : 1536x864 &lt;span class=&quot;o&quot;&gt;[&lt;/span&gt;120.13 fps - &lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;0, 0&lt;span class=&quot;o&quot;&gt;)&lt;/span&gt;/4608x2592 crop] 2304x1296 &lt;span class=&quot;o&quot;&gt;[&lt;/span&gt;56.03 fps - &lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;0, 0&lt;span class=&quot;o&quot;&gt;)&lt;/span&gt;/4608x2592 crop] 4608x2592 &lt;span class=&quot;o&quot;&gt;[&lt;/span&gt;14.35 fps - &lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;0, 0&lt;span class=&quot;o&quot;&gt;)&lt;/span&gt;/4608x2592 crop]&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt; &lt;p&gt;Pour capturer une image, vous pouvez utiliser :&lt;/p&gt; &lt;figure class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-bash&quot; data-lang=&quot;bash&quot;&gt;libcamera-jpeg &lt;span class=&quot;nt&quot;&gt;-o&lt;/span&gt; test.jpg –immediate&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt; &lt;p&gt;La photo suivante montre le résultat : un selfie de la carte Raspberry Pi.&lt;/p&gt; &lt;p style=&quot;text-align: center;&quot;&gt; &lt;picture&gt; &lt;source srcset=&quot;/blog/imgs/2023-02-20/raspberri_selfie-300x169.avif, /blog/imgs/2023-02-20/raspberri_selfie-600x338.avif 2x&quot; type=&quot;image/avif&quot; /&gt; &lt;source srcset=&quot;/blog/imgs/2023-02-20/raspberri_selfie-300x169.webp&quot; type=&quot;image/webp&quot; /&gt; &lt;img src=&quot;/blog/imgs/2023-02-20/raspberri_selfie-300x169.jpg&quot; alt=&quot;Camera Module 3 example&quot; style=&quot;width:300px;height169px;border-radius:8px&quot; /&gt; &lt;/picture&gt; &lt;/p&gt; &lt;h2 id=&quot;références&quot;&gt;Références&lt;/h2&gt; &lt;ul&gt; &lt;li&gt;Raspberry Pi Camera Module 3 : &lt;a href=&quot;https://datasheets.raspberrypi.com/camera/camera-module-3-product-brief.pdf&quot;&gt;datasheets.raspberrypi.com/camera/camera-module-3-product-brief.pdf&lt;/a&gt;&lt;/li&gt; &lt;li&gt;Raspberry Pi 4 Model B : &lt;a href=&quot;https://datasheets.raspberrypi.com/rpi4/raspberry-pi-4-datasheet.pdf&quot;&gt;datasheets.raspberrypi.com/rpi4/raspberry-pi-4-datasheet.pdf&lt;/a&gt;&lt;/li&gt; &lt;li&gt;Camera Serial Interface : &lt;a href=&quot;https://fr.wikipedia.org/wiki/Camera_Serial_Interface&quot;&gt;fr.wikipedia.org/wiki/Camera_Serial_Interface&lt;/a&gt;&lt;/li&gt; &lt;/ul&gt; </description> <pubDate>Mon, 20 Feb 2023 13:00:00 +0100</pubDate> <link>https://www.escogitare.com/blog/fr/connect_camera_to_raspberry</link> <guid isPermaLink="true">https://www.escogitare.com/blog/fr/connect_camera_to_raspberry</guid> <category>RaspberryPi</category> </item> <item> <title>Camera Module 3: how to connect to Raspberry Pi 4</title> <description>&lt;p&gt;“Camera Module 3” is the third generation of the camera lens for &lt;a href=&quot;https://www.raspberrypi.com/&quot;&gt;Raspberry Pi&lt;/a&gt;. It uses a Sony IMX708 sensor with autofocus and HDR. These are the main features:&lt;/p&gt; &lt;ul&gt; &lt;li&gt;Resolution: 11.9 Megapixels&lt;/li&gt; &lt;li&gt;Size in pixels: 4608 x 2592 pixels&lt;/li&gt; &lt;li&gt;Minimum depth of field: 10 cm (5 cm for the Camera Module 3 Wide)&lt;/li&gt; &lt;li&gt;Focal length: 4.74mm (2.75 mm for the Camera Module 3 Wide)&lt;/li&gt; &lt;li&gt;Focal Ratio: F1.8 (F2.2 for the Camera Module 3 Wide)&lt;/li&gt; &lt;li&gt;Maximum exposure time: 112 s&lt;/li&gt; &lt;/ul&gt; &lt;p style=&quot;text-align: center;&quot;&gt; &lt;!-- ************************************** Inglese ************************************** --&gt; &lt;iframe loading=&quot;lazy&quot; width=&quot;360&quot; height=&quot;640&quot; src=&quot;https://www.youtube.com/embed/gqKGdxw1eIc&quot; title=&quot;YouTube video player&quot; frameborder=&quot;0&quot; modestbranding=&quot;1&quot; controls=&quot;2&quot; showinfo=&quot;0&quot; hl=&quot;en&quot; rel=&quot;0&quot; allow=&quot;accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture&quot; allowfullscreen=&quot;&quot; itemprop=&quot;video&quot;&gt;&lt;/iframe&gt; &lt;/p&gt; &lt;p&gt;Camera Module 3 connects to the Raspberry Pi via the CSI (Cameral Serial Interface) connector. Warning: the port is very similar to the one used by the display, you need to pay attention to the position and the writing on the board.&lt;/p&gt; &lt;p style=&quot;text-align: center;&quot;&gt; &lt;picture&gt; &lt;source srcset=&quot;/blog/imgs/2023-02-20/raspberrypi-300x429.avif, /blog/imgs/2023-02-20/raspberrypi-600x858.avif 2x&quot; type=&quot;image/avif&quot; /&gt; &lt;source srcset=&quot;/blog/imgs/2023-02-20/raspberrypi-300x429.webp&quot; type=&quot;image/webp&quot; /&gt; &lt;img src=&quot;/blog/imgs/2023-02-20/raspberrypi-300x429.jpg&quot; alt=&quot;Scheda Raspberry Pi 4&quot; style=&quot;width:300px;height429px&quot; /&gt; &lt;/picture&gt; &lt;/p&gt; &lt;p&gt;To open the connector it is necessary to grasp it by the narrower sides and lift it gently. Then you insert the cable with the blue side pointing towards the Ethernet port.&lt;/p&gt; &lt;p style=&quot;text-align: center;&quot;&gt; &lt;picture&gt; &lt;source srcset=&quot;/blog/imgs/2023-02-20/raspberrypi_csi_1-300x200.avif, /blog/imgs/2023-02-20/raspberrypi_csi_1-600x400.avif 2x&quot; type=&quot;image/avif&quot; /&gt; &lt;source srcset=&quot;/blog/imgs/2023-02-20/raspberrypi_csi_1-300x200.webp&quot; type=&quot;image/webp&quot; /&gt; &lt;img src=&quot;/blog/imgs/2023-02-20/raspberrypi_csi_1-300x200.jpg&quot; alt=&quot;Connettore CSI su Raspberry Pi 4&quot; style=&quot;width:300px;height429px;border-radius:8px&quot; /&gt; &lt;/picture&gt; &lt;/p&gt; &lt;p&gt;Finally, the connector must be closed by pushing it down (gently).&lt;/p&gt; &lt;p style=&quot;text-align: center;&quot;&gt; &lt;picture&gt; &lt;source srcset=&quot;/blog/imgs/2023-02-20/raspberrypi_csi_2-300x200.avif, /blog/imgs/2023-02-20/raspberrypi_csi_2-600x400.avif 2x&quot; type=&quot;image/avif&quot; /&gt; &lt;source srcset=&quot;/blog/imgs/2023-02-20/raspberrypi_csi_2-300x200.webp&quot; type=&quot;image/webp&quot; /&gt; &lt;img src=&quot;/blog/imgs/2023-02-20/raspberrypi_csi_2-300x200.jpg&quot; alt=&quot;CSI connector on Raspberry Pi 4&quot; style=&quot;width:300px;height429px;border-radius:8px&quot; /&gt; &lt;/picture&gt; &lt;/p&gt; &lt;p&gt;You can use the &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;libcamera-jpeg&lt;/code&gt; and &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;libcamera-vid&lt;/code&gt; applications to check if the camera works. For example &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;libcamera-jpeg --list-cameras&lt;/code&gt; shows the installed cameras:&lt;/p&gt; &lt;figure class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-bash&quot; data-lang=&quot;bash&quot;&gt;pi@raspberrypi:~ &lt;span class=&quot;nv&quot;&gt;$ &lt;/span&gt;libcamera-jpeg &lt;span class=&quot;nt&quot;&gt;--list-cameras&lt;/span&gt; Available cameras &lt;span class=&quot;nt&quot;&gt;-----------------&lt;/span&gt; 0 : imx708 &lt;span class=&quot;o&quot;&gt;[&lt;/span&gt;4608x2592] &lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;/base/soc/i2c0mux/i2c@1/imx708@1a&lt;span class=&quot;o&quot;&gt;)&lt;/span&gt; Modes: &lt;span class=&quot;s1&quot;&gt;&apos;SRGGB10_CSI2P&apos;&lt;/span&gt; : 1536x864 &lt;span class=&quot;o&quot;&gt;[&lt;/span&gt;120.13 fps - &lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;0, 0&lt;span class=&quot;o&quot;&gt;)&lt;/span&gt;/4608x2592 crop] 2304x1296 &lt;span class=&quot;o&quot;&gt;[&lt;/span&gt;56.03 fps - &lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;0, 0&lt;span class=&quot;o&quot;&gt;)&lt;/span&gt;/4608x2592 crop] 4608x2592 &lt;span class=&quot;o&quot;&gt;[&lt;/span&gt;14.35 fps - &lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;0, 0&lt;span class=&quot;o&quot;&gt;)&lt;/span&gt;/4608x2592 crop]&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt; &lt;p&gt;To capture an image you can use the command:&lt;/p&gt; &lt;figure class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-bash&quot; data-lang=&quot;bash&quot;&gt;libcamera-jpeg &lt;span class=&quot;nt&quot;&gt;-o&lt;/span&gt; test.jpg –immediate&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt; &lt;p&gt;The following photograph shows the result of the command: a selfie of the Raspberry Pi board.&lt;/p&gt; &lt;p style=&quot;text-align: center;&quot;&gt; &lt;picture&gt; &lt;source srcset=&quot;/blog/imgs/2023-02-20/raspberri_selfie-300x169.avif, /blog/imgs/2023-02-20/raspberri_selfie-600x338.avif 2x&quot; type=&quot;image/avif&quot; /&gt; &lt;source srcset=&quot;/blog/imgs/2023-02-20/raspberri_selfie-300x169.webp&quot; type=&quot;image/webp&quot; /&gt; &lt;img src=&quot;/blog/imgs/2023-02-20/raspberri_selfie-300x169.jpg&quot; alt=&quot;Camera Module 3 example&quot; style=&quot;width:300px;height169px;border-radius:8px&quot; /&gt; &lt;/picture&gt; &lt;/p&gt; &lt;h2 id=&quot;references&quot;&gt;References&lt;/h2&gt; &lt;ul&gt; &lt;li&gt;Raspberry Pi Camera Module 3: &lt;a href=&quot;https://datasheets.raspberrypi.com/camera/camera-module-3-product-brief.pdf&quot;&gt;datasheets.raspberrypi.com/camera/camera-module-3-product-brief.pdf&lt;/a&gt;&lt;/li&gt; &lt;li&gt;Raspberry Pi 4 Model B: &lt;a href=&quot;https://datasheets.raspberrypi.com/rpi4/raspberry-pi-4-datasheet.pdf&quot;&gt;datasheets.raspberrypi.com/rpi4/raspberry-pi-4-datasheet.pdf&lt;/a&gt;&lt;/li&gt; &lt;li&gt;Camera Serial Interface: &lt;a href=&quot;https://en.wikipedia.org/wiki/Camera_Serial_Interface&quot;&gt;en.wikipedia.org/wiki/Camera_Serial_Interface&lt;/a&gt;&lt;/li&gt; &lt;/ul&gt; </description> <pubDate>Mon, 20 Feb 2023 13:00:00 +0100</pubDate> <link>https://www.escogitare.com/blog/en/connect_camera_to_raspberry</link> <guid isPermaLink="true">https://www.escogitare.com/blog/en/connect_camera_to_raspberry</guid> <category>RaspberryPi</category> </item> <item> <title>The ECW file format for Crossword</title> <description>&lt;p&gt;The &lt;em&gt;ECW&lt;/em&gt; file format can store in portable way a crossword. It is an XML text file based on the following DTD:&lt;/p&gt; &lt;figure class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-xml&quot; data-lang=&quot;xml&quot;&gt;&lt;span class=&quot;cp&quot;&gt;&amp;lt;!DOCTYPE cw [ &amp;lt;! ELEMENT cw (title, author, across, down, l+, h*)&amp;gt;&lt;/span&gt; &lt;span class=&quot;cp&quot;&gt;&amp;lt;!ATTLIST cw rows CDATA #REQUIRED columns CDATA #REQUIRED lang CDATA style (dense | sparse) &amp;gt;&lt;/span&gt; &lt;span class=&quot;cp&quot;&gt;&amp;lt;! ELEMENT title (#PCDATA) &amp;gt;&lt;/span&gt; &lt;span class=&quot;cp&quot;&gt;&amp;lt;! ELEMENT author (#PCDATA) &amp;gt;&lt;/span&gt; &lt;span class=&quot;cp&quot;&gt;&amp;lt;! ELEMENT across (w+) &amp;gt;&lt;/span&gt; &lt;span class=&quot;cp&quot;&gt;&amp;lt;! ELEMENT down (w+) &amp;gt;&lt;/span&gt; &lt;span class=&quot;cp&quot;&gt;&amp;lt;! ELEMENT w (#PCDATA) &amp;gt;&lt;/span&gt; &lt;span class=&quot;cp&quot;&gt;&amp;lt;!ATTLIST w r CDATA #REQUIRED c CDATA #REQUIRED w CDATA #REQUIRED &amp;gt;&lt;/span&gt; &lt;span class=&quot;cp&quot;&gt;&amp;lt;! ELEMENT l EMPTY &amp;gt;&lt;/span&gt; &lt;span class=&quot;cp&quot;&gt;&amp;lt;!ATTLIST l r CDATA #REQUIRED l CDATA #REQUIRED &amp;gt;&lt;/span&gt; &lt;span class=&quot;cp&quot;&gt;&amp;lt;! ELEMENT h EMPTY &amp;gt;&lt;/span&gt; &lt;span class=&quot;cp&quot;&gt;&amp;lt;!ATTLIST h r CDATA #REQUIRED l CDATA #REQUIRED &amp;gt;&lt;/span&gt; ]&amp;gt;&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt; &lt;p&gt;It stores some metadata information as the author and the title, the words and the clues, and two different views of the schema (the solved schema an the optional hints).&lt;/p&gt; &lt;p&gt;An example could be:&lt;/p&gt; &lt;figure class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-xml&quot; data-lang=&quot;xml&quot;&gt;&lt;span class=&quot;nt&quot;&gt;&amp;lt;cw&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;rows=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;9&quot;&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;columns=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;9&quot;&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;lang=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;en&quot;&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;style=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;dense&quot;&lt;/span&gt;&lt;span class=&quot;nt&quot;&gt;&amp;gt;&lt;/span&gt; &lt;span class=&quot;nt&quot;&gt;&amp;lt;title&amp;gt;&lt;/span&gt;AutoCrossword easy 1&lt;span class=&quot;nt&quot;&gt;&amp;lt;/title&amp;gt;&lt;/span&gt; &lt;span class=&quot;nt&quot;&gt;&amp;lt;author&amp;gt;&lt;/span&gt;Automatically generated from Wiktionary&lt;span class=&quot;nt&quot;&gt;&amp;lt;/author&amp;gt;&lt;/span&gt; &lt;span class=&quot;c&quot;&gt;&amp;lt;!-- Clues --&amp;gt;&lt;/span&gt; &lt;span class=&quot;nt&quot;&gt;&amp;lt;across&amp;gt;&lt;/span&gt; &lt;span class=&quot;nt&quot;&gt;&amp;lt;w&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;r=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;0&quot;&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;c=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;0&quot;&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;w=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;KEV&quot;&lt;/span&gt;&lt;span class=&quot;nt&quot;&gt;&amp;gt;&lt;/span&gt;kiloelectronvolt, 1000 eV&lt;span class=&quot;nt&quot;&gt;&amp;lt;/w&amp;gt;&lt;/span&gt; &lt;span class=&quot;nt&quot;&gt;&amp;lt;w&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;r=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;0&quot;&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;c=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;6&quot;&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;w=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;LDP&quot;&lt;/span&gt;&lt;span class=&quot;nt&quot;&gt;&amp;gt;&lt;/span&gt;Linux Documentation Project&lt;span class=&quot;nt&quot;&gt;&amp;lt;/w&amp;gt;&lt;/span&gt; &lt;span class=&quot;nt&quot;&gt;&amp;lt;w&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;r=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;1&quot;&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;c=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;6&quot;&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;w=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;SOT&quot;&lt;/span&gt;&lt;span class=&quot;nt&quot;&gt;&amp;gt;&lt;/span&gt;stupid person; fool&lt;span class=&quot;nt&quot;&gt;&amp;lt;/w&amp;gt;&lt;/span&gt; &lt;span class=&quot;nt&quot;&gt;&amp;lt;w&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;r=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;2&quot;&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;c=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;2&quot;&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;w=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;AMOSITE&quot;&lt;/span&gt;&lt;span class=&quot;nt&quot;&gt;&amp;gt;&lt;/span&gt;A variety of grunerite asbestos, once used in insulation.&lt;span class=&quot;nt&quot;&gt;&amp;lt;/w&amp;gt;&lt;/span&gt; &lt;span class=&quot;nt&quot;&gt;&amp;lt;w&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;r=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;4&quot;&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;c=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;0&quot;&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;w=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;RACQ&quot;&lt;/span&gt;&lt;span class=&quot;nt&quot;&gt;&amp;gt;&lt;/span&gt;Royal Automobile Club of Queensland (Australian Automobile Association)&lt;span class=&quot;nt&quot;&gt;&amp;lt;/w&amp;gt;&lt;/span&gt; &lt;span class=&quot;nt&quot;&gt;&amp;lt;w&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;r=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;4&quot;&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;c=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;5&quot;&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;w=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;PERT&quot;&lt;/span&gt;&lt;span class=&quot;nt&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span class=&quot;ni&quot;&gt;&amp;amp;apos;&lt;/span&gt;P&lt;span class=&quot;ni&quot;&gt;&amp;amp;apos;&lt;/span&gt;rogram &lt;span class=&quot;ni&quot;&gt;&amp;amp;apos;&lt;/span&gt;E&lt;span class=&quot;ni&quot;&gt;&amp;amp;apos;&lt;/span&gt;valuation and &lt;span class=&quot;ni&quot;&gt;&amp;amp;apos;&lt;/span&gt;R&lt;span class=&quot;ni&quot;&gt;&amp;amp;apos;&lt;/span&gt;eview &lt;span class=&quot;ni&quot;&gt;&amp;amp;apos;&lt;/span&gt;T&lt;span class=&quot;ni&quot;&gt;&amp;amp;apos;&lt;/span&gt;echnique, a method for diagramming and analyzing the flow of dependent tasks and other events in a project.&lt;span class=&quot;nt&quot;&gt;&amp;lt;/w&amp;gt;&lt;/span&gt; &lt;span class=&quot;nt&quot;&gt;&amp;lt;w&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;r=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;6&quot;&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;c=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;0&quot;&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;w=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;BEEFISH&quot;&lt;/span&gt;&lt;span class=&quot;nt&quot;&gt;&amp;gt;&lt;/span&gt;resembling beef&lt;span class=&quot;nt&quot;&gt;&amp;lt;/w&amp;gt;&lt;/span&gt; &lt;span class=&quot;nt&quot;&gt;&amp;lt;w&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;r=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;7&quot;&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;c=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;0&quot;&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;w=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;MMS&quot;&lt;/span&gt;&lt;span class=&quot;nt&quot;&gt;&amp;gt;&lt;/span&gt;Multimedia Messaging Service&lt;span class=&quot;nt&quot;&gt;&amp;lt;/w&amp;gt;&lt;/span&gt; &lt;span class=&quot;nt&quot;&gt;&amp;lt;w&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;r=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;8&quot;&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;c=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;0&quot;&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;w=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;DES&quot;&lt;/span&gt;&lt;span class=&quot;nt&quot;&gt;&amp;gt;&lt;/span&gt;Data Encryption Standard&lt;span class=&quot;nt&quot;&gt;&amp;lt;/w&amp;gt;&lt;/span&gt; &lt;span class=&quot;nt&quot;&gt;&amp;lt;w&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;r=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;8&quot;&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;c=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;6&quot;&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;w=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;XMP&quot;&lt;/span&gt;&lt;span class=&quot;nt&quot;&gt;&amp;gt;&lt;/span&gt;chemistry xanthosine monophosphate|&lt;span class=&quot;nt&quot;&gt;&amp;lt;/w&amp;gt;&lt;/span&gt; &lt;span class=&quot;nt&quot;&gt;&amp;lt;/across&amp;gt;&lt;/span&gt; &lt;span class=&quot;nt&quot;&gt;&amp;lt;down&amp;gt;&lt;/span&gt; &lt;span class=&quot;nt&quot;&gt;&amp;lt;w&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;r=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;0&quot;&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;c=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;0&quot;&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;w=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;KDD&quot;&lt;/span&gt;&lt;span class=&quot;nt&quot;&gt;&amp;gt;&lt;/span&gt;knowledge discovery in databases|&lt;span class=&quot;nt&quot;&gt;&amp;lt;/w&amp;gt;&lt;/span&gt; &lt;span class=&quot;nt&quot;&gt;&amp;lt;w&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;r=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;0&quot;&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;c=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;2&quot;&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;w=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;VIA&quot;&lt;/span&gt;&lt;span class=&quot;nt&quot;&gt;&amp;gt;&lt;/span&gt;A main road or highway, especially in ancient Rome. &lt;span class=&quot;ni&quot;&gt;&amp;amp;apos;&lt;/span&gt;(Mainly used in set phrases, below.)&lt;span class=&quot;ni&quot;&gt;&amp;amp;apos;&lt;/span&gt;&lt;span class=&quot;nt&quot;&gt;&amp;lt;/w&amp;gt;&lt;/span&gt; &lt;span class=&quot;nt&quot;&gt;&amp;lt;w&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;r=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;0&quot;&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;c=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;4&quot;&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;w=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;RHO&quot;&lt;/span&gt;&lt;span class=&quot;nt&quot;&gt;&amp;gt;&lt;/span&gt;Any of a family of GTP-binding proteins&lt;span class=&quot;nt&quot;&gt;&amp;lt;/w&amp;gt;&lt;/span&gt; &lt;span class=&quot;nt&quot;&gt;&amp;lt;w&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;r=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;0&quot;&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;c=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;6&quot;&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;w=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;LSI&quot;&lt;/span&gt;&lt;span class=&quot;nt&quot;&gt;&amp;gt;&lt;/span&gt;large scale integration|&lt;span class=&quot;nt&quot;&gt;&amp;lt;/w&amp;gt;&lt;/span&gt; &lt;span class=&quot;nt&quot;&gt;&amp;lt;w&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;r=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;0&quot;&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;c=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;7&quot;&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;w=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;DOTARD&quot;&lt;/span&gt;&lt;span class=&quot;nt&quot;&gt;&amp;gt;&lt;/span&gt;An old person with impaired intellect; one in his or her dotage.&lt;span class=&quot;nt&quot;&gt;&amp;lt;/w&amp;gt;&lt;/span&gt; &lt;span class=&quot;nt&quot;&gt;&amp;lt;w&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;r=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;0&quot;&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;c=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;8&quot;&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;w=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;PTE&quot;&lt;/span&gt;&lt;span class=&quot;nt&quot;&gt;&amp;gt;&lt;/span&gt;Abbreviation of private (soldier).&lt;span class=&quot;nt&quot;&gt;&amp;lt;/w&amp;gt;&lt;/span&gt; &lt;span class=&quot;nt&quot;&gt;&amp;lt;w&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;r=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;2&quot;&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;c=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;3&quot;&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;w=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;MAQAF&quot;&lt;/span&gt;&lt;span class=&quot;nt&quot;&gt;&amp;gt;&lt;/span&gt;The Hebrew script hyphen (mul|sc=Hebr|־)&lt;span class=&quot;nt&quot;&gt;&amp;lt;/w&amp;gt;&lt;/span&gt; &lt;span class=&quot;nt&quot;&gt;&amp;lt;w&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;r=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;2&quot;&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;c=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;5&quot;&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;w=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;SUPES&quot;&lt;/span&gt;&lt;span class=&quot;nt&quot;&gt;&amp;gt;&lt;/span&gt;Superman, the &lt;span class=&quot;ni&quot;&gt;&amp;amp;apos;&lt;/span&gt;DC Comics&lt;span class=&quot;ni&quot;&gt;&amp;amp;apos;&lt;/span&gt; character.&lt;span class=&quot;nt&quot;&gt;&amp;lt;/w&amp;gt;&lt;/span&gt; &lt;span class=&quot;nt&quot;&gt;&amp;lt;w&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;r=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;3&quot;&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;c=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;1&quot;&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;w=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;RACEME&quot;&lt;/span&gt;&lt;span class=&quot;nt&quot;&gt;&amp;gt;&lt;/span&gt;An indeterminate inflorescence in which the flowers are arranged along a single central axis.&lt;span class=&quot;nt&quot;&gt;&amp;lt;/w&amp;gt;&lt;/span&gt; &lt;span class=&quot;nt&quot;&gt;&amp;lt;w&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;r=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;6&quot;&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;c=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;0&quot;&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;w=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;BMD&quot;&lt;/span&gt;&lt;span class=&quot;nt&quot;&gt;&amp;gt;&lt;/span&gt;Bermudian dollar&lt;span class=&quot;nt&quot;&gt;&amp;lt;/w&amp;gt;&lt;/span&gt; &lt;span class=&quot;nt&quot;&gt;&amp;lt;w&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;r=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;6&quot;&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;c=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;2&quot;&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;w=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;ESS&quot;&lt;/span&gt;&lt;span class=&quot;nt&quot;&gt;&amp;gt;&lt;/span&gt;electronic switching system|electronic switching system|&lt;span class=&quot;nt&quot;&gt;&amp;lt;/w&amp;gt;&lt;/span&gt; &lt;span class=&quot;nt&quot;&gt;&amp;lt;w&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;r=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;6&quot;&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;c=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;4&quot;&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;w=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;IRQ&quot;&lt;/span&gt;&lt;span class=&quot;nt&quot;&gt;&amp;gt;&lt;/span&gt;The ISO 3166-1 three-letter (alpha-3) code for Iraq.&lt;span class=&quot;nt&quot;&gt;&amp;lt;/w&amp;gt;&lt;/span&gt; &lt;span class=&quot;nt&quot;&gt;&amp;lt;w&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;r=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;6&quot;&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;c=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;6&quot;&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;w=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;HMX&quot;&lt;/span&gt;&lt;span class=&quot;nt&quot;&gt;&amp;gt;&lt;/span&gt;An explosive, related to RDX, &lt;span class=&quot;ni&quot;&gt;&amp;amp;apos;&lt;/span&gt;octahydro-1,3,5,7-tetranitro-1,3,5,7-tetrazocine&lt;span class=&quot;ni&quot;&gt;&amp;amp;apos;&lt;/span&gt;&lt;span class=&quot;nt&quot;&gt;&amp;lt;/w&amp;gt;&lt;/span&gt; &lt;span class=&quot;nt&quot;&gt;&amp;lt;w&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;r=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;6&quot;&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;c=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;8&quot;&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;w=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;STP&quot;&lt;/span&gt;&lt;span class=&quot;nt&quot;&gt;&amp;gt;&lt;/span&gt;The ISO 3166-1 three-letter (alpha-3) code for Sao Tome and Principe.&lt;span class=&quot;nt&quot;&gt;&amp;lt;/w&amp;gt;&lt;/span&gt; &lt;span class=&quot;nt&quot;&gt;&amp;lt;/down&amp;gt;&lt;/span&gt; &lt;span class=&quot;c&quot;&gt;&amp;lt;!-- Solution --&amp;gt;&lt;/span&gt; &lt;span class=&quot;nt&quot;&gt;&amp;lt;l&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;r=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;0&quot;&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;l=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;KEV*R*LDP&quot;&lt;/span&gt; &lt;span class=&quot;nt&quot;&gt;/&amp;gt;&lt;/span&gt; &lt;span class=&quot;nt&quot;&gt;&amp;lt;l&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;r=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;1&quot;&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;l=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;D*I*H*SOT&quot;&lt;/span&gt; &lt;span class=&quot;nt&quot;&gt;/&amp;gt;&lt;/span&gt; &lt;span class=&quot;nt&quot;&gt;&amp;lt;l&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;r=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;2&quot;&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;l=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;D*AMOSITE&quot;&lt;/span&gt; &lt;span class=&quot;nt&quot;&gt;/&amp;gt;&lt;/span&gt; &lt;span class=&quot;nt&quot;&gt;&amp;lt;l&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;r=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;3&quot;&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;l=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;*R*A*U*A*&quot;&lt;/span&gt; &lt;span class=&quot;nt&quot;&gt;/&amp;gt;&lt;/span&gt; &lt;span class=&quot;nt&quot;&gt;&amp;lt;l&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;r=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;4&quot;&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;l=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;RACQ*PERT&quot;&lt;/span&gt; &lt;span class=&quot;nt&quot;&gt;/&amp;gt;&lt;/span&gt; &lt;span class=&quot;nt&quot;&gt;&amp;lt;l&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;r=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;5&quot;&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;l=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;*C*A*E*D*&quot;&lt;/span&gt; &lt;span class=&quot;nt&quot;&gt;/&amp;gt;&lt;/span&gt; &lt;span class=&quot;nt&quot;&gt;&amp;lt;l&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;r=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;6&quot;&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;l=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;BEEFISH*S&quot;&lt;/span&gt; &lt;span class=&quot;nt&quot;&gt;/&amp;gt;&lt;/span&gt; &lt;span class=&quot;nt&quot;&gt;&amp;lt;l&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;r=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;7&quot;&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;l=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;MMS*R*M*T&quot;&lt;/span&gt; &lt;span class=&quot;nt&quot;&gt;/&amp;gt;&lt;/span&gt; &lt;span class=&quot;nt&quot;&gt;&amp;lt;l&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;r=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;8&quot;&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;l=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;DES*Q*XMP&quot;&lt;/span&gt; &lt;span class=&quot;nt&quot;&gt;/&amp;gt;&lt;/span&gt; &lt;span class=&quot;c&quot;&gt;&amp;lt;!-- Hints --&amp;gt;&lt;/span&gt; &lt;span class=&quot;nt&quot;&gt;&amp;lt;h&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;r=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;0&quot;&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;l=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot; * * &quot;&lt;/span&gt; &lt;span class=&quot;nt&quot;&gt;/&amp;gt;&lt;/span&gt; &lt;span class=&quot;nt&quot;&gt;&amp;lt;h&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;r=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;1&quot;&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;l=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot; * * * &quot;&lt;/span&gt; &lt;span class=&quot;nt&quot;&gt;/&amp;gt;&lt;/span&gt; &lt;span class=&quot;nt&quot;&gt;&amp;lt;h&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;r=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;2&quot;&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;l=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot; * &quot;&lt;/span&gt; &lt;span class=&quot;nt&quot;&gt;/&amp;gt;&lt;/span&gt; &lt;span class=&quot;nt&quot;&gt;&amp;lt;h&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;r=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;3&quot;&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;l=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;* * * * *&quot;&lt;/span&gt; &lt;span class=&quot;nt&quot;&gt;/&amp;gt;&lt;/span&gt; &lt;span class=&quot;nt&quot;&gt;&amp;lt;h&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;r=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;4&quot;&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;l=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot; * &quot;&lt;/span&gt; &lt;span class=&quot;nt&quot;&gt;/&amp;gt;&lt;/span&gt; &lt;span class=&quot;nt&quot;&gt;&amp;lt;h&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;r=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;5&quot;&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;l=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;* * * * *&quot;&lt;/span&gt; &lt;span class=&quot;nt&quot;&gt;/&amp;gt;&lt;/span&gt; &lt;span class=&quot;nt&quot;&gt;&amp;lt;h&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;r=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;6&quot;&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;l=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot; * &quot;&lt;/span&gt; &lt;span class=&quot;nt&quot;&gt;/&amp;gt;&lt;/span&gt; &lt;span class=&quot;nt&quot;&gt;&amp;lt;h&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;r=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;7&quot;&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;l=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot; * * * &quot;&lt;/span&gt; &lt;span class=&quot;nt&quot;&gt;/&amp;gt;&lt;/span&gt; &lt;span class=&quot;nt&quot;&gt;&amp;lt;h&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;r=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;8&quot;&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;l=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot; * * &quot;&lt;/span&gt; &lt;span class=&quot;nt&quot;&gt;/&amp;gt;&lt;/span&gt; &lt;span class=&quot;nt&quot;&gt;&amp;lt;/cw&amp;gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt; </description> <pubDate>Mon, 01 Oct 2018 14:00:00 +0200</pubDate> <link>https://www.escogitare.com/programming/2018/10/01/ecw_file_format.html</link> <guid isPermaLink="true">https://www.escogitare.com/programming/2018/10/01/ecw_file_format.html</guid> <category>programming</category> </item> <item> <title>Using ffmpeg to convert from MTS to mp4</title> <description>&lt;p&gt;I have a bunch of memory cards packed with MTS files, that I recorded in few years. Now I would like to convert them in mp4, in order to watch them on my TV or iPad. I used the awesome ffpmeg to concatenate and convert them.&lt;/p&gt; &lt;h2 id=&quot;1-create-a-text-file-with-filenames&quot;&gt;1. Create a text file with filenames&lt;/h2&gt; &lt;p&gt;First I created a text file with the names of all origin videos. Every line in the file is like this:&lt;/p&gt; &lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;file &apos;subdirectory/filename.MTS&apos; &lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt; &lt;p&gt;I just used the &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;ls&lt;/code&gt; command (&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;ls AVCHD/BDMV/STREAM/*MTS &amp;gt; files.txt&lt;/code&gt;) and few substitutions in a text editor to create it.&lt;/p&gt; &lt;h2 id=&quot;2-conatenate&quot;&gt;2. Conatenate&lt;/h2&gt; &lt;p&gt;The fastest command is just a concatenation:&lt;/p&gt; &lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;ffmpeg -f concat -i files.txt -c copy movie.mts &lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt; &lt;p&gt;But you may want to create video files for DVDs, or save space using an &lt;a href=&quot;https://trac.ffmpeg.org/wiki/Encode/H.264&quot;&gt;H.264 encoding&lt;/a&gt;. For DVDs a command could be:&lt;/p&gt; &lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;ffmpeg -f concat -i files.txt -target pal-dvd movie.mpg &lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt; &lt;p&gt;For an mp4 file:&lt;/p&gt; &lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;ffmpeg -f concat -i files.txt -c:a copy -c:v libx264 -preset slow -crf 18 -f mp4 movie.mp4 &lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt; &lt;p&gt;You may tune the &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;-preset&lt;/code&gt; and &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;-crf&lt;/code&gt; parameters to have better quality, or faster encoding.&lt;/p&gt; &lt;h2 id=&quot;3-do-not-disturb-please&quot;&gt;3. Do not disturb, please&lt;/h2&gt; &lt;p&gt;Converting a video is a tough job: everything will slow down while doing. So, if you use your computer at the same time, you may want to put the conversion on a lower priority, using the command &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;renice&lt;/code&gt;.&lt;/p&gt; &lt;p&gt;First you need to know the PID of the ffmpeg process with:&lt;/p&gt; &lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;ps –al &lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt; &lt;p&gt;Then you change its priority with renice:&lt;/p&gt; &lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;renice -n 19 PID &lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt; &lt;p&gt;Where ‘19’ is the lowest priority: it will takes a little more, but it will doesn’t bug you too much.&lt;/p&gt; &lt;p&gt;For example:&lt;/p&gt; &lt;div class=&quot;language-bash highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt; ps –al ... renice –n 19 654 &lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt; &lt;h2 id=&quot;4-what-about-an-ipad-or-android-tablet&quot;&gt;4. What about an iPad or Android tablet?&lt;/h2&gt; &lt;p&gt;To optimize your videos for iPads, ffmpeg gives you some more flags:&lt;/p&gt; &lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;ffmpeg -f concat -i files.txt -vcodec libx264 -profile:v main -level 3.1 -preset medium -tune film -x264-params ref=4 -acodec aac -ac 2 -strict experimental -movflags +faststart -f mp4 movie.mp4 &lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt; &lt;p&gt;It looks like that family videos may benefice of &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;-tune film&lt;/code&gt; parameter, while the &lt;a href=&quot;https://trac.ffmpeg.org/wiki/Encode/H.264#Compatibility&quot;&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;-level&lt;/code&gt;&lt;/a&gt; depends on your iPad model. You may also need to scale down your video with: &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;-vf &quot;scale=-2:720:force_original_aspect_ratio=decrease&quot;&lt;/code&gt;.&lt;/p&gt; &lt;p&gt;More information in &lt;a href=&quot;https://www.ffmpeg.org&quot;&gt;ffmpeg.org&lt;/a&gt; web site, or on &lt;a href=&quot;https://en.wikipedia.org/wiki/FFmpeg&quot;&gt;Wikipedia&lt;/a&gt;.&lt;/p&gt; </description> <pubDate>Sat, 22 Oct 2016 14:00:00 +0200</pubDate> <link>https://www.escogitare.com/graphics/2016/10/22/ffmpeg_concatenation.html</link> <guid isPermaLink="true">https://www.escogitare.com/graphics/2016/10/22/ffmpeg_concatenation.html</guid> <category>graphics</category> </item> <item> <title>Android Support Preferences Library: nested PreferenceScreen</title> <description>&lt;p&gt;&lt;a href=&quot;https://developer.android.com/topic/libraries/support-library&quot;&gt;Android Support Library&lt;/a&gt; includes two librares to simplify the implementation of settings pages:&lt;/p&gt; &lt;ul&gt; &lt;li&gt;&lt;a href=&quot;https://developer.android.com/topic/libraries/support-library/features.html#v7-preference&quot;&gt;v7 Preference Support Library&lt;/a&gt;&lt;/li&gt; &lt;li&gt;&lt;a href=&quot;https://developer.android.com/topic/libraries/support-library/features.html#v14-preference&quot;&gt;v14 Preference Support Library&lt;/a&gt;&lt;/li&gt; &lt;/ul&gt; &lt;p&gt;A post from &lt;a href=&quot;https://plus.google.com/+AndroidDevelopers/posts/9kZ3SsXdT2T?linkId=16598760&quot;&gt;Ian Lake on Google+&lt;/a&gt; shows how to use them. It is easy, but when you need to use multiple nested settings pages you need to pay attention to a couple of points:&lt;/p&gt; &lt;ul&gt; &lt;li&gt;You need to implement the onCreatePreferences method:&lt;/li&gt; &lt;/ul&gt; &lt;figure class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-java&quot; data-lang=&quot;java&quot;&gt; &lt;span class=&quot;nd&quot;&gt;@Override&lt;/span&gt; &lt;span class=&quot;kd&quot;&gt;public&lt;/span&gt; &lt;span class=&quot;kt&quot;&gt;void&lt;/span&gt; &lt;span class=&quot;nf&quot;&gt;onCreatePreferences&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nc&quot;&gt;Bundle&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;savedInstanceState&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;nc&quot;&gt;String&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;rootKey&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;{&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;setPreferencesFromResource&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;no&quot;&gt;R&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;xml&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;preferences&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;rootKey&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;);&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;}&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt; &lt;ul&gt; &lt;li&gt;Every PreferenceScreen in your preferences XML file must have a key:&lt;/li&gt; &lt;/ul&gt; &lt;figure class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-xml&quot; data-lang=&quot;xml&quot;&gt; &lt;span class=&quot;nt&quot;&gt;&amp;lt;PreferenceScreen&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;android:key=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;prefscrkey&quot;&lt;/span&gt;&lt;span class=&quot;nt&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt; &lt;p&gt;This key will not be used in any setting, but in the onCreatePreferences, in order to understand the screen to show.&lt;/p&gt; </description> <pubDate>Wed, 07 Sep 2016 14:00:00 +0200</pubDate> <link>https://www.escogitare.com/android/2016/09/07/android_preferences.html</link> <guid isPermaLink="true">https://www.escogitare.com/android/2016/09/07/android_preferences.html</guid> <category>android</category> </item> </channel> </rss>