tag:blogger.com,1999:blog-29740940419519929802024-03-08T05:05:21.778-08:00Beomagi's thoughts...Beomagihttp://www.blogger.com/profile/00469223835355067867noreply@blogger.comBlogger61125tag:blogger.com,1999:blog-2974094041951992980.post-5850713783990196542024-03-07T20:58:00.000-08:002024-03-08T05:04:47.833-08:00Full Frame, APS-C, Micro Four Thirds, what does this all mean?<h2 style="text-align: left;"><span style="font-family: courier;">What is full frame and why is it a reference?</span></h2><table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto;"><tbody><tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhsI4XZw3NDxUXGX_LI1JRHSGcgKEfvgPAeYsuWBAzMKP6YNgOjXtVrXzJXar7c7X0Ifeav7IPNE5zoicRY7dyb9uU2ZsUoSLznlJuq9ZQqV9OC0Vx9h_zzdKGuUsPVb3TsKhcjZHTRMjNZO6XsIKtPsWQJilOmuaCDtjq6R7umI-hHLyeZL8qOwq9wrz5O/s700/kodakfilm09f.jpg" style="margin-left: auto; margin-right: auto;"><span style="font-family: courier;"><img border="0" data-original-height="700" data-original-width="456" height="640" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhsI4XZw3NDxUXGX_LI1JRHSGcgKEfvgPAeYsuWBAzMKP6YNgOjXtVrXzJXar7c7X0Ifeav7IPNE5zoicRY7dyb9uU2ZsUoSLznlJuq9ZQqV9OC0Vx9h_zzdKGuUsPVb3TsKhcjZHTRMjNZO6XsIKtPsWQJilOmuaCDtjq6R7umI-hHLyeZL8qOwq9wrz5O/w416-h640/kodakfilm09f.jpg" width="416" /></span></a></td></tr><tr><td class="tr-caption" style="text-align: center;"><span style="font-family: courier;">source: https://petapixel.com/color-photography/</span></td></tr></tbody></table><span style="font-family: courier;"><br /></span><p><span style="font-family: courier;">In a nutshell - Full-frame was a popular film format, 36x24mm in size. That format carried through to today's professional digital cameras. Lens focal-length equivalence is often used because the same lens will give different compositions on different cameras. Discussion among photographers involving lenses would bring up full-frame equivalent focal lengths. This way, photographers using any format could follow along.</span></p><p><span style="font-family: courier;">Kodak introduced "135" film in 1934 as a standard film cartridge. This film records images at 36mm x 24mm. By the 1960s, it was the popular standard. This popularity continued till the advent of digital photography. It left us with the common idea of the "professional" format - Full Frame - using these dimensions. The next major competitor is APS-C - a similar rectangle at 2/3rds the side length. Micro Four Thirds is another format even smaller than APS-C. By the time the digital age was upon us, 35mm film/cameras/lenses had dominated the industry for decades. Cost and technical difficulty propelled smaller digital sensors into lower-tier consumer markets, with the expensive "Full Frame" sensors directed to professional or higher-end consumers.</span></p><p><span style="font-family: courier;">A given lens will create an image when focusing on a medium. The image can be recorded on photographic film or a digital sensor. If you're curious, you can hold a lens near a window, and hold blank paper behind it. Move the paper close to the lens until the image is in focus. You should see an inverted circular image of what's outside the window.</span></p><p></p><table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto;"><tbody><tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjd6W9EjbAXfCQJCs-s-4PZ1XX9npbJ2nXsHY0MfX-zgJF7VbL1X9F2lwJL_MN4b_iq6S1LSq6SYqxqdmfy68cJIIcCpXUk79CES7rO8GmQ08waIbhVD3zcE_QogAhdNz58MWNhyphenhyphenYAuPJ8GybpX0dZv0Gkht_Eky232zEj7Gns7jI6HR428cAypyAjZI1X0/s2644/E1022098.JPG" style="margin-left: auto; margin-right: auto;"><span style="font-family: courier;"><img border="0" data-original-height="2644" data-original-width="2644" height="640" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjd6W9EjbAXfCQJCs-s-4PZ1XX9npbJ2nXsHY0MfX-zgJF7VbL1X9F2lwJL_MN4b_iq6S1LSq6SYqxqdmfy68cJIIcCpXUk79CES7rO8GmQ08waIbhVD3zcE_QogAhdNz58MWNhyphenhyphenYAuPJ8GybpX0dZv0Gkht_Eky232zEj7Gns7jI6HR428cAypyAjZI1X0/w640-h640/E1022098.JPG" width="640" /></span></a></td></tr><tr><td class="tr-caption" style="text-align: center;"><span style="font-family: courier;">Holding my Nikon 50mm and trying to focus it on this pad while taking the picture proved quite clumsy.</span></td></tr></tbody></table><span style="font-family: courier;"><br />A full-frame camera would render a picture as if drawing a 36mm x 24mm rectangle in that image. An APS-C sensor is about 24x16, and would be that smaller rectangle. A M43 sensor would be a 17x13 rectangle in that image.<br /><span><br /></span></span><p></p><h2 style="text-align: left;"><span style="font-family: courier;"><span>FOV Equivalence:</span></span></h2><p><span style="font-family: courier;"><span>Right away the idea of smaller sensors being crops of the full-frame image should come to mind. It's a tighter field of view - so how can you get a similar picture? The main idea of equivalence <i>should</i> be about framing your shot. </span></span></p><p><span style="font-family: courier;">Let's assume that you liked 50mm lenses on full-frame cameras. If you picked up a micro four-thirds camera, what lens would give you a similar feel? Well because of the smaller sensor, you will need a wider lens. 25mm is quite close. If you were looking for a lens on APS-C cameras, you'd need 35mm.</span></p><p><span style="font-family: courier;">This is where the idea of <span style="color: red;">crop-factor </span>comes into play. It is the ratio of the sensor's diagonal, comparing the full-frame sensor to the cropped sensor of APS*/M43 and other sensors.</span></p><p><span style="font-family: courier;">APS-C has a crop-factor of 1.5 (in general - Canon does 1.6). Micro four-thirds has a crop factor of 2. These numbers can be used to quickly figure out equivalent focal lengths on their respective systems.</span></p><p><span style="font-family: courier;">Most smartphone cameras have a crop-factor of 5 or 6.</span></p><p><span style="font-family: courier;"><br /></span></p><h2 style="text-align: left;"><span style="font-family: courier;">Depth Of Field Equivalence:</span></h2><div><span style="font-family: courier;">When your camera is focused on a point, some objects in front of and behind that point are also in focus. This area of sharpness is the "depth of field". </span></div><p><span style="font-family: courier;"><span>If I composed a shot on the full-frame A7II, then with the same lens I'd need to recompose on the smaller sensor Panasonic G9. I'd have to step back because the lens has a narrower field of view on that smaller sensor. </span>If you step back, you increase the depth of field.</span></p><p><span style="font-family: courier;">If instead I switch to a wide lens to compose the image in the same place? Wider lens, increased depth of field. The only way to frame it and get the blur right would be to use a wider lens <i>and </i>faster aperture.</span></p><p><span style="font-family: courier;">If I wanted to blur the background of an image, and I shot 50mm F2.8 on the full-frame camera, I'd need to shoot 25mm F1.4 on the Micro four-thirds for the same shot. If I shoot 50mm F1.4 on the full frame, I wouldn't be able to copy the depth of field at that composition, because I'd require a 25mm F0.7 lens for micro four-thirds.</span></p><p><span style="font-family: courier;">This will matter more to photographers using fast zooms, for which there are few equivalent options in crop sensor formats. A 2.8 zoom can still give great subject isolation and background blur on a full-frame camera. The equivalent would be an F2.0 zoom on APS-C or an F1.4 zoom on micro four-thirds. Lenses with those f-stops don't <i>really</i> exist (OK.. Sigma's F1.8 zoom and Panasonic's F1.7!) but some primes can deliver enough blur - or just shoot differently. Nobody says you must take every type of shot, with every camera.</span></p><p><span style="font-family: courier;"><br /></span></p><h2 style="text-align: left;"><span style="font-family: courier;">Depth of field equivalence is usually not as important as some make it appear:</span></h2><div style="text-align: left;"><span style="font-family: courier;">When taking pictures it's helpful to know the field of view. Are you shooting wide, normal, or telephoto. Are you trying to compress the image and pick your backgrounds or capture as much of the sky as possible?</span></div><div style="text-align: left;"><span style="font-family: courier;"><br /></span></div><div><span style="font-family: courier;">I switch between full-frame and micro four-thirds, and rarely think about equivalence for depth of field. Macro excluded - that's always a special case here 😛.</span></div><div><span style="font-family: courier;"><br /></span></div><div><span style="font-family: courier;">For group photos taken indoors, I will likely need a wide field of view. I may use 14mm for micro four-thirds. I might use 28mm on my full-frame.</span></div><div><span style="font-family: courier;"><br /></span></div><div><span style="font-family: courier;">I'll probably shoot both kit zooms wide open at F4, and not care about depth of field, because the kit lenses are slow enough not to worry.</span></div><div><span style="font-family: courier;"><br /></span></div><div><span style="font-family: courier;">I love the shallow depth of field I can get with the A7II and a 50mm F1.4, but I'm also satisfied with what I can get (at least most of the time) with my micro four-thirds Panasonic G9 and some manual glass. I really love to melt messy backgrounds, and some speed-boosted primes are enough to do that.</span></div><div><span style="font-family: courier;"><br /></span></div><div><span style="font-family: courier;"><br /></span></div><div><span style="font-family: courier;">Relatively cheap speed...</span></div><div><span style="font-family: courier;"><br /></span></div><table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto;"><tbody><tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjSTJqQi1kbe5ww3eexm2GHrMVORjddc2M7BcKbJ5ZlTdeqFjlsHDrpnkhzXneqlG-Pw7A_WaOnNoRzKAiKoGFgwOdg-zqwlOPqm7qALRgxoVPeGLAyVf5CoFBD4D6GIl-IyYoIuHow3csiIMxFJUGHIuDQQ-vpq7Dg0CemhcyDl74mnNCpw1Ax8Tkzbt7m/s2016/rPRJC8391.jpg" style="margin-left: auto; margin-right: auto;"><span style="font-family: courier;"><img border="0" data-original-height="1692" data-original-width="2016" height="538" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjSTJqQi1kbe5ww3eexm2GHrMVORjddc2M7BcKbJ5ZlTdeqFjlsHDrpnkhzXneqlG-Pw7A_WaOnNoRzKAiKoGFgwOdg-zqwlOPqm7qALRgxoVPeGLAyVf5CoFBD4D6GIl-IyYoIuHow3csiIMxFJUGHIuDQQ-vpq7Dg0CemhcyDl74mnNCpw1Ax8Tkzbt7m/w640-h538/rPRJC8391.jpg" width="640" /></span></a></td></tr><tr><td class="tr-caption" style="text-align: center;"><span style="font-family: courier;">Canon 55mm F1.2 S.S.C. FD remounted to EF on Metabones focal reducer, 39mm F0.86.</span></td></tr></tbody></table><span style="font-family: courier;"><br /></span><table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto;"><tbody><tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjeDE3qaG2rL88Gcl3ctFgcYOgTIi5t8JEppspLx-_VJ-FB2EurbHMrpSI68yrE_AW3fZs4oYLhwZdXbA1WKApVcmOBQb1doVfhWxKVxMDpnq1hfRpi1W_9vi5vF5Dkoy1rp-00rh2R7gsF1XGdF3NjMnOnKbGSNY8xjtFtjMkHhepUpFnGjgNkY7VbqmoR/s2016/rPRJC8394.jpg" style="margin-left: auto; margin-right: auto;"><span style="font-family: courier;"><img border="0" data-original-height="1692" data-original-width="2016" height="538" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjeDE3qaG2rL88Gcl3ctFgcYOgTIi5t8JEppspLx-_VJ-FB2EurbHMrpSI68yrE_AW3fZs4oYLhwZdXbA1WKApVcmOBQb1doVfhWxKVxMDpnq1hfRpi1W_9vi5vF5Dkoy1rp-00rh2R7gsF1XGdF3NjMnOnKbGSNY8xjtFtjMkHhepUpFnGjgNkY7VbqmoR/w640-h538/rPRJC8394.jpg" width="640" /></span></a></td></tr><tr><td class="tr-caption" style="text-align: center;"><span style="font-family: courier;">Nikon 35mm F1.4 AI-s, adapted to Canon EF, on Pixco focal reducer, 25mm F1.0.</span></td></tr></tbody></table><span style="font-family: courier;"><br /></span><div><span style="font-family: courier;"><br /></span></div><div><span style="font-family: courier;"><br /></span></div><h2 style="text-align: left;"><span style="font-family: courier;">FOV Equivalence Table:</span></h2><p><span style="font-family: courier;"><google-sheets-html-origin></google-sheets-html-origin></span></p><p><span style="font-family: courier;"><google-sheets-html-origin></google-sheets-html-origin></span></p><div><span style="font-family: courier;"><br /></span></div><div><google-sheets-html-origin><span style="font-family: courier;"></span><table border="1" cellpadding="0" cellspacing="0" data-sheets-root="1" dir="ltr" style="border-collapse: collapse; border: none; font-size: 10pt; table-layout: fixed; width: 0px;" xmlns="http://www.w3.org/1999/xhtml"><colgroup><col width="100"></col><col width="100"></col><col width="100"></col><col width="100"></col></colgroup><tbody><tr style="height: 21px;"><td style="border-color: rgb(204, 204, 204) rgb(0, 0, 0) rgb(0, 0, 0) rgb(204, 204, 204); border-image: initial; border-style: solid; border-width: 1px; overflow: hidden; padding: 2px 3px; vertical-align: bottom;"></td><td data-sheets-value="{"1":2,"2":"FF"}" style="background-color: cyan; border-color: rgb(0, 0, 0) rgb(0, 0, 0) rgb(0, 0, 0) rgb(204, 204, 204); border-image: initial; border-style: solid; border-width: 1px; color: #5b0f00; font-weight: bold; overflow: hidden; padding: 2px 3px; text-align: center; vertical-align: bottom;">FF</td><td data-sheets-numberformat="{"1":2,"2":"#,##0.00","3":1}" data-sheets-value="{"1":2,"2":"APS-C"}" style="background-color: #b7e1cd; border-color: rgb(0, 0, 0) rgb(0, 0, 0) rgb(0, 0, 0) rgb(204, 204, 204); border-image: initial; border-style: solid; border-width: 1px; color: #5b0f00; font-weight: bold; overflow: hidden; padding: 2px 3px; text-align: center; vertical-align: bottom;">APS-C</td><td data-sheets-numberformat="{"1":2,"2":"#,##0.00","3":1}" data-sheets-value="{"1":2,"2":"M43"}" style="background-color: #ffd966; border-color: rgb(0, 0, 0) rgb(0, 0, 0) rgb(0, 0, 0) rgb(204, 204, 204); border-image: initial; border-style: solid; border-width: 1px; color: #5b0f00; font-weight: bold; overflow: hidden; padding: 2px 3px; text-align: center; vertical-align: bottom;">M43</td></tr><tr style="height: 21px;"><td data-sheets-value="{"1":2,"2":"sensor width"}" style="background-color: #f4cccc; border-color: rgb(204, 204, 204) rgb(0, 0, 0) rgb(0, 0, 0); border-image: initial; border-style: solid; border-width: 1px; color: #5b0f00; font-weight: bold; overflow: hidden; padding: 2px 3px; text-align: center; vertical-align: bottom;">sensor width</td><td data-sheets-value="{"1":3,"3":36}" style="background-color: cyan; border-color: rgb(204, 204, 204) rgb(0, 0, 0) rgb(0, 0, 0) rgb(204, 204, 204); border-image: initial; border-style: solid; border-width: 1px; color: #5b0f00; font-weight: bold; overflow: hidden; padding: 2px 3px; text-align: center; vertical-align: bottom;">36</td><td data-sheets-numberformat="{"1":2,"2":"#,##0.00","3":1}" data-sheets-value="{"1":3,"3":23.6}" style="background-color: #b7e1cd; border-color: rgb(204, 204, 204) rgb(0, 0, 0) rgb(0, 0, 0) rgb(204, 204, 204); border-image: initial; border-style: solid; border-width: 1px; color: #5b0f00; font-weight: bold; overflow: hidden; padding: 2px 3px; text-align: center; vertical-align: bottom;">23.60</td><td data-sheets-numberformat="{"1":2,"2":"#,##0.00","3":1}" data-sheets-value="{"1":3,"3":17.3}" style="background-color: #ffd966; border-color: rgb(204, 204, 204) rgb(0, 0, 0) rgb(0, 0, 0) rgb(204, 204, 204); border-image: initial; border-style: solid; border-width: 1px; color: #5b0f00; font-weight: bold; overflow: hidden; padding: 2px 3px; text-align: center; vertical-align: bottom;">17.30</td></tr><tr style="height: 21px;"><td data-sheets-value="{"1":2,"2":"sensor height"}" style="background-color: #f4cccc; border-color: rgb(204, 204, 204) rgb(0, 0, 0) rgb(0, 0, 0); border-image: initial; border-style: solid; border-width: 1px; color: #5b0f00; font-weight: bold; overflow: hidden; padding: 2px 3px; text-align: center; vertical-align: bottom;">sensor height</td><td data-sheets-value="{"1":3,"3":24}" style="background-color: cyan; border-color: rgb(204, 204, 204) rgb(0, 0, 0) rgb(0, 0, 0) rgb(204, 204, 204); border-image: initial; border-style: solid; border-width: 1px; color: #5b0f00; font-weight: bold; overflow: hidden; padding: 2px 3px; text-align: center; vertical-align: bottom;">24</td><td data-sheets-numberformat="{"1":2,"2":"#,##0.00","3":1}" data-sheets-value="{"1":3,"3":15.7}" style="background-color: #b7e1cd; border-color: rgb(204, 204, 204) rgb(0, 0, 0) rgb(0, 0, 0) rgb(204, 204, 204); border-image: initial; border-style: solid; border-width: 1px; color: #5b0f00; font-weight: bold; overflow: hidden; padding: 2px 3px; text-align: center; vertical-align: bottom;">15.70</td><td data-sheets-numberformat="{"1":2,"2":"#,##0.00","3":1}" data-sheets-value="{"1":3,"3":13}" style="background-color: #ffd966; border-color: rgb(204, 204, 204) rgb(0, 0, 0) rgb(0, 0, 0) rgb(204, 204, 204); border-image: initial; border-style: solid; border-width: 1px; color: #5b0f00; font-weight: bold; overflow: hidden; padding: 2px 3px; text-align: center; vertical-align: bottom;">13.00</td></tr><tr style="height: 21px;"><td data-sheets-value="{"1":2,"2":"x/FF"}" style="background-color: #f4cccc; border-color: rgb(204, 204, 204) rgb(0, 0, 0) rgb(0, 0, 0); border-image: initial; border-style: solid; border-width: 1px; color: #5b0f00; font-weight: bold; overflow: hidden; padding: 2px 3px; text-align: center; vertical-align: bottom;">x/FF</td><td data-sheets-formula="=(R[-2]C[0]*R[-1]C[0])/(R[-2]C4*R[-1]C4)" data-sheets-numberformat="{"1":2,"2":"#,##0.00","3":1}" data-sheets-value="{"1":3,"3":1}" style="background-color: cyan; border-color: rgb(204, 204, 204) rgb(0, 0, 0) rgb(0, 0, 0) rgb(204, 204, 204); border-image: initial; border-style: solid; border-width: 1px; color: #5b0f00; font-weight: bold; overflow: hidden; padding: 2px 3px; text-align: center; vertical-align: bottom;">1.00</td><td data-sheets-formula="=(R[-2]C[0]*R[-1]C[0])/(R[-2]C[-1]*R[-1]C[-1])" data-sheets-numberformat="{"1":2,"2":"#,##0.00","3":1}" data-sheets-value="{"1":3,"3":0.42884259259259255}" style="background-color: #b7e1cd; border-color: rgb(204, 204, 204) rgb(0, 0, 0) rgb(0, 0, 0) rgb(204, 204, 204); border-image: initial; border-style: solid; border-width: 1px; color: #5b0f00; font-weight: bold; overflow: hidden; padding: 2px 3px; text-align: center; vertical-align: bottom;">0.43</td><td data-sheets-formula="=(R[-2]C[0]*R[-1]C[0])/(R[-2]C[-2]*R[-1]C[-2])" data-sheets-numberformat="{"1":2,"2":"#,##0.00","3":1}" data-sheets-value="{"1":3,"3":0.2603009259259259}" style="background-color: #ffd966; border-color: rgb(204, 204, 204) rgb(0, 0, 0) rgb(0, 0, 0) rgb(204, 204, 204); border-image: initial; border-style: solid; border-width: 1px; color: #5b0f00; font-weight: bold; overflow: hidden; padding: 2px 3px; text-align: center; vertical-align: bottom;">0.26</td></tr></tbody></table></google-sheets-html-origin></div><div><google-sheets-html-origin><span style="font-family: courier;"><br /></span></google-sheets-html-origin></div><div><span style="font-family: courier;"><br /></span></div><div><google-sheets-html-origin><span style="font-family: courier;"></span><table border="1" cellpadding="0" cellspacing="0" data-sheets-root="1" dir="ltr" style="border-collapse: collapse; border: none; font-size: 10pt; table-layout: fixed; width: 0px;" xmlns="http://www.w3.org/1999/xhtml"><colgroup><col width="100"></col><col width="100"></col><col width="100"></col><col width="100"></col><col width="100"></col><col width="100"></col><col width="100"></col></colgroup><tbody><tr style="height: 21px;"><td style="border-color: rgb(204, 204, 204) rgb(0, 0, 0) rgb(0, 0, 0) rgb(204, 204, 204); border-image: initial; border-style: solid; border-width: 1px; overflow: hidden; padding: 2px 3px; vertical-align: bottom;"></td><td colspan="2" data-sheets-value="{"1":2,"2":"Full Frame"}" rowspan="1" style="background-color: cyan; border-color: rgb(0, 0, 0) rgb(0, 0, 0) rgb(0, 0, 0) rgb(204, 204, 204); border-image: initial; border-style: solid; border-width: 1px; color: #4c1130; font-weight: bold; overflow: hidden; padding: 2px 3px; text-align: center; vertical-align: bottom;">Full Frame</td><td colspan="2" data-sheets-value="{"1":2,"2":"APS-C"}" rowspan="1" style="background-color: #b7e1cd; border-color: rgb(0, 0, 0) rgb(0, 0, 0) rgb(0, 0, 0) rgb(204, 204, 204); border-image: initial; border-style: solid; border-width: 1px; color: #4c1130; font-weight: bold; overflow: hidden; padding: 2px 3px; text-align: center; vertical-align: bottom;">APS-C</td><td colspan="2" data-sheets-value="{"1":2,"2":"M43"}" rowspan="1" style="background-color: #ffd966; border-color: rgb(0, 0, 0) rgb(0, 0, 0) rgb(0, 0, 0) rgb(204, 204, 204); border-image: initial; border-style: solid; border-width: 1px; color: #4c1130; font-weight: bold; overflow: hidden; padding: 2px 3px; text-align: center; vertical-align: bottom;">M43</td></tr><tr style="height: 21px;"><td data-sheets-value="{"1":2,"2":"Focal Length"}" style="background-color: #f4cccc; border-color: rgb(204, 204, 204) rgb(0, 0, 0) rgb(0, 0, 0); border-image: initial; border-style: solid; border-width: 1px; color: #4c1130; font-weight: bold; overflow: hidden; padding: 2px 3px; text-align: center; vertical-align: bottom;">Focal Length</td><td data-sheets-value="{"1":2,"2":"FOV horizontal"}" style="background-color: cyan; border-color: rgb(204, 204, 204) rgb(0, 0, 0) rgb(0, 0, 0) rgb(204, 204, 204); border-image: initial; border-style: solid; border-width: 1px; color: #4c1130; font-weight: bold; overflow: hidden; padding: 2px 3px; text-align: center; vertical-align: bottom;">FOV horizontal</td><td data-sheets-value="{"1":2,"2":"FOV vertical"}" style="background-color: cyan; border-color: rgb(204, 204, 204) rgb(0, 0, 0) rgb(0, 0, 0) rgb(204, 204, 204); border-image: initial; border-style: solid; border-width: 1px; color: #4c1130; font-weight: bold; overflow: hidden; padding: 2px 3px; text-align: center; vertical-align: bottom;">FOV vertical</td><td data-sheets-value="{"1":2,"2":"FOV horizontal"}" style="background-color: #b7e1cd; border-color: rgb(204, 204, 204) rgb(0, 0, 0) rgb(0, 0, 0) rgb(204, 204, 204); border-image: initial; border-style: solid; border-width: 1px; color: #4c1130; font-weight: bold; overflow: hidden; padding: 2px 3px; text-align: center; vertical-align: bottom;">FOV horizontal</td><td data-sheets-value="{"1":2,"2":"FOV vertical"}" style="background-color: #b7e1cd; border-color: rgb(204, 204, 204) rgb(0, 0, 0) rgb(0, 0, 0) rgb(204, 204, 204); border-image: initial; border-style: solid; border-width: 1px; color: #4c1130; font-weight: bold; overflow: hidden; padding: 2px 3px; text-align: center; vertical-align: bottom;">FOV vertical</td><td data-sheets-value="{"1":2,"2":"FOV horizontal"}" style="background-color: #ffd966; border-color: rgb(204, 204, 204) rgb(0, 0, 0) rgb(0, 0, 0) rgb(204, 204, 204); border-image: initial; border-style: solid; border-width: 1px; color: #4c1130; font-weight: bold; overflow: hidden; padding: 2px 3px; text-align: center; vertical-align: bottom;">FOV horizontal</td><td data-sheets-value="{"1":2,"2":"FOV vertical"}" style="background-color: #ffd966; border-color: rgb(204, 204, 204) rgb(0, 0, 0) rgb(0, 0, 0) rgb(204, 204, 204); border-image: initial; border-style: solid; border-width: 1px; color: #4c1130; font-weight: bold; overflow: hidden; padding: 2px 3px; text-align: center; vertical-align: bottom;">FOV vertical</td></tr><tr style="height: 21px;"><td data-sheets-value="{"1":3,"3":12}" style="background-color: #f4cccc; border-color: rgb(204, 204, 204) rgb(0, 0, 0) rgb(0, 0, 0); border-image: initial; border-style: solid; border-width: 1px; color: #4c1130; font-weight: bold; overflow: hidden; padding: 2px 3px; text-align: center; vertical-align: bottom;">12</td><td data-sheets-formula="=2*atan(0.5*R3C4/R[0]C[-1])*(180/PI())" data-sheets-numberformat="{"1":2,"2":"#,##0.00","3":1}" data-sheets-value="{"1":3,"3":112.61986494804043}" style="background-color: cyan; border-color: rgb(204, 204, 204) rgb(0, 0, 0) rgb(0, 0, 0) rgb(204, 204, 204); border-image: initial; border-style: solid; border-width: 1px; color: #4c1130; font-weight: bold; overflow: hidden; padding: 2px 3px; text-align: center; vertical-align: bottom;">112.62</td><td data-sheets-formula="=2*atan(0.5*R4C4/R[0]C[-2])*(180/PI())" data-sheets-numberformat="{"1":2,"2":"#,##0.00","3":1}" data-sheets-value="{"1":3,"3":90}" style="background-color: cyan; border-color: rgb(204, 204, 204) rgb(0, 0, 0) rgb(0, 0, 0) rgb(204, 204, 204); border-image: initial; border-style: solid; border-width: 1px; color: #4c1130; font-weight: bold; overflow: hidden; padding: 2px 3px; text-align: center; vertical-align: bottom;">90.00</td><td data-sheets-formula="=2*atan(0.5*R3C5/R[0]C3)*(180/PI())" data-sheets-numberformat="{"1":2,"2":"#,##0.00","3":1}" data-sheets-value="{"1":3,"3":89.0370683883233}" style="background-color: #b7e1cd; border-color: rgb(204, 204, 204) rgb(0, 0, 0) rgb(0, 0, 0) rgb(204, 204, 204); border-image: initial; border-style: solid; border-width: 1px; color: #4c1130; font-weight: bold; overflow: hidden; padding: 2px 3px; text-align: center; vertical-align: bottom;">89.04</td><td data-sheets-formula="=2*atan(0.5*R4C5/R[0]C3)*(180/PI())" data-sheets-numberformat="{"1":2,"2":"#,##0.00","3":1}" data-sheets-value="{"1":3,"3":66.38274821655206}" style="background-color: #b7e1cd; border-color: rgb(204, 204, 204) rgb(0, 0, 0) rgb(0, 0, 0) rgb(204, 204, 204); border-image: initial; border-style: solid; border-width: 1px; color: #4c1130; font-weight: bold; overflow: hidden; padding: 2px 3px; text-align: center; vertical-align: bottom;">66.38</td><td data-sheets-formula="=2*atan(0.5*R3C6/R[0]C3)*(180/PI())" data-sheets-numberformat="{"1":2,"2":"#,##0.00","3":1}" data-sheets-value="{"1":3,"3":71.57064018120727}" style="background-color: #ffd966; border-color: rgb(204, 204, 204) rgb(0, 0, 0) rgb(0, 0, 0) rgb(204, 204, 204); border-image: initial; border-style: solid; border-width: 1px; color: #4c1130; font-weight: bold; overflow: hidden; padding: 2px 3px; text-align: center; vertical-align: bottom;">71.57</td><td data-sheets-formula="=2*atan(0.5*R4C6/R[0]C3)*(180/PI())" data-sheets-numberformat="{"1":2,"2":"#,##0.00","3":1}" data-sheets-value="{"1":3,"3":56.885857248726694}" style="background-color: #ffd966; border-color: rgb(204, 204, 204) rgb(0, 0, 0) rgb(0, 0, 0) rgb(204, 204, 204); border-image: initial; border-style: solid; border-width: 1px; color: #4c1130; font-weight: bold; overflow: hidden; padding: 2px 3px; text-align: center; vertical-align: bottom;">56.89</td></tr><tr style="height: 21px;"><td data-sheets-value="{"1":3,"3":14}" style="background-color: #f4cccc; border-color: rgb(204, 204, 204) rgb(0, 0, 0) rgb(0, 0, 0); border-image: initial; border-style: solid; border-width: 1px; color: #4c1130; font-weight: bold; overflow: hidden; padding: 2px 3px; text-align: center; vertical-align: bottom;">14</td><td data-sheets-formula="=2*atan(0.5*R3C4/R[0]C[-1])*(180/PI())" data-sheets-numberformat="{"1":2,"2":"#,##0.00","3":1}" data-sheets-value="{"1":3,"3":104.2500326978036}" style="background-color: cyan; border-color: rgb(204, 204, 204) rgb(0, 0, 0) rgb(0, 0, 0) rgb(204, 204, 204); border-image: initial; border-style: solid; border-width: 1px; color: #4c1130; font-weight: bold; overflow: hidden; padding: 2px 3px; text-align: center; vertical-align: bottom;">104.25</td><td data-sheets-formula="=2*atan(0.5*R4C4/R[0]C[-2])*(180/PI())" data-sheets-numberformat="{"1":2,"2":"#,##0.00","3":1}" data-sheets-value="{"1":3,"3":81.20258929000894}" style="background-color: cyan; border-color: rgb(204, 204, 204) rgb(0, 0, 0) rgb(0, 0, 0) rgb(204, 204, 204); border-image: initial; border-style: solid; border-width: 1px; color: #4c1130; font-weight: bold; overflow: hidden; padding: 2px 3px; text-align: center; vertical-align: bottom;">81.20</td><td data-sheets-formula="=2*atan(0.5*R3C5/R[0]C3)*(180/PI())" data-sheets-numberformat="{"1":2,"2":"#,##0.00","3":1}" data-sheets-value="{"1":3,"3":80.25220715559047}" style="background-color: #b7e1cd; border-color: rgb(204, 204, 204) rgb(0, 0, 0) rgb(0, 0, 0) rgb(204, 204, 204); border-image: initial; border-style: solid; border-width: 1px; color: #4c1130; font-weight: bold; overflow: hidden; padding: 2px 3px; text-align: center; vertical-align: bottom;">80.25</td><td data-sheets-formula="=2*atan(0.5*R4C5/R[0]C3)*(180/PI())" data-sheets-numberformat="{"1":2,"2":"#,##0.00","3":1}" data-sheets-value="{"1":3,"3":58.55994422981227}" style="background-color: #b7e1cd; border-color: rgb(204, 204, 204) rgb(0, 0, 0) rgb(0, 0, 0) rgb(204, 204, 204); border-image: initial; border-style: solid; border-width: 1px; color: #4c1130; font-weight: bold; overflow: hidden; padding: 2px 3px; text-align: center; vertical-align: bottom;">58.56</td><td data-sheets-formula="=2*atan(0.5*R3C6/R[0]C3)*(180/PI())" data-sheets-numberformat="{"1":2,"2":"#,##0.00","3":1}" data-sheets-value="{"1":3,"3":63.4202837377255}" style="background-color: #ffd966; border-color: rgb(204, 204, 204) rgb(0, 0, 0) rgb(0, 0, 0) rgb(204, 204, 204); border-image: initial; border-style: solid; border-width: 1px; color: #4c1130; font-weight: bold; overflow: hidden; padding: 2px 3px; text-align: center; vertical-align: bottom;">63.42</td><td data-sheets-formula="=2*atan(0.5*R4C6/R[0]C3)*(180/PI())" data-sheets-numberformat="{"1":2,"2":"#,##0.00","3":1}" data-sheets-value="{"1":3,"3":49.809537616190376}" style="background-color: #ffd966; border-color: rgb(204, 204, 204) rgb(0, 0, 0) rgb(0, 0, 0) rgb(204, 204, 204); border-image: initial; border-style: solid; border-width: 1px; color: #4c1130; font-weight: bold; overflow: hidden; padding: 2px 3px; text-align: center; vertical-align: bottom;">49.81</td></tr><tr style="height: 21px;"><td data-sheets-value="{"1":3,"3":16}" style="background-color: #f4cccc; border-color: rgb(204, 204, 204) rgb(0, 0, 0) rgb(0, 0, 0); border-image: initial; border-style: solid; border-width: 1px; color: #4c1130; font-weight: bold; overflow: hidden; padding: 2px 3px; text-align: center; vertical-align: bottom;">16</td><td data-sheets-formula="=2*atan(0.5*R3C4/R[0]C[-1])*(180/PI())" data-sheets-numberformat="{"1":2,"2":"#,##0.00","3":1}" data-sheets-value="{"1":3,"3":96.73292132685961}" style="background-color: cyan; border-color: rgb(204, 204, 204) rgb(0, 0, 0) rgb(0, 0, 0) rgb(204, 204, 204); border-image: initial; border-style: solid; border-width: 1px; color: #4c1130; font-weight: bold; overflow: hidden; padding: 2px 3px; text-align: center; vertical-align: bottom;">96.73</td><td data-sheets-formula="=2*atan(0.5*R4C4/R[0]C[-2])*(180/PI())" data-sheets-numberformat="{"1":2,"2":"#,##0.00","3":1}" data-sheets-value="{"1":3,"3":73.73979529168804}" style="background-color: cyan; border-color: rgb(204, 204, 204) rgb(0, 0, 0) rgb(0, 0, 0) rgb(204, 204, 204); border-image: initial; border-style: solid; border-width: 1px; color: #4c1130; font-weight: bold; overflow: hidden; padding: 2px 3px; text-align: center; vertical-align: bottom;">73.74</td><td data-sheets-formula="=2*atan(0.5*R3C5/R[0]C3)*(180/PI())" data-sheets-numberformat="{"1":2,"2":"#,##0.00","3":1}" data-sheets-value="{"1":3,"3":72.81754913554472}" style="background-color: #b7e1cd; border-color: rgb(204, 204, 204) rgb(0, 0, 0) rgb(0, 0, 0) rgb(204, 204, 204); border-image: initial; border-style: solid; border-width: 1px; color: #4c1130; font-weight: bold; overflow: hidden; padding: 2px 3px; text-align: center; vertical-align: bottom;">72.82</td><td data-sheets-formula="=2*atan(0.5*R4C5/R[0]C3)*(180/PI())" data-sheets-numberformat="{"1":2,"2":"#,##0.00","3":1}" data-sheets-value="{"1":3,"3":52.267446939080656}" style="background-color: #b7e1cd; border-color: rgb(204, 204, 204) rgb(0, 0, 0) rgb(0, 0, 0) rgb(204, 204, 204); border-image: initial; border-style: solid; border-width: 1px; color: #4c1130; font-weight: bold; overflow: hidden; padding: 2px 3px; text-align: center; vertical-align: bottom;">52.27</td><td data-sheets-formula="=2*atan(0.5*R3C6/R[0]C3)*(180/PI())" data-sheets-numberformat="{"1":2,"2":"#,##0.00","3":1}" data-sheets-value="{"1":3,"3":56.79352848713613}" style="background-color: #ffd966; border-color: rgb(204, 204, 204) rgb(0, 0, 0) rgb(0, 0, 0) rgb(204, 204, 204); border-image: initial; border-style: solid; border-width: 1px; color: #4c1130; font-weight: bold; overflow: hidden; padding: 2px 3px; text-align: center; vertical-align: bottom;">56.79</td><td data-sheets-formula="=2*atan(0.5*R4C6/R[0]C3)*(180/PI())" data-sheets-numberformat="{"1":2,"2":"#,##0.00","3":1}" data-sheets-value="{"1":3,"3":44.218896687503346}" style="background-color: #ffd966; border-color: rgb(204, 204, 204) rgb(0, 0, 0) rgb(0, 0, 0) rgb(204, 204, 204); border-image: initial; border-style: solid; border-width: 1px; color: #4c1130; font-weight: bold; overflow: hidden; padding: 2px 3px; text-align: center; vertical-align: bottom;">44.22</td></tr><tr style="height: 21px;"><td data-sheets-value="{"1":3,"3":20}" style="background-color: #f4cccc; border-color: rgb(204, 204, 204) rgb(0, 0, 0) rgb(0, 0, 0); border-image: initial; border-style: solid; border-width: 1px; color: #4c1130; font-weight: bold; overflow: hidden; padding: 2px 3px; text-align: center; vertical-align: bottom;">20</td><td data-sheets-formula="=2*atan(0.5*R3C4/R[0]C[-1])*(180/PI())" data-sheets-numberformat="{"1":2,"2":"#,##0.00","3":1}" data-sheets-value="{"1":3,"3":83.97442499163331}" style="background-color: cyan; border-color: rgb(204, 204, 204) rgb(0, 0, 0) rgb(0, 0, 0) rgb(204, 204, 204); border-image: initial; border-style: solid; border-width: 1px; color: #4c1130; font-weight: bold; overflow: hidden; padding: 2px 3px; text-align: center; vertical-align: bottom;">83.97</td><td data-sheets-formula="=2*atan(0.5*R4C4/R[0]C[-2])*(180/PI())" data-sheets-numberformat="{"1":2,"2":"#,##0.00","3":1}" data-sheets-value="{"1":3,"3":61.92751306414704}" style="background-color: cyan; border-color: rgb(204, 204, 204) rgb(0, 0, 0) rgb(0, 0, 0) rgb(204, 204, 204); border-image: initial; border-style: solid; border-width: 1px; color: #4c1130; font-weight: bold; overflow: hidden; padding: 2px 3px; text-align: center; vertical-align: bottom;">61.93</td><td data-sheets-formula="=2*atan(0.5*R3C5/R[0]C3)*(180/PI())" data-sheets-numberformat="{"1":2,"2":"#,##0.00","3":1}" data-sheets-value="{"1":3,"3":61.08120969936301}" style="background-color: #b7e1cd; border-color: rgb(204, 204, 204) rgb(0, 0, 0) rgb(0, 0, 0) rgb(204, 204, 204); border-image: initial; border-style: solid; border-width: 1px; color: #4c1130; font-weight: bold; overflow: hidden; padding: 2px 3px; text-align: center; vertical-align: bottom;">61.08</td><td data-sheets-formula="=2*atan(0.5*R4C5/R[0]C3)*(180/PI())" data-sheets-numberformat="{"1":2,"2":"#,##0.00","3":1}" data-sheets-value="{"1":3,"3":42.860014603504766}" style="background-color: #b7e1cd; border-color: rgb(204, 204, 204) rgb(0, 0, 0) rgb(0, 0, 0) rgb(204, 204, 204); border-image: initial; border-style: solid; border-width: 1px; color: #4c1130; font-weight: bold; overflow: hidden; padding: 2px 3px; text-align: center; vertical-align: bottom;">42.86</td><td data-sheets-formula="=2*atan(0.5*R3C6/R[0]C3)*(180/PI())" data-sheets-numberformat="{"1":2,"2":"#,##0.00","3":1}" data-sheets-value="{"1":3,"3":46.7769648579898}" style="background-color: #ffd966; border-color: rgb(204, 204, 204) rgb(0, 0, 0) rgb(0, 0, 0) rgb(204, 204, 204); border-image: initial; border-style: solid; border-width: 1px; color: #4c1130; font-weight: bold; overflow: hidden; padding: 2px 3px; text-align: center; vertical-align: bottom;">46.78</td><td data-sheets-formula="=2*atan(0.5*R4C6/R[0]C3)*(180/PI())" data-sheets-numberformat="{"1":2,"2":"#,##0.00","3":1}" data-sheets-value="{"1":3,"3":36.00832321182676}" style="background-color: #ffd966; border-color: rgb(204, 204, 204) rgb(0, 0, 0) rgb(0, 0, 0) rgb(204, 204, 204); border-image: initial; border-style: solid; border-width: 1px; color: #4c1130; font-weight: bold; overflow: hidden; padding: 2px 3px; text-align: center; vertical-align: bottom;">36.01</td></tr><tr style="height: 21px;"><td data-sheets-value="{"1":3,"3":24}" style="background-color: #f4cccc; border-color: rgb(204, 204, 204) rgb(0, 0, 0) rgb(0, 0, 0); border-image: initial; border-style: solid; border-width: 1px; color: #4c1130; font-weight: bold; overflow: hidden; padding: 2px 3px; text-align: center; vertical-align: bottom;">24</td><td data-sheets-formula="=2*atan(0.5*R3C4/R[0]C[-1])*(180/PI())" data-sheets-numberformat="{"1":2,"2":"#,##0.00","3":1}" data-sheets-value="{"1":3,"3":73.73979529168804}" style="background-color: cyan; border-color: rgb(204, 204, 204) rgb(0, 0, 0) rgb(0, 0, 0) rgb(204, 204, 204); border-image: initial; border-style: solid; border-width: 1px; color: #4c1130; font-weight: bold; overflow: hidden; padding: 2px 3px; text-align: center; vertical-align: bottom;">73.74</td><td data-sheets-formula="=2*atan(0.5*R4C4/R[0]C[-2])*(180/PI())" data-sheets-numberformat="{"1":2,"2":"#,##0.00","3":1}" data-sheets-value="{"1":3,"3":53.13010235415598}" style="background-color: cyan; border-color: rgb(204, 204, 204) rgb(0, 0, 0) rgb(0, 0, 0) rgb(204, 204, 204); border-image: initial; border-style: solid; border-width: 1px; color: #4c1130; font-weight: bold; overflow: hidden; padding: 2px 3px; text-align: center; vertical-align: bottom;">53.13</td><td data-sheets-formula="=2*atan(0.5*R3C5/R[0]C3)*(180/PI())" data-sheets-numberformat="{"1":2,"2":"#,##0.00","3":1}" data-sheets-value="{"1":3,"3":52.36361506288648}" style="background-color: #b7e1cd; border-color: rgb(204, 204, 204) rgb(0, 0, 0) rgb(0, 0, 0) rgb(204, 204, 204); border-image: initial; border-style: solid; border-width: 1px; color: #4c1130; font-weight: bold; overflow: hidden; padding: 2px 3px; text-align: center; vertical-align: bottom;">52.36</td><td data-sheets-formula="=2*atan(0.5*R4C5/R[0]C3)*(180/PI())" data-sheets-numberformat="{"1":2,"2":"#,##0.00","3":1}" data-sheets-value="{"1":3,"3":36.22411610965541}" style="background-color: #b7e1cd; border-color: rgb(204, 204, 204) rgb(0, 0, 0) rgb(0, 0, 0) rgb(204, 204, 204); border-image: initial; border-style: solid; border-width: 1px; color: #4c1130; font-weight: bold; overflow: hidden; padding: 2px 3px; text-align: center; vertical-align: bottom;">36.22</td><td data-sheets-formula="=2*atan(0.5*R3C6/R[0]C3)*(180/PI())" data-sheets-numberformat="{"1":2,"2":"#,##0.00","3":1}" data-sheets-value="{"1":3,"3":39.64001558204184}" style="background-color: #ffd966; border-color: rgb(204, 204, 204) rgb(0, 0, 0) rgb(0, 0, 0) rgb(204, 204, 204); border-image: initial; border-style: solid; border-width: 1px; color: blue; font-weight: bold; overflow: hidden; padding: 2px 3px; text-align: center; vertical-align: bottom;">39.64</td><td data-sheets-formula="=2*atan(0.5*R4C6/R[0]C3)*(180/PI())" data-sheets-numberformat="{"1":2,"2":"#,##0.00","3":1}" data-sheets-value="{"1":3,"3":30.308136100625195}" style="background-color: #ffd966; border-color: rgb(204, 204, 204) rgb(0, 0, 0) rgb(0, 0, 0) rgb(204, 204, 204); border-image: initial; border-style: solid; border-width: 1px; color: blue; font-weight: bold; overflow: hidden; padding: 2px 3px; text-align: center; vertical-align: bottom;">30.31</td></tr><tr style="height: 21px;"><td data-sheets-value="{"1":3,"3":35}" style="background-color: #f4cccc; border-color: rgb(204, 204, 204) rgb(0, 0, 0) rgb(0, 0, 0); border-image: initial; border-style: solid; border-width: 1px; color: #4c1130; font-weight: bold; overflow: hidden; padding: 2px 3px; text-align: center; vertical-align: bottom;">35</td><td data-sheets-formula="=2*atan(0.5*R3C4/R[0]C[-1])*(180/PI())" data-sheets-numberformat="{"1":2,"2":"#,##0.00","3":1}" data-sheets-value="{"1":3,"3":54.43222311461495}" style="background-color: cyan; border-color: rgb(204, 204, 204) rgb(0, 0, 0) rgb(0, 0, 0) rgb(204, 204, 204); border-image: initial; border-style: solid; border-width: 1px; color: #4c1130; font-weight: bold; overflow: hidden; padding: 2px 3px; text-align: center; vertical-align: bottom;">54.43</td><td data-sheets-formula="=2*atan(0.5*R4C4/R[0]C[-2])*(180/PI())" data-sheets-numberformat="{"1":2,"2":"#,##0.00","3":1}" data-sheets-value="{"1":3,"3":37.84928883210247}" style="background-color: cyan; border-color: rgb(204, 204, 204) rgb(0, 0, 0) rgb(0, 0, 0) rgb(204, 204, 204); border-image: initial; border-style: solid; border-width: 1px; color: #4c1130; font-weight: bold; overflow: hidden; padding: 2px 3px; text-align: center; vertical-align: bottom;">37.85</td><td data-sheets-formula="=2*atan(0.5*R3C5/R[0]C3)*(180/PI())" data-sheets-numberformat="{"1":2,"2":"#,##0.00","3":1}" data-sheets-value="{"1":3,"3":37.26233295763187}" style="background-color: #b7e1cd; border-color: rgb(204, 204, 204) rgb(0, 0, 0) rgb(0, 0, 0) rgb(204, 204, 204); border-image: initial; border-style: solid; border-width: 1px; color: blue; font-weight: bold; overflow: hidden; padding: 2px 3px; text-align: center; vertical-align: bottom;">37.26</td><td data-sheets-formula="=2*atan(0.5*R4C5/R[0]C3)*(180/PI())" data-sheets-numberformat="{"1":2,"2":"#,##0.00","3":1}" data-sheets-value="{"1":3,"3":25.282848008108225}" style="background-color: #b7e1cd; border-color: rgb(204, 204, 204) rgb(0, 0, 0) rgb(0, 0, 0) rgb(204, 204, 204); border-image: initial; border-style: solid; border-width: 1px; color: blue; font-weight: bold; overflow: hidden; padding: 2px 3px; text-align: center; vertical-align: bottom;">25.28</td><td data-sheets-formula="=2*atan(0.5*R3C6/R[0]C3)*(180/PI())" data-sheets-numberformat="{"1":2,"2":"#,##0.00","3":1}" data-sheets-value="{"1":3,"3":27.764135015376986}" style="background-color: #ffd966; border-color: rgb(204, 204, 204) rgb(0, 0, 0) rgb(0, 0, 0) rgb(204, 204, 204); border-image: initial; border-style: solid; border-width: 1px; color: #4c1130; font-weight: bold; overflow: hidden; padding: 2px 3px; text-align: center; vertical-align: bottom;">27.76</td><td data-sheets-formula="=2*atan(0.5*R4C6/R[0]C3)*(180/PI())" data-sheets-numberformat="{"1":2,"2":"#,##0.00","3":1}" data-sheets-value="{"1":3,"3":21.041568627748724}" style="background-color: #ffd966; border-color: rgb(204, 204, 204) rgb(0, 0, 0) rgb(0, 0, 0) rgb(204, 204, 204); border-image: initial; border-style: solid; border-width: 1px; color: #4c1130; font-weight: bold; overflow: hidden; padding: 2px 3px; text-align: center; vertical-align: bottom;">21.04</td></tr><tr style="height: 21px;"><td data-sheets-value="{"1":3,"3":45}" style="background-color: #f4cccc; border-color: rgb(204, 204, 204) rgb(0, 0, 0) rgb(0, 0, 0); border-image: initial; border-style: solid; border-width: 1px; color: #4c1130; font-weight: bold; overflow: hidden; padding: 2px 3px; text-align: center; vertical-align: bottom;">45</td><td data-sheets-formula="=2*atan(0.5*R3C4/R[0]C[-1])*(180/PI())" data-sheets-numberformat="{"1":2,"2":"#,##0.00","3":1}" data-sheets-value="{"1":3,"3":43.60281897270362}" style="background-color: cyan; border-color: rgb(204, 204, 204) rgb(0, 0, 0) rgb(0, 0, 0) rgb(204, 204, 204); border-image: initial; border-style: solid; border-width: 1px; color: #4c1130; font-weight: bold; overflow: hidden; padding: 2px 3px; text-align: center; vertical-align: bottom;">43.60</td><td data-sheets-formula="=2*atan(0.5*R4C4/R[0]C[-2])*(180/PI())" data-sheets-numberformat="{"1":2,"2":"#,##0.00","3":1}" data-sheets-value="{"1":3,"3":29.862834356275105}" style="background-color: cyan; border-color: rgb(204, 204, 204) rgb(0, 0, 0) rgb(0, 0, 0) rgb(204, 204, 204); border-image: initial; border-style: solid; border-width: 1px; color: #4c1130; font-weight: bold; overflow: hidden; padding: 2px 3px; text-align: center; vertical-align: bottom;">29.86</td><td data-sheets-formula="=2*atan(0.5*R3C5/R[0]C3)*(180/PI())" data-sheets-numberformat="{"1":2,"2":"#,##0.00","3":1}" data-sheets-value="{"1":3,"3":29.38682674098246}" style="background-color: #b7e1cd; border-color: rgb(204, 204, 204) rgb(0, 0, 0) rgb(0, 0, 0) rgb(204, 204, 204); border-image: initial; border-style: solid; border-width: 1px; color: #4c1130; font-weight: bold; overflow: hidden; padding: 2px 3px; text-align: center; vertical-align: bottom;">29.39</td><td data-sheets-formula="=2*atan(0.5*R4C5/R[0]C3)*(180/PI())" data-sheets-numberformat="{"1":2,"2":"#,##0.00","3":1}" data-sheets-value="{"1":3,"3":19.790714928813237}" style="background-color: #b7e1cd; border-color: rgb(204, 204, 204) rgb(0, 0, 0) rgb(0, 0, 0) rgb(204, 204, 204); border-image: initial; border-style: solid; border-width: 1px; color: #4c1130; font-weight: bold; overflow: hidden; padding: 2px 3px; text-align: center; vertical-align: bottom;">19.79</td><td data-sheets-formula="=2*atan(0.5*R3C6/R[0]C3)*(180/PI())" data-sheets-numberformat="{"1":2,"2":"#,##0.00","3":1}" data-sheets-value="{"1":3,"3":21.761609101382867}" style="background-color: #ffd966; border-color: rgb(204, 204, 204) rgb(0, 0, 0) rgb(0, 0, 0) rgb(204, 204, 204); border-image: initial; border-style: solid; border-width: 1px; color: #4c1130; font-weight: bold; overflow: hidden; padding: 2px 3px; text-align: center; vertical-align: bottom;">21.76</td><td data-sheets-formula="=2*atan(0.5*R4C6/R[0]C3)*(180/PI())" data-sheets-numberformat="{"1":2,"2":"#,##0.00","3":1}" data-sheets-value="{"1":3,"3":16.43841849779812}" style="background-color: #ffd966; border-color: rgb(204, 204, 204) rgb(0, 0, 0) rgb(0, 0, 0) rgb(204, 204, 204); border-image: initial; border-style: solid; border-width: 1px; color: #4c1130; font-weight: bold; overflow: hidden; padding: 2px 3px; text-align: center; vertical-align: bottom;">16.44</td></tr><tr style="height: 21px;"><td data-sheets-value="{"1":3,"3":50}" style="background-color: #f4cccc; border-color: rgb(204, 204, 204) rgb(0, 0, 0) rgb(0, 0, 0); border-image: initial; border-style: solid; border-width: 1px; color: blue; font-weight: bold; overflow: hidden; padding: 2px 3px; text-align: center; vertical-align: bottom;">50</td><td data-sheets-formula="=2*atan(0.5*R3C4/R[0]C[-1])*(180/PI())" data-sheets-numberformat="{"1":2,"2":"#,##0.00","3":1}" data-sheets-value="{"1":3,"3":39.597752709049864}" style="background-color: cyan; border-color: rgb(204, 204, 204) rgb(0, 0, 0) rgb(0, 0, 0) rgb(204, 204, 204); border-image: initial; border-style: solid; border-width: 1px; color: blue; font-weight: bold; overflow: hidden; padding: 2px 3px; text-align: center; vertical-align: bottom;">39.60</td><td data-sheets-formula="=2*atan(0.5*R4C4/R[0]C[-2])*(180/PI())" data-sheets-numberformat="{"1":2,"2":"#,##0.00","3":1}" data-sheets-value="{"1":3,"3":26.991466561591622}" style="background-color: cyan; border-color: rgb(204, 204, 204) rgb(0, 0, 0) rgb(0, 0, 0) rgb(204, 204, 204); border-image: initial; border-style: solid; border-width: 1px; color: blue; font-weight: bold; overflow: hidden; padding: 2px 3px; text-align: center; vertical-align: bottom;">26.99</td><td data-sheets-formula="=2*atan(0.5*R3C5/R[0]C3)*(180/PI())" data-sheets-numberformat="{"1":2,"2":"#,##0.00","3":1}" data-sheets-value="{"1":3,"3":26.55767260474591}" style="background-color: #b7e1cd; border-color: rgb(204, 204, 204) rgb(0, 0, 0) rgb(0, 0, 0) rgb(204, 204, 204); border-image: initial; border-style: solid; border-width: 1px; color: #4c1130; font-weight: bold; overflow: hidden; padding: 2px 3px; text-align: center; vertical-align: bottom;">26.56</td><td data-sheets-formula="=2*atan(0.5*R4C5/R[0]C3)*(180/PI())" data-sheets-numberformat="{"1":2,"2":"#,##0.00","3":1}" data-sheets-value="{"1":3,"3":17.845204130699308}" style="background-color: #b7e1cd; border-color: rgb(204, 204, 204) rgb(0, 0, 0) rgb(0, 0, 0) rgb(204, 204, 204); border-image: initial; border-style: solid; border-width: 1px; color: #4c1130; font-weight: bold; overflow: hidden; padding: 2px 3px; text-align: center; vertical-align: bottom;">17.85</td><td data-sheets-formula="=2*atan(0.5*R3C6/R[0]C3)*(180/PI())" data-sheets-numberformat="{"1":2,"2":"#,##0.00","3":1}" data-sheets-value="{"1":3,"3":19.63004280270854}" style="background-color: #ffd966; border-color: rgb(204, 204, 204) rgb(0, 0, 0) rgb(0, 0, 0) rgb(204, 204, 204); border-image: initial; border-style: solid; border-width: 1px; color: #4c1130; font-weight: bold; overflow: hidden; padding: 2px 3px; text-align: center; vertical-align: bottom;">19.63</td><td data-sheets-formula="=2*atan(0.5*R4C6/R[0]C3)*(180/PI())" data-sheets-numberformat="{"1":2,"2":"#,##0.00","3":1}" data-sheets-value="{"1":3,"3":14.81382425699046}" style="background-color: #ffd966; border-color: rgb(204, 204, 204) rgb(0, 0, 0) rgb(0, 0, 0) rgb(204, 204, 204); border-image: initial; border-style: solid; border-width: 1px; color: #4c1130; font-weight: bold; overflow: hidden; padding: 2px 3px; text-align: center; vertical-align: bottom;">14.81</td></tr><tr style="height: 21px;"><td data-sheets-value="{"1":3,"3":85}" style="background-color: #f4cccc; border-color: rgb(204, 204, 204) rgb(0, 0, 0) rgb(0, 0, 0); border-image: initial; border-style: solid; border-width: 1px; color: #4c1130; font-weight: bold; overflow: hidden; padding: 2px 3px; text-align: center; vertical-align: bottom;">85</td><td data-sheets-formula="=2*atan(0.5*R3C4/R[0]C[-1])*(180/PI())" data-sheets-numberformat="{"1":2,"2":"#,##0.00","3":1}" data-sheets-value="{"1":3,"3":23.913168486298265}" style="background-color: cyan; border-color: rgb(204, 204, 204) rgb(0, 0, 0) rgb(0, 0, 0) rgb(204, 204, 204); border-image: initial; border-style: solid; border-width: 1px; color: #4c1130; font-weight: bold; overflow: hidden; padding: 2px 3px; text-align: center; vertical-align: bottom;">23.91</td><td data-sheets-formula="=2*atan(0.5*R4C4/R[0]C[-2])*(180/PI())" data-sheets-numberformat="{"1":2,"2":"#,##0.00","3":1}" data-sheets-value="{"1":3,"3":16.071421421069587}" style="background-color: cyan; border-color: rgb(204, 204, 204) rgb(0, 0, 0) rgb(0, 0, 0) rgb(204, 204, 204); border-image: initial; border-style: solid; border-width: 1px; color: #4c1130; font-weight: bold; overflow: hidden; padding: 2px 3px; text-align: center; vertical-align: bottom;">16.07</td><td data-sheets-formula="=2*atan(0.5*R3C5/R[0]C3)*(180/PI())" data-sheets-numberformat="{"1":2,"2":"#,##0.00","3":1}" data-sheets-value="{"1":3,"3":15.806977438050989}" style="background-color: #b7e1cd; border-color: rgb(204, 204, 204) rgb(0, 0, 0) rgb(0, 0, 0) rgb(204, 204, 204); border-image: initial; border-style: solid; border-width: 1px; color: #4c1130; font-weight: bold; overflow: hidden; padding: 2px 3px; text-align: center; vertical-align: bottom;">15.81</td><td data-sheets-formula="=2*atan(0.5*R4C5/R[0]C3)*(180/PI())" data-sheets-numberformat="{"1":2,"2":"#,##0.00","3":1}" data-sheets-value="{"1":3,"3":10.552933224037051}" style="background-color: #b7e1cd; border-color: rgb(204, 204, 204) rgb(0, 0, 0) rgb(0, 0, 0) rgb(204, 204, 204); border-image: initial; border-style: solid; border-width: 1px; color: #4c1130; font-weight: bold; overflow: hidden; padding: 2px 3px; text-align: center; vertical-align: bottom;">10.55</td><td data-sheets-formula="=2*atan(0.5*R3C6/R[0]C3)*(180/PI())" data-sheets-numberformat="{"1":2,"2":"#,##0.00","3":1}" data-sheets-value="{"1":3,"3":11.621369310795806}" style="background-color: #ffd966; border-color: rgb(204, 204, 204) rgb(0, 0, 0) rgb(0, 0, 0) rgb(204, 204, 204); border-image: initial; border-style: solid; border-width: 1px; color: #4c1130; font-weight: bold; overflow: hidden; padding: 2px 3px; text-align: center; vertical-align: bottom;">11.62</td><td data-sheets-formula="=2*atan(0.5*R4C6/R[0]C3)*(180/PI())" data-sheets-numberformat="{"1":2,"2":"#,##0.00","3":1}" data-sheets-value="{"1":3,"3":8.745862553762255}" style="background-color: #ffd966; border-color: rgb(204, 204, 204) rgb(0, 0, 0) rgb(0, 0, 0) rgb(204, 204, 204); border-image: initial; border-style: solid; border-width: 1px; color: #4c1130; font-weight: bold; overflow: hidden; padding: 2px 3px; text-align: center; vertical-align: bottom;">8.75</td></tr><tr style="height: 21px;"><td data-sheets-value="{"1":3,"3":135}" style="background-color: #f4cccc; border-color: rgb(204, 204, 204) rgb(0, 0, 0) rgb(0, 0, 0); border-image: initial; border-style: solid; border-width: 1px; color: #4c1130; font-weight: bold; overflow: hidden; padding: 2px 3px; text-align: center; vertical-align: bottom;">135</td><td data-sheets-formula="=2*atan(0.5*R3C4/R[0]C[-1])*(180/PI())" data-sheets-numberformat="{"1":2,"2":"#,##0.00","3":1}" data-sheets-value="{"1":3,"3":15.18928673718289}" style="background-color: cyan; border-color: rgb(204, 204, 204) rgb(0, 0, 0) rgb(0, 0, 0) rgb(204, 204, 204); border-image: initial; border-style: solid; border-width: 1px; color: #4c1130; font-weight: bold; overflow: hidden; padding: 2px 3px; text-align: center; vertical-align: bottom;">15.19</td><td data-sheets-formula="=2*atan(0.5*R4C4/R[0]C[-2])*(180/PI())" data-sheets-numberformat="{"1":2,"2":"#,##0.00","3":1}" data-sheets-value="{"1":3,"3":10.159215720029142}" style="background-color: cyan; border-color: rgb(204, 204, 204) rgb(0, 0, 0) rgb(0, 0, 0) rgb(204, 204, 204); border-image: initial; border-style: solid; border-width: 1px; color: #4c1130; font-weight: bold; overflow: hidden; padding: 2px 3px; text-align: center; vertical-align: bottom;">10.16</td><td data-sheets-formula="=2*atan(0.5*R3C5/R[0]C3)*(180/PI())" data-sheets-numberformat="{"1":2,"2":"#,##0.00","3":1}" data-sheets-value="{"1":3,"3":9.990759399047578}" style="background-color: #b7e1cd; border-color: rgb(204, 204, 204) rgb(0, 0, 0) rgb(0, 0, 0) rgb(204, 204, 204); border-image: initial; border-style: solid; border-width: 1px; color: #4c1130; font-weight: bold; overflow: hidden; padding: 2px 3px; text-align: center; vertical-align: bottom;">9.99</td><td data-sheets-formula="=2*atan(0.5*R4C5/R[0]C3)*(180/PI())" data-sheets-numberformat="{"1":2,"2":"#,##0.00","3":1}" data-sheets-value="{"1":3,"3":6.655792165312686}" style="background-color: #b7e1cd; border-color: rgb(204, 204, 204) rgb(0, 0, 0) rgb(0, 0, 0) rgb(204, 204, 204); border-image: initial; border-style: solid; border-width: 1px; color: #4c1130; font-weight: bold; overflow: hidden; padding: 2px 3px; text-align: center; vertical-align: bottom;">6.66</td><td data-sheets-formula="=2*atan(0.5*R3C6/R[0]C3)*(180/PI())" data-sheets-numberformat="{"1":2,"2":"#,##0.00","3":1}" data-sheets-value="{"1":3,"3":7.332324748643674}" style="background-color: #ffd966; border-color: rgb(204, 204, 204) rgb(0, 0, 0) rgb(0, 0, 0) rgb(204, 204, 204); border-image: initial; border-style: solid; border-width: 1px; color: #4c1130; font-weight: bold; overflow: hidden; padding: 2px 3px; text-align: center; vertical-align: bottom;">7.33</td><td data-sheets-formula="=2*atan(0.5*R4C6/R[0]C3)*(180/PI())" data-sheets-numberformat="{"1":2,"2":"#,##0.00","3":1}" data-sheets-value="{"1":3,"3":5.513113743073044}" style="background-color: #ffd966; border-color: rgb(204, 204, 204) rgb(0, 0, 0) rgb(0, 0, 0) rgb(204, 204, 204); border-image: initial; border-style: solid; border-width: 1px; color: #4c1130; font-weight: bold; overflow: hidden; padding: 2px 3px; text-align: center; vertical-align: bottom;">5.51</td></tr><tr style="height: 21px;"><td data-sheets-value="{"1":3,"3":200}" style="background-color: #f4cccc; border-color: rgb(204, 204, 204) rgb(0, 0, 0) rgb(0, 0, 0); border-image: initial; border-style: solid; border-width: 1px; color: #4c1130; font-weight: bold; overflow: hidden; padding: 2px 3px; text-align: center; vertical-align: bottom;">200</td><td data-sheets-formula="=2*atan(0.5*R3C4/R[0]C[-1])*(180/PI())" data-sheets-numberformat="{"1":2,"2":"#,##0.00","3":1}" data-sheets-value="{"1":3,"3":10.285529115768483}" style="background-color: cyan; border-color: rgb(204, 204, 204) rgb(0, 0, 0) rgb(0, 0, 0) rgb(204, 204, 204); border-image: initial; border-style: solid; border-width: 1px; color: #4c1130; font-weight: bold; overflow: hidden; padding: 2px 3px; text-align: center; vertical-align: bottom;">10.29</td><td data-sheets-formula="=2*atan(0.5*R4C4/R[0]C[-2])*(180/PI())" data-sheets-numberformat="{"1":2,"2":"#,##0.00","3":1}" data-sheets-value="{"1":3,"3":6.867260724901044}" style="background-color: cyan; border-color: rgb(204, 204, 204) rgb(0, 0, 0) rgb(0, 0, 0) rgb(204, 204, 204); border-image: initial; border-style: solid; border-width: 1px; color: #4c1130; font-weight: bold; overflow: hidden; padding: 2px 3px; text-align: center; vertical-align: bottom;">6.87</td><td data-sheets-formula="=2*atan(0.5*R3C5/R[0]C3)*(180/PI())" data-sheets-numberformat="{"1":2,"2":"#,##0.00","3":1}" data-sheets-value="{"1":3,"3":6.75307342683818}" style="background-color: #b7e1cd; border-color: rgb(204, 204, 204) rgb(0, 0, 0) rgb(0, 0, 0) rgb(204, 204, 204); border-image: initial; border-style: solid; border-width: 1px; color: #4c1130; font-weight: bold; overflow: hidden; padding: 2px 3px; text-align: center; vertical-align: bottom;">6.75</td><td data-sheets-formula="=2*atan(0.5*R4C5/R[0]C3)*(180/PI())" data-sheets-numberformat="{"1":2,"2":"#,##0.00","3":1}" data-sheets-value="{"1":3,"3":4.495411152096482}" style="background-color: #b7e1cd; border-color: rgb(204, 204, 204) rgb(0, 0, 0) rgb(0, 0, 0) rgb(204, 204, 204); border-image: initial; border-style: solid; border-width: 1px; color: #4c1130; font-weight: bold; overflow: hidden; padding: 2px 3px; text-align: center; vertical-align: bottom;">4.50</td><td data-sheets-formula="=2*atan(0.5*R3C6/R[0]C3)*(180/PI())" data-sheets-numberformat="{"1":2,"2":"#,##0.00","3":1}" data-sheets-value="{"1":3,"3":4.952998169322298}" style="background-color: #ffd966; border-color: rgb(204, 204, 204) rgb(0, 0, 0) rgb(0, 0, 0) rgb(204, 204, 204); border-image: initial; border-style: solid; border-width: 1px; color: #4c1130; font-weight: bold; overflow: hidden; padding: 2px 3px; text-align: center; vertical-align: bottom;">4.95</td><td data-sheets-formula="=2*atan(0.5*R4C6/R[0]C3)*(180/PI())" data-sheets-numberformat="{"1":2,"2":"#,##0.00","3":1}" data-sheets-value="{"1":3,"3":3.722915260933458}" style="background-color: #ffd966; border-color: rgb(204, 204, 204) rgb(0, 0, 0) rgb(0, 0, 0) rgb(204, 204, 204); border-image: initial; border-style: solid; border-width: 1px; color: #4c1130; font-weight: bold; overflow: hidden; padding: 2px 3px; text-align: center; vertical-align: bottom;">3.72</td></tr><tr style="height: 21px;"><td data-sheets-value="{"1":3,"3":300}" style="background-color: #f4cccc; border-color: rgb(204, 204, 204) rgb(0, 0, 0) rgb(0, 0, 0); border-image: initial; border-style: solid; border-width: 1px; color: #4c1130; font-weight: bold; overflow: hidden; padding: 2px 3px; text-align: center; vertical-align: bottom;">300</td><td data-sheets-formula="=2*atan(0.5*R3C4/R[0]C[-1])*(180/PI())" data-sheets-numberformat="{"1":2,"2":"#,##0.00","3":1}" data-sheets-value="{"1":3,"3":6.867260724901044}" style="background-color: cyan; border-color: rgb(204, 204, 204) rgb(0, 0, 0) rgb(0, 0, 0) rgb(204, 204, 204); border-image: initial; border-style: solid; border-width: 1px; color: #4c1130; font-weight: bold; overflow: hidden; padding: 2px 3px; text-align: center; vertical-align: bottom;">6.87</td><td data-sheets-formula="=2*atan(0.5*R4C4/R[0]C[-2])*(180/PI())" data-sheets-numberformat="{"1":2,"2":"#,##0.00","3":1}" data-sheets-value="{"1":3,"3":4.581220085277059}" style="background-color: cyan; border-color: rgb(204, 204, 204) rgb(0, 0, 0) rgb(0, 0, 0) rgb(204, 204, 204); border-image: initial; border-style: solid; border-width: 1px; color: #4c1130; font-weight: bold; overflow: hidden; padding: 2px 3px; text-align: center; vertical-align: bottom;">4.58</td><td data-sheets-formula="=2*atan(0.5*R3C5/R[0]C3)*(180/PI())" data-sheets-numberformat="{"1":2,"2":"#,##0.00","3":1}" data-sheets-value="{"1":3,"3":4.504945728862528}" style="background-color: #b7e1cd; border-color: rgb(204, 204, 204) rgb(0, 0, 0) rgb(0, 0, 0) rgb(204, 204, 204); border-image: initial; border-style: solid; border-width: 1px; color: #4c1130; font-weight: bold; overflow: hidden; padding: 2px 3px; text-align: center; vertical-align: bottom;">4.50</td><td data-sheets-formula="=2*atan(0.5*R4C5/R[0]C3)*(180/PI())" data-sheets-numberformat="{"1":2,"2":"#,##0.00","3":1}" data-sheets-value="{"1":3,"3":2.9977950615216336}" style="background-color: #b7e1cd; border-color: rgb(204, 204, 204) rgb(0, 0, 0) rgb(0, 0, 0) rgb(204, 204, 204); border-image: initial; border-style: solid; border-width: 1px; color: #4c1130; font-weight: bold; overflow: hidden; padding: 2px 3px; text-align: center; vertical-align: bottom;">3.00</td><td data-sheets-formula="=2*atan(0.5*R3C6/R[0]C3)*(180/PI())" data-sheets-numberformat="{"1":2,"2":"#,##0.00","3":1}" data-sheets-value="{"1":3,"3":3.3031414536500487}" style="background-color: #ffd966; border-color: rgb(204, 204, 204) rgb(0, 0, 0) rgb(0, 0, 0) rgb(204, 204, 204); border-image: initial; border-style: solid; border-width: 1px; color: #4c1130; font-weight: bold; overflow: hidden; padding: 2px 3px; text-align: center; vertical-align: bottom;">3.30</td><td data-sheets-formula="=2*atan(0.5*R4C6/R[0]C3)*(180/PI())" data-sheets-numberformat="{"1":2,"2":"#,##0.00","3":1}" data-sheets-value="{"1":3,"3":2.482428706728613}" style="background-color: #ffd966; border-color: rgb(204, 204, 204) rgb(0, 0, 0) rgb(0, 0, 0) rgb(204, 204, 204); border-image: initial; border-style: solid; border-width: 1px; color: #4c1130; font-weight: bold; overflow: hidden; padding: 2px 3px; text-align: center; vertical-align: bottom;">2.48</td></tr><tr style="height: 21px;"><td data-sheets-value="{"1":3,"3":400}" style="background-color: #f4cccc; border-color: rgb(204, 204, 204) rgb(0, 0, 0) rgb(0, 0, 0); border-image: initial; border-style: solid; border-width: 1px; color: #4c1130; font-weight: bold; overflow: hidden; padding: 2px 3px; text-align: center; vertical-align: bottom;">400</td><td data-sheets-formula="=2*atan(0.5*R3C4/R[0]C[-1])*(180/PI())" data-sheets-numberformat="{"1":2,"2":"#,##0.00","3":1}" data-sheets-value="{"1":3,"3":5.153143660537661}" style="background-color: cyan; border-color: rgb(204, 204, 204) rgb(0, 0, 0) rgb(0, 0, 0) rgb(204, 204, 204); border-image: initial; border-style: solid; border-width: 1px; color: #4c1130; font-weight: bold; overflow: hidden; padding: 2px 3px; text-align: center; vertical-align: bottom;">5.15</td><td data-sheets-formula="=2*atan(0.5*R4C4/R[0]C[-2])*(180/PI())" data-sheets-numberformat="{"1":2,"2":"#,##0.00","3":1}" data-sheets-value="{"1":3,"3":3.4367160033109143}" style="background-color: cyan; border-color: rgb(204, 204, 204) rgb(0, 0, 0) rgb(0, 0, 0) rgb(204, 204, 204); border-image: initial; border-style: solid; border-width: 1px; color: #4c1130; font-weight: bold; overflow: hidden; padding: 2px 3px; text-align: center; vertical-align: bottom;">3.44</td><td data-sheets-formula="=2*atan(0.5*R3C5/R[0]C3)*(180/PI())" data-sheets-numberformat="{"1":2,"2":"#,##0.00","3":1}" data-sheets-value="{"1":3,"3":3.3794708904888875}" style="background-color: #b7e1cd; border-color: rgb(204, 204, 204) rgb(0, 0, 0) rgb(0, 0, 0) rgb(204, 204, 204); border-image: initial; border-style: solid; border-width: 1px; color: #4c1130; font-weight: bold; overflow: hidden; padding: 2px 3px; text-align: center; vertical-align: bottom;">3.38</td><td data-sheets-formula="=2*atan(0.5*R4C5/R[0]C3)*(180/PI())" data-sheets-numberformat="{"1":2,"2":"#,##0.00","3":1}" data-sheets-value="{"1":3,"3":2.2485707035549414}" style="background-color: #b7e1cd; border-color: rgb(204, 204, 204) rgb(0, 0, 0) rgb(0, 0, 0) rgb(204, 204, 204); border-image: initial; border-style: solid; border-width: 1px; color: #4c1130; font-weight: bold; overflow: hidden; padding: 2px 3px; text-align: center; vertical-align: bottom;">2.25</td><td data-sheets-formula="=2*atan(0.5*R3C6/R[0]C3)*(180/PI())" data-sheets-numberformat="{"1":2,"2":"#,##0.00","3":1}" data-sheets-value="{"1":3,"3":2.477656294512591}" style="background-color: #ffd966; border-color: rgb(204, 204, 204) rgb(0, 0, 0) rgb(0, 0, 0) rgb(204, 204, 204); border-image: initial; border-style: solid; border-width: 1px; color: #4c1130; font-weight: bold; overflow: hidden; padding: 2px 3px; text-align: center; vertical-align: bottom;">2.48</td><td data-sheets-formula="=2*atan(0.5*R4C6/R[0]C3)*(180/PI())" data-sheets-numberformat="{"1":2,"2":"#,##0.00","3":1}" data-sheets-value="{"1":3,"3":1.8619489554155084}" style="background-color: #ffd966; border-color: rgb(204, 204, 204) rgb(0, 0, 0) rgb(0, 0, 0) rgb(204, 204, 204); border-image: initial; border-style: solid; border-width: 1px; color: #4c1130; font-weight: bold; overflow: hidden; padding: 2px 3px; text-align: center; vertical-align: bottom;">1.86</td></tr><tr style="height: 21px;"><td data-sheets-value="{"1":3,"3":600}" style="background-color: #f4cccc; border-color: rgb(204, 204, 204) rgb(0, 0, 0) rgb(0, 0, 0); border-image: initial; border-style: solid; border-width: 1px; color: #4c1130; font-weight: bold; overflow: hidden; padding: 2px 3px; text-align: center; vertical-align: bottom;">600</td><td data-sheets-formula="=2*atan(0.5*R3C4/R[0]C[-1])*(180/PI())" data-sheets-numberformat="{"1":2,"2":"#,##0.00","3":1}" data-sheets-value="{"1":3,"3":3.4367160033109143}" style="background-color: cyan; border-color: rgb(204, 204, 204) rgb(0, 0, 0) rgb(0, 0, 0) rgb(204, 204, 204); border-image: initial; border-style: solid; border-width: 1px; color: #4c1130; font-weight: bold; overflow: hidden; padding: 2px 3px; text-align: center; vertical-align: bottom;">3.44</td><td data-sheets-formula="=2*atan(0.5*R4C4/R[0]C[-2])*(180/PI())" data-sheets-numberformat="{"1":2,"2":"#,##0.00","3":1}" data-sheets-value="{"1":3,"3":2.291525676350207}" style="background-color: cyan; border-color: rgb(204, 204, 204) rgb(0, 0, 0) rgb(0, 0, 0) rgb(204, 204, 204); border-image: initial; border-style: solid; border-width: 1px; color: #4c1130; font-weight: bold; overflow: hidden; padding: 2px 3px; text-align: center; vertical-align: bottom;">2.29</td><td data-sheets-formula="=2*atan(0.5*R3C5/R[0]C3)*(180/PI())" data-sheets-numberformat="{"1":2,"2":"#,##0.00","3":1}" data-sheets-value="{"1":3,"3":2.253343509740617}" style="background-color: #b7e1cd; border-color: rgb(204, 204, 204) rgb(0, 0, 0) rgb(0, 0, 0) rgb(204, 204, 204); border-image: initial; border-style: solid; border-width: 1px; color: #4c1130; font-weight: bold; overflow: hidden; padding: 2px 3px; text-align: center; vertical-align: bottom;">2.25</td><td data-sheets-formula="=2*atan(0.5*R4C5/R[0]C3)*(180/PI())" data-sheets-numberformat="{"1":2,"2":"#,##0.00","3":1}" data-sheets-value="{"1":3,"3":1.4991540292935526}" style="background-color: #b7e1cd; border-color: rgb(204, 204, 204) rgb(0, 0, 0) rgb(0, 0, 0) rgb(204, 204, 204); border-image: initial; border-style: solid; border-width: 1px; color: #4c1130; font-weight: bold; overflow: hidden; padding: 2px 3px; text-align: center; vertical-align: bottom;">1.50</td><td data-sheets-formula="=2*atan(0.5*R3C6/R[0]C3)*(180/PI())" data-sheets-numberformat="{"1":2,"2":"#,##0.00","3":1}" data-sheets-value="{"1":3,"3":1.6519138708902472}" style="background-color: #ffd966; border-color: rgb(204, 204, 204) rgb(0, 0, 0) rgb(0, 0, 0) rgb(204, 204, 204); border-image: initial; border-style: solid; border-width: 1px; color: #4c1130; font-weight: bold; overflow: hidden; padding: 2px 3px; text-align: center; vertical-align: bottom;">1.65</td><td data-sheets-formula="=2*atan(0.5*R4C6/R[0]C3)*(180/PI())" data-sheets-numberformat="{"1":2,"2":"#,##0.00","3":1}" data-sheets-value="{"1":3,"3":1.2413599951737413}" style="background-color: #ffd966; border-color: rgb(204, 204, 204) rgb(0, 0, 0) rgb(0, 0, 0) rgb(204, 204, 204); border-image: initial; border-style: solid; border-width: 1px; color: #4c1130; font-weight: bold; overflow: hidden; padding: 2px 3px; text-align: center; vertical-align: bottom;">1.24</td></tr><tr style="height: 21px;"><td data-sheets-value="{"1":3,"3":800}" style="background-color: #f4cccc; border-color: rgb(204, 204, 204) rgb(0, 0, 0) rgb(0, 0, 0); border-image: initial; border-style: solid; border-width: 1px; color: #4c1130; font-weight: bold; overflow: hidden; padding: 2px 3px; text-align: center; vertical-align: bottom;">800</td><td data-sheets-formula="=2*atan(0.5*R3C4/R[0]C[-1])*(180/PI())" data-sheets-numberformat="{"1":2,"2":"#,##0.00","3":1}" data-sheets-value="{"1":3,"3":2.5778751203737906}" style="background-color: cyan; border-color: rgb(204, 204, 204) rgb(0, 0, 0) rgb(0, 0, 0) rgb(204, 204, 204); border-image: initial; border-style: solid; border-width: 1px; color: #4c1130; font-weight: bold; overflow: hidden; padding: 2px 3px; text-align: center; vertical-align: bottom;">2.58</td><td data-sheets-formula="=2*atan(0.5*R4C4/R[0]C[-2])*(180/PI())" data-sheets-numberformat="{"1":2,"2":"#,##0.00","3":1}" data-sheets-value="{"1":3,"3":1.7187444872893616}" style="background-color: cyan; border-color: rgb(204, 204, 204) rgb(0, 0, 0) rgb(0, 0, 0) rgb(204, 204, 204); border-image: initial; border-style: solid; border-width: 1px; color: #4c1130; font-weight: bold; overflow: hidden; padding: 2px 3px; text-align: center; vertical-align: bottom;">1.72</td><td data-sheets-formula="=2*atan(0.5*R3C5/R[0]C3)*(180/PI())" data-sheets-numberformat="{"1":2,"2":"#,##0.00","3":1}" data-sheets-value="{"1":3,"3":1.6901029350728156}" style="background-color: #b7e1cd; border-color: rgb(204, 204, 204) rgb(0, 0, 0) rgb(0, 0, 0) rgb(204, 204, 204); border-image: initial; border-style: solid; border-width: 1px; color: #4c1130; font-weight: bold; overflow: hidden; padding: 2px 3px; text-align: center; vertical-align: bottom;">1.69</td><td data-sheets-formula="=2*atan(0.5*R4C5/R[0]C3)*(180/PI())" data-sheets-numberformat="{"1":2,"2":"#,##0.00","3":1}" data-sheets-value="{"1":3,"3":1.1243935864000596}" style="background-color: #b7e1cd; border-color: rgb(204, 204, 204) rgb(0, 0, 0) rgb(0, 0, 0) rgb(204, 204, 204); border-image: initial; border-style: solid; border-width: 1px; color: #4c1130; font-weight: bold; overflow: hidden; padding: 2px 3px; text-align: center; vertical-align: bottom;">1.12</td><td data-sheets-formula="=2*atan(0.5*R3C6/R[0]C3)*(180/PI())" data-sheets-numberformat="{"1":2,"2":"#,##0.00","3":1}" data-sheets-value="{"1":3,"3":1.238972950635165}" style="background-color: #ffd966; border-color: rgb(204, 204, 204) rgb(0, 0, 0) rgb(0, 0, 0) rgb(204, 204, 204); border-image: initial; border-style: solid; border-width: 1px; color: #4c1130; font-weight: bold; overflow: hidden; padding: 2px 3px; text-align: center; vertical-align: bottom;">1.24</td><td data-sheets-formula="=2*atan(0.5*R4C6/R[0]C3)*(180/PI())" data-sheets-numberformat="{"1":2,"2":"#,##0.00","3":1}" data-sheets-value="{"1":3,"3":0.9310359298086419}" style="background-color: #ffd966; border-color: rgb(204, 204, 204) rgb(0, 0, 0) rgb(0, 0, 0) rgb(204, 204, 204); border-image: initial; border-style: solid; border-width: 1px; color: #4c1130; font-weight: bold; overflow: hidden; padding: 2px 3px; text-align: center; vertical-align: bottom;">0.93</td></tr><tr style="height: 21px;"><td data-sheets-value="{"1":3,"3":1000}" style="background-color: #f4cccc; border-color: rgb(204, 204, 204) rgb(0, 0, 0) rgb(0, 0, 0); border-image: initial; border-style: solid; border-width: 1px; color: #4c1130; font-weight: bold; overflow: hidden; padding: 2px 3px; text-align: center; vertical-align: bottom;">1000</td><td data-sheets-formula="=2*atan(0.5*R3C4/R[0]C[-1])*(180/PI())" data-sheets-numberformat="{"1":2,"2":"#,##0.00","3":1}" data-sheets-value="{"1":3,"3":2.062425339775906}" style="background-color: cyan; border-color: rgb(204, 204, 204) rgb(0, 0, 0) rgb(0, 0, 0) rgb(204, 204, 204); border-image: initial; border-style: solid; border-width: 1px; color: #4c1130; font-weight: bold; overflow: hidden; padding: 2px 3px; text-align: center; vertical-align: bottom;">2.06</td><td data-sheets-formula="=2*atan(0.5*R4C4/R[0]C[-2])*(180/PI())" data-sheets-numberformat="{"1":2,"2":"#,##0.00","3":1}" data-sheets-value="{"1":3,"3":1.3750327092781995}" style="background-color: cyan; border-color: rgb(204, 204, 204) rgb(0, 0, 0) rgb(0, 0, 0) rgb(204, 204, 204); border-image: initial; border-style: solid; border-width: 1px; color: #4c1130; font-weight: bold; overflow: hidden; padding: 2px 3px; text-align: center; vertical-align: bottom;">1.38</td><td data-sheets-formula="=2*atan(0.5*R3C5/R[0]C3)*(180/PI())" data-sheets-numberformat="{"1":2,"2":"#,##0.00","3":1}" data-sheets-value="{"1":3,"3":1.3521176425519061}" style="background-color: #b7e1cd; border-color: rgb(204, 204, 204) rgb(0, 0, 0) rgb(0, 0, 0) rgb(204, 204, 204); border-image: initial; border-style: solid; border-width: 1px; color: #4c1130; font-weight: bold; overflow: hidden; padding: 2px 3px; text-align: center; vertical-align: bottom;">1.35</td><td data-sheets-formula="=2*atan(0.5*R4C5/R[0]C3)*(180/PI())" data-sheets-numberformat="{"1":2,"2":"#,##0.00","3":1}" data-sheets-value="{"1":3,"3":0.8995252616605302}" style="background-color: #b7e1cd; border-color: rgb(204, 204, 204) rgb(0, 0, 0) rgb(0, 0, 0) rgb(204, 204, 204); border-image: initial; border-style: solid; border-width: 1px; color: #4c1130; font-weight: bold; overflow: hidden; padding: 2px 3px; text-align: center; vertical-align: bottom;">0.90</td><td data-sheets-formula="=2*atan(0.5*R3C6/R[0]C3)*(180/PI())" data-sheets-numberformat="{"1":2,"2":"#,##0.00","3":1}" data-sheets-value="{"1":3,"3":0.9911922649084776}" style="background-color: #ffd966; border-color: rgb(204, 204, 204) rgb(0, 0, 0) rgb(0, 0, 0) rgb(204, 204, 204); border-image: initial; border-style: solid; border-width: 1px; color: #4c1130; font-weight: bold; overflow: hidden; padding: 2px 3px; text-align: center; vertical-align: bottom;">0.99</td><td data-sheets-formula="=2*atan(0.5*R4C6/R[0]C3)*(180/PI())" data-sheets-numberformat="{"1":2,"2":"#,##0.00","3":1}" data-sheets-value="{"1":3,"3":0.744834644033682}" style="background-color: #ffd966; border-color: rgb(204, 204, 204) rgb(0, 0, 0) rgb(0, 0, 0) rgb(204, 204, 204); border-image: initial; border-style: solid; border-width: 1px; color: #4c1130; font-weight: bold; overflow: hidden; padding: 2px 3px; text-align: center; vertical-align: bottom;">0.74</td></tr><tr style="height: 21px;"><td data-sheets-value="{"1":3,"3":1250}" style="background-color: #f4cccc; border-color: rgb(204, 204, 204) rgb(0, 0, 0) rgb(0, 0, 0); border-image: initial; border-style: solid; border-width: 1px; color: #4c1130; font-weight: bold; overflow: hidden; padding: 2px 3px; text-align: center; vertical-align: bottom;">1250</td><td data-sheets-formula="=2*atan(0.5*R3C4/R[0]C[-1])*(180/PI())" data-sheets-numberformat="{"1":2,"2":"#,##0.00","3":1}" data-sheets-value="{"1":3,"3":1.6500044079778218}" style="background-color: cyan; border-color: rgb(204, 204, 204) rgb(0, 0, 0) rgb(0, 0, 0) rgb(204, 204, 204); border-image: initial; border-style: solid; border-width: 1px; color: #4c1130; font-weight: bold; overflow: hidden; padding: 2px 3px; text-align: center; vertical-align: bottom;">1.65</td><td data-sheets-formula="=2*atan(0.5*R4C4/R[0]C[-2])*(180/PI())" data-sheets-numberformat="{"1":2,"2":"#,##0.00","3":1}" data-sheets-value="{"1":3,"3":1.1000451740938986}" style="background-color: cyan; border-color: rgb(204, 204, 204) rgb(0, 0, 0) rgb(0, 0, 0) rgb(204, 204, 204); border-image: initial; border-style: solid; border-width: 1px; color: #4c1130; font-weight: bold; overflow: hidden; padding: 2px 3px; text-align: center; vertical-align: bottom;">1.10</td><td data-sheets-formula="=2*atan(0.5*R3C5/R[0]C3)*(180/PI())" data-sheets-numberformat="{"1":2,"2":"#,##0.00","3":1}" data-sheets-value="{"1":3,"3":1.0817121862148333}" style="background-color: #b7e1cd; border-color: rgb(204, 204, 204) rgb(0, 0, 0) rgb(0, 0, 0) rgb(204, 204, 204); border-image: initial; border-style: solid; border-width: 1px; color: #4c1130; font-weight: bold; overflow: hidden; padding: 2px 3px; text-align: center; vertical-align: bottom;">1.08</td><td data-sheets-formula="=2*atan(0.5*R4C5/R[0]C3)*(180/PI())" data-sheets-numberformat="{"1":2,"2":"#,##0.00","3":1}" data-sheets-value="{"1":3,"3":0.719625530490631}" style="background-color: #b7e1cd; border-color: rgb(204, 204, 204) rgb(0, 0, 0) rgb(0, 0, 0) rgb(204, 204, 204); border-image: initial; border-style: solid; border-width: 1px; color: #4c1130; font-weight: bold; overflow: hidden; padding: 2px 3px; text-align: center; vertical-align: bottom;">0.72</td><td data-sheets-formula="=2*atan(0.5*R3C6/R[0]C3)*(180/PI())" data-sheets-numberformat="{"1":2,"2":"#,##0.00","3":1}" data-sheets-value="{"1":3,"3":0.7929609312745728}" style="background-color: #ffd966; border-color: rgb(204, 204, 204) rgb(0, 0, 0) rgb(0, 0, 0) rgb(204, 204, 204); border-image: initial; border-style: solid; border-width: 1px; color: #4c1130; font-weight: bold; overflow: hidden; padding: 2px 3px; text-align: center; vertical-align: bottom;">0.79</td><td data-sheets-formula="=2*atan(0.5*R4C6/R[0]C3)*(180/PI())" data-sheets-numberformat="{"1":2,"2":"#,##0.00","3":1}" data-sheets-value="{"1":3,"3":0.5958707361932136}" style="background-color: #ffd966; border-color: rgb(204, 204, 204) rgb(0, 0, 0) rgb(0, 0, 0) rgb(204, 204, 204); border-image: initial; border-style: solid; border-width: 1px; color: #4c1130; font-weight: bold; overflow: hidden; padding: 2px 3px; text-align: center; vertical-align: bottom;">0.60</td></tr></tbody></table></google-sheets-html-origin></div><div><span style="font-family: courier;"><br /></span></div><div><span style="font-family: courier;"><br /></span></div><div><span style="font-family: courier;">How to calculate the Field of view? Trigonometry!</span></div><div><span style="font-family: courier;">e.g.</span></div><div><span style="font-family: courier;"><br /></span></div><div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiK95646Q1It72Phn1IcIqBdpUK_nqzwKgviaQkXCWDS2pjR6kfxTXJFgw0HoNRMCCdih3tKk9eJ0Az5ajucTWeKBuBKyiBZp1UCpy14bY3vM7vQt_08dMdu4eEU74gtXEMt090oj70yg_TpQZTMeVWcWiW0ZDmEP59O4Wz5GhqYdC55I01eyVckMqSRzP3/s941/fov%20calc.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="720" data-original-width="941" height="490" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiK95646Q1It72Phn1IcIqBdpUK_nqzwKgviaQkXCWDS2pjR6kfxTXJFgw0HoNRMCCdih3tKk9eJ0Az5ajucTWeKBuBKyiBZp1UCpy14bY3vM7vQt_08dMdu4eEU74gtXEMt090oj70yg_TpQZTMeVWcWiW0ZDmEP59O4Wz5GhqYdC55I01eyVckMqSRzP3/w640-h490/fov%20calc.jpg" width="640" /></a></div><br /><div class="separator" style="clear: both; text-align: center;"><br /></div><span style="font-family: courier;"><br /><br /></span></div><div><span style="font-family: courier;"><br /></span></div><div><span style="font-family: courier;"><br /></span></div><div><span style="font-family: courier;"><br /></span></div><div><span style="font-family: courier;"><br /></span></div><div><br /></div>Beomagihttp://www.blogger.com/profile/00469223835355067867noreply@blogger.com0tag:blogger.com,1999:blog-2974094041951992980.post-15659015066915783562023-09-12T16:40:00.005-07:002023-10-08T10:45:09.801-07:00Analyzing my lens choices<h2 style="text-align: left;"><span style="font-family: courier;">So, I took a trip...</span></h2><div><span style="font-family: courier;">I don't take long trips away often. So when I do, I have to seize the opportunity. I was heading to Canada on a cruise. My travel budget (both $$ and lbs) lent a generous portion of itself to photography. The then, is "What lens to take?". </span></div><div><span style="font-family: courier;"><br /></span></div><div><span style="font-family: courier;"><br /></span></div><div><span style="font-family: courier;"><br /></span></div><h2 style="text-align: left;"><span style="font-family: courier;">And I took some lenses...</span></h2><div><span style="font-family: courier;">I have a decent collection of micro four-thirds glass, and a fair number of adapted lenses too. My breakdown for what I took:</span></div><div><ul style="text-align: left;"><li><span style="font-family: courier;"><span style="color: #04ff00;">Panasonic 12-60mm F3.5-5.6</span>: Solid general zoom lens. Great in bright light. Quite wide for a kit zoom.</span></li><li><span style="font-family: courier;"><span style="color: #04ff00;">Olympus 75-300mm F4.8-6.7</span>: My long zoom. Possibility of birds, whales, and other wildlife - this definitely gets in my bag. The lens also provides certain background compression opportunities. e.g. Taking a picture of someone with a far-off object in the background, taking up most of the picture.</span></li><li><span style="font-family: courier;"><span style="color: #04ff00;">Sigma 16mm F1.4</span>: I've been loving this lens a lot lately. It's a 32mm equivalent, which is sort of a "wide-normal" focal length. It's bright - so it's great for indoors.</span></li><li><span style="font-family: courier;"><span style="color: #04ff00;">Samyang 50mm F1.4 + Metabones Focal Reducer</span>: As a 35mm F1.0 lens, this is still my favorite portrait combo on M43. I wasn't expecting to use this much - but just in case.</span></li><li><span style="font-family: courier;"><span style="color: #04ff00;">7Artisians 7.5mm F2.8 Fisheye</span>: Another manual lens. this fisheye gave me some of the best pictures of the last holiday. When you cannot get a wide enough view, this works wonders.</span></li><li><span style="font-family: courier;"><span style="color: #04ff00;">Panasonic 20mm F1.7</span>: Both my wife and daughter carried their Olympus E-M10 I and III cameras with version I and II of this lens. It's a nice pancake with excellent sharpness.</span></li></ul><div><span style="font-family: courier;"><br /></span></div></div><h2 style="text-align: left;"><span style="font-family: courier;">Analyze photos with exiftool and WSL:</span></h2><div><span style="font-family: courier;">I used exiftool to check image information. Windows Subsystem for Linux is one of the few things that keeps me with a Windows box still. </span></div><div><span style="font-family: courier;"><br /></span></div><div><span style="font-family: courier;">Install exiftool (WSL/debian/ubuntu):</span></div><div><span style="font-family: courier;">sudo apt install libimage-exiftool-perl</span></div><div><span style="font-family: courier;"><br /></span></div><div><span style="font-family: courier;">Usage:</span></div><div><span style="font-family: courier;">exiftool yourimage</span></div><div><span style="font-family: courier;"><br /></span></div><div><span style="font-family: courier;">I wanted output I could parse easier, so</span></div><div><span style="font-family: courier;">exiftool -json yourimage</span></div><div><span style="font-family: courier;"><br /></span></div><div><span style="font-family: courier;">e.g.</span></div><div><span style="font-family: courier;"><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/a/AVvXsEgwqkharwBzgizZzSdFtUaxI6r7rIwmB7aioQJbk0EA-QYK9jqXT-KGhbjhbP7dO_as4ha798OwA0c7CqXB8rL9w7PoNEuoWhrCCSYUeKjPxWICOl1IDcW9bJm_Mf6oiWjpxXMbF6Q8STtZ39G54-VfSgcJX4GmheHS9tnPM-PQvc55sZnM9NwfUgEbemtg" style="margin-left: 1em; margin-right: 1em;"><img alt="" data-original-height="697" data-original-width="2560" height="174" src="https://blogger.googleusercontent.com/img/a/AVvXsEgwqkharwBzgizZzSdFtUaxI6r7rIwmB7aioQJbk0EA-QYK9jqXT-KGhbjhbP7dO_as4ha798OwA0c7CqXB8rL9w7PoNEuoWhrCCSYUeKjPxWICOl1IDcW9bJm_Mf6oiWjpxXMbF6Q8STtZ39G54-VfSgcJX4GmheHS9tnPM-PQvc55sZnM9NwfUgEbemtg=w640-h174" width="640" /></a></div><br />So... many... fields!!!</span></div><div><span style="font-family: courier;">I really just want the lens and focal length fields.</span></div><div><span style="font-family: courier;"><br /></span></div><div><span style="font-family: courier;"><div>$ exiftool -json PRJC5662.JPG | jq -c "{Lens:.[].LensID,FL:.[].FocalLength}"</div><div><b>{<span style="color: #01ffff;">"Lens"</span>:<span style="color: #fcff01;">"LUMIX G VARIO 12-60mm F3.5-5.6"</span>,<span style="color: #01ffff;">"FL"</span>:<span style="color: #fcff01;">"15.0 mm"</span>}</b></div></span></div><div><br /></div><div><br /></div><div><span style="font-family: courier;">Next step - dump just the specifics on each file - lens and focal length.</span></div><div><br /></div><div><br /></div><div><div style="background-color: #16171d; color: #f8f8f0; font-family: Consolas, "Courier New", monospace; font-size: 14px; line-height: 19px; white-space: pre;"><div><div style="line-height: 19px;"><div><div style="line-height: 19px;"><div><span style="font-style: italic;">#!/bin/bash</span></div><div>origdir<span style="color: #ff3f4f;">=</span><span style="color: #ffd945;">"/mnt/d/library/htdocs/Pics/2023"</span> <span style="color: #5c6370; font-style: italic;">#Parent folder of image folders</span></div><div><span style="color: #5c6370; font-style: italic;">#iterate across all subfolders needed</span></div><div><span style="color: #ff3f4f;">for</span> folder <span style="color: #ff3f4f;">in</span> <span style="color: #ffd945;">"08/24"</span> <span style="color: #ffd945;">"08/25"</span> <span style="color: #ffd945;">"08/26"</span> <span style="color: #ffd945;">"08/27"</span> <span style="color: #ffd945;">"08/28"</span> <span style="color: #ffd945;">"08/29"</span> <span style="color: #ffd945;">"08/30"</span> <span style="color: #ffd945;">"08/31"</span> <span style="color: #ffd945;">"09/01"</span> <span style="color: #ffd945;">"09/02"</span>; <span style="color: #ff3f4f;">do</span></div><div> <span style="color: #19d1e5;">cd</span> $origdir</div><div> <span style="color: #19d1e5;">cd</span> $folder</div><div> alljpegs<span style="color: #ff3f4f;">=</span><span style="color: #ffd945;">`</span><span style="color: #81f900;">find</span> <span style="color: #ffd945;">.</span> <span style="color: #ff3f4f;">|</span> <span style="color: #81f900;">grep</span> <span style="color: #e373ce;">-i</span> <span style="color: #ffd945;">"jpg$"`</span></div><div> <span style="color: #ff3f4f;">for</span> afile <span style="color: #ff3f4f;">in</span> $alljpegs; <span style="color: #ff3f4f;">do</span></div><div> bfile<span style="color: #ff3f4f;">=</span><span style="color: #ffd945;">`</span><span style="color: #81f900;">basename</span> $afile<span style="color: #ffd945;">`</span></div><div> ffile<span style="color: #ff3f4f;">=</span><span style="color: #ffd945;">"${</span>origdir<span style="color: #ffd945;">}/${</span>folder<span style="color: #ffd945;">}/${</span>bfile<span style="color: #ffd945;">}"</span></div><div> exifdt<span style="color: #ff3f4f;">=</span><span style="color: #ffd945;">`</span><span style="color: #81f900;">exiftool</span> <span style="color: #e373ce;">-json</span> $afile <span style="color: #ff3f4f;">|</span> <span style="color: #81f900;">jq</span> <span style="color: #e373ce;">-c</span> <span style="color: #ffd945;">"{File:</span><span style="color: #e373ce;">\"</span><span style="color: #ffd945;">$ffile</span><span style="color: #e373ce;">\"</span><span style="color: #ffd945;">,Lens:.[].LensID,FL:.[].FocalLength}"`</span></div><div> <span style="color: #19d1e5;">echo</span> <span style="color: #ffd945;">"$exifdt"</span></div><div> <span style="color: #ff3f4f;">done</span></div><div><span style="color: #ff3f4f;">done</span> <span style="color: #ff3f4f;">|</span> <span style="color: #81f900;">tee</span> <span style="color: #ffd945;">./lensinfo.json</span></div><br /></div></div></div></div></div></div><div><span style="font-family: courier;">This produces leninfo.txt, where I can just grep the information, and pipe the output to wc to count matching lines.</span></div><div><span style="font-family: courier;"><br /></span></div><div><span style="font-family: courier;">The output looks like this:</span></div><div><span style="font-family: courier;"><div><div style="background-color: #16171d; color: #f8f8f0; font-family: Consolas, "Courier New", monospace; font-size: 14px; line-height: 19px; white-space: pre;"><div style="line-height: 19px;"><div>{<span style="color: #19d1e5;">"File"</span>:<span style="color: #ffd945;">"/mnt/d/library/htdocs/Pics/2023/08/24/08/24/LLC10011.JPG"</span>,<span style="color: #19d1e5;">"Lens"</span>:<span style="color: #ffd945;">"Lumix G 20mm F1.7 Asph."</span>,<span style="color: #19d1e5;">"FL"</span>:<span style="color: #ffd945;">"20.0 mm"</span>}</div><div>{<span style="color: #19d1e5;">"File"</span>:<span style="color: #ffd945;">"/mnt/d/library/htdocs/Pics/2023/08/24/08/24/PRJC4306.JPG"</span>,<span style="color: #19d1e5;">"Lens"</span>:<span style="color: #ffd945;">"SIGMA 16mm F1.4 DC DN | C 017"</span>,<span style="color: #19d1e5;">"FL"</span>:<span style="color: #ffd945;">"16.0 mm"</span>}</div><div>{<span style="color: #19d1e5;">"File"</span>:<span style="color: #ffd945;">"/mnt/d/library/htdocs/Pics/2023/08/24/08/24/PRJC4308.JPG"</span>,<span style="color: #19d1e5;">"Lens"</span>:<span style="color: #e373ce;">null</span>,<span style="color: #19d1e5;">"FL"</span>:<span style="color: #ffd945;">"0.0 mm"</span>}</div></div></div></div><div><br /></div><div>For example - If I want to know how many pictures were taken with the Sigma 16mm lens:</div><div><div>$ ∙ cat lensinfo.txt | grep "SIGMA 16" | wc -l</div><div>311</div></div><div><br /></div><div><br /></div><div>Manual lenses are the reduced 50mm F1.4 (35mm F1.0) and fisheye.</div></span></div><div><span style="font-family: courier;">I need to visually determine these.</span></div><div><span style="font-family: courier;"><br /></span></div><div><span style="font-family: courier;">A quick loop is all that's needed - I copied photos with manual glass to a temp folder, and just dragged photos that looked like non-fisheye to another.</span></div><div><span style="font-family: courier;"><br /></span></div><div><span style="font-family: courier;"><div style="background-color: #16171d; color: #f8f8f0; font-family: Consolas, "Courier New", monospace; font-size: 14px; line-height: 19px; white-space: pre;"><div>mf_fh<span style="color: #ff3f4f;">=</span><span style="color: #ffd945;">"${</span>HOME<span style="color: #ffd945;">}/scripts/photag/mf/fh/"</span></div><div><span style="color: #ff3f4f;">while</span> <span style="color: #19d1e5;">read</span> <span style="color: #e373ce;">-r</span> <span style="color: #ffd945;">line</span>; <span style="color: #ff3f4f;">do</span></div><div> <span style="color: #ff3f4f;">if</span> [[ <span style="color: #ffd945;">"$line"</span> <span style="color: #ff3f4f;">==</span> <span style="color: #ff3f4f;">*</span><span style="color: #ffd945;">"Lens</span><span style="color: #e373ce;">\"</span><span style="color: #ffd945;">:null"</span><span style="color: #ff3f4f;">*</span> ]]; <span style="color: #ff3f4f;">then</span></div><div> fname<span style="color: #ff3f4f;">=</span><span style="color: #ffd945;">`</span><span style="color: #19d1e5;">echo</span> <span style="color: #ffd945;">"$line"</span> <span style="color: #ff3f4f;">|</span> <span style="color: #81f900;">jq</span> <span style="color: #e373ce;">-r</span> <span style="color: #ffd945;">".File"`</span></div><div> <span style="color: #81f900;">cp</span> <span style="color: #ffd945;">"$fname"</span> <span style="color: #ffd945;">"$mf_fh"</span> &&<span style="color: #19d1e5;">echo</span> <span style="color: #ffd945;">"copied $line"</span></div><div> <span style="color: #ff3f4f;">fi</span>; </div><div><span style="color: #ff3f4f;">done</span> <span style="color: #ff3f4f;"><<<</span> <span style="color: #ffd945;">`</span><span style="color: #81f900;">cat</span> ./lensinfo.json<span style="color: #ffd945;">`</span></div><br /></div></span></div><div><span style="font-family: courier;"><br /></span></div><div><span style="font-family: courier;">That dropped maybe 200 files into the fisheye folder. I barely used my 50mm so should be quick.</span></div><div><span style="font-family: courier;"><br /></span></div><div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/a/AVvXsEirV4o2aZgE3j39-R-WY8RwWX49lmkTIexBFH-PxwkjwhHqSTb6PRl4wwgKywZ7FmymzvV-AMfzEWhzaSRXoS3jAzPSMg1cE0MMWMgoAsBBlcBWonKhmLYU8Gg7mIoAQkPaqI1YtALIcaEWz1uyc8pNncl_oxNBnjngoNjmZPo5wPJErkMw8Xr_MILat2Iz" style="margin-left: 1em; margin-right: 1em;"><span style="font-family: courier;"><img alt="" data-original-height="1222" data-original-width="1612" height="485" src="https://blogger.googleusercontent.com/img/a/AVvXsEirV4o2aZgE3j39-R-WY8RwWX49lmkTIexBFH-PxwkjwhHqSTb6PRl4wwgKywZ7FmymzvV-AMfzEWhzaSRXoS3jAzPSMg1cE0MMWMgoAsBBlcBWonKhmLYU8Gg7mIoAQkPaqI1YtALIcaEWz1uyc8pNncl_oxNBnjngoNjmZPo5wPJErkMw8Xr_MILat2Iz=w640-h485" width="640" /></span></a></div><span style="font-family: courier;"><br /><br /></span></div><div><span style="font-family: courier;">Out of ~200 photos, 15 were shot with the 50mm and 179 with the fisheye.</span></div><div><span style="font-family: courier;"><br /></span></div><div><span style="font-family: courier;">Lens use tally:</span></div><div><google-sheets-html-origin><table border="1" cellpadding="0" cellspacing="0" dir="ltr" style="border-collapse: collapse; border: none; font-family: Arial; font-size: 10pt; table-layout: fixed; width: 0px;" xmlns="http://www.w3.org/1999/xhtml"><colgroup><col width="162"></col><col width="100"></col></colgroup><tbody><tr style="height: 21px;"><td data-sheets-value="{"1":2,"2":"Lens"}" style="background-color: #4a86e8; border: 1px solid rgb(0, 0, 0); color: white; font-family: "Courier New"; font-weight: bold; overflow: hidden; padding: 2px 3px; text-align: center; vertical-align: bottom;">Lens</td><td data-sheets-value="{"1":2,"2":"Count"}" style="background-color: #4a86e8; border-color: rgb(0, 0, 0) rgb(0, 0, 0) rgb(0, 0, 0) rgb(204, 204, 204); border-image: initial; border-style: solid; border-width: 1px; color: white; font-family: "Courier New"; font-weight: bold; overflow: hidden; padding: 2px 3px; text-align: center; vertical-align: bottom;">Count</td></tr><tr style="height: 21px;"><td data-sheets-value="{"1":2,"2":"Sigma 16mm"}" style="background-color: #fce5cd; border-color: rgb(204, 204, 204) rgb(0, 0, 0) rgb(0, 0, 0); border-image: initial; border-style: solid; border-width: 1px; font-family: "Courier New"; overflow: hidden; padding: 2px 3px; text-align: center; vertical-align: bottom;"><span style="color: #20124d;">Sigma 16mm</span></td><td data-sheets-value="{"1":3,"3":311}" style="background-color: #fce5cd; border-color: rgb(204, 204, 204) rgb(0, 0, 0) rgb(0, 0, 0) rgb(204, 204, 204); border-image: initial; border-style: solid; border-width: 1px; font-family: "Courier New"; overflow: hidden; padding: 2px 3px; text-align: center; vertical-align: bottom;"><span style="color: #20124d;">311</span></td></tr><tr style="height: 21px;"><td data-sheets-value="{"1":2,"2":"50mm F1.4 + MB"}" style="background-color: #fce5cd; border-color: rgb(204, 204, 204) rgb(0, 0, 0) rgb(0, 0, 0); border-image: initial; border-style: solid; border-width: 1px; font-family: "Courier New"; overflow: hidden; padding: 2px 3px; text-align: center; vertical-align: bottom;"><span style="color: #20124d;">50mm F1.4 + MB</span></td><td data-sheets-value="{"1":3,"3":15}" style="background-color: #fce5cd; border-color: rgb(204, 204, 204) rgb(0, 0, 0) rgb(0, 0, 0) rgb(204, 204, 204); border-image: initial; border-style: solid; border-width: 1px; font-family: "Courier New"; overflow: hidden; padding: 2px 3px; text-align: center; vertical-align: bottom;"><span style="color: #20124d;">15</span></td></tr><tr style="height: 21px;"><td data-sheets-value="{"1":2,"2":"75-300mm"}" style="background-color: #fce5cd; border-color: rgb(204, 204, 204) rgb(0, 0, 0) rgb(0, 0, 0); border-image: initial; border-style: solid; border-width: 1px; font-family: "Courier New"; overflow: hidden; padding: 2px 3px; text-align: center; vertical-align: bottom;"><span style="color: #20124d;">75-300mm</span></td><td data-sheets-value="{"1":3,"3":284}" style="background-color: #fce5cd; border-color: rgb(204, 204, 204) rgb(0, 0, 0) rgb(0, 0, 0) rgb(204, 204, 204); border-image: initial; border-style: solid; border-width: 1px; font-family: "Courier New"; overflow: hidden; padding: 2px 3px; text-align: center; vertical-align: bottom;"><span style="color: #20124d;">284</span></td></tr><tr style="height: 21px;"><td data-sheets-value="{"1":2,"2":"12-60mm"}" style="background-color: #fce5cd; border-color: rgb(204, 204, 204) rgb(0, 0, 0) rgb(0, 0, 0); border-image: initial; border-style: solid; border-width: 1px; font-family: "Courier New"; overflow: hidden; padding: 2px 3px; text-align: center; vertical-align: bottom;"><span style="color: #20124d;">12-60mm</span></td><td data-sheets-value="{"1":3,"3":384}" style="background-color: #fce5cd; border-color: rgb(204, 204, 204) rgb(0, 0, 0) rgb(0, 0, 0) rgb(204, 204, 204); border-image: initial; border-style: solid; border-width: 1px; font-family: "Courier New"; overflow: hidden; padding: 2px 3px; text-align: center; vertical-align: bottom;"><span style="color: #20124d;">384</span></td></tr><tr style="height: 21px;"><td data-sheets-value="{"1":2,"2":"7Artisians FE"}" style="background-color: #fce5cd; border-color: rgb(204, 204, 204) rgb(0, 0, 0) rgb(0, 0, 0); border-image: initial; border-style: solid; border-width: 1px; font-family: "Courier New"; overflow: hidden; padding: 2px 3px; text-align: center; vertical-align: bottom;"><span style="color: #20124d;">7Artisians FE</span></td><td data-sheets-value="{"1":3,"3":179}" style="background-color: #fce5cd; border-color: rgb(204, 204, 204) rgb(0, 0, 0) rgb(0, 0, 0) rgb(204, 204, 204); border-image: initial; border-style: solid; border-width: 1px; font-family: "Courier New"; overflow: hidden; padding: 2px 3px; text-align: center; vertical-align: bottom;"><span style="color: #20124d;">179</span></td></tr><tr style="height: 21px;"><td data-sheets-value="{"1":2,"2":"Lydia"}" style="background-color: #fce5cd; border-color: rgb(204, 204, 204) rgb(0, 0, 0) rgb(0, 0, 0); border-image: initial; border-style: solid; border-width: 1px; font-family: "Courier New"; overflow: hidden; padding: 2px 3px; text-align: center; vertical-align: bottom;"><span style="color: #20124d;">Super Wife</span></td><td data-sheets-value="{"1":3,"3":952}" style="background-color: #fce5cd; border-color: rgb(204, 204, 204) rgb(0, 0, 0) rgb(0, 0, 0) rgb(204, 204, 204); border-image: initial; border-style: solid; border-width: 1px; font-family: "Courier New"; overflow: hidden; padding: 2px 3px; text-align: center; vertical-align: bottom;"><span style="color: #20124d;">952</span></td></tr><tr style="height: 21px;"><td data-sheets-value="{"1":2,"2":"Gia"}" style="background-color: #fce5cd; border-color: rgb(204, 204, 204) rgb(0, 0, 0) rgb(0, 0, 0); border-image: initial; border-style: solid; border-width: 1px; font-family: "Courier New"; overflow: hidden; padding: 2px 3px; text-align: center; vertical-align: bottom;"><span style="color: #20124d;">Awesome Kid</span></td><td data-sheets-value="{"1":3,"3":120}" style="background-color: #fce5cd; border-color: rgb(204, 204, 204) rgb(0, 0, 0) rgb(0, 0, 0) rgb(204, 204, 204); border-image: initial; border-style: solid; border-width: 1px; font-family: "Courier New"; overflow: hidden; padding: 2px 3px; text-align: center; vertical-align: bottom;"><span style="color: #20124d;">120</span></td></tr></tbody></table></google-sheets-html-origin></div><div><span style="font-family: courier;"><br /></span></div><div><span style="font-family: courier;"><div class="separator" style="clear: both; text-align: center;"><br /></div><div class="separator" style="clear: both; text-align: center;"><br /></div></span></div><div><span style="font-family: courier;">But.... This was just an initial check - how many of these are keepers? Some may not be great. Burst shooting was used for a few. These pics are informal for my family, so I'm being less stringent on what I remove. What does the final tally look like?</span></div><div><span style="font-family: courier;"><br /></span></div><div><google-sheets-html-origin><table border="1" cellpadding="0" cellspacing="0" dir="ltr" style="border-collapse: collapse; border: none; font-family: Arial; font-size: 10pt; table-layout: fixed; width: 0px;" xmlns="http://www.w3.org/1999/xhtml"><colgroup><col width="178"></col><col width="100"></col><col width="100"></col></colgroup><tbody><tr style="height: 21px;"><td data-sheets-value="{"1":2,"2":"Lens"}" style="background-color: #1155cc; border: 1px solid rgb(0, 0, 0); color: white; font-family: "Courier New"; font-weight: bold; overflow: hidden; padding: 2px 3px; text-align: center; vertical-align: bottom;">Lens</td><td data-sheets-value="{"1":2,"2":"Count"}" style="background-color: #1155cc; border-color: rgb(0, 0, 0) rgb(0, 0, 0) rgb(0, 0, 0) rgb(204, 204, 204); border-image: initial; border-style: solid; border-width: 1px; color: white; font-family: "Courier New"; font-weight: bold; overflow: hidden; padding: 2px 3px; text-align: center; vertical-align: bottom;">Count</td><td data-sheets-value="{"1":2,"2":"Keeper Rate"}" style="background-color: #1155cc; border-color: rgb(0, 0, 0) rgb(0, 0, 0) rgb(0, 0, 0) rgb(204, 204, 204); border-image: initial; border-style: solid; border-width: 1px; color: white; font-family: "Courier New"; font-weight: bold; overflow: hidden; padding: 2px 3px; vertical-align: bottom;">Keeper Rate</td></tr><tr style="height: 21px;"><td data-sheets-value="{"1":2,"2":"Sigma 16mm"}" style="background-color: #fff2cc; border-color: rgb(204, 204, 204) rgb(0, 0, 0) rgb(0, 0, 0); border-image: initial; border-style: solid; border-width: 1px; font-family: "Courier New"; overflow: hidden; padding: 2px 3px; text-align: center; vertical-align: bottom;"><span style="color: #20124d;">Sigma 16mm</span></td><td data-sheets-value="{"1":3,"3":225}" style="background-color: #fff2cc; border-color: rgb(204, 204, 204) rgb(0, 0, 0) rgb(0, 0, 0) rgb(204, 204, 204); border-image: initial; border-style: solid; border-width: 1px; font-family: "Courier New"; overflow: hidden; padding: 2px 3px; text-align: center; vertical-align: bottom;"><span style="color: #20124d;">225</span></td><td data-sheets-formula="=R[0]C[-1]/R[0]C[-4]" data-sheets-numberformat="{"1":3,"2":"0.00%","3":1}" data-sheets-value="{"1":3,"3":0.7234726688102894}" style="background-color: #fff2cc; border-color: rgb(204, 204, 204) rgb(0, 0, 0) rgb(0, 0, 0) rgb(204, 204, 204); border-image: initial; border-style: solid; border-width: 1px; font-family: "Courier New"; overflow: hidden; padding: 2px 3px; text-align: right; vertical-align: bottom;"><span style="color: #20124d;">72.35%</span></td></tr><tr style="height: 21px;"><td data-sheets-value="{"1":2,"2":"50mm F1.4 + MB"}" style="background-color: #fff2cc; border-color: rgb(204, 204, 204) rgb(0, 0, 0) rgb(0, 0, 0); border-image: initial; border-style: solid; border-width: 1px; font-family: "Courier New"; overflow: hidden; padding: 2px 3px; text-align: center; vertical-align: bottom;"><span style="color: #20124d;">50mm F1.4 + MB</span></td><td data-sheets-value="{"1":3,"3":10}" style="background-color: #fff2cc; border-color: rgb(204, 204, 204) rgb(0, 0, 0) rgb(0, 0, 0) rgb(204, 204, 204); border-image: initial; border-style: solid; border-width: 1px; font-family: "Courier New"; overflow: hidden; padding: 2px 3px; text-align: center; vertical-align: bottom;"><span style="color: #20124d;">10</span></td><td data-sheets-formula="=R[0]C[-1]/R[0]C[-4]" data-sheets-numberformat="{"1":3,"2":"0.00%","3":1}" data-sheets-value="{"1":3,"3":0.6666666666666666}" style="background-color: #fff2cc; border-color: rgb(204, 204, 204) rgb(0, 0, 0) rgb(0, 0, 0) rgb(204, 204, 204); border-image: initial; border-style: solid; border-width: 1px; font-family: "Courier New"; overflow: hidden; padding: 2px 3px; text-align: right; vertical-align: bottom;"><span style="color: #20124d;">66.67%</span></td></tr><tr style="height: 21px;"><td data-sheets-value="{"1":2,"2":"75-300mm"}" style="background-color: #fff2cc; border-color: rgb(204, 204, 204) rgb(0, 0, 0) rgb(0, 0, 0); border-image: initial; border-style: solid; border-width: 1px; font-family: "Courier New"; overflow: hidden; padding: 2px 3px; text-align: center; vertical-align: bottom;"><span style="color: #20124d;">75-300mm</span></td><td data-sheets-value="{"1":3,"3":265}" style="background-color: #fff2cc; border-color: rgb(204, 204, 204) rgb(0, 0, 0) rgb(0, 0, 0) rgb(204, 204, 204); border-image: initial; border-style: solid; border-width: 1px; font-family: "Courier New"; overflow: hidden; padding: 2px 3px; text-align: center; vertical-align: bottom;"><span style="color: #20124d;">265</span></td><td data-sheets-formula="=R[0]C[-1]/R[0]C[-4]" data-sheets-numberformat="{"1":3,"2":"0.00%","3":1}" data-sheets-value="{"1":3,"3":0.9330985915492958}" style="background-color: #fff2cc; border-color: rgb(204, 204, 204) rgb(0, 0, 0) rgb(0, 0, 0) rgb(204, 204, 204); border-image: initial; border-style: solid; border-width: 1px; font-family: "Courier New"; overflow: hidden; padding: 2px 3px; text-align: right; vertical-align: bottom;"><span style="color: #20124d;">93.31%</span></td></tr><tr style="height: 21px;"><td data-sheets-value="{"1":2,"2":"12-60mm"}" style="background-color: #fff2cc; border-color: rgb(204, 204, 204) rgb(0, 0, 0) rgb(0, 0, 0); border-image: initial; border-style: solid; border-width: 1px; font-family: "Courier New"; overflow: hidden; padding: 2px 3px; text-align: center; vertical-align: bottom;"><span style="color: #20124d;">12-60mm</span></td><td data-sheets-value="{"1":3,"3":301}" style="background-color: #fff2cc; border-color: rgb(204, 204, 204) rgb(0, 0, 0) rgb(0, 0, 0) rgb(204, 204, 204); border-image: initial; border-style: solid; border-width: 1px; font-family: "Courier New"; overflow: hidden; padding: 2px 3px; text-align: center; vertical-align: bottom;"><span style="color: #20124d;">301</span></td><td data-sheets-formula="=R[0]C[-1]/R[0]C[-4]" data-sheets-numberformat="{"1":3,"2":"0.00%","3":1}" data-sheets-value="{"1":3,"3":0.7838541666666666}" style="background-color: #fff2cc; border-color: rgb(204, 204, 204) rgb(0, 0, 0) rgb(0, 0, 0) rgb(204, 204, 204); border-image: initial; border-style: solid; border-width: 1px; font-family: "Courier New"; overflow: hidden; padding: 2px 3px; text-align: right; vertical-align: bottom;"><span style="color: #20124d;">78.39%</span></td></tr><tr style="height: 21px;"><td data-sheets-value="{"1":2,"2":"7Artisians FE"}" style="background-color: #fff2cc; border-color: rgb(204, 204, 204) rgb(0, 0, 0) rgb(0, 0, 0); border-image: initial; border-style: solid; border-width: 1px; font-family: "Courier New"; overflow: hidden; padding: 2px 3px; text-align: center; vertical-align: bottom;"><span style="color: #20124d;">7Artisians FE</span></td><td data-sheets-value="{"1":3,"3":116}" style="background-color: #fff2cc; border-color: rgb(204, 204, 204) rgb(0, 0, 0) rgb(0, 0, 0) rgb(204, 204, 204); border-image: initial; border-style: solid; border-width: 1px; font-family: "Courier New"; overflow: hidden; padding: 2px 3px; text-align: center; vertical-align: bottom;"><span style="color: #20124d;">116</span></td><td data-sheets-formula="=R[0]C[-1]/R[0]C[-4]" data-sheets-numberformat="{"1":3,"2":"0.00%","3":1}" data-sheets-value="{"1":3,"3":0.6480446927374302}" style="background-color: #fff2cc; border-color: rgb(204, 204, 204) rgb(0, 0, 0) rgb(0, 0, 0) rgb(204, 204, 204); border-image: initial; border-style: solid; border-width: 1px; font-family: "Courier New"; overflow: hidden; padding: 2px 3px; text-align: right; vertical-align: bottom;"><span style="color: #20124d;">64.80%</span></td></tr><tr style="height: 21px;"><td data-sheets-value="{"1":2,"2":"Lydia"}" style="background-color: #fff2cc; border-color: rgb(204, 204, 204) rgb(0, 0, 0) rgb(0, 0, 0); border-image: initial; border-style: solid; border-width: 1px; font-family: "Courier New"; overflow: hidden; padding: 2px 3px; text-align: center; vertical-align: bottom;"><span style="color: #20124d;">Super Wife</span></td><td data-sheets-value="{"1":3,"3":756}" style="background-color: #fff2cc; border-color: rgb(204, 204, 204) rgb(0, 0, 0) rgb(0, 0, 0) rgb(204, 204, 204); border-image: initial; border-style: solid; border-width: 1px; font-family: "Courier New"; overflow: hidden; padding: 2px 3px; text-align: center; vertical-align: bottom;"><span style="color: #20124d;">756</span></td><td data-sheets-formula="=R[0]C[-1]/R[0]C[-4]" data-sheets-numberformat="{"1":3,"2":"0.00%","3":1}" data-sheets-value="{"1":3,"3":0.7941176470588235}" style="background-color: #fff2cc; border-color: rgb(204, 204, 204) rgb(0, 0, 0) rgb(0, 0, 0) rgb(204, 204, 204); border-image: initial; border-style: solid; border-width: 1px; font-family: "Courier New"; overflow: hidden; padding: 2px 3px; text-align: right; vertical-align: bottom;"><span style="color: #20124d;">79.41%</span></td></tr><tr style="height: 21px;"><td data-sheets-value="{"1":2,"2":"Gia"}" style="background-color: #fff2cc; border-color: rgb(204, 204, 204) rgb(0, 0, 0) rgb(0, 0, 0); border-image: initial; border-style: solid; border-width: 1px; font-family: "Courier New"; overflow: hidden; padding: 2px 3px; text-align: center; vertical-align: bottom;"><span style="color: #20124d;">Awesome Kid</span></td><td data-sheets-value="{"1":3,"3":79}" style="background-color: #fff2cc; border-color: rgb(204, 204, 204) rgb(0, 0, 0) rgb(0, 0, 0) rgb(204, 204, 204); border-image: initial; border-style: solid; border-width: 1px; font-family: "Courier New"; overflow: hidden; padding: 2px 3px; text-align: center; vertical-align: bottom;"><span style="color: #20124d;">79</span></td><td data-sheets-formula="=R[0]C[-1]/R[0]C[-4]" data-sheets-numberformat="{"1":3,"2":"0.00%","3":1}" data-sheets-value="{"1":3,"3":0.6583333333333333}" style="background-color: #fff2cc; border-color: rgb(204, 204, 204) rgb(0, 0, 0) rgb(0, 0, 0) rgb(204, 204, 204); border-image: initial; border-style: solid; border-width: 1px; font-family: "Courier New"; overflow: hidden; padding: 2px 3px; text-align: right; vertical-align: bottom;"><span style="color: #20124d;">65.83%</span></td></tr></tbody></table></google-sheets-html-origin></div><div><span style="font-family: courier;"><br /></span></div><div><span style="font-family: courier;"><br /></span></div><div><span style="font-family: courier;">How often I used a particular lens:</span></div><div><span style="font-family: courier;"><br /></span></div><div><span style="font-family: courier;"><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/a/AVvXsEip6o_KLaxSUFmbUZhDRSqYbbMWzTQBFqoqLaYQrg7CWeaRcc_OD5E-RLHd0QRsxBnHrXUVzpbMLiXmhgjFsgRcsKbxuJJtMiQLRvQF8Xy8Z05DFJUMx5ZZjEVTbd11pPqQqtnsF2Kl9A-BOQeMDctoFZT_EmAPx7GqDYQwbnt_kBwE-B1IL7m3fYu-fkRk" style="margin-left: 1em; margin-right: 1em;"><img alt="" data-original-height="1029" data-original-width="1828" height="360" src="https://blogger.googleusercontent.com/img/a/AVvXsEip6o_KLaxSUFmbUZhDRSqYbbMWzTQBFqoqLaYQrg7CWeaRcc_OD5E-RLHd0QRsxBnHrXUVzpbMLiXmhgjFsgRcsKbxuJJtMiQLRvQF8Xy8Z05DFJUMx5ZZjEVTbd11pPqQqtnsF2Kl9A-BOQeMDctoFZT_EmAPx7GqDYQwbnt_kBwE-B1IL7m3fYu-fkRk=w640-h360" width="640" /></a></div><br /><br /></span></div><div><span style="font-family: courier;"><br /></span></div><h2 style="text-align: left;"><span style="font-family: courier;">Shooting patterns:</span></h2><div><span style="font-family: courier;">Well right off the bat I can see that if there's any lens I leave behind on a scenic trip, it's the <b>50mm F1.4 + MB reducer</b>. It's a <i>great</i> lens. A favorite. It just obliterates the background. If the objective of the photo is to capture the subject (people) <i>with</i> the surroundings, it's not the right lens for the job. Nice render though 😁</span></div><div><span style="font-family: courier;"><br /></span></div><div><span style="font-family: courier;"><table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto;"><tbody><tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/a/AVvXsEixp_nQ5o0voc2kglXEutM29mveHkPH93lkbq0POYN7y511nsXNoCLrxdsCEATKQrzbcCMGAZRlkR57-0lErqpXt3nQMF-sErDWqZpNEHctp6IoPGYfOG4Gt7lfk9ElDTCcKyxvoPrgxg8YmMYxZHKISBiYiFTyLR4ef7lSoQgxwnWJPGCRAnpItHOWyAkN" style="margin-left: auto; margin-right: auto;"><img alt="" data-original-height="2600" data-original-width="1948" height="640" src="https://blogger.googleusercontent.com/img/a/AVvXsEixp_nQ5o0voc2kglXEutM29mveHkPH93lkbq0POYN7y511nsXNoCLrxdsCEATKQrzbcCMGAZRlkR57-0lErqpXt3nQMF-sErDWqZpNEHctp6IoPGYfOG4Gt7lfk9ElDTCcKyxvoPrgxg8YmMYxZHKISBiYiFTyLR4ef7lSoQgxwnWJPGCRAnpItHOWyAkN=w480-h640" width="480" /></a></td></tr><tr><td class="tr-caption" style="text-align: center;"><span style="font-size: medium;">I love the way this lens renders bokeh. I can stop down for the background, but at that point, I'll just use the regular zoom.</span></td></tr></tbody></table><div><span style="font-family: courier;"><br /></span></div><div><span style="font-family: courier;"><br /></span></div>Of my own pictures, the <b>7Artisians Fisheye </b>was the next least used (still significantly used over the 50 though!) - but it also gave some of the most impactful pictures! It will capture the sweeping curves of the cruise ship's structures, or just deliver a perspective otherwise impossible to capture. The image can be fully defished to give a wide rectilinear result, or slightly to keep a bit of that distortion.</span></div><div><span style="font-family: courier;"><br /></span></div><div><span style="font-family: courier;"><table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto;"><tbody><tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/a/AVvXsEhkCDcd_40GS7Wm4kAfTwfCUmcwP6vYfY7ag9ajHoytRKKE7MaxR_ihKYIBtSE0XsQd2wu6dCvs32RW5MhTls_8ZKS_h0DFNQn6pCs04kZqjVgwNBeC-1-7H-A3PcQMyh4p0udiTq_l_TPIu4IhDlH1Jm_7c3Cks7e7B0oe3l5Z4oGAj6N5yOzEhsKXvrJR" style="margin-left: auto; margin-right: auto;"><img alt="" data-original-height="2600" data-original-width="1948" height="640" src="https://blogger.googleusercontent.com/img/a/AVvXsEhkCDcd_40GS7Wm4kAfTwfCUmcwP6vYfY7ag9ajHoytRKKE7MaxR_ihKYIBtSE0XsQd2wu6dCvs32RW5MhTls_8ZKS_h0DFNQn6pCs04kZqjVgwNBeC-1-7H-A3PcQMyh4p0udiTq_l_TPIu4IhDlH1Jm_7c3Cks7e7B0oe3l5Z4oGAj6N5yOzEhsKXvrJR=w480-h640" width="480" /></a></td></tr><tr><td class="tr-caption" style="text-align: center;"><span style="font-size: medium;">A spiraling staircase led from the 3rd floor to the 5th. Keep subjects near the center of the frame and step back. This keeps them from getting too distorted. </span></td></tr></tbody></table><div class="separator" style="clear: both; text-align: center;"><br /></div><div class="separator" style="clear: both; text-align: center;"><br /></div><table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto;"><tbody><tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/a/AVvXsEjAyoyGERZv2hPS19IhDXMcZ8bFhoq_RtxdgfB2BvUg-Xw1LpRU6IVf0HWKjeXCMeOW3VVbhhNTMVn4XW9Ny_7SUbqL1i6KTdZPv0z1_R4ZATv1a6h1x_RUhmDrUIwjYujzKLIBM6ED5Bb2KFyGgnmwQZZr1XLOEVpkOFsNRNaPjKtNcO9RYHj9cyyNdJcn" style="margin-left: auto; margin-right: auto;"><img alt="" data-original-height="1948" data-original-width="2600" height="480" src="https://blogger.googleusercontent.com/img/a/AVvXsEjAyoyGERZv2hPS19IhDXMcZ8bFhoq_RtxdgfB2BvUg-Xw1LpRU6IVf0HWKjeXCMeOW3VVbhhNTMVn4XW9Ny_7SUbqL1i6KTdZPv0z1_R4ZATv1a6h1x_RUhmDrUIwjYujzKLIBM6ED5Bb2KFyGgnmwQZZr1XLOEVpkOFsNRNaPjKtNcO9RYHj9cyyNdJcn" width="640" /></a></td></tr><tr><td class="tr-caption" style="text-align: center;"><span style="font-size: medium;">the fisheye also fares well in the ship's main dining room.</span></td></tr></tbody></table><br /><br /><br /><br /></span></div><div><span style="font-family: courier;"><table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto;"><tbody><tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/a/AVvXsEhial62Q29_PP1TuFq1X-5SO0v7Gyhh0WwkGkOUO8hqKDiH54qmvsLHWbADTNPNnUoA_GtjDFWG1ZIdv4CcVuL3t78AQM9vse9yUMgrrfteI9pA9Vn7yplH2Fyc29c44mrtWnzyEkB2zjFzT8rkB-hOuetTS-WHkBeg9JukQXycz5NgpSvPD1SXnlHOsogd" style="margin-left: auto; margin-right: auto;"><img alt="" data-original-height="2600" data-original-width="1948" height="640" src="https://blogger.googleusercontent.com/img/a/AVvXsEhial62Q29_PP1TuFq1X-5SO0v7Gyhh0WwkGkOUO8hqKDiH54qmvsLHWbADTNPNnUoA_GtjDFWG1ZIdv4CcVuL3t78AQM9vse9yUMgrrfteI9pA9Vn7yplH2Fyc29c44mrtWnzyEkB2zjFzT8rkB-hOuetTS-WHkBeg9JukQXycz5NgpSvPD1SXnlHOsogd=w480-h640" width="480" /></a></td></tr><tr><td class="tr-caption" style="text-align: center;"><span style="font-size: medium;">Sometimes you just want pictures with tall buildings, statues, and monuments - and it feels impossible with most lenses. Without being able to step back a lot, the 7Artisians Fisheye was able to capture the top of the lighthouse.</span></td></tr></tbody></table><br /><br /><table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto;"><tbody><tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/a/AVvXsEjuPjreP3-limnFiN8YaTDFLNi_BoWO7dIXctkScj31e_eexSt1SQNb8PsD1imGhxwXyeKu81CHBhVG5ibeB7GrWHEqzzCFX2Vk1cLbKAHnB-g2RdW3SAZFyXy_d4kFNm5gLpC-u10kjz6NMn9WENHIIpG_Kot3dLrWtnQixn55z19fe5O09ajB1SULvHk9" style="margin-left: 1em; margin-right: 1em;"><img alt="" data-original-height="1948" data-original-width="2600" height="480" src="https://blogger.googleusercontent.com/img/a/AVvXsEjuPjreP3-limnFiN8YaTDFLNi_BoWO7dIXctkScj31e_eexSt1SQNb8PsD1imGhxwXyeKu81CHBhVG5ibeB7GrWHEqzzCFX2Vk1cLbKAHnB-g2RdW3SAZFyXy_d4kFNm5gLpC-u10kjz6NMn9WENHIIpG_Kot3dLrWtnQixn55z19fe5O09ajB1SULvHk9=w640-h480" width="640" /></a></td></tr><tr><td class="tr-caption" style="text-align: center;"><span style="font-size: medium;">When you want all the sky...</span></td></tr></tbody></table><br /><br /><br /></span></div><div><span style="font-family: courier;"><table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto;"><tbody><tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/a/AVvXsEidKOLrQuYVQtxBM04EkQ380GsueqDEbDN11K4e-IQUt_MHwuGNyFsepJ0hAeYwhNwW4WCdlVtnXJ2qeLhrWir6YDtn4J_vTptKi8UozhBpWSSRMi4ieIU7uWzDsduB71e0Tf_LL426E9skSkFfXY0_rBXiu4H-8vUIHfMd52X16TvmBFClJjVwfY9xhRQs" style="margin-left: 1em; margin-right: 1em;"><img alt="" data-original-height="1948" data-original-width="2600" height="480" src="https://blogger.googleusercontent.com/img/a/AVvXsEidKOLrQuYVQtxBM04EkQ380GsueqDEbDN11K4e-IQUt_MHwuGNyFsepJ0hAeYwhNwW4WCdlVtnXJ2qeLhrWir6YDtn4J_vTptKi8UozhBpWSSRMi4ieIU7uWzDsduB71e0Tf_LL426E9skSkFfXY0_rBXiu4H-8vUIHfMd52X16TvmBFClJjVwfY9xhRQs=w640-h480" width="640" /></a></td></tr><tr><td class="tr-caption" style="text-align: center;"><span style="font-size: medium;">Sometimes you just want more width and a consistent hyperfocal distance that puts everything in focus.</span></td></tr></tbody></table><br /><br /><table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto;"><tbody><tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/a/AVvXsEiwqzBV6Dz7HEKOFqrCNQKBzHk3sOuB0QSN4XwEgznpw6oquxG1okWfRTngTS846Q5pO4VFJXsTZenVR0IHQOh1r-Y9Bb4jOscKVvDnmuGy4TpunC5eL4jTLknuHASyLSnPRUc7mKWdRSyaXbVkMirRvNFf6Y85O2sqjn8yLDI24zSiw7OEF6GiNm1NRVor" style="margin-left: auto; margin-right: auto;"><img alt="" data-original-height="1864" data-original-width="2488" height="480" src="https://blogger.googleusercontent.com/img/a/AVvXsEiwqzBV6Dz7HEKOFqrCNQKBzHk3sOuB0QSN4XwEgznpw6oquxG1okWfRTngTS846Q5pO4VFJXsTZenVR0IHQOh1r-Y9Bb4jOscKVvDnmuGy4TpunC5eL4jTLknuHASyLSnPRUc7mKWdRSyaXbVkMirRvNFf6Y85O2sqjn8yLDI24zSiw7OEF6GiNm1NRVor=w640-h480" width="640" /></a></td></tr><tr><td class="tr-caption" style="text-align: center;"><span style="font-size: medium;">Being close to the ship wasn't a problem. I did slightly defish the image.</span></td></tr></tbody></table><br /><table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto;"><tbody><tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/a/AVvXsEgRM00A89hNWptDdNvHM-Md207vYDHtYTHWrOMh0DgwirMb8ol3FozfakbJFQmECUM5k6WrRuM4ujgkCyhXzPX2iXzMHki_5PagLyicb0PC3Zwv17P8EjShIZC6xAD11G6AnvE4LrqiSAiKCDTuZQ6tS5ckUSB1Rlb1nPen7OtJrCnE7WMt669yVa6sCuxF" style="margin-left: auto; margin-right: auto;"><img alt="" data-original-height="1948" data-original-width="2600" height="480" src="https://blogger.googleusercontent.com/img/a/AVvXsEgRM00A89hNWptDdNvHM-Md207vYDHtYTHWrOMh0DgwirMb8ol3FozfakbJFQmECUM5k6WrRuM4ujgkCyhXzPX2iXzMHki_5PagLyicb0PC3Zwv17P8EjShIZC6xAD11G6AnvE4LrqiSAiKCDTuZQ6tS5ckUSB1Rlb1nPen7OtJrCnE7WMt669yVa6sCuxF" width="640" /></a></td></tr><tr><td class="tr-caption" style="text-align: center;"><span style="font-size: medium;">Photography on a ship can be tough with unforgiving lighting conditions. Lights come at bad angles casting shadows on faces. Lights from different areas have different colors making white balance tough. A fisheye captures so much, that it's even tougher to balance exposure and color.</span></td></tr></tbody></table><br /><br /><br /><br />Next up, is the <b>12-60mm</b> lens. I went into this not realizing how much I'd use it. I barely used this lens when on the ship. Out in the sun during the day, however, it was really effective.</span></div><div><span style="font-family: courier;"><br /></span></div><div><span style="font-family: courier;"><table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto;"><tbody><tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/a/AVvXsEgSwC9CStmusuT1c6dP--WIPRJJDxTNdYXZK7UMcB-i1B0tnLtY5XpaREvD9OMRST67zAlzyOS-q-9_1nYjru2pLJzte30S2eLm7QEp_-ybUlLfLrnV-b7qYvmiryP2sjvvh8vcD7GwYUwmU3Epcizzh5wHorTJyr91Y3uaeYB8UtsEpHQbjFoplB8ACH-Y" style="margin-left: auto; margin-right: auto;"><img alt="" data-original-height="1948" data-original-width="2600" height="480" src="https://blogger.googleusercontent.com/img/a/AVvXsEgSwC9CStmusuT1c6dP--WIPRJJDxTNdYXZK7UMcB-i1B0tnLtY5XpaREvD9OMRST67zAlzyOS-q-9_1nYjru2pLJzte30S2eLm7QEp_-ybUlLfLrnV-b7qYvmiryP2sjvvh8vcD7GwYUwmU3Epcizzh5wHorTJyr91Y3uaeYB8UtsEpHQbjFoplB8ACH-Y=w640-h480" width="640" /></a></td></tr><tr><td class="tr-caption" style="text-align: center;"><span style="font-size: medium;">Arcadia National Park, Jordon Pond</span></td></tr></tbody></table><br /><br /><table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto;"><tbody><tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/a/AVvXsEi7-uPeiT39hGU2sLYeDbfEZWqESed4kOIRLH8VN3an8eOUDefoNjEmb52mY-ZuVK0upJcG0LYA-UMr4DEUZ0Oa0vqqWkiYGjsqftwUgJUdKhU9nVOWMgnPHCclRAqsKIN4ACLDR59XhKCPaity0r5K4BzkI3yEFChjZr5s9ysIEP0S_fh3gM5hTk2IjU5x" style="margin-left: auto; margin-right: auto;"><img alt="" data-original-height="1948" data-original-width="2600" height="480" src="https://blogger.googleusercontent.com/img/a/AVvXsEi7-uPeiT39hGU2sLYeDbfEZWqESed4kOIRLH8VN3an8eOUDefoNjEmb52mY-ZuVK0upJcG0LYA-UMr4DEUZ0Oa0vqqWkiYGjsqftwUgJUdKhU9nVOWMgnPHCclRAqsKIN4ACLDR59XhKCPaity0r5K4BzkI3yEFChjZr5s9ysIEP0S_fh3gM5hTk2IjU5x=w640-h480" width="640" /></a></td></tr><tr><td class="tr-caption" style="text-align: center;"><span style="font-size: medium;">Cape Elizabeth, Portland Head Light</span></td></tr></tbody></table><br /><br /><table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto;"><tbody><tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/a/AVvXsEjWNCdJoG-IRU67YcCszoHzsW1tr8LKSq-69MOG6WyiPRy9JRY4DLzzzrUvMVEOZNe9Fg-3HWXealJgcIuQz_8zbMMoPUO5AHbLi6kmnUSpzDuRwBNLVByM78lcL6Uc4YE-DxlCzBHqg1KeS1KwZQkBQMDWTcgfoN2e9Jc6sBiOjZPeGoy1KOG62bJbQv4Y" style="margin-left: auto; margin-right: auto;"><img alt="" data-original-height="1756" data-original-width="2344" height="480" src="https://blogger.googleusercontent.com/img/a/AVvXsEjWNCdJoG-IRU67YcCszoHzsW1tr8LKSq-69MOG6WyiPRy9JRY4DLzzzrUvMVEOZNe9Fg-3HWXealJgcIuQz_8zbMMoPUO5AHbLi6kmnUSpzDuRwBNLVByM78lcL6Uc4YE-DxlCzBHqg1KeS1KwZQkBQMDWTcgfoN2e9Jc6sBiOjZPeGoy1KOG62bJbQv4Y=w640-h480" width="640" /></a></td></tr><tr><td class="tr-caption" style="text-align: center;"><span style="font-size: medium;">Nova Scotia,Peggy's Cove Lighthouse</span></td></tr></tbody></table><br /><br /><table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto;"><tbody><tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/a/AVvXsEgnh7oKS1yz8k9NiwSYxobWJUj8bgPRgb5vStKno0yACDLH8L2G_XWlQwMvp8Zr0NcFg6K9uP6syg7KAAv1zJ1f45gv4sZP3_qt2HBVqwqd1C9h9irgg8uVyX49LmTXLrrVwpHGqsrxn6cBrSyrEWCWM2qQ9yFXWpowJGbYoT1AmWqAO9nKpyBtWGBm8Yvh" style="margin-left: 1em; margin-right: 1em;"><img alt="" data-original-height="1948" data-original-width="2600" height="480" src="https://blogger.googleusercontent.com/img/a/AVvXsEgnh7oKS1yz8k9NiwSYxobWJUj8bgPRgb5vStKno0yACDLH8L2G_XWlQwMvp8Zr0NcFg6K9uP6syg7KAAv1zJ1f45gv4sZP3_qt2HBVqwqd1C9h9irgg8uVyX49LmTXLrrVwpHGqsrxn6cBrSyrEWCWM2qQ9yFXWpowJGbYoT1AmWqAO9nKpyBtWGBm8Yvh=w640-h480" width="640" /></a></td></tr><tr><td class="tr-caption" style="text-align: center;"><span style="font-size: medium;">Strength of a zoom, is in composition and framing. I took this from a bridge in Concord. I saw the boathouse through a gap in the trees. The kayakers were a welcome addition.</span></td></tr></tbody></table><br /><table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto;"><tbody><tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/a/AVvXsEisfCe3HYnaqI5Bt7UQEdLFe5qghR1dz_xBIMuGOpJbYFmgM-inUgCkElmMXHEIXujdNysYNztkhU2VQJs4jA-lv6zkQSOXou_UZW4KnlAxWXBOcOKqGLylQSQlL6Q1REPlyZIy95DIbPEUuj2-SHT69EWvYY2_xf2h5E8XewOwg97PQPGYJvAYcIqKRHHq" style="margin-left: 1em; margin-right: 1em;"><img alt="" data-original-height="1781" data-original-width="2377" height="480" src="https://blogger.googleusercontent.com/img/a/AVvXsEisfCe3HYnaqI5Bt7UQEdLFe5qghR1dz_xBIMuGOpJbYFmgM-inUgCkElmMXHEIXujdNysYNztkhU2VQJs4jA-lv6zkQSOXou_UZW4KnlAxWXBOcOKqGLylQSQlL6Q1REPlyZIy95DIbPEUuj2-SHT69EWvYY2_xf2h5E8XewOwg97PQPGYJvAYcIqKRHHq=w640-h480" width="640" /></a></td></tr><tr><td class="tr-caption" style="text-align: center;"><span style="font-size: medium;">The 12-60mm isn't a macro lens, but it can give a respectable close focus in a pinch when desired. With an achromatic close-up filter, it does have fair macro capability.</span></td></tr></tbody></table><br /><br /><br /><br /></span></div><div><span style="font-family: courier;">The <b>Olympus 75-300mm</b> is a long zoom. It's good for wildlife, far-off structures, and even for portraits where you want to have something in the distance fill the background.</span></div><div><span style="font-family: courier;"><br /></span></div><div><span style="font-family: courier;"><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/a/AVvXsEgMEV8RKFDqxZLo_3SsG5-ymDiPzVICtoDAvF-fgNZHBP3vggwKV4rnQjcoyuTD2qrDyHUwKp9hsB3ipeKtUjvg8QuiUN02rTIWCbQrNYTSJrhUnVHYk6fXzi6-lmGaDwXewzfcUZ7Ekj_v80gIrNdAQEOhQ9ijLCtE8L9XirpNw-pmm_DINPSdBOqhymdu" style="margin-left: 1em; margin-right: 1em;"><img alt="" data-original-height="1948" data-original-width="2600" height="480" src="https://blogger.googleusercontent.com/img/a/AVvXsEgMEV8RKFDqxZLo_3SsG5-ymDiPzVICtoDAvF-fgNZHBP3vggwKV4rnQjcoyuTD2qrDyHUwKp9hsB3ipeKtUjvg8QuiUN02rTIWCbQrNYTSJrhUnVHYk6fXzi6-lmGaDwXewzfcUZ7Ekj_v80gIrNdAQEOhQ9ijLCtE8L9XirpNw-pmm_DINPSdBOqhymdu=w640-h480" width="640" /></a></div><br /><br /></span></div><div><span style="font-family: courier;"><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/a/AVvXsEi81Uf2R9JzjDPzEkQsLH7ZTgOtpQa2TKNYXVKy846XdyyZhPPfjgKvsI7sJuwgDY6pPNG81QFakbmyt1MdBJcAE6Z3IeA-1YZ1lKO54HxCzAhZXU-m3cz-EEU7fqx4GwyMSZ-CCqL2hERnF7ivNvPeTUuw3GX9pSl1Z-lwmIoQTGHv4TImz3qGH7Y4W_Fm" style="margin-left: 1em; margin-right: 1em;"><img alt="" data-original-height="1583" data-original-width="1979" height="480" src="https://blogger.googleusercontent.com/img/a/AVvXsEi81Uf2R9JzjDPzEkQsLH7ZTgOtpQa2TKNYXVKy846XdyyZhPPfjgKvsI7sJuwgDY6pPNG81QFakbmyt1MdBJcAE6Z3IeA-1YZ1lKO54HxCzAhZXU-m3cz-EEU7fqx4GwyMSZ-CCqL2hERnF7ivNvPeTUuw3GX9pSl1Z-lwmIoQTGHv4TImz3qGH7Y4W_Fm" width="600" /></a></div></span></div><div><span style="font-family: courier;"><table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto;"><tbody><tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/a/AVvXsEjPH9fKpqlSDgbYKGRRnxeRXE09dDAbmU5dB-FQK5-nqoPjMg-4wQ0lzkrd-lIifltlbMnOG_uV1P_2uktDSfvTxE-x3shQwgm0RibVUM32xmNW-K-A0-sZJrZ-K2LDmpWYqVTxzUQgrXMBc4tU2ZQdkflZC1acLsZpTDvQVcO0aW77x5pkb1u8bbY6kNmh" style="margin-left: auto; margin-right: auto;"><img alt="" data-original-height="1410" data-original-width="1882" height="480" src="https://blogger.googleusercontent.com/img/a/AVvXsEjPH9fKpqlSDgbYKGRRnxeRXE09dDAbmU5dB-FQK5-nqoPjMg-4wQ0lzkrd-lIifltlbMnOG_uV1P_2uktDSfvTxE-x3shQwgm0RibVUM32xmNW-K-A0-sZJrZ-K2LDmpWYqVTxzUQgrXMBc4tU2ZQdkflZC1acLsZpTDvQVcO0aW77x5pkb1u8bbY6kNmh=w640-h480" width="640" /></a><br /><div class="separator" style="clear: both; text-align: center;"></div></td></tr><tr><td class="tr-caption" style="text-align: center;"><span style="font-size: medium;">I didn't see any whales, puffins, or other wildlife. Birds seem to like flying by cruise ships though. I guess they use the rising warm air as a pick-me-up.</span></td></tr></tbody></table><br /><br /></span></div><div><span style="font-family: courier;"><table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto;"><tbody><tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/a/AVvXsEgzKKXLrbLK8rMaywAcZUtG8FZ4YcCKxbGyiuJbb9vslxbS6EC9HJZp3u5f4i4TljJVNbOgcvyat3qwqW0cYu9RilqegAMnVW8mfWjPJ-spmYOkSNgZg6WeT0w9s0VkZfEZaov3BxrK2DtQK7YASCv_wIeigO22WllWkbmgH1MhB5IrL9TLIfQ7PO6wz3ce" style="margin-left: 1em; margin-right: 1em;"><img alt="" data-original-height="1948" data-original-width="2600" height="480" src="https://blogger.googleusercontent.com/img/a/AVvXsEgzKKXLrbLK8rMaywAcZUtG8FZ4YcCKxbGyiuJbb9vslxbS6EC9HJZp3u5f4i4TljJVNbOgcvyat3qwqW0cYu9RilqegAMnVW8mfWjPJ-spmYOkSNgZg6WeT0w9s0VkZfEZaov3BxrK2DtQK7YASCv_wIeigO22WllWkbmgH1MhB5IrL9TLIfQ7PO6wz3ce" width="640" /></a></td></tr><tr><td class="tr-caption" style="text-align: center;"><span style="font-size: medium;">We passed the Cape Elizabeth lighthouse while pulling out of Portland. At 156mm (312mm effective in full-frame terms) It fills the available space in the background. </span></td></tr></tbody></table><br /><br />The <b>Sigma 16mm </b>is fast becoming a favorite of mine. The F1.4 aperture is nice and bright for indoors and at night. It's somewhat wide, giving a decent depth of field. Sharp, flare-resistant etc... It's a good lens. A little big though, especially compared to the competition - a 15mm F1.4 Panasonic and 17mm F1.8 OM. It <i>is</i> cheaper though, and doesn't seem to sacrifice image quality. </span></div><div><span style="font-family: courier;"><br /></span></div><div><span style="font-family: courier;"><table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto;"><tbody><tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/a/AVvXsEhOTJsrEgCEsbT4aJMvTxLfW0vVlqY9OMbOck-X-gRRMSG2hi3KiiLIkH-MUsMsT7SdLXhLuXnZYBEtqPFjqz6bIR8oGjs77XdbAOVdnYB830iS3pqOJxkyQf06AuO862eCq8DUOMn16NXQuFfHABhtAjJmJpTEO2X2Dohe-u4H8cqRuh54InGrh_ghNwcu" style="margin-left: auto; margin-right: auto;"><img alt="" data-original-height="3896" data-original-width="5200" height="480" src="https://blogger.googleusercontent.com/img/a/AVvXsEhOTJsrEgCEsbT4aJMvTxLfW0vVlqY9OMbOck-X-gRRMSG2hi3KiiLIkH-MUsMsT7SdLXhLuXnZYBEtqPFjqz6bIR8oGjs77XdbAOVdnYB830iS3pqOJxkyQf06AuO862eCq8DUOMn16NXQuFfHABhtAjJmJpTEO2X2Dohe-u4H8cqRuh54InGrh_ghNwcu" width="640" /></a></td></tr><tr><td class="tr-caption" style="text-align: center;"><span style="font-size: medium;">Night on a cruise ship is generally quite dark. It certainly wasn't this bright. Faces are perpetually ill-lit, with multiple light colors to make post-processing a pain.<br /></span></td></tr></tbody></table></span></div><div><span style="font-family: courier;"><br /></span></div><div><span style="font-family: courier;"><br /></span></div><div><span style="font-family: courier;"><table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto;"><tbody><tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/a/AVvXsEi095u6cT5VvSbeF9SoAofcg6gG6e3KqbXZUPBGPTEY0jgSaCnr26-DNFOCEqWntYm5aKsCATmw-pZQFHTkYaNC_w5d51DrU6wlMAaOqgIv3SI37RC8_OXck7Z8777gykp331kFHfu3yRydaeUoFN_wocxkaRZCWhy2pKq_ziJv6msv54-QqwrSAUmSUS8G" style="margin-left: 1em; margin-right: 1em;"><img alt="" data-original-height="1948" data-original-width="2600" height="480" src="https://blogger.googleusercontent.com/img/a/AVvXsEi095u6cT5VvSbeF9SoAofcg6gG6e3KqbXZUPBGPTEY0jgSaCnr26-DNFOCEqWntYm5aKsCATmw-pZQFHTkYaNC_w5d51DrU6wlMAaOqgIv3SI37RC8_OXck7Z8777gykp331kFHfu3yRydaeUoFN_wocxkaRZCWhy2pKq_ziJv6msv54-QqwrSAUmSUS8G" width="640" /></a></td></tr><tr><td class="tr-caption" style="text-align: center;"><span style="font-size: medium;">The arcade is one of the darker areas on the ship. A bright F1.4 lens really shines here - especially if it's wide enough to capture more.</span></td></tr></tbody></table><br /><br /></span></div><div><span style="font-family: courier;"><br /><table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto;"><tbody><tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/a/AVvXsEj_X6jL7hgbN6p7Lf2DCOjNxKqYVLNNe_9-i7GAf0K1sFYxx5OK9n4c3HeoCGkwR6sDJKfTaI4q3ZqoZtY986rBZfeQZMxZrRWm9W8VGHl3aEPdgG_nSmIurDEzBcPQjyUKNRCxOxy3bvm4HYuq9h-CCgCurr2q3zbSWl22crBRSxSxs_uGmtwJVk5_I8wf" style="margin-left: 1em; margin-right: 1em;"><img alt="" data-original-height="2600" data-original-width="1948" height="640" src="https://blogger.googleusercontent.com/img/a/AVvXsEj_X6jL7hgbN6p7Lf2DCOjNxKqYVLNNe_9-i7GAf0K1sFYxx5OK9n4c3HeoCGkwR6sDJKfTaI4q3ZqoZtY986rBZfeQZMxZrRWm9W8VGHl3aEPdgG_nSmIurDEzBcPQjyUKNRCxOxy3bvm4HYuq9h-CCgCurr2q3zbSWl22crBRSxSxs_uGmtwJVk5_I8wf=w480-h640" width="480" /></a></td></tr><tr><td class="tr-caption" style="text-align: center;"><span style="font-size: medium;">It's a fast lens - but that doesn't mean it's useless in bright light. You can stop down - or just let it rip and enjoy a bit of background blur.</span></td></tr></tbody></table><br /><br /><table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto;"><tbody><tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/a/AVvXsEhaWst2_RbyFTC-SIRPm8mp19E4JZrtkIK-E--qd5WUW2bhoavVKyq0fkdAYvLf6_ONApHYLCkMCmRdzJsDPT9by76kCuxvurxTQ6i4Q6gbtpR9uZFNdbt7sI_ZPbX4WHw7Mga6VzsDX8et03X9pmglbJJdcEe7uk8jcFH7Oi_Qb3ciRoN6Xd2V-VnMoWa6" style="margin-left: 1em; margin-right: 1em;"><img alt="" data-original-height="1948" data-original-width="2600" height="480" src="https://blogger.googleusercontent.com/img/a/AVvXsEhaWst2_RbyFTC-SIRPm8mp19E4JZrtkIK-E--qd5WUW2bhoavVKyq0fkdAYvLf6_ONApHYLCkMCmRdzJsDPT9by76kCuxvurxTQ6i4Q6gbtpR9uZFNdbt7sI_ZPbX4WHw7Mga6VzsDX8et03X9pmglbJJdcEe7uk8jcFH7Oi_Qb3ciRoN6Xd2V-VnMoWa6" width="640" /></a></td></tr><tr><td class="tr-caption" style="text-align: center;"><span style="font-size: medium;">The 16mm F1.4 gives a 32mm effective focal length on Micro Four thirds. It's a nice wide-normal type field of view, making it really comfortable to use indoors.</span></td></tr></tbody></table><br /><table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto;"><tbody><tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/a/AVvXsEiJnzcehX0E_2lJRRYFl6OscDldW294Nu_6RRi3fWNltWcUI2pW1asVaIfKaBI49HZJrIbpF5ABDDNryti7cqWxz0F-5aMiBd-xt6cbrUEEI_JcmYDTxnm_hX9fcHLCd42R8_B_mflwTfVP6KceCXaSso7T06THDRQ8zSxqZtEoR5co5QUhIHMbuAfSAF-L" style="margin-left: auto; margin-right: auto;"><img alt="" data-original-height="1948" data-original-width="2600" height="480" src="https://blogger.googleusercontent.com/img/a/AVvXsEiJnzcehX0E_2lJRRYFl6OscDldW294Nu_6RRi3fWNltWcUI2pW1asVaIfKaBI49HZJrIbpF5ABDDNryti7cqWxz0F-5aMiBd-xt6cbrUEEI_JcmYDTxnm_hX9fcHLCd42R8_B_mflwTfVP6KceCXaSso7T06THDRQ8zSxqZtEoR5co5QUhIHMbuAfSAF-L=w640-h480" width="640" /></a></td></tr><tr><td class="tr-caption" style="text-align: center;"><span style="font-size: medium;">It was a cruise - it won't be complete without a food pic 😁. Last night of the cruise - Lamb and vegetables.</span></td></tr></tbody></table><br /><br /></span></div><div><span style="font-family: courier;"><br /></span></div><div><span style="font-family: courier;"><br /></span></div><div><br /></div><h2 style="text-align: left;"><span style="font-family: courier;">Final thoughts...</span></h2><div><span style="font-family: courier;">If I had to use one lens, it would easily be the Sigma 16mm F1.4. It doesn't have to specifically be this lens - the 15mm Panasonic and 17mm Olympus are also great options for normal-wide type primes. The ability to shoot in dark areas is great. I didn't bother to take it outside, because I had the 12-60mm zoom - but it would fare well outside too, just stopped down. It wouldn't have the versatility of the 12-60mm of course.</span></div><div><span style="font-family: courier;"><br /></span></div><div><span style="font-family: courier;">Why doesn't this apply to the 50mm? Well, 50mm on the micro four-thirds platform is an effective 100mm. It's too narrow a field of view, making it rather restrictive. The reducer makes it 35mm - but that's still too narrow.</span></div><div><span style="font-family: courier;"><br /></span></div><div><span style="font-family: courier;">The next lens in my arsenal I wouldn't go without is the fisheye. I used the zooms far more than this lens, but I was really pleased with the standout fisheye results.</span></div><div><span style="font-family: courier;"><br /></span></div><div><span style="font-family: courier;">Other than the 50mm F1.4 (35mm F1) that I could definitely do without, what else would I probably drop? I</span><span style="font-family: courier;">t might be the 75-300mm. I got some great shots with it, and there's always the possibility of wildlife where I just <i>need </i>that range - but nothing really stood out this time. Perhaps a better idea would be a superzoom lens - Olympus has a 12-200mm superzoom (though costly!). Tamron has a 14-150mm that has decent sharpness (and it's cheap too).</span></div><div><span style="font-family: courier;"><br /></span></div><div><br /></div><div><span style="font-family: courier;">How do you carry what you need comfortably? Get a decent bag. A small sling is fine for light loads. Get a proper backpack when it starts getting heavy.</span></div><div><br /></div><div><span style="font-family: courier;"><table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto;"><tbody><tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/a/AVvXsEi7tR37BuaC4UtA-tYva7qlYbZmxjKqYzZmc3fY2sFKOpWKO0FdCmOSoxkwJTkCzT7f9anUA9zgtqw5ffJc3ad_yWyouwhPwMt6gU6QkCKzLOS4fJDvc1rdaN7R8Wa-c13R44bZtBzk1apo7TXXVQhcuIjHEpFRTTQG7EzieQIzCXUJBoaBKRVGBEbEuAKh" style="margin-left: 1em; margin-right: 1em;"><img alt="" data-original-height="2600" data-original-width="1948" height="480" src="https://blogger.googleusercontent.com/img/a/AVvXsEi7tR37BuaC4UtA-tYva7qlYbZmxjKqYzZmc3fY2sFKOpWKO0FdCmOSoxkwJTkCzT7f9anUA9zgtqw5ffJc3ad_yWyouwhPwMt6gU6QkCKzLOS4fJDvc1rdaN7R8Wa-c13R44bZtBzk1apo7TXXVQhcuIjHEpFRTTQG7EzieQIzCXUJBoaBKRVGBEbEuAKh" width="360" /></a></td></tr><tr><td class="tr-caption" style="text-align: center;"><span style="font-size: medium;">5 Lenses, the Panasonic G9 Camera, a 360 cam, tripod, spare cards, adapters, wipes, my laptop, tablet, chargers, snacks, passports etc. all fit in this bag. A Tarion Pro backpack. If you want to carry 2 cameras, or even 2 systems and a laptop, this will do this very nicely. On the ship I used my Domke F-802 "reporter's satchel" - seen rolled up and being carried by the Tarion in the rear straps.<br /></span></td></tr></tbody></table><br /><br /></span></div><div><span style="font-family: courier;"><br /></span></div><div><span style="font-family: courier;"><br /></span></div><div><span style="font-family: courier;"><br /></span></div><div><br /></div>Beomagihttp://www.blogger.com/profile/00469223835355067867noreply@blogger.com0tag:blogger.com,1999:blog-2974094041951992980.post-45387575556045559342023-05-23T17:43:00.031-07:002023-07-04T13:05:19.884-07:00A bevy of Vintage 50s and focal reducers<h2 style="text-align: left;"><span style="font-family: courier; font-size: large;">This article may not be for you...</span></h2><h2><span style="font-family: courier; font-size: small;"><div style="font-weight: 400; text-align: left;"><span style="font-family: courier;">Disclaimer about sharpness. The question of sharpness and 50s isn't new. I've seen a lot of photographers knock the idea of pixel peeping, and responses like "Just stop down!" or "Why shoot wide open?" or "Stop chasing sharpness." </span></div><div style="font-weight: 400; text-align: left;"><span style="font-family: courier;"><br /></span></div><div style="font-weight: 400; text-align: left;"><span style="font-family: courier;">Well, to each their own, but It's still an important aspect of photography <i>to me</i>. I <i>like</i> seeing that critical focus on that part of the subject that I want in focus. Sure, I'm not going to use max aperture on everything - but when I do, I still want a crisp subject in my isolation. </span></div><div style="font-weight: 400;"><span style="font-family: courier;"><br /></span></div></span></h2><h2 style="text-align: left;"><span style="font-family: courier; font-size: large;">Why am I using old lenses?</span></h2><div style="text-align: left;"><span style="font-family: courier;">Since the dawn of the camera, gear nerds have always had G.A.S. Gear Acquisition Syndrome. <br /></span><span style="font-family: courier;">It's the insatiable desire for better IQ, more bokeh, faster lenses, longer wider etc.<br /></span><span style="font-family: courier;">Over the years I've accumulated a large collection of vintage glass.</span></div><p></p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj0FWPPg5_r2dLGOmKlpwqNggD2GqgQekLfw4d_h6xhFl6qPrI9B6rln-CwA7b_Uu-OaIMamrrZlErJVb1RGES24mWDrWUQDsrtS22XvM1nsxQT1fGu7oAzLhWC2ijVOHAcUBV6QnU02Lf8-n-e0Dua1X-z2Hf6-k-Doz4nIgGKeiurWTevNeCOM69OhQ/s1678/sharetemp.jpg" style="margin-left: 1em; margin-right: 1em;"><span style="font-family: courier;"><img border="0" data-original-height="1259" data-original-width="1678" height="480" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj0FWPPg5_r2dLGOmKlpwqNggD2GqgQekLfw4d_h6xhFl6qPrI9B6rln-CwA7b_Uu-OaIMamrrZlErJVb1RGES24mWDrWUQDsrtS22XvM1nsxQT1fGu7oAzLhWC2ijVOHAcUBV6QnU02Lf8-n-e0Dua1X-z2Hf6-k-Doz4nIgGKeiurWTevNeCOM69OhQ/w640-h480/sharetemp.jpg" width="640" /></span></a></div><span style="font-family: courier;"><br /></span><div class="separator" style="clear: both; text-align: center;"><span style="font-family: courier;"><br /></span></div><span style="font-family: courier;">I started micro-four-thirds with an E-PL1 and Panasonic Leica 25mm F1.4. I really liked this combination. Micro-four-thirds was new at the time. The problem with any new camera system though - there aren't many lenses for it. I adapted a four-thirds fast zoom, but I really liked primes. The sensor was a bit lackluster at higher ISO. It's not just about sensor size, but also about development. It's 68% the size of Canon's APS-C sensor, but Canon handled high iso a lot better than the size difference suggested.</span><div><span style="font-family: courier;"><br /></span><div><span style="font-family: courier;">Then I saw that mirrorless with a low flange distance could adapt lenses. Behold! Cheap fast primes were suddenly available. DSLR lenses, range finder lenses, c-mount...</span></div><div><span style="font-family: courier;"><br /></span></div><div><span style="font-family: courier;">Mirrorless cameras today are like digital-backs for older lenses. The crop of the micro-four-thirds sensor meant every lens was effectively longer. Were they any good? Sure. Maybe not wide open, some lemons, some degraded with time, some had nice character - some too much! This moon was shot with the $40 Vivitar 400mm with a cheap Vivitar teleconverter. I thought this was spectacular. </span><div><span style="font-family: courier;"><br /></span></div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiGy5scM-3sl7xHpEmRsbLI98TUDRj4-ImxaZJowqIP9ToQ9aAILRzrLrkFbSuDSXF7C6UpOSpG_bCD55kO_-wxp03yhTxcEvqRSpj5wjlOBjezuyGL9zLZJtTOSxDzOolBm_CaF7Pvw7WseApSR7TgquejUBdI8iJ_JVVNrWql3hzrLWovHH5Pb9aQzA/s1558/P4132807.JPG" style="margin-left: 1em; margin-right: 1em;"><span style="font-family: courier;"><img border="0" data-original-height="1558" data-original-width="1558" height="640" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiGy5scM-3sl7xHpEmRsbLI98TUDRj4-ImxaZJowqIP9ToQ9aAILRzrLrkFbSuDSXF7C6UpOSpG_bCD55kO_-wxp03yhTxcEvqRSpj5wjlOBjezuyGL9zLZJtTOSxDzOolBm_CaF7Pvw7WseApSR7TgquejUBdI8iJ_JVVNrWql3hzrLWovHH5Pb9aQzA/w640-h640/P4132807.JPG" width="640" /></span></a></div><span style="font-family: courier;"><br /></span><div><span style="font-family: courier;">Vintage glass was also a cheap solution for macros.</span></div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjNILU4kc_kXcSqkeqOvtNliX_e9T62nI_Wb2hVbLU3uU2fEF-EJrx14aKYSSJOhClPNXaK7SfeGfi_wBpd_R3KJk6n3EZByJ93UoabKDvpgE52w6iFZPf3HjYLwE3LB_O0blTMC-x-CF6CNwm5wK9B4gWwqBpbQyQIy4gwLXiTMIm8MLrCt3B9OH4tyQ/s4053/P7151947.jpg" style="margin-left: 1em; margin-right: 1em;"><span style="font-family: courier;"><img border="0" data-original-height="3040" data-original-width="4053" height="480" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjNILU4kc_kXcSqkeqOvtNliX_e9T62nI_Wb2hVbLU3uU2fEF-EJrx14aKYSSJOhClPNXaK7SfeGfi_wBpd_R3KJk6n3EZByJ93UoabKDvpgE52w6iFZPf3HjYLwE3LB_O0blTMC-x-CF6CNwm5wK9B4gWwqBpbQyQIy4gwLXiTMIm8MLrCt3B9OH4tyQ/w640-h480/P7151947.jpg" width="640" /></span></a></div><span style="font-family: courier;"><br /></span><div><span style="font-family: courier;">And vintage glass could be fast! As fast as F1.2 without getting too expensive. My most expensive glass was the Nikon 50mm F1.2 ($375) and Canon FD 55mm F1.2 SSC ($271). Compare this to the Canon EOS 50mm F1.2 L which was $1300 - perhaps $1000 used.</span></div><div><span style="font-family: courier;"><br /></span></div><div><span style="font-family: courier;">I did want to try a full-frame look with these lenses. I got the Canon FD 55mm F1.2 SSC first. I replaced the FD mount with an EF mount conversion kit. Being successful there, the next part of my plan was to purchase a used Canon 5D classic - but the mirror would hit the back of the lens, so <b>I used a Dremel to grind the mirror</b>. I swapped the focusing screen and wow, cheap full frame 50mm F1.2 for far less than Canon's 50mm F1.2L. My daughter was just a baby now, and I was getting some real keepers.</span></div><div><span style="font-family: courier;"><br /></span></div><div><span style="font-family: courier;">Manual focus is a different kind of beast - you have to learn tricks on how to focus. I'd practice with my daughter - She'd run and jump and I'd try to prefocus at a point and nail it. Sometimes, I'd focus on the ground where she'd be expected to cross, and as she got to that point, I'd time it and snap.</span></div><div><span style="font-family: courier;"><br /></span></div><div><span style="font-family: courier;">With the focus screen, and my then younger eyes, I still had a lot of missed focus shots - but they weren't bad. And upon nailing the focus just right, I'd be rewarded with the creamy goodness of that F1.2 f-stop. This is my little angel running towards me. This was shot wide open on the 5D, 1/100, ISO 800. Given that the 5D ISO got noisy above this, I was thankful for the fast lens.</span></div><div><span style="font-family: courier;"><br /></span></div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhPXFcX0ed6rBhweINNS4qL6nNwVzrP1Bk9_7sN6G6CvidNiwVU7A45gHcZca8BPMxBL-_UayfSMjsNydBgUGVxPg4uStqTJux35M1j2-37v_n1RTBtnIiA3f9LLbAlcMLbgXKd29OTF3O2v4IcG8-1zb6ri_EPJO8O8_SBaF9xeWBnIOKZdj11flk25w/s4088/IMG_8316.JPG" style="margin-left: 1em; margin-right: 1em;"><span style="font-family: courier;"><img border="0" data-original-height="4088" data-original-width="2920" height="640" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhPXFcX0ed6rBhweINNS4qL6nNwVzrP1Bk9_7sN6G6CvidNiwVU7A45gHcZca8BPMxBL-_UayfSMjsNydBgUGVxPg4uStqTJux35M1j2-37v_n1RTBtnIiA3f9LLbAlcMLbgXKd29OTF3O2v4IcG8-1zb6ri_EPJO8O8_SBaF9xeWBnIOKZdj11flk25w/w458-h640/IMG_8316.JPG" width="458" /></span></a></div><span style="font-family: courier;"><br /></span><div><span style="font-family: courier;">Is this gear "pro" enough to be recommended in place of current gear? LOL NO... Not then, not now. This is an amateur's hobby gear. A fun experiment that occasionally gives astounding results. The 5d was perfect for me - the Canon EF mount was a few millimeters shallower than the Pentax K, M42, Leica R, Nikon, Contax Yashica, and Olympus OM mounts - So I was able to adapt most of my older DSLR glass to this amazing camera. Naturally, I'd be looking up the most common cheap fast lenses of all - 50mm glass. Back then I'd score F1.4 speeds for $30 off eBay or KEH. The price of those jewels has risen quite a bit, as the mirrorless crowd gobbled them up.</span></div><div><span style="font-family: courier;"><br /></span></div><div><span style="font-family: courier;">At ~2013, Metabones released their focal reducer - branded a "Speed Booster". Focal reducers weren't new - they were used in telescopes mostly but used between a mirrorless camera's sensor and DSLR's lens (designed to be far from the sensor for a mirror), suddenly crop sensor cameras were giving pictures more similar to larger sensors. It wasn't perfect, but the image brightness was noticeable, and the concentration of light did somewhat increase resolution. The result was 50mm, which had a field of view of a 35mm lens. An F1.8 captured light like an F1.3. An F1.4 was like an F1.0. An F1.2 was a blistering effective (theoretically) F0.86.</span></div><div><span style="font-family: courier;"><br /></span></div><div><span style="font-family: courier;">Clones followed. Focal reducers as I mentioned were used in telescopes before, so finding appropriate glass and fitting them into adapters was the next step for cheaper brands. Metabones sold their adapter for $600. Cheaper brands sold theirs for $70 on ebay. Guess which one I picked up.</span></div><div><span style="font-family: courier;"><br /></span></div><div><span style="font-family: courier;">I'm still using micro-four-thirds, but my Canon 5D is relegated to nostalgia. A Sony A7 is the current house "darling" delivering the creamy smoothness of a full frame with a resolution that leaves the Canon 5D behind. But... I still love my micro-four-thirds. It's so small... Not just cameras, but lenses, and thus necessary tripods, bags etc. I have so many 50mm lenses - and I jumped on a couple eBay deals to snag an old Metabones "Speed Booster" EF to MFT adapter, and Zhongyi "lens turbo II". Naturally, I had to test these lenses and adapters. Perhaps a lens may favor one or the other. Was the Metabones <i>really</i> that much better? I set up a quick test...</span></div><div><span style="font-family: courier;"><br /></span></div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhK8k97vUrd3iQYzNIliu0QGRpv9JSPXrJqufDnrZ4NaNGCzv2ocArteSYE8GBS8OHfLZK3p6AFI2kKKwhwiXqKwmxfbK6YcCh4e360D8PS4kgIHYYIcNuYwkABsybxszUPk-QTL_KdJj_Fh1SPPoNPw5OeOKG5RmzGUKUyL6KbkASjBrRS1rr4HoZp6Q/s3596/PRJC7166-crop.jpg" style="margin-left: 1em; margin-right: 1em;"><span style="font-family: courier;"><img border="0" data-original-height="1588" data-original-width="3596" height="282" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhK8k97vUrd3iQYzNIliu0QGRpv9JSPXrJqufDnrZ4NaNGCzv2ocArteSYE8GBS8OHfLZK3p6AFI2kKKwhwiXqKwmxfbK6YcCh4e360D8PS4kgIHYYIcNuYwkABsybxszUPk-QTL_KdJj_Fh1SPPoNPw5OeOKG5RmzGUKUyL6KbkASjBrRS1rr4HoZp6Q/w640-h282/PRJC7166-crop.jpg" width="640" /></span></a></div><span style="font-family: courier;"><br /></span><div><span style="font-family: courier;">I aimed for the center of the larger chart, and went back enough to get the eye-chart at the edge.</span></div><div><span style="font-family: courier;"><br /></span></div><h2 style="text-align: left;"><span style="font-family: courier; font-size: large;">What am I testing</span></h2><div><span style="font-family: courier;">There are 3 main speed boosters you can get today. Probably more - "Commlite" comes to mind, but it's likely they're using an existing lens design. Here are the speed boosters I have. Zhongyi Lens Turbo II, Metabones EF-M43 "smart" adapter (aperture control), and the Pixco "generic" speed booster. Do note that the "smart" feature of the Metabones Speed Booster works against adapted old lenses, shorting out the pins. I disabled my speed booster. All focal reducers here are EF mount - because so many other lens mounts work on EF.</span></div><div><span style="font-family: courier;"><br /></span></div><div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi_MJ7Uug7AygKhnd7cRM7t4DcLwmJLvrBln8UwhAmLAs6m6BYlde0hrDW_x0OpJU5U1nrlTEZgWGfZXcv0DqO5kllPB69Aj_O1XYlYgTJsXgCVmZZFANz7dSwl0pjPETqwpBBqM4rQDZxkyVOJ1yNBvl7T1lTmEoTfk4NvIzHq5gH4Joe1MjxVY7rG9w/s5447/DSC03038.JPG" style="margin-left: 1em; margin-right: 1em;"><span style="font-family: courier;"><img border="0" data-original-height="3064" data-original-width="5447" height="360" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi_MJ7Uug7AygKhnd7cRM7t4DcLwmJLvrBln8UwhAmLAs6m6BYlde0hrDW_x0OpJU5U1nrlTEZgWGfZXcv0DqO5kllPB69Aj_O1XYlYgTJsXgCVmZZFANz7dSwl0pjPETqwpBBqM4rQDZxkyVOJ1yNBvl7T1lTmEoTfk4NvIzHq5gH4Joe1MjxVY7rG9w/w640-h360/DSC03038.JPG" width="640" /></span></a></div><div><span style="font-family: courier;"><br /></span></div><div><span style="font-family: courier;"><br /></span></div><span style="font-family: courier;">Here's a look at the lenses I tested. I should probably weigh them. The Nikon 50mm F1.4 and Contax are the lightest here. The Canon 55mm F1.2 could possibly be weaponized against zombies.</span></div><div><span style="font-family: courier;"><br /></span><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj-uAbQ2R7kpDUOsgnopLZmDLZ73XXbe-mp_qjl3fU8-WSu5mWU3I01q5qoDlfuMu06_eR1SRAM6XDHfKeRlCeNmaqbge3CZgVXJYfETYZxFjfRcc0PqBoHc2laCP8W7aB3Hy09hXt_JIKj7HXtMWmRT0wU_xvgsfP2WQfw5z85X0A3Lv5MkLPkBEMglQ/s6016/DSC03039.JPG" style="margin-left: 1em; margin-right: 1em;"><span style="font-family: courier;"><img border="0" data-original-height="3384" data-original-width="6016" height="360" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj-uAbQ2R7kpDUOsgnopLZmDLZ73XXbe-mp_qjl3fU8-WSu5mWU3I01q5qoDlfuMu06_eR1SRAM6XDHfKeRlCeNmaqbge3CZgVXJYfETYZxFjfRcc0PqBoHc2laCP8W7aB3Hy09hXt_JIKj7HXtMWmRT0wU_xvgsfP2WQfw5z85X0A3Lv5MkLPkBEMglQ/w640-h360/DSC03039.JPG" width="640" /></span></a></div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEis2ipUWksP720Z1N8NWCM5p1KF5VyPQ9qBmJJnWEkyNZSZbxsTvtCuXQupkK5GEk27LS8WvRvXG8sLdn9dG-EK8qwbBEKtl1wzUJfj0NdqcanKyHWLZBOYIGtee_9waGcc_P_3uEnfrRS2g1sdMwcB9nZcw-zykbdwqPfJ7VUJBVhm_K-dXB-pQClwIQ/s6016/DSC03040.JPG" style="margin-left: 1em; margin-right: 1em;"><span style="font-family: courier;"><img border="0" data-original-height="3384" data-original-width="6016" height="360" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEis2ipUWksP720Z1N8NWCM5p1KF5VyPQ9qBmJJnWEkyNZSZbxsTvtCuXQupkK5GEk27LS8WvRvXG8sLdn9dG-EK8qwbBEKtl1wzUJfj0NdqcanKyHWLZBOYIGtee_9waGcc_P_3uEnfrRS2g1sdMwcB9nZcw-zykbdwqPfJ7VUJBVhm_K-dXB-pQClwIQ/w640-h360/DSC03040.JPG" width="640" /></span></a></div><span style="font-family: courier;"><br /><br /><br /></span></div><div><span style="font-family: courier;"><br /></span></div><h2 style="text-align: left;"><span style="font-family: courier; font-size: large;">A look at center sharpness</span></h2><div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgOqaAL73-Luj99PsfkE_Hf0EzSNb4S9MYEBbaMnoVLTMBe8YTom7zLzr3Z0ruCb9YZ6Xtf-qznzZKmDLwpOPj4s1CTtZNNjwjWGuFPBoxj_jYS2oVf3OAWLN8m6wMLWg1OaIraXq9qxuU6hEeNXHxZIOaWskJEQ-qJB68KJI6CovM9RqCwxnCmk3EuzqkB/s1700/collective-center.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><span style="font-family: courier;"><img border="0" data-original-height="1700" data-original-width="1000" height="640" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgOqaAL73-Luj99PsfkE_Hf0EzSNb4S9MYEBbaMnoVLTMBe8YTom7zLzr3Z0ruCb9YZ6Xtf-qznzZKmDLwpOPj4s1CTtZNNjwjWGuFPBoxj_jYS2oVf3OAWLN8m6wMLWg1OaIraXq9qxuU6hEeNXHxZIOaWskJEQ-qJB68KJI6CovM9RqCwxnCmk3EuzqkB/w376-h640/collective-center.png" width="376" /></span></a></div><span style="font-family: courier;"><br /><span><br /></span></span></div><div class="separator" style="clear: both; text-align: center;"><span style="font-family: courier;"><br /></span></div><span style="font-family: courier;"><br /></span><div><span style="font-family: courier;">I'm not going to say which is best. Some of these are close enough to be subjective. You can see and judge what you like. </span></div><div><span style="font-family: courier;"><br /></span></div><div><span style="font-family: courier;">Some notes though.</span></div><div><ul style="text-align: left;"><li><span style="font-family: courier;">Minolta is off by itself since it cannot mount to Canon EF. That lens has its own Pixco adapter.</span></li><li><span style="font-family: courier;">The Cheap $70 Pixco has nicer contrast and sharpness than the Zhongyi, although the Zhongyi lens turbo II is a little brighter. I'd recommend the Pixco based on that though.</span></li><li><span style="font-family: courier;">Viltrox provides aperture control and autofocus. The image though is smeary Vaseline. </span></li><li><span style="font-family: courier;">All shots were done with a flash to keep exposure mostly constant. ISO 200, 1/160 shutter speed, and lenses were used wide open.</span></li><li><span style="font-family: courier;">I think the Nikon 50mm F1.4 is quite good, being the "newest" of the vintage class. It's almost as bright as the 1.2s but has better contrast wide open. The Minolta is cheaper to obtain but not quite as sharp. </span></li><li><span style="font-family: courier;">The sharpest lens wide open is the Rokinon 50mm F1.4. The Zeiss is beautifully sharp too and the Takumar is spectacular given its age, but the Rokinon has truly impressed me here.</span></li><li><span style="font-family: courier;">The SMC Takumar 50mm F1.4 yellowed with age. That's radioactive glass! It's beautiful and crisp - but darker than the F1.7 Zeiss Planar. I left it in the sun, with some foil under it to "cure" the yellowing (UV light). It did lighten up a lot before this test. I left it there for maybe 2 weeks. I think the dark effect of the glass diminishes the benefits of this fast lens.</span></li><li><span style="font-family: courier;">The Canon 55mm F1.2 and Nikon 50mm F1.2 seem close. I snapped the tabs off the Nikon lenses so that I could use them on all the focal reducers. The Canon 55mm F1.2 SSC is spectacular on the Metabones adapter and is ahead of the Nikon 50mm F1.2 there. Strangely enough, I think the Nikon F1.2 does better on the Pixco adapter than the Canon. I've gone back and tried this several times. It really does seem that an adapter can work better with some lenses than others.</span></li><li><span style="font-family: courier;">The Nikon 50mm F1.4 on Pixco looks really good - spectacular given the price.</span></li><li><span style="font-family: courier;">The Rokinon has me absolutely floored. I really wasn't expecting it to blow me away. Online reviews generally paint it as "average". Not a bad lens - but in competition with modern brand specific 50mm F1.4s, it does not really stand out - while at the same time, lacking autofocus. Getting this used at a fraction of the cost ($334 from their site, <$200 used) provides a magnificent manual lens for use on a focal reducer.</span></li></ul><div><span style="font-family: courier;"><br /></span></div><h2 style="text-align: left;"><span style="font-family: courier; font-size: large;">What about the Edges?</span></h2></div><div><span style="font-family: courier; font-size: large;">NOTE: pending redo!</span></div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiIRhMGY_MchROaGrpv7Y4MwHXiB4Hu2IseZ4PiRWYn5NQz4Tn0NxK3D1kHo9Gsy02guCU8fjQXqgOFSDrIW7JGNQGKbMvBR37hBi437pZ4LPpGBukUjcFZVV4wSR8rZeWGaSAwR66_KmbrvN2b6vj1r6HGkq-nzVoFPUy-es6hTvbqSH10VesErMU_8A/s1800/all%20shots-edgeb.png" style="margin-left: 1em; margin-right: 1em;"><span style="font-family: courier;"><img border="0" data-original-height="1800" data-original-width="1000" height="640" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiIRhMGY_MchROaGrpv7Y4MwHXiB4Hu2IseZ4PiRWYn5NQz4Tn0NxK3D1kHo9Gsy02guCU8fjQXqgOFSDrIW7JGNQGKbMvBR37hBi437pZ4LPpGBukUjcFZVV4wSR8rZeWGaSAwR66_KmbrvN2b6vj1r6HGkq-nzVoFPUy-es6hTvbqSH10VesErMU_8A/w356-h640/all%20shots-edgeb.png" width="356" /></span></a></div><span style="font-family: courier;"><br /></span><div><ul style="text-align: left;"><li><span style="font-family: courier;">The Nikons seem to have the edge here on the Pixco and Zhongyi LensTurbo II, though the LensTurbo falls apart at the edges.</span></li><li><span style="font-family: courier;">The Nikon 50mm F1.4 continues to impress on the cheap Pixco adapter. A good combination of contrast and clarity.</span></li><li><span style="font-family: courier;">The biggest disappointment is the "modern" Canon 50mm F1.4 USM. That current lens just can't keep up with the Nikons.</span></li><li><span style="font-family: courier;">The Zhongyi just isn't as nice a render as the Pixco. Given that the Pixco is a half to a third the price new, it just seems like a better buy.</span></li><li><span style="font-family: courier;">Neither cheaper adapter can do the Canon 55mm F1.2 justice. The Metabones Speed Booster clearly shows superior contrast and brightness. </span></li><li><span style="font-family: courier;">I'm not investing in Canon EF gear, and the Canon 50mm F1.4 USM sucks using manual focus. Wide open it falls to the older Canon 55mm F1.2 SSC. Given that, and the fact that my Panasonic G9 would error out with vintage glass attached shorting the Metabones "smart" adapter pins, I disabled it.<b> I opened the Metabones and cut the ribbon cable.</b> Now there are no more errors and problems with vintage glass.</span></li><li><span style="font-family: courier;">I'd say the Metabones Speed Booster is worth it if you still like vintage lenses and want the most out of them. Just use eBay and hunt. I'd be very satisfied with the Pixco-generic if the only available Metabones Speed Booster was $600 (current cost).</span></li><li><span style="font-family: courier;">I <i>might</i> try cutting the protrusion off the Nikon lenses so that I can run them on the Metabones and see how they perform there.</span></li></ul><div><span style="font-family: courier;"><br /></span></div></div><h2 style="text-align: left;"><span style="font-family: courier; font-size: large;">Other aspects of the lenses are also relevant!</span></h2><div><ul style="text-align: left;"><li><span style="font-family: courier;">A lens could be sharp, but also difficult to focus. I don't think the Modern Canon 50mm F1.4 USM is <i>bad</i>. But it's not great, and manually focusing it is compounded by the sticky, rough focus action.</span></li><li><span style="font-family: courier;">Focus action on the Canon 55mm F1.2 is butter smooth, and <i>long</i>. It's easier to move past focus and move back to where you saw focus peak. the Takumar is also great for this. It's a pleasure to use. the Contax Yashica Zeiss is also nice. Not <i>as</i> smooth and damped, but still a pleasure to use. </span></li><li><span style="font-family: courier;">The Nikon focus action isn't nearly so nice and damped. It's not nearly as rough as the modern Canon 50 USM, but I'm surprised it's not smoother.</span></li><li><span style="font-family: courier;">The Canon 55mm F1.2 SSC is an FD mount. This predates EF and is not adaptable. I found a mount <i>replacement</i> (EdMika) that replaced the FD bayonet mount with a brass EF mount. This makes this a one-of-a-kind lens.</span></li><li><span style="font-family: courier;">The Nikon 50mm F1.4 can go from $75-$100 on eBay. The Pixco adapter is ~$70. You can end up with a $160 35mm F1.0 with this combination. An impressively low price for the speed and quality.</span></li><li><span style="font-family: courier;">The Rokinon is a beautifully made lens - but it's <i>large</i>. It's larger than the Canon 55mm F1.2 FD, and the Canon 50mm F1.2 USM. The focus is nice and damped, with just the right length of throw. It's not metal, but decent-quality plastic. If this were metal, I doubt it would be affordable.</span></li></ul><div><span style="font-family: courier;"><br /></span></div></div><h2 style="text-align: left;"><span style="font-family: courier; font-size: large;">How they look on M43 cameras</span></h2><div><span style="font-family: courier;">The Panasonic G9 is my current "main". In this picture, the Metabones + Canon 55mm F1.2 is mounted to it. The Olympus E-M10 II is my backup. I've put the Nikon 50mm F1.4 and Pixco adapter on that one.</span></div><div><span style="font-family: courier;"><br /></span><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhWXyP1lhPoVVK0rEVFpUVIqSguagsxai2CcPMBWALc1-sNCNnvI7OOqJ7Dsrg3UM2-BWpE3BkEqGr0h7dpCTvuHIMYaND7J9SRScy3vI1R3CCz_Nryp3AmV7G8fOOvbHyUfRVlXS_R42en88cWod23kml0eCOEDQxOHvbl4yqb7qE1brox2Z1o9A3yqA/s6012/DSC03043.JPG" style="margin-left: 1em; margin-right: 1em;"><span style="font-family: courier;"><img border="0" data-original-height="3382" data-original-width="6012" height="360" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhWXyP1lhPoVVK0rEVFpUVIqSguagsxai2CcPMBWALc1-sNCNnvI7OOqJ7Dsrg3UM2-BWpE3BkEqGr0h7dpCTvuHIMYaND7J9SRScy3vI1R3CCz_Nryp3AmV7G8fOOvbHyUfRVlXS_R42en88cWod23kml0eCOEDQxOHvbl4yqb7qE1brox2Z1o9A3yqA/w640-h360/DSC03043.JPG" width="640" /></span></a></div></div><div><span style="font-family: courier;"><br /></span></div><div><span style="font-family: courier;">Here we can see my current favorite - The Rokinon+Metabones on the G9. An old GX1 wth the Pixco+Zeiss 50mm F1.7, and an ancient E-P3 with the Pixco+Minolta 50 F1.4.</span></div><div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgIWVhA2w7p_4F0BvQlT0TTAGcuasXK3ofH5gTKNSY3V5uwM8TSwqoz4PuNgPWzqRKBI8vDzSR5K9GKzeo-JKglCdioFCYhzARQP2_w_NaPc4lnHab2mZRIbUSK_V73-hgtjzJLYiE7gkV5Yn2Lc8F-PIfO7S4_cQ5mS4DytwE0zYqixhOJoo_-xL7FP5UF/s6016/DSC03636.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="4016" data-original-width="6016" height="428" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgIWVhA2w7p_4F0BvQlT0TTAGcuasXK3ofH5gTKNSY3V5uwM8TSwqoz4PuNgPWzqRKBI8vDzSR5K9GKzeo-JKglCdioFCYhzARQP2_w_NaPc4lnHab2mZRIbUSK_V73-hgtjzJLYiE7gkV5Yn2Lc8F-PIfO7S4_cQ5mS4DytwE0zYqixhOJoo_-xL7FP5UF/w640-h428/DSC03636.JPG" width="640" /></a></div><br /><span style="font-family: courier;"><br /></span></div><h2 style="text-align: left;"><span style="font-family: courier; font-size: large;">Todo:</span></h2><div><ul style="text-align: left;"><li><span style="font-family: courier;">Attempt to put the Nikon lenses on the Metabones adapter - it deserves a try 😁</span></li><li><span style="font-family: courier;">Go out and have fun with the Canon 55mm F1.2/Speed Booster. 👍</span></li><li><span style="font-family: courier;">update: Nikons tested! Broke tabs off with pliers. Pretty sharp, but lacks contrast on Metabones wide open. Have to update the images.</span></li><li><span style="font-family: courier;">Have to test bokeh smoothness and flare. That may be interesting ;)</span></li></ul><div><span style="font-family: courier;"><br /></span></div></div></div></div><div><span style="font-family: courier;"><br /></span></div>Beomagihttp://www.blogger.com/profile/00469223835355067867noreply@blogger.com0tag:blogger.com,1999:blog-2974094041951992980.post-35783602015925319932023-05-11T13:27:00.004-07:002023-05-11T13:29:14.712-07:00Don't toss broken electronics. They're often easier to fix than you'd expect.<p><span style="font-family: courier;"> I tried turning on my Blu-ray player recently only to discover the device was powerless. Neither did LED lights flicker nor did the disc tray eject.</span></p><p><span style="font-family: courier;">This wasn't the first bit of household electronics I've had to fix. A lot of stuff is modular these days. Usually, it comes down to replacing a board. for power, process, or display. I've been able to fix a couple TVs and my oven this way. 4k Blu-ray players are still expensive so, it's good savings buying a replacement module vs buying a completely new Blu-ray player.</span></p><p><span style="font-family: courier;">Looking at the way my Bluray player responded, it appears to be a power issue - so a power module board is a likely culprit.</span></p><p></p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/a/AVvXsEjJY_8SC2ZymCpcuVEeRyVmqlLJt2N7eIIrSvuJCGHhjxc_0noZtVqhIDATmLK0y2Ahe416J_l-xyQL_spcybTOADHykZ5G9fs-3JMF-XSh66U08x-MNn8AXJOBwvJxt-rN0OKul-8gdgnEIFzMMaApNWOKdrdaSuVOQgtnHscUsXNlNrWogZlgd-rf5w" style="margin-left: 1em; margin-right: 1em;"><span style="font-family: courier;"><img alt="" data-original-height="4016" data-original-width="6016" height="428" src="https://blogger.googleusercontent.com/img/a/AVvXsEjJY_8SC2ZymCpcuVEeRyVmqlLJt2N7eIIrSvuJCGHhjxc_0noZtVqhIDATmLK0y2Ahe416J_l-xyQL_spcybTOADHykZ5G9fs-3JMF-XSh66U08x-MNn8AXJOBwvJxt-rN0OKul-8gdgnEIFzMMaApNWOKdrdaSuVOQgtnHscUsXNlNrWogZlgd-rf5w=w640-h428" width="640" /></span></a></div><span style="font-family: courier;"><br />Looking at the device opened up - There are only a couple of boards. the power cable plugs into the brown power module. The green board drives the disc.</span><p></p><p><span style="font-family: courier;">Ok - so if we need a brown power board, how do we get one?</span></p><p><span style="font-family: courier;">Most module boards will have a serial number (or a few). Just search for them.</span></p><p><span style="font-family: courier;">e.g.</span></p><p></p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/a/AVvXsEgO1PTOCptjqxtCExzOJBwdYueO_gUNR-woyNvr4L9NRF_OQyjPuz2_0y-DgSS6zptXU07sI7kqO-UBSJhr4BOpon0NX7GxdK3gcl1EXVlDDlHVtrPeEgCYlS1_8j2ZQxp9jLTl7md8VJjv7dmr2BJky1jDNw6sGzNJyaJVVVmCSbW1rLAUt0TMHu1Djw" style="margin-left: 1em; margin-right: 1em;"><span style="font-family: courier;"><img alt="" data-original-height="178" data-original-width="310" height="230" src="https://blogger.googleusercontent.com/img/a/AVvXsEgO1PTOCptjqxtCExzOJBwdYueO_gUNR-woyNvr4L9NRF_OQyjPuz2_0y-DgSS6zptXU07sI7kqO-UBSJhr4BOpon0NX7GxdK3gcl1EXVlDDlHVtrPeEgCYlS1_8j2ZQxp9jLTl7md8VJjv7dmr2BJky1jDNw6sGzNJyaJVVVmCSbW1rLAUt0TMHu1Djw=w400-h230" width="400" /></span></a></div><span style="font-family: courier;"><br /></span><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/a/AVvXsEiTwYSpRRoE4TCvCfffRVjkkWcfLcqOCzaSjUpKrH8W6BC3YhjdvNUyS6nZNxVKKUZ2TF6mdbVwMHuXyTyJj8tsNK91CV8cnzPZ0DUtUmn1UH7LKdlH7fGxHbzD3oYn9Vhy9UuYFU2WytZvgZblhgUsOofFU4Q0TfSBRE9xLwrQzEyZ7jNet23Xpkq2Aw" style="margin-left: 1em; margin-right: 1em;"><span style="font-family: courier;"><img alt="" data-original-height="491" data-original-width="751" height="418" src="https://blogger.googleusercontent.com/img/a/AVvXsEiTwYSpRRoE4TCvCfffRVjkkWcfLcqOCzaSjUpKrH8W6BC3YhjdvNUyS6nZNxVKKUZ2TF6mdbVwMHuXyTyJj8tsNK91CV8cnzPZ0DUtUmn1UH7LKdlH7fGxHbzD3oYn9Vhy9UuYFU2WytZvgZblhgUsOofFU4Q0TfSBRE9xLwrQzEyZ7jNet23Xpkq2Aw=w640-h418" width="640" /></span></a></div><span style="font-family: courier;"><br />Other possible search strings may be the model of the device and "control board", "motherboard", "power board" or "daughter board".</span><p></p><p><span style="font-family: courier;">A little looking around and you may be rewarded with the part you need. Ebay is another good place to look for modules by serial number.</span></p><p></p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/a/AVvXsEibe-TP1LCt02bWHowZRPJHVjlvXByYK9Dhq2W_lvgFyFhViy52XDTr4KhARR5AONWHDg5036Uzsj7i3TMJCEDRjNHEAPUMuSMhwVJiha8IsCufrtZmKFxxSL4oyV9pirH3_C9nG133vsFW0evk0PNgX0WDaXT1JmkQXWCDKKQ3bqLF589VcxZE7WqoXw" style="margin-left: 1em; margin-right: 1em;"><span style="font-family: courier;"><img alt="" data-original-height="4016" data-original-width="6016" height="428" src="https://blogger.googleusercontent.com/img/a/AVvXsEibe-TP1LCt02bWHowZRPJHVjlvXByYK9Dhq2W_lvgFyFhViy52XDTr4KhARR5AONWHDg5036Uzsj7i3TMJCEDRjNHEAPUMuSMhwVJiha8IsCufrtZmKFxxSL4oyV9pirH3_C9nG133vsFW0evk0PNgX0WDaXT1JmkQXWCDKKQ3bqLF589VcxZE7WqoXw=w640-h428" width="640" /></span></a></div><span style="font-family: courier;"><br /><br /></span><p></p><p><span style="font-family: courier;">This was unplugged of course, but I did make sure to short out the terminals of the big capacitor before unscrewing this. A screwdriver was all I needed to get this out. The cables plug in only one way, so there's no worry about plugging this back in wrong. A few minutes later, this was powering back up.</span></p><p><span style="font-family: courier;"><span style="color: #01ffff;">Board cost </span>= <span style="color: #ff00fe;">$65</span><br /><span style="color: #01ffff;">Device cost </span>= <span style="color: #ff00fe;">$300</span><br /><span style="color: #01ffff;">Money saved </span>= <span style="color: #ff00fe;">$235</span><br /><span style="color: #01ffff;">Awesome points gained </span>= <span style="color: #ff00fe;">$...</span><b><span style="color: red;">¯\_(ツ)_/¯</span></b></span></p><p></p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/a/AVvXsEgit-mNL68BW_SbqY4pllC44U5rspnd0HpdWDmpg0mBWp9QScsEbDp3jzF-QDoW34WnWoj0OfsMs3Gn670jBaoSKGDFqFNEOs-qcW-MGaX18XfixjRSLjEHyoMkG5Cn1wmRXlERX9Odwix0QrsOTFQ1pAXlnGtVDyo5-dp6iRwQjQ_guLeMfgQ5R717mA" style="margin-left: 1em; margin-right: 1em;"><span style="font-family: courier;"><img alt="" data-original-height="505" data-original-width="1206" height="168" src="https://blogger.googleusercontent.com/img/a/AVvXsEgit-mNL68BW_SbqY4pllC44U5rspnd0HpdWDmpg0mBWp9QScsEbDp3jzF-QDoW34WnWoj0OfsMs3Gn670jBaoSKGDFqFNEOs-qcW-MGaX18XfixjRSLjEHyoMkG5Cn1wmRXlERX9Odwix0QrsOTFQ1pAXlnGtVDyo5-dp6iRwQjQ_guLeMfgQ5R717mA=w400-h168" width="400" /></span></a></div><span style="font-family: courier;"><br /></span><br /><p></p>Beomagihttp://www.blogger.com/profile/00469223835355067867noreply@blogger.com0tag:blogger.com,1999:blog-2974094041951992980.post-14038825877938027342023-01-24T17:42:00.007-08:002023-01-25T08:46:15.000-08:00I made a joystick. i.e. Why pay $X for something you can spend $(X+Y) building ¯\_(ツ)_/¯<h2 style="text-align: left;"><span style="font-family: courier;">I Made A Joystick.</span></h2><div><span style="font-family: courier;"><span> </span>I was playing Microsoft Flight Simulator - gorgeous graphics! - and amidst the splendor of... someplace I've never been, I found myself wanting more physical controls. I have a nice joystick - A VKB Gladiator. It even has a little throttle. That's the only analog control other than the stick though. It's far from bad, but I just felt like trying more...</span></div><div><span style="font-family: courier;"><br /></span></div><div><span style="font-family: courier;"><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/a/AVvXsEgv1297M4drNTaCoVnishjZT_2vuiQq2IFZpq91zMsTwr2AcZWFhAoQy0UNAA1JNi1Ryx8dII80G6SqxcBVuswpUc44gSasgR4fSOg576D-Mm9cRk5VU4sW4WJx8iLBUFpZwUQPilo1gQygiThkpXdp7AHEQuyxuNkJ3eOrVTGzeDBo1Ks52eKOoEAkKQ" style="margin-left: 1em; margin-right: 1em;"><img alt="" data-original-height="559" data-original-width="1086" height="330" src="https://blogger.googleusercontent.com/img/a/AVvXsEgv1297M4drNTaCoVnishjZT_2vuiQq2IFZpq91zMsTwr2AcZWFhAoQy0UNAA1JNi1Ryx8dII80G6SqxcBVuswpUc44gSasgR4fSOg576D-Mm9cRk5VU4sW4WJx8iLBUFpZwUQPilo1gQygiThkpXdp7AHEQuyxuNkJ3eOrVTGzeDBo1Ks52eKOoEAkKQ=w640-h330" width="640" /></a></div><br /><span> The f</span>irst place I checked was amazon. The Thrustmaster TCA "Airbus" controller caught my eye. It was expandable to 4 levers, and there was even a sale. So I bought it...</span></div><div><span style="font-family: courier;"> Then I thought about checking Reddit. it's not a <i>bad</i> controller, but there was a lot of love for the pricier fare. Of course, I then stumble onto threads of homemade joysticks. "Yeah... I can do that..." I thought - and off I dove into Amazon again, canceling my order, and getting a project box, various switches, wires, and an Arduino Leonardo.<br /></span></div><div><span style="font-family: courier;"><br /></span></div><div><span style="font-family: courier;"><br /></span></div><h2 style="text-align: left;"><span style="font-family: courier;">Are you board?</span></h2><div><span style="font-family: courier;"><span> </span>It should be noted that not every Arduino board can work in a joystick project (at least, not <i>normally </i>to my knowledge). The Leonardo can, and there are a few libraries that will work with it. </span></div><div><span style="font-family: courier;">The library I used is here:<br /><a href="https://github.com/MHeironimus/ArduinoJoystickLibrary">https://github.com/MHeironimus/ArduinoJoystickLibrary</a></span></div><div><span style="font-family: courier;"><br /></span></div><div><span style="font-family: courier;"><span> That takes care of me telling the computer what to do - "button 5 is pressed", or "set that much throttle". Now I need to figure out how to put together the physical switches, potentiometers etc and read them in.</span><br /></span></div><div><span style="font-family: courier;"><span><br /></span></span></div><div><span style="font-family: courier;"><span><br /></span></span></div><h2 style="text-align: left;"><span style="font-family: courier;"><span>Building!</span></span></h2><div><span style="font-family: courier;"><span><span> I started with the project box - cutting holes for the switches - and a couple radio-control replacement sticks. These are modular joysticks for use in radio-control transmitters - like the type you'd control a model airplane with.</span><br /></span></span></div><div><span style="font-family: courier;"><span><span><br /></span></span></span></div><div><span style="font-family: courier;"><span><span><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/a/AVvXsEi_06Op6hduLdgfehOBBHmGL06EmhqO3ccCID56I8JSfXKysLudu61EjLi1a6PlyWn5uGuKbcbel294UAHOg1-_v5rSKAmUCe98LFTre9aTxySJN23OHi1nzy3BmrdBT5SX5LjfExDspyRYYW4eN56xNuug0eKT20dDqsHLmmld6cPZb4jb9CbyhCn_qw" style="margin-left: 1em; margin-right: 1em;"><img alt="" data-original-height="457" data-original-width="642" height="456" src="https://blogger.googleusercontent.com/img/a/AVvXsEi_06Op6hduLdgfehOBBHmGL06EmhqO3ccCID56I8JSfXKysLudu61EjLi1a6PlyWn5uGuKbcbel294UAHOg1-_v5rSKAmUCe98LFTre9aTxySJN23OHi1nzy3BmrdBT5SX5LjfExDspyRYYW4eN56xNuug0eKT20dDqsHLmmld6cPZb4jb9CbyhCn_qw=w640-h456" width="640" /></a></div><span> This simplified the project - I didn't have to develop a gimbal. This has it all built in. It's small - a thumb stick - but this is fine for at least version 1 right?</span></span></span></span></div><div><span style="font-family: courier;"><span><span><span><span> NB: looks like there are nicer stick modules about too. "FrSky" has an all-aluminum hall sensor model. Version 2? 😀</span><br /></span></span></span></span></div><div><span style="font-family: courier;"><span><span><span><br /></span></span></span></span></div><div><span style="font-family: courier;"><span><span><br /></span></span></span></div><div><span style="font-family: courier;"><span><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhPz6_iaLBc6fTF8ZzccmEyHB7hoaxBNJrvcPn9fBmxqz5iaRI5HKzhxJCh2kYU8DKmb2ZFAB7lgOJc5gxF0VZ9RHhZmsC4MyRPjk20JEbIBSR8bR4INJXmIsuYzEcucgSqWV5OBmbx2m7-dCpQZO5OF6g1rh4zCvDceCeW6TIvlyeoVatlw3P5eiXSLA/s6016/DSC00671.JPG" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="4016" data-original-width="6016" height="428" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhPz6_iaLBc6fTF8ZzccmEyHB7hoaxBNJrvcPn9fBmxqz5iaRI5HKzhxJCh2kYU8DKmb2ZFAB7lgOJc5gxF0VZ9RHhZmsC4MyRPjk20JEbIBSR8bR4INJXmIsuYzEcucgSqWV5OBmbx2m7-dCpQZO5OF6g1rh4zCvDceCeW6TIvlyeoVatlw3P5eiXSLA/w640-h428/DSC00671.JPG" width="640" /></a></div><div><span style="font-family: courier;"><span><br /></span></span></div><span><span> </span>I used sticker paper with a cutout to get the holes right before applying it to the inside of the project box, and using my scroll saw to cut the larger holes and slider-hole. The smaller holes were simply drilled. The texture of the box is the same as my last headset - Rhino-liner.</span></span></span></div><div><span style="font-family: courier;"><span><span><br /></span></span></span></div><div><span style="font-family: courier;"><span><span><br /></span></span></span></div><div><span style="font-family: courier;"><span><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhmTgoUgSBD9QrLBwy2HZad2vukvHPdxb3gzxwhB8Ahc_PYiDo4uT9o519uuW_ML7HcARGnKKpx2xYUjjibl2y8aqU3T8p8y29ejXTIBiHnlep9VGvmeGHdtetWYod7TlxBUxzQJZd2_H5s1lxjw2r4BDQCGzRTtWFVhVHTDNQ2B1jrLkFy154S1Dp8zw/s4616/_RJC1035.JPG" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="3464" data-original-width="4616" height="480" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhmTgoUgSBD9QrLBwy2HZad2vukvHPdxb3gzxwhB8Ahc_PYiDo4uT9o519uuW_ML7HcARGnKKpx2xYUjjibl2y8aqU3T8p8y29ejXTIBiHnlep9VGvmeGHdtetWYod7TlxBUxzQJZd2_H5s1lxjw2r4BDQCGzRTtWFVhVHTDNQ2B1jrLkFy154S1Dp8zw/w640-h480/_RJC1035.JPG" width="640" /></a></div> </span></span></div><div><span style="font-family: courier;"><span><span> </span>Measure twice, and cut once. With the holes cut, everything fit quite nicely. Rhinoliner did get pretty scratched while bolting in the buttons so I make another pass with a touch of bronze.</span></span></div><div><span style="font-family: courier;"><span><span><span><br /></span></span></span></span></div><div><span style="font-family: courier;"><span><span><span><br /></span></span></span></span></div><div><span style="font-family: courier;"><span><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi1petqdB4h1yhB4WBzIIndv2aR-RfON61uh62cMJEdjnS3tcsDugoQrcVYtyCIUIOKtpNjq7WXXIcXzuGaNNVT3Crl1sz_247h-XnsTTIxbJnKirSJd8O87qVvTMiVNNVDS0auErkclTJhEFwa54Gh63CqXyR4Wwxfb5nKfFuwYbGhwP4tJ6oadrHxLA/s4616/_RJC1036.JPG" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="3464" data-original-width="4616" height="480" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi1petqdB4h1yhB4WBzIIndv2aR-RfON61uh62cMJEdjnS3tcsDugoQrcVYtyCIUIOKtpNjq7WXXIcXzuGaNNVT3Crl1sz_247h-XnsTTIxbJnKirSJd8O87qVvTMiVNNVDS0auErkclTJhEFwa54Gh63CqXyR4Wwxfb5nKfFuwYbGhwP4tJ6oadrHxLA/w640-h480/_RJC1036.JPG" width="640" /></a></div><div><span style="font-family: courier;"><span><br /></span></span></div><span> </span>The underside of the panel <i>looked</i> like it provided plenty of room - Piece of cake right? (The cake is a lie!)</span></span></div><div><span style="font-family: courier;"><span><span> Meanwhile, I'm messing with the Arduino code, trying to see what it will take to read the values correctly.</span></span></span></div><div><span style="font-family: courier;"><span><span><br /></span></span></span></div><div><span style="font-family: courier;"><span><span><br /></span></span></span></div><div><span style="font-family: courier;"><span><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhfl3QqXAu376DZRS3B7LtFBi5wQOevcjwF_aUnRwB5Y4s69eXefcddhNF4diZlwmSNpU6V1xaygGiAo9lTco1JlMB5AiMF6Tt_v78RqNui8qf7LszvSoX0HpaAdu1L4lsYEQWXbn-Fe0_Mmw7bNY8SCv0PPjzhr3r8NyJD9QUle67W3gRInMuHGbwRoQ/s4616/_RJC1037.JPG" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="3464" data-original-width="4616" height="480" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhfl3QqXAu376DZRS3B7LtFBi5wQOevcjwF_aUnRwB5Y4s69eXefcddhNF4diZlwmSNpU6V1xaygGiAo9lTco1JlMB5AiMF6Tt_v78RqNui8qf7LszvSoX0HpaAdu1L4lsYEQWXbn-Fe0_Mmw7bNY8SCv0PPjzhr3r8NyJD9QUle67W3gRInMuHGbwRoQ/w640-h480/_RJC1037.JPG" width="640" /></a></div><br /><span><span> I've got 16 buttons (6 up-down toggle + 4 regular) - I don't think I had enough pins - so the alternative, is to use 8 pins in a 4x4 grid. Loop through one row of pins sending a signal, then check each pin in the column for a response. If it's there, the button is on. Throw in a diode, and you can press multiple buttons without issue.</span><br /></span></span></span></div><div><span style="font-family: courier;"><span><span><span><br /></span></span></span></span></div><div><span style="font-family: courier;"><span><span><span><br /></span></span></span></span></div><h2 style="text-align: left;"><span style="font-family: courier;"><span><span><span>I ain't 'fraid of no ghosting...</span></span></span></span></h2><div><span style="font-family: courier;"><span><span><span><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/a/AVvXsEjsIOZ1kxelVjXsWqutvHwST7pTokEQW_D0-rcElIJvMyWBXS3liokQR9dieqhbc8UodCyNXa7oNcrGWbI_ci2vR88jt0Wv3-sy7pVX0NFg0dPKtVWbEvnzULcUadl0EpftL-GqFOXcjPegefDrtWJ9CPA1hpRRhr1exGdXicZKCU4BFS8-fc8gibSuFg" style="margin-left: 1em; margin-right: 1em;"><img alt="" data-original-height="619" data-original-width="686" height="577" src="https://blogger.googleusercontent.com/img/a/AVvXsEjsIOZ1kxelVjXsWqutvHwST7pTokEQW_D0-rcElIJvMyWBXS3liokQR9dieqhbc8UodCyNXa7oNcrGWbI_ci2vR88jt0Wv3-sy7pVX0NFg0dPKtVWbEvnzULcUadl0EpftL-GqFOXcjPegefDrtWJ9CPA1hpRRhr1exGdXicZKCU4BFS8-fc8gibSuFg=w640-h577" width="640" /></a></div><br /><br /></span></span></span></span></div><div><span style="font-family: courier;"><span><br /></span></span></div><div><span style="font-family: courier;"><span><br /></span></span></div><div><span style="font-family: courier;"><span><span><span><span> Turns out you cannot assume an input pin is going to be high or low - it should be pulled to that point - or else you can expect some garbage. Arduino has an input mode for this - "</span></span></span></span>INPUT_PULLUP".</span></div><div><span><span style="font-family: courier;"> </span></span></div><div><span style="font-family: courier;"><span><span> </span>From the grid above, pins 1-4 are read. Pins A-D are scanned.</span><br /></span></div><div><span><span style="font-family: courier;"><br /></span></span></div><div><span style="font-family: courier;"><span> So I'm taking "HIGH" as normal (not pressed). If I press a button that closes a switch - say at "C-2" in the diagram, then as I scan the pins - set "C" to low, then read 1-4 - pin 2 will register low, button press. When done with scanning for "C", set "C" again to high.</span><br /></span></div><div><span><span style="font-family: courier;"><br /></span></span></div><div><span><span style="font-family: courier;"><span> The diode setup prevents ghosting - you can smush a bunch of buttons and only those buttons show up as pressed. Without the diode, singular button presses are fine - but if I were to press A1, A2 and B1 - then B2 will show up as pressed as well.</span><br /></span></span></div><div><span><span><span style="font-family: courier;"><br /></span></span></span></div><div><span><span><span style="font-family: courier;"><br /></span></span></span></div><h2 style="text-align: left;"><span style="font-family: courier;">So... many... wires...</span></h2><div><span><span><span style="font-family: courier;">Gaaahhh!!</span></span></span></div><div><span><span><span style="font-family: courier;"><br /></span></span></span></div><div><span><span style="font-family: courier;"><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiaYpoClEUh3LzpCcFOrAE0VLV_DqAfbEfYOYo7PNIFPyvvKpI4w-BQwppkmvY2e1EREZl1zxUcg8JXDGfjxNThCEwMKV3aIadIo9_j9GiywxTYG1gvOZ37j_QNAcx_VyA5FNhYky6ISwel7WRPigqSBBcHClX2RhGYT8pJyC-bfECXanBotp6wOSQdgw/s4616/_RJC1041.JPG" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="3464" data-original-width="4616" height="480" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiaYpoClEUh3LzpCcFOrAE0VLV_DqAfbEfYOYo7PNIFPyvvKpI4w-BQwppkmvY2e1EREZl1zxUcg8JXDGfjxNThCEwMKV3aIadIo9_j9GiywxTYG1gvOZ37j_QNAcx_VyA5FNhYky6ISwel7WRPigqSBBcHClX2RhGYT8pJyC-bfECXanBotp6wOSQdgw/w640-h480/_RJC1041.JPG" width="640" /></a></div><br /><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj5kVOU7Xphj56SPjVjZKH34yra1s-mdRXCffGibDnJxdYtTw9HhIr_DZFMerpDv_iEO8K-rRCjfDihROI7DyOBCKDRY-pQQ8C-oywDPY498G2o1r_e9wVEDT_g_XIZkZMUIfgE9VYXA5C090TPhAlsYl0DrzBBXPvDqf4PY-sDP8su0U0KXGPsh6Ko4g/s4616/_RJC1044.JPG" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="3464" data-original-width="4616" height="480" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj5kVOU7Xphj56SPjVjZKH34yra1s-mdRXCffGibDnJxdYtTw9HhIr_DZFMerpDv_iEO8K-rRCjfDihROI7DyOBCKDRY-pQQ8C-oywDPY498G2o1r_e9wVEDT_g_XIZkZMUIfgE9VYXA5C090TPhAlsYl0DrzBBXPvDqf4PY-sDP8su0U0KXGPsh6Ko4g/w640-h480/_RJC1044.JPG" width="640" /></a></div><span> </span></span></span></div><div><span><span style="font-family: courier;"><span> </span>The most annoying bit of this was soldering all the wires in place. The board needed several wires to act as rows and columns. 4 wires for reading, 4 for the scan, and 32 for 16 buttons. Wires tend to come joined - Joined wires appear to put a lot of stress on the shorter wire. I had to resolder a few that pulled away from the board.</span></span></div><div><span><span style="font-family: courier;"><span><br /></span></span></span></div><div><span><span style="font-family: courier;"><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjtA3WJVeIvOsS19bly8Vagl0r66LVtW7lo8AX_gx8z2lO04KdUGWJEngRVqsDUl98rThAh2kcIV64RTmTkvJe2IiASXx3N3-E_mdaZ3sTiQPTCyYIo5fh54eQxe5-td_ora3nAg0yV1DZW89VmEJN3QPo4DH4JiqIz9NlD27sWMHJOmLtNMvvVkKcUvA/s4616/_RJC1054.JPG" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="3464" data-original-width="4616" height="480" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjtA3WJVeIvOsS19bly8Vagl0r66LVtW7lo8AX_gx8z2lO04KdUGWJEngRVqsDUl98rThAh2kcIV64RTmTkvJe2IiASXx3N3-E_mdaZ3sTiQPTCyYIo5fh54eQxe5-td_ora3nAg0yV1DZW89VmEJN3QPo4DH4JiqIz9NlD27sWMHJOmLtNMvvVkKcUvA/w640-h480/_RJC1054.JPG" width="640" /></a></div><div><span><span style="font-family: courier;"><br /></span></span></div><div><span><span style="font-family: courier;"><span> </span>Soldering the wires to the buttons after that was no picnic either!</span></span></div><div><span><span style="font-family: courier;"><br /></span></span></div><br /><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgNvRVKDEhmfWc7q2mG48wCxamdhOO2OHcRyvcOu--49wXK2McAY0pvzadtFoZPfXuYF72jYuW5-DDob8VMEaQRzvhC1D5rBu_nFvwdt6BA-LLJqUK3LNs3mmfRR5RzJSv5cRdPJUN-tJW4CqVL40VEebaLvoKMcURhnQVbW6rXlh8R7xIl1hUbNrwONw/s4616/_RJC1055.JPG" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="3464" data-original-width="4616" height="480" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgNvRVKDEhmfWc7q2mG48wCxamdhOO2OHcRyvcOu--49wXK2McAY0pvzadtFoZPfXuYF72jYuW5-DDob8VMEaQRzvhC1D5rBu_nFvwdt6BA-LLJqUK3LNs3mmfRR5RzJSv5cRdPJUN-tJW4CqVL40VEebaLvoKMcURhnQVbW6rXlh8R7xIl1hUbNrwONw/w640-h480/_RJC1055.JPG" width="640" /></a></div><br /><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhiz_RKMs38miy5mVFTXVuAUpB6YM35t_nFnfoDbsxgkWCGBaqOb4fG9HVnqfi4hB3a31Q1FNSrBI6ob1sZZQMkltNoUMZ8uHRxI3g2aeHBPdYjwjH85Apk2Z-QTjn5mXQnOJPahNUi2ij50kKY5_PNplgo5rgI2Pob52nYkKibNBNOiifT2uZ5wdEfjA/s4616/_RJC1056.JPG" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="3464" data-original-width="4616" height="480" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhiz_RKMs38miy5mVFTXVuAUpB6YM35t_nFnfoDbsxgkWCGBaqOb4fG9HVnqfi4hB3a31Q1FNSrBI6ob1sZZQMkltNoUMZ8uHRxI3g2aeHBPdYjwjH85Apk2Z-QTjn5mXQnOJPahNUi2ij50kKY5_PNplgo5rgI2Pob52nYkKibNBNOiifT2uZ5wdEfjA/w640-h480/_RJC1056.JPG" width="640" /></a></div><span> </span><div><span><span style="font-family: courier;"><span> I thought I had enough space - really. </span><br /></span></span></div><div><span><span style="font-family: courier;"><span><br /></span></span></span></div><br /><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjGmPf_ebMHkTZpd-Z3UYQkMtgZNtUbvJTEWtHH072_4xZPxEoz1fcIXEklQQlNfHQ7SfZ8to5JnW5rb2t5uXDYGzPYiqOGy6xnOEHYAm6nJqhHCjamk5sMcIWFl2b0y_9SYcdiH4PL7O1PDwkUr7kCDagi02EpFdNGtdtiJ89GTTWE2QGEymZHKD4yTw/s4616/_RJC1057.JPG" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="3464" data-original-width="4616" height="480" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjGmPf_ebMHkTZpd-Z3UYQkMtgZNtUbvJTEWtHH072_4xZPxEoz1fcIXEklQQlNfHQ7SfZ8to5JnW5rb2t5uXDYGzPYiqOGy6xnOEHYAm6nJqhHCjamk5sMcIWFl2b0y_9SYcdiH4PL7O1PDwkUr7kCDagi02EpFdNGtdtiJ89GTTWE2QGEymZHKD4yTw/w640-h480/_RJC1057.JPG" width="640" /></a></div><div><span><span style="font-family: courier;"><br /></span></span></div><div><span> </span>I had to get creative, bending the headers on the Arduino board a bit. Heatshrink was getting in the way, so I went with masking tape and tucked those wires above one of the stick modules. Not the best, but it will do.</div><div><br /></div><div><br /></div><div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/a/AVvXsEjq118wNBxnCqfUkLApg_3pKNUvA2obNCRRnvu42HStKTKSrUVrRlRXygWNbwUHcDyoeorZGmwPQYkYDOuizti_kroXSL6zFx3u5nb_ZP0ntxmczRAHNoYmUGpxYepj-dVwN_9Mn_TdSNch36OSVu5NQ6YdCKX5cuT8hHEV0wFEDzFObKaJ8VtZjMGxhQ" style="margin-left: 1em; margin-right: 1em;"><img alt="" data-original-height="609" data-original-width="1102" height="354" src="https://blogger.googleusercontent.com/img/a/AVvXsEjq118wNBxnCqfUkLApg_3pKNUvA2obNCRRnvu42HStKTKSrUVrRlRXygWNbwUHcDyoeorZGmwPQYkYDOuizti_kroXSL6zFx3u5nb_ZP0ntxmczRAHNoYmUGpxYepj-dVwN_9Mn_TdSNch36OSVu5NQ6YdCKX5cuT8hHEV0wFEDzFObKaJ8VtZjMGxhQ=w640-h354" width="640" /></a></div><br /><span> Yay - we have a pulse!</span><br /></div><div><span><br /></span></div><br /><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgXL3aLVmrumLv2UcOIPSK6M-_xgc4ePpqzkXDnDXrMKnymRcig-u5nZleobPnQ4yZUBSVbecZTprJjTRvPWDSmbfLJwekc0EG1nGssh-E8x92v22atuaJQWs83knSd1KJJ5IMoJHdUeaNJPMUgx6bj5LExCSBgh3UWs4FGQ1vWJBkTkQS8qc6W1hcYPw/s6016/DSC01631.JPG" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="4016" data-original-width="6016" height="428" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgXL3aLVmrumLv2UcOIPSK6M-_xgc4ePpqzkXDnDXrMKnymRcig-u5nZleobPnQ4yZUBSVbecZTprJjTRvPWDSmbfLJwekc0EG1nGssh-E8x92v22atuaJQWs83knSd1KJJ5IMoJHdUeaNJPMUgx6bj5LExCSBgh3UWs4FGQ1vWJBkTkQS8qc6W1hcYPw/w640-h428/DSC01631.JPG" width="640" /></a></div><div><span><span style="font-family: courier;"><br /></span></span></div>It doesn't look much different, but it's got a brain now! I've tried it in MS Flight Simulator, and Superflight. I still need to try it in Kerbal Space Program 😀.</span></span></div><div><span><span style="font-family: courier;"><br /></span></span></div><div><span><span style="font-family: courier;"><br /></span></span></div><div><span><span style="font-family: courier;">Code:</span></span></div><div><span><span style="font-family: courier;"><a href="https://github.com/beomagi/joystick-in-a-box/blob/main/joystick.ino">https://github.com/beomagi/joystick-in-a-box/blob/main/joystick.ino</a></span></span></div><div><span><span style="font-family: courier;"><br /></span></span></div><div><div style="background-color: #1e1e1e; color: #d4d4d4; font-family: Consolas, "Courier New", monospace; font-size: 14px; line-height: 19px; white-space: pre;"><div><span style="color: #c586c0;">#include</span><span style="color: #569cd6;"> </span><span style="color: #ce9178;">"Joystick.h"</span></div><br /><div><span style="color: #4ec9b0;">Joystick_</span> <span style="color: #9cdcfe;">Joystick</span>(<span style="color: #4ec9b0;">JOYSTICK_DEFAULT_REPORT_ID</span>, <span style="color: #4ec9b0;">JOYSTICK_TYPE_JOYSTICK</span>, <span style="color: #b5cea8;">16</span>, <span style="color: #b5cea8;">0</span>,</div><div> <span style="color: #4ec9b0;">true</span>, <span style="color: #4ec9b0;">true</span>, <span style="color: #4ec9b0;">true</span>, <span style="color: #4ec9b0;">false</span>, <span style="color: #4ec9b0;">false</span>, <span style="color: #4ec9b0;">false</span>, <span style="color: #4ec9b0;">true</span>, <span style="color: #4ec9b0;">true</span>, <span style="color: #4ec9b0;">false</span>, <span style="color: #4ec9b0;">false</span>, <span style="color: #4ec9b0;">false</span>);</div><div><span style="color: #6a9955;">// X, Y, Z, RX, RY, RZ, rudr, throt, accel, brake, steer);</span></div><br /><br /><div><span style="color: #c586c0;">#define</span><span style="color: #569cd6;"> </span><span style="color: #569cd6;">JOYAX1_PIN</span><span style="color: #569cd6;"> A1</span><span style="color: #6a9955;"> // Arduino pin connected to VRX pin</span></div><div><span style="color: #c586c0;">#define</span><span style="color: #569cd6;"> </span><span style="color: #569cd6;">JOYAX2_PIN</span><span style="color: #569cd6;"> A2</span><span style="color: #6a9955;"> // Arduino pin connected to VRY pin</span></div><div><span style="color: #c586c0;">#define</span><span style="color: #569cd6;"> </span><span style="color: #569cd6;">JOYAX3_PIN</span><span style="color: #569cd6;"> A4</span><span style="color: #6a9955;"> // Arduino pin connected to VRY pin</span></div><div><span style="color: #c586c0;">#define</span><span style="color: #569cd6;"> </span><span style="color: #569cd6;">JOYAX4_PIN</span><span style="color: #569cd6;"> A3</span><span style="color: #6a9955;"> // Arduino pin connected to VRY pin</span></div><div><span style="color: #c586c0;">#define</span><span style="color: #569cd6;"> </span><span style="color: #569cd6;">JOYAX5_PIN</span><span style="color: #569cd6;"> A0</span><span style="color: #6a9955;"> // Arduino pin connected to VRY pin</span></div><div><span style="color: #c586c0;">#define</span><span style="color: #569cd6;"> </span><span style="color: #569cd6;">HIGHPIN</span><span style="color: #569cd6;"> </span><span style="color: #b5cea8;">13</span></div><div><span style="color: #c586c0;">#define</span><span style="color: #569cd6;"> </span><span style="color: #569cd6;">CHKPIN</span><span style="color: #569cd6;"> </span><span style="color: #b5cea8;">12</span></div><br /><div><span style="color: #c586c0;">#define</span><span style="color: #569cd6;"> </span><span style="color: #569cd6;">buttchanA</span><span style="color: #569cd6;"> </span><span style="color: #b5cea8;">2</span></div><div><span style="color: #c586c0;">#define</span><span style="color: #569cd6;"> </span><span style="color: #569cd6;">buttchanB</span><span style="color: #569cd6;"> </span><span style="color: #b5cea8;">3</span></div><div><span style="color: #c586c0;">#define</span><span style="color: #569cd6;"> </span><span style="color: #569cd6;">buttchanC</span><span style="color: #569cd6;"> </span><span style="color: #b5cea8;">4</span></div><div><span style="color: #c586c0;">#define</span><span style="color: #569cd6;"> </span><span style="color: #569cd6;">buttchanD</span><span style="color: #569cd6;"> </span><span style="color: #b5cea8;">5</span></div><br /><div><span style="color: #c586c0;">#define</span><span style="color: #569cd6;"> </span><span style="color: #569cd6;">buttreadA</span><span style="color: #569cd6;"> </span><span style="color: #b5cea8;">8</span></div><div><span style="color: #c586c0;">#define</span><span style="color: #569cd6;"> </span><span style="color: #569cd6;">buttreadB</span><span style="color: #569cd6;"> </span><span style="color: #b5cea8;">9</span></div><div><span style="color: #c586c0;">#define</span><span style="color: #569cd6;"> </span><span style="color: #569cd6;">buttreadC</span><span style="color: #569cd6;"> </span><span style="color: #b5cea8;">7</span></div><div><span style="color: #c586c0;">#define</span><span style="color: #569cd6;"> </span><span style="color: #569cd6;">buttreadD</span><span style="color: #569cd6;"> </span><span style="color: #b5cea8;">6</span></div><br /><div><span style="color: #569cd6;">int</span> <span style="color: #9cdcfe;">ButtonState</span>[<span style="color: #b5cea8;">16</span>] = {<span style="color: #b5cea8;">0</span>,<span style="color: #b5cea8;">0</span>,<span style="color: #b5cea8;">0</span>,<span style="color: #b5cea8;">0</span>,<span style="color: #b5cea8;">0</span>,<span style="color: #b5cea8;">0</span>,<span style="color: #b5cea8;">0</span>,<span style="color: #b5cea8;">0</span>,<span style="color: #b5cea8;">0</span>,<span style="color: #b5cea8;">0</span>,<span style="color: #b5cea8;">0</span>,<span style="color: #b5cea8;">0</span>,<span style="color: #b5cea8;">0</span>,<span style="color: #b5cea8;">0</span>,<span style="color: #b5cea8;">0</span>,<span style="color: #b5cea8;">0</span>};</div><br /><div><span style="color: #569cd6;">int</span> <span style="color: #dcdcaa;">reRange</span>(<span style="color: #569cd6;">int</span> <span style="color: #9cdcfe;">inval</span>, <span style="color: #569cd6;">int</span> <span style="color: #9cdcfe;">inmin</span>, <span style="color: #569cd6;">int</span> <span style="color: #9cdcfe;">inmax</span>, <span style="color: #569cd6;">int</span> <span style="color: #9cdcfe;">neg</span>){</div><div> <span style="color: #569cd6;">int</span> <span style="color: #9cdcfe;">range</span>=<span style="color: #9cdcfe;">inmax</span>-<span style="color: #9cdcfe;">inmin</span>;</div><div> <span style="color: #569cd6;">float</span> <span style="color: #9cdcfe;">oldval</span>=<span style="color: #9cdcfe;">inval</span>;</div><div> <span style="color: #569cd6;">int</span> <span style="color: #9cdcfe;">newval</span>=(((<span style="color: #9cdcfe;">oldval</span>-<span style="color: #9cdcfe;">inmin</span>)*<span style="color: #b5cea8;">1023</span>)/<span style="color: #9cdcfe;">range</span>);</div><div> <span style="color: #9cdcfe;">newval</span>=<span style="color: #dcdcaa;">min</span>(<span style="color: #9cdcfe;">newval</span>,<span style="color: #b5cea8;">1023</span>);</div><div> <span style="color: #9cdcfe;">newval</span>=<span style="color: #dcdcaa;">max</span>(<span style="color: #9cdcfe;">newval</span>,<span style="color: #b5cea8;">0</span>);</div><div> <span style="color: #c586c0;">if</span> (<span style="color: #9cdcfe;">neg</span><<span style="color: #b5cea8;">0</span>) {</div><div> <span style="color: #9cdcfe;">newval</span>=<span style="color: #b5cea8;">1023</span>-<span style="color: #9cdcfe;">newval</span>;</div><div> }</div><div> <span style="color: #c586c0;">return</span> <span style="color: #569cd6;">int</span>(<span style="color: #9cdcfe;">newval</span>);</div><div>}</div><br /><div><span style="color: #569cd6;">void</span> <span style="color: #dcdcaa;">setup</span>() {</div><div><span style="color: #6a9955;"> //Serial.begin(9600);</span></div><div> <span style="color: #dcdcaa;">pinMode</span>(<span style="color: #569cd6;">JOYAX1_PIN</span>, INPUT_PULLUP);</div><div> <span style="color: #dcdcaa;">pinMode</span>(<span style="color: #569cd6;">JOYAX2_PIN</span>, INPUT_PULLUP);</div><div> <span style="color: #dcdcaa;">pinMode</span>(<span style="color: #569cd6;">JOYAX3_PIN</span>, INPUT_PULLUP);</div><div> <span style="color: #dcdcaa;">pinMode</span>(<span style="color: #569cd6;">JOYAX4_PIN</span>, INPUT_PULLUP);</div><div> <span style="color: #dcdcaa;">pinMode</span>(<span style="color: #569cd6;">JOYAX5_PIN</span>, INPUT_PULLUP);</div><div> </div><div> <span style="color: #dcdcaa;">pinMode</span>(<span style="color: #569cd6;">HIGHPIN</span>, OUTPUT);</div><div> <span style="color: #dcdcaa;">digitalWrite</span>(<span style="color: #569cd6;">HIGHPIN</span>, HIGH);</div><div> <span style="color: #dcdcaa;">pinMode</span>(<span style="color: #569cd6;">buttchanA</span>, OUTPUT);</div><div> <span style="color: #dcdcaa;">pinMode</span>(<span style="color: #569cd6;">buttchanB</span>, OUTPUT);</div><div> <span style="color: #dcdcaa;">pinMode</span>(<span style="color: #569cd6;">buttchanC</span>, OUTPUT);</div><div> <span style="color: #dcdcaa;">pinMode</span>(<span style="color: #569cd6;">buttchanD</span>, OUTPUT);</div><div> <span style="color: #dcdcaa;">digitalWrite</span>(<span style="color: #569cd6;">buttchanA</span>, HIGH);</div><div> <span style="color: #dcdcaa;">digitalWrite</span>(<span style="color: #569cd6;">buttchanB</span>, HIGH);</div><div> <span style="color: #dcdcaa;">digitalWrite</span>(<span style="color: #569cd6;">buttchanC</span>, HIGH);</div><div> <span style="color: #dcdcaa;">digitalWrite</span>(<span style="color: #569cd6;">buttchanD</span>, HIGH);</div><div> <span style="color: #dcdcaa;">pinMode</span>(<span style="color: #569cd6;">buttreadA</span>, INPUT_PULLUP);</div><div> <span style="color: #dcdcaa;">pinMode</span>(<span style="color: #569cd6;">buttreadB</span>, INPUT_PULLUP);</div><div> <span style="color: #dcdcaa;">pinMode</span>(<span style="color: #569cd6;">buttreadC</span>, INPUT_PULLUP);</div><div> <span style="color: #dcdcaa;">pinMode</span>(<span style="color: #569cd6;">buttreadD</span>, INPUT_PULLUP);</div><div> <span style="color: #dcdcaa;">pinMode</span>(<span style="color: #569cd6;">CHKPIN</span>, INPUT); </div><div> <span style="color: #9cdcfe;">Joystick</span>.<span style="color: #dcdcaa;">begin</span>();</div><div>}</div><br /><div><span style="color: #569cd6;">void</span> <span style="color: #dcdcaa;">loop</span>() {</div><div> <span style="color: #569cd6;">int</span> <span style="color: #9cdcfe;">joy_ax1_val</span> = <span style="color: #dcdcaa;">analogRead</span>(<span style="color: #569cd6;">JOYAX1_PIN</span>);<span style="color: #6a9955;"> // X axis, right stick regx</span></div><div> <span style="color: #569cd6;">int</span> <span style="color: #9cdcfe;">joy_ax2_val</span> = <span style="color: #dcdcaa;">analogRead</span>(<span style="color: #569cd6;">JOYAX2_PIN</span>);<span style="color: #6a9955;"> // y axis, right stick regy</span></div><div> <span style="color: #569cd6;">int</span> <span style="color: #9cdcfe;">joy_ax3_val</span> = <span style="color: #dcdcaa;">analogRead</span>(<span style="color: #569cd6;">JOYAX3_PIN</span>);<span style="color: #6a9955;"> // X axis, right stick rudder</span></div><div> <span style="color: #569cd6;">int</span> <span style="color: #9cdcfe;">joy_ax4_val</span> = <span style="color: #dcdcaa;">analogRead</span>(<span style="color: #569cd6;">JOYAX4_PIN</span>);<span style="color: #6a9955;"> // Y axis, right stick throttle</span></div><div> <span style="color: #569cd6;">int</span> <span style="color: #9cdcfe;">joy_ax5_val</span> = <span style="color: #dcdcaa;">analogRead</span>(<span style="color: #569cd6;">JOYAX5_PIN</span>);<span style="color: #6a9955;"> // Z axis, slider for trim </span></div><br /><div> <span style="color: #569cd6;">int</span> <span style="color: #9cdcfe;">pinW</span>;</div><div> <span style="color: #569cd6;">int</span> <span style="color: #9cdcfe;">pinR</span>;</div><div> <span style="color: #c586c0;">for</span> (<span style="color: #569cd6;">int</span> <span style="color: #9cdcfe;">idxW</span> = <span style="color: #b5cea8;">0</span>; <span style="color: #9cdcfe;">idxW</span> < <span style="color: #b5cea8;">4</span>; <span style="color: #9cdcfe;">idxW</span>++){</div><div> <span style="color: #c586c0;">if</span> (<span style="color: #9cdcfe;">idxW</span> == <span style="color: #b5cea8;">0</span>) {<span style="color: #9cdcfe;">pinW</span>=<span style="color: #569cd6;">buttchanA</span>;}</div><div> <span style="color: #c586c0;">if</span> (<span style="color: #9cdcfe;">idxW</span> == <span style="color: #b5cea8;">1</span>) {<span style="color: #9cdcfe;">pinW</span>=<span style="color: #569cd6;">buttchanB</span>;}</div><div> <span style="color: #c586c0;">if</span> (<span style="color: #9cdcfe;">idxW</span> == <span style="color: #b5cea8;">2</span>) {<span style="color: #9cdcfe;">pinW</span>=<span style="color: #569cd6;">buttchanC</span>;}</div><div> <span style="color: #c586c0;">if</span> (<span style="color: #9cdcfe;">idxW</span> == <span style="color: #b5cea8;">3</span>) {<span style="color: #9cdcfe;">pinW</span>=<span style="color: #569cd6;">buttchanD</span>;}</div><div> <span style="color: #dcdcaa;">digitalWrite</span>(<span style="color: #9cdcfe;">pinW</span>, LOW);</div><div> <span style="color: #c586c0;">for</span> (<span style="color: #569cd6;">int</span> <span style="color: #9cdcfe;">idxR</span> = <span style="color: #b5cea8;">0</span>; <span style="color: #9cdcfe;">idxR</span> < <span style="color: #b5cea8;">4</span>; <span style="color: #9cdcfe;">idxR</span>++){</div><div> <span style="color: #c586c0;">if</span> (<span style="color: #9cdcfe;">idxR</span> == <span style="color: #b5cea8;">0</span>) {<span style="color: #9cdcfe;">pinR</span>=<span style="color: #569cd6;">buttreadA</span>;}</div><div> <span style="color: #c586c0;">if</span> (<span style="color: #9cdcfe;">idxR</span> == <span style="color: #b5cea8;">1</span>) {<span style="color: #9cdcfe;">pinR</span>=<span style="color: #569cd6;">buttreadB</span>;}</div><div> <span style="color: #c586c0;">if</span> (<span style="color: #9cdcfe;">idxR</span> == <span style="color: #b5cea8;">2</span>) {<span style="color: #9cdcfe;">pinR</span>=<span style="color: #569cd6;">buttreadC</span>;}</div><div> <span style="color: #c586c0;">if</span> (<span style="color: #9cdcfe;">idxR</span> == <span style="color: #b5cea8;">3</span>) {<span style="color: #9cdcfe;">pinR</span>=<span style="color: #569cd6;">buttreadD</span>;}</div><div> <span style="color: #569cd6;">int</span> <span style="color: #9cdcfe;">ChkButtonState</span>=!<span style="color: #dcdcaa;">digitalRead</span>(<span style="color: #9cdcfe;">pinR</span>);</div><div> <span style="color: #569cd6;">int</span> <span style="color: #9cdcfe;">butnum</span>=(<span style="color: #9cdcfe;">idxW</span>*<span style="color: #b5cea8;">4</span>)+<span style="color: #9cdcfe;">idxR</span>;</div><div> <span style="color: #c586c0;">if</span> (<span style="color: #9cdcfe;">ChkButtonState</span> != <span style="color: #9cdcfe;">ButtonState</span>[<span style="color: #9cdcfe;">butnum</span>]){</div><div> <span style="color: #9cdcfe;">Joystick</span>.<span style="color: #dcdcaa;">setButton</span>(<span style="color: #9cdcfe;">butnum</span>, <span style="color: #9cdcfe;">ChkButtonState</span>);</div><div> <span style="color: #9cdcfe;">ButtonState</span>[<span style="color: #9cdcfe;">butnum</span>] = <span style="color: #9cdcfe;">ChkButtonState</span>;</div><div> }</div><div> }</div><div> <span style="color: #dcdcaa;">digitalWrite</span>(<span style="color: #9cdcfe;">pinW</span>, HIGH);</div><div> }</div><br /><div> <span style="color: #9cdcfe;">joy_ax1_val</span>=<span style="color: #dcdcaa;">reRange</span>(<span style="color: #9cdcfe;">joy_ax1_val</span>,<span style="color: #b5cea8;">92</span>,<span style="color: #b5cea8;">977</span>,<span style="color: #b5cea8;">1</span>);</div><div> <span style="color: #9cdcfe;">joy_ax2_val</span>=<span style="color: #dcdcaa;">reRange</span>(<span style="color: #9cdcfe;">joy_ax2_val</span>,<span style="color: #b5cea8;">64</span>,<span style="color: #b5cea8;">928</span>,<span style="color: #b5cea8;">1</span>);</div><div> <span style="color: #9cdcfe;">joy_ax3_val</span>=<span style="color: #dcdcaa;">reRange</span>(<span style="color: #9cdcfe;">joy_ax3_val</span>,<span style="color: #b5cea8;">88</span>,<span style="color: #b5cea8;">985</span>,<span style="color: #b5cea8;">1</span>);</div><div> <span style="color: #9cdcfe;">joy_ax4_val</span>=<span style="color: #dcdcaa;">reRange</span>(<span style="color: #9cdcfe;">joy_ax4_val</span>,<span style="color: #b5cea8;">47</span>,<span style="color: #b5cea8;">920</span>,-<span style="color: #b5cea8;">1</span>);</div><div> <span style="color: #9cdcfe;">joy_ax5_val</span>=<span style="color: #dcdcaa;">reRange</span>(<span style="color: #9cdcfe;">joy_ax5_val</span>,<span style="color: #b5cea8;">15</span>,<span style="color: #b5cea8;">1023</span>,-<span style="color: #b5cea8;">1</span>);</div><div><span style="color: #6a9955;"> /*Serial.println( String(joy_ax1_val)+" "+</span></div><div><span style="color: #6a9955;"> String(joy_ax2_val)+" "+</span></div><div><span style="color: #6a9955;"> String(joy_ax3_val)+" "+</span></div><div><span style="color: #6a9955;"> String(joy_ax4_val)+" "+</span></div><div><span style="color: #6a9955;"> String(joy_ax5_val)+" ");</span></div><div><span style="color: #6a9955;"> */</span></div><div> <span style="color: #9cdcfe;">Joystick</span>.<span style="color: #dcdcaa;">setXAxis</span>(<span style="color: #9cdcfe;">joy_ax1_val</span>);</div><div> <span style="color: #9cdcfe;">Joystick</span>.<span style="color: #dcdcaa;">setYAxis</span>(<span style="color: #9cdcfe;">joy_ax2_val</span>);</div><div> <span style="color: #9cdcfe;">Joystick</span>.<span style="color: #dcdcaa;">setRudder</span>(<span style="color: #9cdcfe;">joy_ax3_val</span>);</div><div> <span style="color: #9cdcfe;">Joystick</span>.<span style="color: #dcdcaa;">setThrottle</span>(<span style="color: #9cdcfe;">joy_ax4_val</span>);</div><div> <span style="color: #9cdcfe;">Joystick</span>.<span style="color: #dcdcaa;">setZAxis</span>(<span style="color: #9cdcfe;">joy_ax5_val</span>);</div><br /><div> <span style="color: #c586c0;">if</span> (<span style="color: #dcdcaa;">digitalRead</span>(<span style="color: #569cd6;">CHKPIN</span>) == LOW){</div><div> <span style="color: #9cdcfe;">Joystick</span>.<span style="color: #dcdcaa;">end</span>();</div><div> }</div><div> <span style="color: #dcdcaa;">delay</span>(<span style="color: #b5cea8;">5</span>);</div><div>}</div><br /></div></div><div><span><span style="font-family: courier;"><br /></span></span></div><div><span><span style="font-family: courier;"><span> </span>Ignore the "HIGHPIN" and "CHKPIN" - those were there for troubleshooting. The "reRange" function may stand out as odd. The purpose of that is to calibrate the analog axis somewhat. It's not handling centering really, but it will invert an axis if needed and spread the values it does read from 0-1023. </span></span></div><div><span><span style="font-family: courier;"><span> </span>e.g. A stick may read from 90-950, instead of the expected 0-1023. Taking the read value, subtracting the minimum value, then multiplying by the range I want (1023), and dividing by the range I have (950-90) gives me an effective 0-1023 analog control. </span></span></div><div><span><span style="font-family: courier;"><br /></span></span></div><div><span><span style="font-family: courier;"><br /><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgMZ3EyzCpjpPOdBqkFzanD9wizNQ0Lw900VAU5rBCBsGcD-ykKoBXc86LWleCG22992UOeBavCiwm1xkxDQOAhRdIhHbXIb0qqzkhvMRF4CJXqdQw7UweeXupjZWYddOzNJkoElNno9iaVsj6Jd7-BG6r-IDlZ3iCSA3ANvEK1KoPGD4zPOQ6mVgYXJQ/s6016/DSC01637.JPG" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="4016" data-original-width="6016" height="428" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgMZ3EyzCpjpPOdBqkFzanD9wizNQ0Lw900VAU5rBCBsGcD-ykKoBXc86LWleCG22992UOeBavCiwm1xkxDQOAhRdIhHbXIb0qqzkhvMRF4CJXqdQw7UweeXupjZWYddOzNJkoElNno9iaVsj6Jd7-BG6r-IDlZ3iCSA3ANvEK1KoPGD4zPOQ6mVgYXJQ/w640-h428/DSC01637.JPG" width="640" /></a></div><br /><span><span> I'm pleased with how this turned out. It matches my headset - version 11 🎧. Two 40mm drivers in each ear, David Clark headband... The headphone builds improved with each version. Perhaps this would apply to the controller as well? 😁</span><br /></span></span></span></div><div><br /></div><div><span><span><span style="font-family: courier;"><br /></span></span></span></div><div><span><span><span style="font-family: courier;"><br /></span></span></span></div><div><span><span><span style="font-family: courier;"><br /></span></span></span></div><div><span style="font-family: courier;"><br /></span></div><div><span style="font-family: courier;"><span><span><span><br /></span></span></span></span></div><div><span style="font-family: courier;"><span><span><span><br /></span></span></span></span></div><div><span style="font-family: courier;"><br /></span></div><div><span style="font-family: courier;"><br /></span></div><div><span style="font-family: courier;"><br /></span></div><div><span style="font-family: courier;"><br /></span></div>Beomagihttp://www.blogger.com/profile/00469223835355067867noreply@blogger.com0tag:blogger.com,1999:blog-2974094041951992980.post-39673523951885316782022-12-13T10:42:00.007-08:002022-12-20T06:25:11.077-08:00Hardware Cost, Greed, Covid, Shipping, Crypto and Crazy<p><span style="font-family: courier;">Somewhere some guy is waking up from a 5-year coma and saying he wants to get started PC gaming again. His friends exchange glances...</span></p><p></p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgPiwYjjaXlgmxYxFFF-7E25a_AmvGa9KuOgXNB6ptseK8bgw3puOGf-ArT3jUAXZphcbYH28MbkslfmEj96_KBaly_Phutn0__t_AISGmWUc28tA4hriKxgtCq0eFUG-l-GHK_jzGm9P-U6us1uFztagRLNuKLJ94bgE4vNUfE4yMZY-BzYuG2ToxplA/s292/sidelook.gif" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="292" data-original-width="220" height="292" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgPiwYjjaXlgmxYxFFF-7E25a_AmvGa9KuOgXNB6ptseK8bgw3puOGf-ArT3jUAXZphcbYH28MbkslfmEj96_KBaly_Phutn0__t_AISGmWUc28tA4hriKxgtCq0eFUG-l-GHK_jzGm9P-U6us1uFztagRLNuKLJ94bgE4vNUfE4yMZY-BzYuG2ToxplA/s1600/sidelook.gif" width="220" /></a></div><br /><span style="font-family: courier;"><br /></span><p></p><p><span style="font-family: courier;">For the last 4 years, hardware prices have been insane. Years before when prices were relatively sane, top-end cards were $600-$700. The mid-range was $250-$350. Nvidia's 3060 is the 3000 generation's mid-range. Here's what recent history looks like...</span></p><p><span style="font-family: courier;"></span></p><table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto;"><tbody><tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/a/AVvXsEgaFPBw6GqspABjoRPiGkFvkYfY9OeBQJG1M1_uqsQqLNHmgbrxWE658qbUcuWVTWSQFgVdvloFFjJBZoCAGn5pf0lyu97eY7VmvNu0E1r41_hQ_RQr-pEPgEiwA7C5V_QMetLFXpfSpvRUyYwtA_CDVYWzrFJGAOd96aJbTUHPlUUf7pVjsB_vwdjrLA" style="margin-left: auto; margin-right: auto;"><img alt="" data-original-height="299" data-original-width="917" height="209" src="https://blogger.googleusercontent.com/img/a/AVvXsEgaFPBw6GqspABjoRPiGkFvkYfY9OeBQJG1M1_uqsQqLNHmgbrxWE658qbUcuWVTWSQFgVdvloFFjJBZoCAGn5pf0lyu97eY7VmvNu0E1r41_hQ_RQr-pEPgEiwA7C5V_QMetLFXpfSpvRUyYwtA_CDVYWzrFJGAOd96aJbTUHPlUUf7pVjsB_vwdjrLA=w640-h209" width="640" /></a></td></tr><tr><td class="tr-caption" style="text-align: center;"><span style="font-family: courier;">MSI 3060 Ventus 3x</span></td></tr></tbody></table><span style="font-family: courier;"><br /><table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto;"><tbody><tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/a/AVvXsEj0_kNP9zEtPB0lihDkcvW3dcNKoiPF317_f5bgsTBMW6gKSyLv8afI7WYxm7O0nILUYUk-E4oQ6J7Re2vcJ2a8KpFfCFBykTz50jKeNsdB0I2enq6wSbFdD5aixK5i0ISTRhl9s35EaSM2My9-IS8kkn4twkYGlJz_cp-Xvyv9HRROXEulcshFGFgHEA" style="margin-left: auto; margin-right: auto;"><img alt="" data-original-height="320" data-original-width="917" height="224" src="https://blogger.googleusercontent.com/img/a/AVvXsEj0_kNP9zEtPB0lihDkcvW3dcNKoiPF317_f5bgsTBMW6gKSyLv8afI7WYxm7O0nILUYUk-E4oQ6J7Re2vcJ2a8KpFfCFBykTz50jKeNsdB0I2enq6wSbFdD5aixK5i0ISTRhl9s35EaSM2My9-IS8kkn4twkYGlJz_cp-Xvyv9HRROXEulcshFGFgHEA=w640-h224" width="640" /></a></td></tr><tr><td class="tr-caption" style="text-align: center;">Zotac Gaming 3060Ti Twin Edge</td></tr></tbody></table><br /><br /></span><p></p><p><span style="font-family: courier;"></span></p><table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto;"><tbody><tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/a/AVvXsEhqCfW1XqnKmzVyA_lnYfyA2C7vepEWGR7XTZLF1pCKki4jQQu0aqq0qaRiW64D19XncpSqHhK9lcImWyIKhHs5xoicIRi5BriRBpV9BqVrt-K6t4fmyurrsmSZHTUQDgcTFdyd0YY0N0pTg21HxoCmcCKxM8VcZjumoIRd5uaLCKhUfIV9bUUG5xdM2g" style="margin-left: auto; margin-right: auto;"><img alt="" data-original-height="305" data-original-width="913" height="214" src="https://blogger.googleusercontent.com/img/a/AVvXsEhqCfW1XqnKmzVyA_lnYfyA2C7vepEWGR7XTZLF1pCKki4jQQu0aqq0qaRiW64D19XncpSqHhK9lcImWyIKhHs5xoicIRi5BriRBpV9BqVrt-K6t4fmyurrsmSZHTUQDgcTFdyd0YY0N0pTg21HxoCmcCKxM8VcZjumoIRd5uaLCKhUfIV9bUUG5xdM2g=w640-h214" width="640" /></a></td></tr><tr><td class="tr-caption" style="text-align: center;"><span style="font-family: courier;">EVGA 3060Ti FTW3 Ultra</span></td></tr></tbody></table><span style="font-family: courier;"><br /><br /></span><p></p><div class="separator" style="clear: both; text-align: center;"><br /></div><span style="font-family: courier;">The initial price of this graphics card from Nvidia was $330. This was released in February 2021. It's nearly 2 years later. I still can't find this reliably under $400 <i>new</i>. And what happened last year? How on earth did a $330 card garner a price four times higher than the MSRP?<br /><br />You really cannot point to any one thing. <br /><ul style="text-align: left;"><li>Covid happened</li><li>General microchip shortage affected all industries</li><li>Shipping issues</li><li>Crypto-mining</li><li>Inflation</li><li>Good old corporate greed</li></ul><div>These points will actually work in any areas where the cost has increased. Anyone saying one thing and one thing only is the cause of price increases is probably full of shit. If politics is involved, assume that's the default and move on. Of note, inflation really hasn't affected all things proportionately. </div><div><br /></div><div><table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto;"><tbody><tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhcjWXEPfaSVprO51wvPInotWVw3LlD0aRTxoZi1TwTzgVHhCdwfrSKSholm7KRqLWFmNROWDLnQdjMmt9MoFHPV1swkMepyjNYVS89B41wdYilkFJ0NMeguln8g0iDVDCpcoddZSoc1EcYLzURW9bYjO42_CNMWEgWyBTIN4RVfzruT4QsmQWeSOV8xQ/s1536/ever-given-moved-e1617097934892-1536x768.jpg" style="margin-left: auto; margin-right: auto;"><img border="0" data-original-height="768" data-original-width="1536" height="320" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhcjWXEPfaSVprO51wvPInotWVw3LlD0aRTxoZi1TwTzgVHhCdwfrSKSholm7KRqLWFmNROWDLnQdjMmt9MoFHPV1swkMepyjNYVS89B41wdYilkFJ0NMeguln8g0iDVDCpcoddZSoc1EcYLzURW9bYjO42_CNMWEgWyBTIN4RVfzruT4QsmQWeSOV8xQ/w640-h320/ever-given-moved-e1617097934892-1536x768.jpg" width="640" /></a></td></tr><tr><td class="tr-caption" style="text-align: center;">Not ALL the issues were from the Ever Given being stuck in the suez canal, but it didn't help 😂</td></tr></tbody></table><br /></div><div><br /></div>Here's what the MSRP for past mid-range cards looked like. A quick comparison to "high end", and an estimate of the "mid range". Take it with a grain of salt - They can price their GPUs any way they feel like. </span><div><span style="font-family: courier;"><br /><br /><google-sheets-html-origin><table border="1" cellpadding="0" cellspacing="0" dir="ltr" style="border-collapse: collapse; border: none; font-family: Arial; font-size: 10pt; table-layout: fixed; width: 0px;" xmlns="http://www.w3.org/1999/xhtml"><colgroup><col width="44"></col><col width="85"></col><col width="86"></col><col width="80"></col><col width="69"></col><col width="91"></col></colgroup><tbody><tr style="height: 21px;"><td data-sheets-value="{"1":2,"2":"Year"}" style="border: 1px solid rgb(0, 255, 0); overflow: hidden; padding: 2px 3px; text-align: center; vertical-align: bottom;">Year</td><td data-sheets-value="{"1":2,"2":"Nvidia Mid"}" style="border-color: rgb(0, 255, 0) rgb(0, 255, 0) rgb(0, 255, 0) rgb(204, 204, 204); border-image: initial; border-style: solid; border-width: 1px; overflow: hidden; padding: 2px 3px; text-align: center; vertical-align: bottom;">Nvidia Mid</td><td data-sheets-value="{"1":2,"2":"Initial Cost"}" style="border-color: rgb(0, 255, 0) rgb(0, 255, 0) rgb(0, 255, 0) rgb(204, 204, 204); border-image: initial; border-style: solid; border-width: 1px; overflow: hidden; padding: 2px 3px; text-align: center; vertical-align: bottom;">Initial Cost</td><td data-sheets-value="{"1":2,"2":"Nvidia High"}" style="border-color: rgb(0, 255, 0) rgb(0, 255, 0) rgb(0, 255, 0) rgb(204, 204, 204); border-image: initial; border-style: solid; border-width: 1px; overflow: hidden; padding: 2px 3px; text-align: center; vertical-align: bottom;">Nvidia High</td><td data-sheets-value="{"1":2,"2":"Initial Cost"}" style="border-color: rgb(0, 255, 0) rgb(0, 255, 0) rgb(0, 255, 0) rgb(204, 204, 204); border-image: initial; border-style: solid; border-width: 1px; overflow: hidden; padding: 2px 3px; text-align: center; vertical-align: bottom;">Initial Cost</td><td data-sheets-value="{"1":2,"2":"Ratio high/low"}" style="border-color: rgb(0, 255, 0) rgb(0, 255, 0) rgb(0, 255, 0) rgb(204, 204, 204); border-image: initial; border-style: solid; border-width: 1px; overflow: hidden; padding: 2px 3px; vertical-align: bottom;">Ratio high/low</td></tr><tr style="height: 21px;"><td data-sheets-value="{"1":3,"3":2015}" style="border-color: rgb(204, 204, 204) rgb(0, 255, 0) rgb(0, 255, 0); border-image: initial; border-style: solid; border-width: 1px; overflow: hidden; padding: 2px 3px; text-align: center; vertical-align: bottom;">2015</td><td data-sheets-value="{"1":2,"2":"GTX 960"}" style="border-color: rgb(204, 204, 204) rgb(0, 255, 0) rgb(0, 255, 0) rgb(204, 204, 204); border-image: initial; border-style: solid; border-width: 1px; overflow: hidden; padding: 2px 3px; text-align: center; vertical-align: bottom;">GTX 960</td><td data-sheets-numberformat="{"1":4,"2":"\"$\"#,##0","3":1}" data-sheets-value="{"1":3,"3":200}" style="border-color: rgb(204, 204, 204) rgb(0, 255, 0) rgb(0, 255, 0) rgb(204, 204, 204); border-image: initial; border-style: solid; border-width: 1px; overflow: hidden; padding: 2px 3px; text-align: center; vertical-align: bottom;">$200</td><td data-sheets-value="{"1":2,"2":"GTX 980"}" style="border-color: rgb(204, 204, 204) rgb(0, 255, 0) rgb(0, 255, 0) rgb(204, 204, 204); border-image: initial; border-style: solid; border-width: 1px; overflow: hidden; padding: 2px 3px; text-align: center; vertical-align: bottom;">GTX 980</td><td data-sheets-numberformat="{"1":4,"2":"\"$\"#,##0","3":1}" data-sheets-value="{"1":3,"3":549}" style="border-color: rgb(204, 204, 204) rgb(0, 255, 0) rgb(0, 255, 0) rgb(204, 204, 204); border-image: initial; border-style: solid; border-width: 1px; overflow: hidden; padding: 2px 3px; text-align: center; vertical-align: bottom;">$549</td><td data-sheets-formula="=R[0]C[-1]/R[0]C[-3]" data-sheets-numberformat="{"1":2,"2":"0.000"}" data-sheets-value="{"1":3,"3":2.745}" style="border-color: rgb(204, 204, 204) rgb(0, 255, 0) rgb(0, 255, 0) rgb(204, 204, 204); border-image: initial; border-style: solid; border-width: 1px; overflow: hidden; padding: 2px 3px; text-align: right; vertical-align: bottom;">2.745</td></tr><tr style="height: 21px;"><td data-sheets-value="{"1":3,"3":2017}" style="border-color: rgb(204, 204, 204) rgb(0, 255, 0) rgb(0, 255, 0); border-image: initial; border-style: solid; border-width: 1px; overflow: hidden; padding: 2px 3px; text-align: center; vertical-align: bottom;">2017</td><td data-sheets-value="{"1":2,"2":"GTX 1060"}" style="border-color: rgb(204, 204, 204) rgb(0, 255, 0) rgb(0, 255, 0) rgb(204, 204, 204); border-image: initial; border-style: solid; border-width: 1px; overflow: hidden; padding: 2px 3px; text-align: center; vertical-align: bottom;">GTX 1060</td><td data-sheets-numberformat="{"1":4,"2":"\"$\"#,##0","3":1}" data-sheets-value="{"1":3,"3":300}" style="border-color: rgb(204, 204, 204) rgb(0, 255, 0) rgb(0, 255, 0) rgb(204, 204, 204); border-image: initial; border-style: solid; border-width: 1px; overflow: hidden; padding: 2px 3px; text-align: center; vertical-align: bottom;">$300</td><td data-sheets-value="{"1":2,"2":"GTX 1080"}" style="border-color: rgb(204, 204, 204) rgb(0, 255, 0) rgb(0, 255, 0) rgb(204, 204, 204); border-image: initial; border-style: solid; border-width: 1px; overflow: hidden; padding: 2px 3px; text-align: center; vertical-align: bottom;">GTX 1080</td><td data-sheets-numberformat="{"1":4,"2":"\"$\"#,##0","3":1}" data-sheets-value="{"1":3,"3":600}" style="border-color: rgb(204, 204, 204) rgb(0, 255, 0) rgb(0, 255, 0) rgb(204, 204, 204); border-image: initial; border-style: solid; border-width: 1px; overflow: hidden; padding: 2px 3px; text-align: center; vertical-align: bottom;">$600</td><td data-sheets-formula="=R[0]C[-1]/R[0]C[-3]" data-sheets-numberformat="{"1":2,"2":"0.000"}" data-sheets-value="{"1":3,"3":2}" style="border-color: rgb(204, 204, 204) rgb(0, 255, 0) rgb(0, 255, 0) rgb(204, 204, 204); border-image: initial; border-style: solid; border-width: 1px; overflow: hidden; padding: 2px 3px; text-align: right; vertical-align: bottom;">2.000</td></tr><tr style="height: 21px;"><td data-sheets-value="{"1":3,"3":2019}" style="border-color: rgb(204, 204, 204) rgb(0, 255, 0) rgb(0, 255, 0); border-image: initial; border-style: solid; border-width: 1px; overflow: hidden; padding: 2px 3px; text-align: center; vertical-align: bottom;">2019</td><td data-sheets-value="{"1":2,"2":"GTX 2060"}" style="border-color: rgb(204, 204, 204) rgb(0, 255, 0) rgb(0, 255, 0) rgb(204, 204, 204); border-image: initial; border-style: solid; border-width: 1px; overflow: hidden; padding: 2px 3px; text-align: center; vertical-align: bottom;">GTX 2060</td><td data-sheets-numberformat="{"1":4,"2":"\"$\"#,##0","3":1}" data-sheets-value="{"1":3,"3":350}" style="border-color: rgb(204, 204, 204) rgb(0, 255, 0) rgb(0, 255, 0) rgb(204, 204, 204); border-image: initial; border-style: solid; border-width: 1px; overflow: hidden; padding: 2px 3px; text-align: center; vertical-align: bottom;">$350</td><td data-sheets-value="{"1":2,"2":"GTX 2080"}" style="border-color: rgb(204, 204, 204) rgb(0, 255, 0) rgb(0, 255, 0) rgb(204, 204, 204); border-image: initial; border-style: solid; border-width: 1px; overflow: hidden; padding: 2px 3px; text-align: center; vertical-align: bottom;">GTX 2080</td><td data-sheets-numberformat="{"1":4,"2":"\"$\"#,##0","3":1}" data-sheets-value="{"1":3,"3":700}" style="border-color: rgb(204, 204, 204) rgb(0, 255, 0) rgb(0, 255, 0) rgb(204, 204, 204); border-image: initial; border-style: solid; border-width: 1px; overflow: hidden; padding: 2px 3px; text-align: center; vertical-align: bottom;">$700</td><td data-sheets-formula="=R[0]C[-1]/R[0]C[-3]" data-sheets-numberformat="{"1":2,"2":"0.000"}" data-sheets-value="{"1":3,"3":2}" style="border-color: rgb(204, 204, 204) rgb(0, 255, 0) rgb(0, 255, 0) rgb(204, 204, 204); border-image: initial; border-style: solid; border-width: 1px; overflow: hidden; padding: 2px 3px; text-align: right; vertical-align: bottom;">2.000</td></tr><tr style="height: 21px;"><td data-sheets-value="{"1":3,"3":2021}" style="border-color: rgb(204, 204, 204) rgb(0, 255, 0) rgb(0, 255, 0); border-image: initial; border-style: solid; border-width: 1px; overflow: hidden; padding: 2px 3px; text-align: center; vertical-align: bottom;">2021</td><td data-sheets-value="{"1":2,"2":"GTX 3060"}" style="border-color: rgb(204, 204, 204) rgb(0, 255, 0) rgb(0, 255, 0) rgb(204, 204, 204); border-image: initial; border-style: solid; border-width: 1px; overflow: hidden; padding: 2px 3px; text-align: center; vertical-align: bottom;">GTX 3060</td><td data-sheets-numberformat="{"1":4,"2":"\"$\"#,##0","3":1}" data-sheets-value="{"1":3,"3":330}" style="border-color: rgb(204, 204, 204) rgb(0, 255, 0) rgb(0, 255, 0) rgb(204, 204, 204); border-image: initial; border-style: solid; border-width: 1px; overflow: hidden; padding: 2px 3px; text-align: center; vertical-align: bottom;">$330</td><td data-sheets-value="{"1":2,"2":"GTX 3080"}" style="border-color: rgb(204, 204, 204) rgb(0, 255, 0) rgb(0, 255, 0) rgb(204, 204, 204); border-image: initial; border-style: solid; border-width: 1px; overflow: hidden; padding: 2px 3px; text-align: center; vertical-align: bottom;">GTX 3080</td><td data-sheets-numberformat="{"1":4,"2":"\"$\"#,##0","3":1}" data-sheets-value="{"1":3,"3":700}" style="border-color: rgb(204, 204, 204) rgb(0, 255, 0) rgb(0, 255, 0) rgb(204, 204, 204); border-image: initial; border-style: solid; border-width: 1px; overflow: hidden; padding: 2px 3px; text-align: center; vertical-align: bottom;">$700</td><td data-sheets-formula="=R[0]C[-1]/R[0]C[-3]" data-sheets-numberformat="{"1":2,"2":"0.000"}" data-sheets-value="{"1":3,"3":2.121212121212121}" style="border-color: rgb(204, 204, 204) rgb(0, 255, 0) rgb(0, 255, 0) rgb(204, 204, 204); border-image: initial; border-style: solid; border-width: 1px; overflow: hidden; padding: 2px 3px; text-align: right; vertical-align: bottom;">2.121</td></tr><tr style="height: 21px;"><td data-sheets-value="{"1":2,"2":"2023?"}" style="border-color: rgb(204, 204, 204) rgb(0, 255, 0) rgb(0, 255, 0); border-image: initial; border-style: solid; border-width: 1px; overflow: hidden; padding: 2px 3px; text-align: center; vertical-align: bottom;">2023</td><td data-sheets-value="{"1":2,"2":"GTX 4060"}" style="border-color: rgb(204, 204, 204) rgb(0, 255, 0) rgb(0, 255, 0) rgb(204, 204, 204); border-image: initial; border-style: solid; border-width: 1px; overflow: hidden; padding: 2px 3px; text-align: center; vertical-align: bottom;">GTX 4060</td><td data-sheets-value="{"1":2,"2":"???"}" style="border-color: rgb(204, 204, 204) rgb(0, 255, 0) rgb(0, 255, 0) rgb(204, 204, 204); border-image: initial; border-style: solid; border-width: 1px; overflow: hidden; padding: 2px 3px; text-align: center; vertical-align: bottom;">???</td><td data-sheets-value="{"1":2,"2":"GTX 4080"}" style="border-color: rgb(204, 204, 204) rgb(0, 255, 0) rgb(0, 255, 0) rgb(204, 204, 204); border-image: initial; border-style: solid; border-width: 1px; overflow: hidden; padding: 2px 3px; text-align: center; vertical-align: bottom;">GTX 4080</td><td data-sheets-numberformat="{"1":4,"2":"\"$\"#,##0","3":1}" data-sheets-value="{"1":3,"3":1200}" style="border-color: rgb(204, 204, 204) rgb(0, 255, 0) rgb(0, 255, 0) rgb(204, 204, 204); border-image: initial; border-style: solid; border-width: 1px; overflow: hidden; padding: 2px 3px; text-align: center; vertical-align: bottom;">$1,200</td><td style="border-color: rgb(204, 204, 204) rgb(0, 255, 0) rgb(0, 255, 0) rgb(204, 204, 204); border-image: initial; border-style: solid; border-width: 1px; overflow: hidden; padding: 2px 3px; vertical-align: bottom;"></td></tr><tr style="height: 21px;"><td colspan="2" data-sheets-value="{"1":2,"2":"high to low average"}" rowspan="1" style="border-color: rgb(204, 204, 204) rgb(0, 255, 0) rgb(0, 255, 0); border-image: initial; border-style: solid; border-width: 1px; overflow: hidden; padding: 2px 3px; vertical-align: bottom;">high to low average</td><td colspan="4" data-sheets-formula="=AVERAGE(R[-5]C[3]:R[-2]C[3])" data-sheets-numberformat="{"1":2,"2":"0.000"}" data-sheets-value="{"1":3,"3":2.2165530303030305}" rowspan="1" style="border-color: rgb(204, 204, 204) rgb(0, 255, 0) rgb(0, 255, 0) rgb(204, 204, 204); border-image: initial; border-style: solid; border-width: 1px; overflow: hidden; padding: 2px 3px; vertical-align: bottom;">2.217</td></tr><tr style="height: 21px;"><td colspan="2" data-sheets-value="{"1":2,"2":"estimated 4060 price"}" rowspan="1" style="border-color: rgb(204, 204, 204) rgb(0, 255, 0) rgb(0, 255, 0); border-image: initial; border-style: solid; border-width: 1px; overflow: hidden; padding: 2px 3px; vertical-align: bottom;">estimated 4060 price</td><td colspan="4" data-sheets-formula="=R[-2]C[2]/R[-1]C[0]" data-sheets-numberformat="{"1":4,"2":"\"$\"#,##0","3":1}" data-sheets-value="{"1":3,"3":541.3811371054564}" rowspan="1" style="border-color: rgb(204, 204, 204) rgb(0, 255, 0) rgb(0, 255, 0) rgb(204, 204, 204); border-image: initial; border-style: solid; border-width: 1px; overflow: hidden; padding: 2px 3px; vertical-align: bottom;">$541</td></tr></tbody></table></google-sheets-html-origin><br /><br /><google-sheets-html-origin><table border="1" cellpadding="0" cellspacing="0" dir="ltr" style="border-collapse: collapse; border: none; font-family: Arial; font-size: 10pt; table-layout: fixed; width: 0px;" xmlns="http://www.w3.org/1999/xhtml"><colgroup><col width="44"></col><col width="85"></col><col width="86"></col><col width="80"></col><col width="69"></col><col width="91"></col></colgroup><tbody><tr style="height: 21px;"><td data-sheets-value="{"1":2,"2":"Year"}" style="border: 1px solid rgb(255, 0, 0); overflow: hidden; padding: 2px 3px; text-align: center; vertical-align: bottom;">Year</td><td data-sheets-value="{"1":2,"2":"AMD Mid"}" style="border-color: rgb(255, 0, 0) rgb(255, 0, 0) rgb(255, 0, 0) rgb(204, 204, 204); border-image: initial; border-style: solid; border-width: 1px; overflow: hidden; padding: 2px 3px; text-align: center; vertical-align: bottom;">AMD Mid</td><td data-sheets-value="{"1":2,"2":"Initial Cost"}" style="border-color: rgb(255, 0, 0) rgb(255, 0, 0) rgb(255, 0, 0) rgb(204, 204, 204); border-image: initial; border-style: solid; border-width: 1px; overflow: hidden; padding: 2px 3px; text-align: center; vertical-align: bottom;">Initial Cost</td><td data-sheets-value="{"1":2,"2":"AMD High"}" style="border-color: rgb(255, 0, 0) rgb(255, 0, 0) rgb(255, 0, 0) rgb(204, 204, 204); border-image: initial; border-style: solid; border-width: 1px; overflow: hidden; padding: 2px 3px; text-align: center; vertical-align: bottom;">AMD High</td><td data-sheets-value="{"1":2,"2":"Initial Cost"}" style="border-color: rgb(255, 0, 0) rgb(255, 0, 0) rgb(255, 0, 0) rgb(204, 204, 204); border-image: initial; border-style: solid; border-width: 1px; overflow: hidden; padding: 2px 3px; text-align: center; vertical-align: bottom;">Initial Cost</td><td data-sheets-value="{"1":2,"2":"Ratio high/low"}" style="border-color: rgb(255, 0, 0) rgb(255, 0, 0) rgb(255, 0, 0) rgb(204, 204, 204); border-image: initial; border-style: solid; border-width: 1px; overflow: hidden; padding: 2px 3px; vertical-align: bottom;">Ratio high/low</td></tr><tr style="height: 21px;"><td data-sheets-value="{"1":3,"3":2015}" style="border-color: rgb(204, 204, 204) rgb(255, 0, 0) rgb(255, 0, 0); border-image: initial; border-style: solid; border-width: 1px; overflow: hidden; padding: 2px 3px; text-align: center; vertical-align: bottom;">2015</td><td data-sheets-value="{"1":2,"2":"RX 480"}" style="border-color: rgb(204, 204, 204) rgb(255, 0, 0) rgb(255, 0, 0) rgb(204, 204, 204); border-image: initial; border-style: solid; border-width: 1px; overflow: hidden; padding: 2px 3px; text-align: center; vertical-align: bottom;">RX 480</td><td data-sheets-numberformat="{"1":4,"2":"\"$\"#,##0","3":1}" data-sheets-value="{"1":3,"3":200}" style="border-color: rgb(204, 204, 204) rgb(255, 0, 0) rgb(255, 0, 0) rgb(204, 204, 204); border-image: initial; border-style: solid; border-width: 1px; overflow: hidden; padding: 2px 3px; text-align: center; vertical-align: bottom;">$200</td><td data-sheets-value="{"1":2,"2":"--"}" style="border-color: rgb(204, 204, 204) rgb(255, 0, 0) rgb(255, 0, 0) rgb(204, 204, 204); border-image: initial; border-style: solid; border-width: 1px; overflow: hidden; padding: 2px 3px; text-align: center; vertical-align: bottom;">--</td><td style="border-color: rgb(204, 204, 204) rgb(255, 0, 0) rgb(255, 0, 0) rgb(204, 204, 204); border-image: initial; border-style: solid; border-width: 1px; overflow: hidden; padding: 2px 3px; vertical-align: bottom;"></td><td data-sheets-numberformat="{"1":2,"2":"0.000"}" style="border-color: rgb(204, 204, 204) rgb(255, 0, 0) rgb(255, 0, 0) rgb(204, 204, 204); border-image: initial; border-style: solid; border-width: 1px; overflow: hidden; padding: 2px 3px; vertical-align: bottom;"></td></tr><tr style="height: 21px;"><td data-sheets-value="{"1":3,"3":2017}" style="border-color: rgb(204, 204, 204) rgb(255, 0, 0) rgb(255, 0, 0); border-image: initial; border-style: solid; border-width: 1px; overflow: hidden; padding: 2px 3px; text-align: center; vertical-align: bottom;">2017</td><td data-sheets-value="{"1":2,"2":"RX 580"}" style="border-color: rgb(204, 204, 204) rgb(255, 0, 0) rgb(255, 0, 0) rgb(204, 204, 204); border-image: initial; border-style: solid; border-width: 1px; overflow: hidden; padding: 2px 3px; text-align: center; vertical-align: bottom;">RX 580</td><td data-sheets-numberformat="{"1":4,"2":"\"$\"#,##0","3":1}" data-sheets-value="{"1":3,"3":230}" style="border-color: rgb(204, 204, 204) rgb(255, 0, 0) rgb(255, 0, 0) rgb(204, 204, 204); border-image: initial; border-style: solid; border-width: 1px; overflow: hidden; padding: 2px 3px; text-align: center; vertical-align: bottom;">$230</td><td data-sheets-value="{"1":2,"2":"Vega 64"}" style="border-color: rgb(204, 204, 204) rgb(255, 0, 0) rgb(255, 0, 0) rgb(204, 204, 204); border-image: initial; border-style: solid; border-width: 1px; overflow: hidden; padding: 2px 3px; text-align: center; vertical-align: bottom;">Vega 64</td><td data-sheets-numberformat="{"1":4,"2":"\"$\"#,##0","3":1}" data-sheets-value="{"1":3,"3":500}" style="border-color: rgb(204, 204, 204) rgb(255, 0, 0) rgb(255, 0, 0) rgb(204, 204, 204); border-image: initial; border-style: solid; border-width: 1px; overflow: hidden; padding: 2px 3px; text-align: center; vertical-align: bottom;">$500</td><td data-sheets-formula="=R[0]C[-1]/R[0]C[-3]" data-sheets-numberformat="{"1":2,"2":"0.000"}" data-sheets-value="{"1":3,"3":2.1739130434782608}" style="border-color: rgb(204, 204, 204) rgb(255, 0, 0) rgb(255, 0, 0) rgb(204, 204, 204); border-image: initial; border-style: solid; border-width: 1px; overflow: hidden; padding: 2px 3px; text-align: right; vertical-align: bottom;">2.174</td></tr><tr style="height: 21px;"><td data-sheets-value="{"1":3,"3":2019}" style="border-color: rgb(204, 204, 204) rgb(255, 0, 0) rgb(255, 0, 0); border-image: initial; border-style: solid; border-width: 1px; overflow: hidden; padding: 2px 3px; text-align: center; vertical-align: bottom;">2019</td><td data-sheets-value="{"1":2,"2":"RX 5600"}" style="border-color: rgb(204, 204, 204) rgb(255, 0, 0) rgb(255, 0, 0) rgb(204, 204, 204); border-image: initial; border-style: solid; border-width: 1px; overflow: hidden; padding: 2px 3px; text-align: center; vertical-align: bottom;">RX 5600</td><td data-sheets-numberformat="{"1":4,"2":"\"$\"#,##0","3":1}" data-sheets-value="{"1":3,"3":280}" style="border-color: rgb(204, 204, 204) rgb(255, 0, 0) rgb(255, 0, 0) rgb(204, 204, 204); border-image: initial; border-style: solid; border-width: 1px; overflow: hidden; padding: 2px 3px; text-align: center; vertical-align: bottom;">$280</td><td data-sheets-value="{"1":2,"2":"RX 5700 XT"}" style="border-color: rgb(204, 204, 204) rgb(255, 0, 0) rgb(255, 0, 0) rgb(204, 204, 204); border-image: initial; border-style: solid; border-width: 1px; overflow: hidden; padding: 2px 3px; text-align: center; vertical-align: bottom;">RX 5700 XT</td><td data-sheets-numberformat="{"1":4,"2":"\"$\"#,##0","3":1}" data-sheets-value="{"1":3,"3":400}" style="border-color: rgb(204, 204, 204) rgb(255, 0, 0) rgb(255, 0, 0) rgb(204, 204, 204); border-image: initial; border-style: solid; border-width: 1px; overflow: hidden; padding: 2px 3px; text-align: center; vertical-align: bottom;">$400</td><td data-sheets-formula="=R[0]C[-1]/R[0]C[-3]" data-sheets-numberformat="{"1":2,"2":"0.000"}" data-sheets-value="{"1":3,"3":1.4285714285714286}" style="border-color: rgb(204, 204, 204) rgb(255, 0, 0) rgb(255, 0, 0) rgb(204, 204, 204); border-image: initial; border-style: solid; border-width: 1px; overflow: hidden; padding: 2px 3px; text-align: right; vertical-align: bottom;">1.429</td></tr><tr style="height: 21px;"><td data-sheets-value="{"1":3,"3":2021}" style="border-color: rgb(204, 204, 204) rgb(255, 0, 0) rgb(255, 0, 0); border-image: initial; border-style: solid; border-width: 1px; overflow: hidden; padding: 2px 3px; text-align: center; vertical-align: bottom;">2021</td><td data-sheets-value="{"1":2,"2":"RX 6600"}" style="border-color: rgb(204, 204, 204) rgb(255, 0, 0) rgb(255, 0, 0) rgb(204, 204, 204); border-image: initial; border-style: solid; border-width: 1px; overflow: hidden; padding: 2px 3px; text-align: center; vertical-align: bottom;">RX 6600</td><td data-sheets-numberformat="{"1":4,"2":"\"$\"#,##0","3":1}" data-sheets-value="{"1":3,"3":330}" style="border-color: rgb(204, 204, 204) rgb(255, 0, 0) rgb(255, 0, 0) rgb(204, 204, 204); border-image: initial; border-style: solid; border-width: 1px; overflow: hidden; padding: 2px 3px; text-align: center; vertical-align: bottom;">$330</td><td data-sheets-value="{"1":2,"2":"RX 6800"}" style="border-color: rgb(204, 204, 204) rgb(255, 0, 0) rgb(255, 0, 0) rgb(204, 204, 204); border-image: initial; border-style: solid; border-width: 1px; overflow: hidden; padding: 2px 3px; text-align: center; vertical-align: bottom;">RX 6800</td><td data-sheets-numberformat="{"1":4,"2":"\"$\"#,##0","3":1}" data-sheets-value="{"1":3,"3":580}" style="border-color: rgb(204, 204, 204) rgb(255, 0, 0) rgb(255, 0, 0) rgb(204, 204, 204); border-image: initial; border-style: solid; border-width: 1px; overflow: hidden; padding: 2px 3px; text-align: center; vertical-align: bottom;">$580</td><td data-sheets-formula="=R[0]C[-1]/R[0]C[-3]" data-sheets-numberformat="{"1":2,"2":"0.000"}" data-sheets-value="{"1":3,"3":1.7575757575757576}" style="border-color: rgb(204, 204, 204) rgb(255, 0, 0) rgb(255, 0, 0) rgb(204, 204, 204); border-image: initial; border-style: solid; border-width: 1px; overflow: hidden; padding: 2px 3px; text-align: right; vertical-align: bottom;">1.758</td></tr><tr style="height: 21px;"><td data-sheets-value="{"1":2,"2":"2023?"}" style="border-color: rgb(204, 204, 204) rgb(255, 0, 0) rgb(255, 0, 0); border-image: initial; border-style: solid; border-width: 1px; overflow: hidden; padding: 2px 3px; text-align: center; vertical-align: bottom;">2023</td><td data-sheets-value="{"1":2,"2":"RX 7600"}" style="border-color: rgb(204, 204, 204) rgb(255, 0, 0) rgb(255, 0, 0) rgb(204, 204, 204); border-image: initial; border-style: solid; border-width: 1px; overflow: hidden; padding: 2px 3px; text-align: center; vertical-align: bottom;">RX 7600</td><td data-sheets-value="{"1":2,"2":"???"}" style="border-color: rgb(204, 204, 204) rgb(255, 0, 0) rgb(255, 0, 0) rgb(204, 204, 204); border-image: initial; border-style: solid; border-width: 1px; overflow: hidden; padding: 2px 3px; text-align: center; vertical-align: bottom;">???</td><td data-sheets-value="{"1":2,"2":"RX 7900 XT"}" style="border-color: rgb(204, 204, 204) rgb(255, 0, 0) rgb(255, 0, 0) rgb(204, 204, 204); border-image: initial; border-style: solid; border-width: 1px; overflow: hidden; padding: 2px 3px; text-align: center; vertical-align: bottom;">RX 7900 XT</td><td data-sheets-numberformat="{"1":4,"2":"\"$\"#,##0","3":1}" data-sheets-value="{"1":3,"3":900}" style="border-color: rgb(204, 204, 204) rgb(255, 0, 0) rgb(255, 0, 0) rgb(204, 204, 204); border-image: initial; border-style: solid; border-width: 1px; overflow: hidden; padding: 2px 3px; text-align: center; vertical-align: bottom;">$900</td><td data-sheets-numberformat="{"1":2,"2":"0.000"}" style="border-color: rgb(204, 204, 204) rgb(255, 0, 0) rgb(255, 0, 0) rgb(204, 204, 204); border-image: initial; border-style: solid; border-width: 1px; overflow: hidden; padding: 2px 3px; vertical-align: bottom;"></td></tr><tr style="height: 21px;"><td colspan="2" data-sheets-value="{"1":2,"2":"high to low average"}" rowspan="1" style="border-color: rgb(204, 204, 204) rgb(255, 0, 0) rgb(255, 0, 0); border-image: initial; border-style: solid; border-width: 1px; overflow: hidden; padding: 2px 3px; vertical-align: bottom;">high to low average</td><td colspan="4" data-sheets-formula="=AVERAGE(R[-5]C[3]:R[-2]C[3])" data-sheets-numberformat="{"1":2,"2":"0.000"}" data-sheets-value="{"1":3,"3":1.7866867432084825}" rowspan="1" style="border-color: rgb(204, 204, 204) rgb(255, 0, 0) rgb(255, 0, 0) rgb(204, 204, 204); border-image: initial; border-style: solid; border-width: 1px; overflow: hidden; padding: 2px 3px; vertical-align: bottom;">1.787</td></tr><tr style="height: 21px;"><td colspan="2" data-sheets-value="{"1":2,"2":"estimated 7600 price"}" rowspan="1" style="border-color: rgb(204, 204, 204) rgb(255, 0, 0) rgb(255, 0, 0); border-image: initial; border-style: solid; border-width: 1px; overflow: hidden; padding: 2px 3px; vertical-align: bottom;">estimated 7600 price</td><td colspan="4" data-sheets-formula="=R[-2]C[2]/R[-1]C[0]" data-sheets-numberformat="{"1":4,"2":"\"$\"#,##0","3":1}" data-sheets-value="{"1":3,"3":503.7256829833555}" rowspan="1" style="border-color: rgb(204, 204, 204) rgb(255, 0, 0) rgb(255, 0, 0) rgb(204, 204, 204); border-image: initial; border-style: solid; border-width: 1px; overflow: hidden; padding: 2px 3px; vertical-align: bottom;">$504</td></tr></tbody></table></google-sheets-html-origin><br /><br />**to be fair, I'm using the Radeon 7900 which is technically above the "high tier" 7800 - but that's only because there is no 7800 yet, AMD decided 2 new extreme tier 7900 versions was a better idea...<br /><br />Shortly into the 1060/580 release, crypto-mining took off and prices skyrocketed. I got "lucky" getting a 1060 3GB (yuck) for $300. The MSRPs for the Nvidia 20 series and AMD 5000 series were like a practical joke. Cost only really started dropping recently with the change of a major cryptocurrency (Etherium) moving to "proof-of-stake". This had security and validation in mind for the cryptocurrency but mining was no longer profitable (yay). Do note, the crypto-market is in freefall. Unsure if this is simply compounded by moves like that.</span></div><div><span style="font-family: courier;"><br /></span></div><div><span style="font-family: courier;">So today (end of 2022), there's a flood of second-hand cards for sale. A card from 2 years ago selling second-hand for over the initial MSRP is ridiculous - yet, that's the rule.</span></div><div><span style="font-family: courier;"><br /></span></div><div><span style="font-family: courier;">At this point, looking at amazon, the 3060 is going for $370 at least, with most over $400. This seems to be "normal" for Nvidia's product line. The 3080 is $800-$1400, and the 3090 is $1400-$1900.</span></div><div><span style="font-family: courier;"><br /></span></div><div><span style="font-family: courier;">The AMD 6600 is going for as low as $230 - from several vendors. The 3060 is faster overall but it's not <i>huge</i>. Lower single-digit percent change there. Ray tracing makes a bigger difference between the two, but for a lot of people, these cards won't be effective ray-tracing cards anyway. The rest of AMD's product stack is similar, where matching price with Nvidia results in much higher performance levels - up to the point where AMD's cards hit their limit. The XFX 6900 XT is available from $650 now and is about parity with Nvidia's 3080 - not the 3080 OC or Ti or other variants.</span></div><div><span style="font-family: courier;"><br /></span></div><div><span style="font-family: courier;">Perhaps this performance advantage led to Nvidia making a massive space heater of a GPU which necessitated a new power delivery plug (there were fires!). Maybe their thinking was they should get so far ahead of the competition that it would hurt them. They set an MSRP for this insanity at $1600, and prices soared - the "Founders Edition" hit $3350. The Nvidia store is selling this monstrosity for $2450 now, so they're quite complicit with scalpers. They introduced a cheaper version of the card - a 4080 - MSRP of $1200. These prices have gone full crazy now. Normally you pay a premium to get a little more speed, but now you're getting much less with the "lower-end" card. Simply put, the drop in price is less than the drop in performance, making the 4090 a "better buy". This is how a company tries to milk its customers.</span></div><div><span style="font-family: courier;"><br /></span></div><div><span style="font-family: courier;">AMD's next generation part to compete with the 4000 series is the 7900xtx and 7900xt. The 7900xtx can compare with the 4080 (perhaps not with raytracing) and the MSRP comes in at $1000. OK - that's still <i>well above</i> what the high-end used to cost. The 7900xt is $900. Lose 10% of the cost, and about 17% the speed - a worse buy? A page from Nvidia's playbook?</span></div><div><span style="font-family: courier;"><br /></span></div><div><span style="font-family: courier;">In the past, the high-end was about double the cost of the mid-tier. If the high end is going for $1600, we may just see ludicrous MSRP pricing at the mid-tier, even before price gouging, scalping, etc.</span></div><div><span style="font-family: courier;"><br /></span></div><div><span style="font-family: courier;">Bottom line? Prices are still crazy, and the companies making the cards are setting nonsense prices to goad users into spending for top-tier GPUs. The habit of not producing mid-range cards as well to push customers to buy the high-end is relatively recent. It's been happening for several years, but that's only the last few product lines. How do we get around it? Jump ship. AMD's prices are more reasonable even if they are trying the same thing. </span></div><div><span style="font-family: courier;"><br /></span></div><div><span style="font-family: courier;">The new GPUs are priced so high, the old GPUs aren't going to drop in cost until mid-range models come out - and only if mid-range GPUs are given mid-range prices. It doesn't feel like an improvement over the last generation, but an expensive extension of it.</span></div><div><span style="font-family: courier;"><br /></span></div><div><span style="font-family: courier;">Buy older higher tier cards until the cost drops. Get second-hand cards if you can trust the seller. Hit them where it hurts. Hit their wallets.</span></div><div><span style="font-family: courier;"><br /></span></div><div><span style="font-family: courier;">Addendum - another thought: We're paying for a feature that we just weren't quite ready for. We have 4k monitors and we have fast refresh-rate monitors. But we barely have graphics cards that can do both with ray tracing turned on. Even current budget cards will give us excellent frame rates at 2560x1440. But if a $600 graphics card is struggling to do that with ray tracing turned on (maybe not in all games) maybe that feature is a little beyond common mainstream. No one should be paying $1000+ for gaming hardware that would be outdated in a few years. GPUs shouldn't brute force their way into getting something done expending this much power and heat.</span></div><div><p></p></div>Beomagihttp://www.blogger.com/profile/00469223835355067867noreply@blogger.com0tag:blogger.com,1999:blog-2974094041951992980.post-25658174680986060612022-03-27T12:09:00.001-07:002022-03-27T12:11:03.997-07:00Headphones 3 : Moar!<h2 style="text-align: left;"><span style="font-family: courier;">Heavy modding:</span></h2><p><span style="font-family: courier;"> I've been quite pleased with my headphones so far. Especially those I've made using titanium drivers. I had a relatively high-quality "tesla" driver available that I believe is even higher quality than the <a href="https://beomagi.blogspot.com/2022/03/headphones-part-two.html" rel="nofollow" target="_blank">last "tesla" driver I used</a>. The outer casing is anodized metal. </span></p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgJv3894KuoS8qFmxo-uvPcDPfehqxy_TwfC2uzuELWX3x8jqtQwwfxj-bezLXqRlegNSDBwNVfS08N2On6kb8XIqejUdqlgmdLKhG9HRzAfED1oOyx7lOo-pVvO3hjQL4QXo2zaE4FXSfQcH5NXHa_iz65a7oPSPrXpRTQ8hA7YZrkPHVpBjissZBfJg/s742/GHXAMP-40mm-Subwoofer-Headphone-Unit-32Ohm-Headset-Speaker-Driver-118dB-W-Blue-No-Grain-Tesla-Magnetic.jpg_Q90.jpg_%20(1).jpg" style="margin-left: 1em; margin-right: 1em;"><span style="font-family: courier;"><img border="0" data-original-height="451" data-original-width="742" height="390" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgJv3894KuoS8qFmxo-uvPcDPfehqxy_TwfC2uzuELWX3x8jqtQwwfxj-bezLXqRlegNSDBwNVfS08N2On6kb8XIqejUdqlgmdLKhG9HRzAfED1oOyx7lOo-pVvO3hjQL4QXo2zaE4FXSfQcH5NXHa_iz65a7oPSPrXpRTQ8hA7YZrkPHVpBjissZBfJg/w640-h390/GHXAMP-40mm-Subwoofer-Headphone-Unit-32Ohm-Headset-Speaker-Driver-118dB-W-Blue-No-Grain-Tesla-Magnetic.jpg_Q90.jpg_%20(1).jpg" width="640" /></span></a></div><div class="separator" style="clear: both; text-align: center;"><span style="font-family: courier;"><br /></span></div><p><span style="font-family: courier;">Hmm, what shall I do with this one? I do have a rather ragged Symphonized headset...</span></p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiJfJb1ZGENyX9uQ5pvl9eKMjdAFyXv8HmKbMSmCKaJbOa2KLzyxddwVJGmW6CXH2QIZd6VQ0j8Wb8xbqdztgWkk8-yN-WohVeULgGJmiyaWsUnm4m8tYJnWa8BVrrEhYzD26IhNhphklbBB9TNQP3cAxndwsGuAtUSof5Y5Z4el9hSOjAM-xFPboCieA/s499/image.png" style="margin-left: 1em; margin-right: 1em;"><span style="font-family: courier;"><img border="0" data-original-height="499" data-original-width="394" height="640" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiJfJb1ZGENyX9uQ5pvl9eKMjdAFyXv8HmKbMSmCKaJbOa2KLzyxddwVJGmW6CXH2QIZd6VQ0j8Wb8xbqdztgWkk8-yN-WohVeULgGJmiyaWsUnm4m8tYJnWa8BVrrEhYzD26IhNhphklbBB9TNQP3cAxndwsGuAtUSof5Y5Z4el9hSOjAM-xFPboCieA/w506-h640/image.png" width="506" /></span></a></div><p><span style="font-family: courier;">My next pair of headphones is now obvious. I've always liked the build quality of this headset. It's not <i>really</i> solid metal. it's not really thick, and there's plastic in the cup's walls. That said, the headband, the sliding mechanism, and stirrup are all steel, and have decent flex. It's not something I'd worry about being unable to take a beating. The main reason I used this headset over my others in the past, was comfort - not sound quality.</span></p><p><span style="font-family: courier;"><br /></span></p><h2 style="text-align: left;"><span style="font-family: courier;">Let's Build!</span></h2><p><span style="font-family: courier;">I started with my pair minus the torn earpads. </span></p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjG2uKp_dXNLsYHqKHdd_PfEJvATfI3SG0fgOU6BRB3Z1okeqgcU1zSiCWVpt-tkMdpqhBrUsFzLllmRJCnZpHBy1L4udWWgiMk7KiGmfmk3mJmuPKq2wEBhfhAWkNaM3_bwckijoABEpJ_UchPVwAWZ_0jr_Hxu-l0YWSiWouyItqwX-BXwXDpRhz9EQ/s4616/W3236098.JPG" style="margin-left: 1em; margin-right: 1em;"><span style="font-family: courier;"><img border="0" data-original-height="3464" data-original-width="4616" height="480" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjG2uKp_dXNLsYHqKHdd_PfEJvATfI3SG0fgOU6BRB3Z1okeqgcU1zSiCWVpt-tkMdpqhBrUsFzLllmRJCnZpHBy1L4udWWgiMk7KiGmfmk3mJmuPKq2wEBhfhAWkNaM3_bwckijoABEpJ_UchPVwAWZ_0jr_Hxu-l0YWSiWouyItqwX-BXwXDpRhz9EQ/w640-h480/W3236098.JPG" width="640" /></span></a></div><p><span style="font-family: courier;">I've had this a few years, and it still looks great. Time to make this muffled mess sound better 😁</span></p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjeD9HujtpiSZGWmcGuSRlbej9RoCZCSMlVEu3T-En2RziYVaqKYoRtO0o6_P-wNmKPYRnZumJGbw5JmP1m3DaItYRdzMTibARoALcLMb8mWkINaPNjXlKIvAS2-hDCLlj5bha2-RgzXS_2bR_Rqswfpu5jGs3ikpwi3zfqXEu5SZ-C2Y2dcSSIqGYKFQ/s4616/W3236099.JPG" style="margin-left: 1em; margin-right: 1em;"><span style="font-family: courier;"><img border="0" data-original-height="3464" data-original-width="4616" height="480" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjeD9HujtpiSZGWmcGuSRlbej9RoCZCSMlVEu3T-En2RziYVaqKYoRtO0o6_P-wNmKPYRnZumJGbw5JmP1m3DaItYRdzMTibARoALcLMb8mWkINaPNjXlKIvAS2-hDCLlj5bha2-RgzXS_2bR_Rqswfpu5jGs3ikpwi3zfqXEu5SZ-C2Y2dcSSIqGYKFQ/w640-h480/W3236099.JPG" width="640" /></span></a></div><p><span style="font-family: courier;">I twisted it to display the speaker side. I'm removing that entire baffle, and of course, replacing the speaker. I'll use a larger plastic baffle for a bigger more comfortable pad too.</span></p><p><span style="font-family: courier;"><br /></span></p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEguh18VFa2f1n1Nu4Jc2Gv03WTTyNRTUGtruOVKinUl-d05EGihrDBXQd0eOTRQLclQ59n7-lEkbSi4MzPPHkIWpUnEQU5Cju50MgbGxyAh1a1TwzmYviua9rvLf-yvnvzKbTBgqoS_LiV0PADuwFeNL_IiiHb3XilwzAhSg7hhWOdJX_1SF6k9L5vl_g/s4616/W3236100.JPG" style="margin-left: 1em; margin-right: 1em;"><span style="font-family: courier;"><img border="0" data-original-height="4616" data-original-width="3464" height="640" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEguh18VFa2f1n1Nu4Jc2Gv03WTTyNRTUGtruOVKinUl-d05EGihrDBXQd0eOTRQLclQ59n7-lEkbSi4MzPPHkIWpUnEQU5Cju50MgbGxyAh1a1TwzmYviua9rvLf-yvnvzKbTBgqoS_LiV0PADuwFeNL_IiiHb3XilwzAhSg7hhWOdJX_1SF6k9L5vl_g/w480-h640/W3236100.JPG" width="480" /></span></a></div><p><span style="font-family: courier;">Sticking with Kydex. Easy to cut, and I like the patterned finish I get on the sheets. Durable as hell too.</span></p><p><span style="font-family: courier;"><br /></span></p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj9nIiWiElAivur4FSZ1dxoo8s1Hvw1AlYorArY4m1dSVDdmRmrL-O6VmMLtWUvUZBdOxxfDzYLx9bx5f7fnE2WFk5e-7uJHFrEPbyWxNdjyJgYfNBQGKe32_Fv0C9RGApgWo5BYHvsswEk7Rnz3ig7V5bD3tvEQdXHjUSI0VHsTH8PQsh4ztNlWqLHrw/s4616/W3236103.JPG" style="margin-left: 1em; margin-right: 1em;"><span style="font-family: courier;"><img border="0" data-original-height="3464" data-original-width="4616" height="480" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj9nIiWiElAivur4FSZ1dxoo8s1Hvw1AlYorArY4m1dSVDdmRmrL-O6VmMLtWUvUZBdOxxfDzYLx9bx5f7fnE2WFk5e-7uJHFrEPbyWxNdjyJgYfNBQGKe32_Fv0C9RGApgWo5BYHvsswEk7Rnz3ig7V5bD3tvEQdXHjUSI0VHsTH8PQsh4ztNlWqLHrw/w640-h480/W3236103.JPG" width="640" /></span></a></div><p><span style="font-family: courier;">I started by measuring the diagonal of the 4 holes. I drew a circle on the baffle I cut using that as the diameter. Next, I clamped the original baffle down so that I could see the drawn circle on the new baffle through all 4 holes. With that, it was aligned. I drilled the 4 holes that would bolt this new baffle to the cup.</span></p><p><span style="font-family: courier;"><br /></span></p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiMqvnRSTKrt2yHFePrhTTkteg6IYmGvzJxjw5-AUtv9dlLk9_Hw-NE6HcRqef7n_UANyDwKGIKRjlwPzR7knxeHN8AwuVxixAURbFRd-_2PEfMBppcnnkB8S2Ef_UoablVhljp8mgZymbO-vv2PGAuzh_5A5NjRIyORbWhgoRv_7ynUSgtOUtuKX32HQ/s4616/W3236105.JPG" style="margin-left: 1em; margin-right: 1em;"><span style="font-family: courier;"><img border="0" data-original-height="3464" data-original-width="4616" height="480" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiMqvnRSTKrt2yHFePrhTTkteg6IYmGvzJxjw5-AUtv9dlLk9_Hw-NE6HcRqef7n_UANyDwKGIKRjlwPzR7knxeHN8AwuVxixAURbFRd-_2PEfMBppcnnkB8S2Ef_UoablVhljp8mgZymbO-vv2PGAuzh_5A5NjRIyORbWhgoRv_7ynUSgtOUtuKX32HQ/w640-h480/W3236105.JPG" width="640" /></span></a></div><p><span style="font-family: courier;">Now that I have the baffle that bolts to the cup, I need to attach the speakers. I drew another circle, 50mm in diameter, and used that to estimate where I'd drill 4 more holes.</span></p><p><span style="font-family: courier;"><br /></span></p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhuNwCcpQFSfy303IB9icOnhnmXwhImqVbv3TxIab3f4YouhhKVJcVUL5J-tpGSCt8UvpkoEkPVZ8ZJ7niNSnOY1Rg7mrEgw5YRREuFhikQ56lOs0LIcMEKP1akagCThtXt5NqWokIfwJQLZ7yBeu-HdtUmmcmJvjloD4252794NncUNmbOpbwQviRIOQ/s4616/W3236106.JPG" style="margin-left: 1em; margin-right: 1em;"><span style="font-family: courier;"><img border="0" data-original-height="3464" data-original-width="4616" height="480" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhuNwCcpQFSfy303IB9icOnhnmXwhImqVbv3TxIab3f4YouhhKVJcVUL5J-tpGSCt8UvpkoEkPVZ8ZJ7niNSnOY1Rg7mrEgw5YRREuFhikQ56lOs0LIcMEKP1akagCThtXt5NqWokIfwJQLZ7yBeu-HdtUmmcmJvjloD4252794NncUNmbOpbwQviRIOQ/w640-h480/W3236106.JPG" width="640" /></span></a></div><p><span style="font-family: courier;">After drilling holes to fasten the speaker, I needed to either drill a big hole and fasten a speaker grill, or fashion my own. I opted for the latter, drilling out a pattern within the 50mm circle's perimeter.</span></p><p><span style="font-family: courier;"><br /></span></p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj4vuR6KxhrIH3t8kOzAKMRqyzCU3ld7vOTBF61amiKQbGtu2lwx5_OzTm1-sz8WSnValulIFd21Wttny-oKb6iEAJcgy6DhZa_pO9t58MIE87jGcxfpADls0da1nRctU6jRd8cq62To6kkMocQzoIQeMSmJK5FVeNzVZ3GdWomGKnkk-72PW-g5YBnJg/s4616/W3236107.JPG" style="margin-left: 1em; margin-right: 1em;"><span style="font-family: courier;"><img border="0" data-original-height="3464" data-original-width="4616" height="480" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj4vuR6KxhrIH3t8kOzAKMRqyzCU3ld7vOTBF61amiKQbGtu2lwx5_OzTm1-sz8WSnValulIFd21Wttny-oKb6iEAJcgy6DhZa_pO9t58MIE87jGcxfpADls0da1nRctU6jRd8cq62To6kkMocQzoIQeMSmJK5FVeNzVZ3GdWomGKnkk-72PW-g5YBnJg/w640-h480/W3236107.JPG" width="640" /></span></a></div><p><span style="font-family: courier;">I turned my attention to the cups now. I <i>could </i>leave this closed-back, but from all the drivers I've used, it just seems that sound fidelity suffers this way. I could always reduce the hole's effect covering up from inside, so wanting to go back to "closed" remains an option.</span></p><p><span style="font-family: courier;"><br /></span></p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgRsS4FdFqKa1aa_hGR1KpdHy3n9uQ62EnAyple549WjZUGe6jXmpYyV-fE8tngck_Pdfxau1PIWZ3YGfHuOjdZbay5hUfeU06v-zFRdlJBGSEPJzidCnKG_rbZm-EKWkpodgm43TuTycbMOUR8qUNSSqonNixfGt2YJPjnJvC8nFzyANnwLA48BRTNYQ/s4616/W3236108.JPG" style="margin-left: 1em; margin-right: 1em;"><span style="font-family: courier;"><img border="0" data-original-height="3464" data-original-width="4616" height="480" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgRsS4FdFqKa1aa_hGR1KpdHy3n9uQ62EnAyple549WjZUGe6jXmpYyV-fE8tngck_Pdfxau1PIWZ3YGfHuOjdZbay5hUfeU06v-zFRdlJBGSEPJzidCnKG_rbZm-EKWkpodgm43TuTycbMOUR8qUNSSqonNixfGt2YJPjnJvC8nFzyANnwLA48BRTNYQ/w640-h480/W3236108.JPG" width="640" /></span></a></div><p><span style="font-family: courier;">The original baffle was used as a screw template. Now I'm, scavenging the foam it used as a sound filter to cover the cup's holes from the inside, where it will serve as a dust filter.</span></p><p><span style="font-family: courier;"><br /></span></p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh3vMwjOeua9j0utrVYWicL-zfZVL2KSyGxqx_Ewj7OPY0523VSmEShNKA0QntYdTBIx2ZS-BlT32H65uvmV1bIRHb2BrrV7zzu_CgF18MujH4Gu1u03drjARrqI38rbAfX_Y_beb88cy2XXVNeabC5NlLdedAPWKh5vR4GUIGVyNMxF9eu-YScQ8ksHg/s4616/W3236109.JPG" style="margin-left: 1em; margin-right: 1em;"><span style="font-family: courier;"><img border="0" data-original-height="3464" data-original-width="4616" height="480" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh3vMwjOeua9j0utrVYWicL-zfZVL2KSyGxqx_Ewj7OPY0523VSmEShNKA0QntYdTBIx2ZS-BlT32H65uvmV1bIRHb2BrrV7zzu_CgF18MujH4Gu1u03drjARrqI38rbAfX_Y_beb88cy2XXVNeabC5NlLdedAPWKh5vR4GUIGVyNMxF9eu-YScQ8ksHg/w640-h480/W3236109.JPG" width="640" /></span></a></div><div class="separator" style="clear: both; text-align: center;"><span style="font-family: courier;"><br /></span></div><div><span style="font-family: courier;">Foam covered the holes nicely.</span></div><div><span style="font-family: courier;"><br /></span></div><div><span style="font-family: courier;"><br /></span></div><div class="separator" style="clear: both; text-align: center;"><span style="font-family: courier;"><br /></span></div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjMTobKNnwuxTslD5fpjrH1PphuiKYvOg8jXGqsXsYl-Drmo-kckoFZSawhNpIEnB5EA4zQHsscP_-uSO1sz6aL_7m414LevGt0t_T3P3E2JdK4HkyKqWwLGUIrIRVKY7eqLlaZSuKV2EFJ2ZrOSOWXHHOCygzIlK53YIUQRoVR3tYpxdREW3M4C_yiTg/s4616/W3236111.JPG" style="margin-left: 1em; margin-right: 1em;"><span style="font-family: courier;"><img border="0" data-original-height="3464" data-original-width="4616" height="480" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjMTobKNnwuxTslD5fpjrH1PphuiKYvOg8jXGqsXsYl-Drmo-kckoFZSawhNpIEnB5EA4zQHsscP_-uSO1sz6aL_7m414LevGt0t_T3P3E2JdK4HkyKqWwLGUIrIRVKY7eqLlaZSuKV2EFJ2ZrOSOWXHHOCygzIlK53YIUQRoVR3tYpxdREW3M4C_yiTg/w640-h480/W3236111.JPG" width="640" /></span></a></div><div><span style="font-family: courier;"><br /></span></div><span style="font-family: courier;">I fastened the speaker to the baffle in the usual way. 3d-pen makes that easy. The receptacle however gets in the way of the plastic inside the cup. I simply removed the plastic getting in my way, grinding it out using a rotary tool.</span><div><span style="font-family: courier;"><br /></span><div><span style="font-family: courier;"><br /></span></div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgh8e1OkazrnLhyBGuYMjrDNsBQWw5ee9KreMdsu_qwQ-aBMOtpY3aET-GU-n58G4qOl8u55Tfnaxt7G62ckNO7HniViGO0IE7-ScEXM976S43GzaNbXv_rHOSYT00CFJJ02TqecbHvdUEYJEph_imLKwWiTD9_9MISr6FHrxV5pUGY7f1W0Q3q_2BIxg/s4616/W3236110.JPG" style="margin-left: 1em; margin-right: 1em;"><span style="font-family: courier;"><img border="0" data-original-height="3464" data-original-width="4616" height="480" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgh8e1OkazrnLhyBGuYMjrDNsBQWw5ee9KreMdsu_qwQ-aBMOtpY3aET-GU-n58G4qOl8u55Tfnaxt7G62ckNO7HniViGO0IE7-ScEXM976S43GzaNbXv_rHOSYT00CFJJ02TqecbHvdUEYJEph_imLKwWiTD9_9MISr6FHrxV5pUGY7f1W0Q3q_2BIxg/w640-h480/W3236110.JPG" width="640" /></span></a></div><span style="font-family: courier;"><br /></span><div><span style="font-family: courier;">It's a rough cut, but that doesn't matter. The speaker can now fit.</span></div><div><span style="font-family: courier;"><br /></span><div class="separator" style="clear: both; text-align: center;"><span style="font-family: courier;"><br /></span></div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgLDNZjxokmUmsTEjpyUpfbg6rfZMY6PxGrA-3IGcd0suIbSOc6IlPMBcJgIp1FUZhApodUMfW9oU_v7SyNPpkHpkILuHHZGso1vm_V4Wz6kc4yGZnQ-3Qc93KWBYIhNfVvFRsatKqY4bx6vsTREkV99CfF-ONbmCM5u9fqp4WS7g50QShs6HOKvou2HQ/s4616/W3236112.JPG" style="margin-left: 1em; margin-right: 1em;"><span style="font-family: courier;"><img border="0" data-original-height="3464" data-original-width="4616" height="480" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgLDNZjxokmUmsTEjpyUpfbg6rfZMY6PxGrA-3IGcd0suIbSOc6IlPMBcJgIp1FUZhApodUMfW9oU_v7SyNPpkHpkILuHHZGso1vm_V4Wz6kc4yGZnQ-3Qc93KWBYIhNfVvFRsatKqY4bx6vsTREkV99CfF-ONbmCM5u9fqp4WS7g50QShs6HOKvou2HQ/w640-h480/W3236112.JPG" width="640" /></span></a></div><p><span style="font-family: courier;">Finally, bolted on the baffles and added the pads. everything looks quite clean!</span></p><p><span style="font-family: courier;"><br /></span></p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg7fDBlToZLIoxHwcJHQMl4LkSISyrADoGqVDJm7bOCT9mvyxvZ2EVa8l7GTm_JceUYia1PFmTGC1jQTD-BE4KkdaVjGMXQqqxBWMPd4yewn63yRrubHXTJeTSbIXhaXvbB5CmJoAMkzDkuqN59VhsA3mh_DSGMFQufUv-phId2oLkK7kK8tV0cGon_qw/s3463/W3276130.JPG" style="margin-left: 1em; margin-right: 1em;"><span style="font-family: courier;"><img border="0" data-original-height="3463" data-original-width="3463" height="640" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg7fDBlToZLIoxHwcJHQMl4LkSISyrADoGqVDJm7bOCT9mvyxvZ2EVa8l7GTm_JceUYia1PFmTGC1jQTD-BE4KkdaVjGMXQqqxBWMPd4yewn63yRrubHXTJeTSbIXhaXvbB5CmJoAMkzDkuqN59VhsA3mh_DSGMFQufUv-phId2oLkK7kK8tV0cGon_qw/w640-h640/W3276130.JPG" width="640" /></span></a></div><span style="font-family: courier;"><br /></span><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEihQbG4dZvRwXt9SQi0hgMMk49RhNWtdWtGpaaPqloFw5krdHLpvrePRagWCYcxvcMZsZP4sndjx2L3eaO19B2B0cZudIZJQ2Bz7yKWhVsim7x41fQ7B-HVwe8Wvo-ib5804V7a93tBub_tWNlfJIZXh2pnhsuGe2xZZ4liEjhXw7JxsIxVRzeAjO4Gww/s4491/W3276131.JPG" style="margin-left: 1em; margin-right: 1em;"><span style="font-family: courier;"><img border="0" data-original-height="4491" data-original-width="3370" height="640" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEihQbG4dZvRwXt9SQi0hgMMk49RhNWtdWtGpaaPqloFw5krdHLpvrePRagWCYcxvcMZsZP4sndjx2L3eaO19B2B0cZudIZJQ2Bz7yKWhVsim7x41fQ7B-HVwe8Wvo-ib5804V7a93tBub_tWNlfJIZXh2pnhsuGe2xZZ4liEjhXw7JxsIxVRzeAjO4Gww/w480-h640/W3276131.JPG" width="480" /></span></a></div><span style="font-family: courier;"><br /></span><h2 style="text-align: left;"><span style="font-family: courier;">Sound?</span></h2><p><span style="font-family: courier;">The sound is <i>far </i>improved. My usual tests (<a href="https://beomagi.blogspot.com/2022/01/making-my-own-headphones.html" rel="nofollow" target="_blank">described at the end of my first DIY-Headphone article</a>) were handled quite well. From hearing the seagulls in "Faded", the triangles in "The Trio" to the creaking of piano keys in "Mad World". The details are all there. Somewhat more nuanced than the <a href="https://beomagi.blogspot.com/2022/03/headphones-part-two.html" rel="nofollow" target="_blank">titanium driver in my second article provided</a>, but the bass is thicker, fuller. These headphones appear easier to drive too, picking up higher volumes than my last pair. Chuck Mangione "Feels so good"? It sounded so good too 😉</span></p><p><span style="font-family: courier;"><br /></span></p><h2 style="text-align: left;"><span style="font-family: courier;">Final Thoughts...</span></h2><p><span style="font-family: courier;">Comparing this with my previous builds (<a href="https://beomagi.blogspot.com/2022/01/making-my-own-headphones.html" rel="nofollow" target="_blank">first</a>, <a href="https://beomagi.blogspot.com/2022/03/headphones-part-two.html" rel="nofollow" target="_blank">second</a>), it may be not only simpler to use these headphones as a base, but also cheaper. They can sell for ~$35 as refurbished. That gets a good build quality headband and stirrups, cups, jacks, and cable with an in-line mic. I also value my time. I did this in an afternoon. I didn't have to wait for the glue to dry and paint to finish. I'm definitely considering this option again for future builds.</span></p><p><span style="font-family: courier;"><br /></span></p><p><br /></p></div></div>Beomagihttp://www.blogger.com/profile/00469223835355067867noreply@blogger.com3tag:blogger.com,1999:blog-2974094041951992980.post-22387317885491231432022-03-19T17:55:00.003-07:002022-03-19T18:12:55.701-07:00Headphones: Part Two!<h2 style="text-align: left;"><span style="font-family: courier;">Modifications to the original and other projects:</span></h2><div><span style="font-family: courier;">Since making <a href="https://beomagi.blogspot.com/2022/01/making-my-own-headphones.html" rel="nofollow" target="_blank">headphones in my last foray</a>, I've swapped out the pads, added headband padding, and thoroughly enjoyed them. I've also given them to my biggest fan - my daughter 😉. Then I made 2 more and gave them to my brothers' in law.</span></div><div><span style="font-family: courier;"><br /></span></div><div><div style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhBYS1TPsOeJOE0cCBHLqZEl033ZxPEYHx9ZFXo7IiD-DaaOZI6O0Twq1dXlBlDDx3RbcwQfaLtd-yZYVon2c0OE7ykLLE4SudnGDVQ1ROfFjA7WDZX3kjDC4aU6Kpe6m_XyD-C9ZkuDS1cvHPX0z2vm4MLxXZgtmPLbgIUDA4qIhQVFtCjMGx1RsmUEQ/s4700/DSC07078.JPG"><span style="font-family: courier;"><img border="0" data-original-height="3760" data-original-width="4700" height="512" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhBYS1TPsOeJOE0cCBHLqZEl033ZxPEYHx9ZFXo7IiD-DaaOZI6O0Twq1dXlBlDDx3RbcwQfaLtd-yZYVon2c0OE7ykLLE4SudnGDVQ1ROfFjA7WDZX3kjDC4aU6Kpe6m_XyD-C9ZkuDS1cvHPX0z2vm4MLxXZgtmPLbgIUDA4qIhQVFtCjMGx1RsmUEQ/w640-h512/DSC07078.JPG" width="640" /></span></a></div><div style="text-align: left;"><span style="text-align: center;"><span style="font-family: courier;"><br /></span></span></div><div style="text-align: left;"><span style="text-align: center;"><span style="font-family: courier;">Mark III - Wool diaphragm drivers in these. I removed the paper backing, and with the 3 holes on the cups, these are bass cannons. Clarity isn't great, but it's better than my old Razer headphones. The olive wood cups are beautiful and strong. Have to redo these with better speakers sometime. I should note - The headband is from a noise protection headset. It's light and durable - but barely long enough for my head. The noise protector with a plastic headband and thin metal stirrups as I used in my previous set are more adjustable and more comfortable. I'd wager this is more durable though, and for smaller heads would also be more comfortable.</span></span></div><div style="text-align: left;"><span style="text-align: center;"><span style="font-family: courier;"><br /></span></span></div><div style="text-align: center;"><blockquote style="border: none; margin: 0px 0px 0px 40px; padding: 0px; text-align: left;"><span style="font-family: courier;"><br /></span></blockquote></div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhTyHpir0gONjWpTtVqLk6Y3rOqrbROmTO-YV_NWpOo3b5jJ_bMgqw36YmcjzPTsGn0hdzOogSzC4_6fFDd9H1TIsU3snE6TPzL3k8EK1dZei9Csm5S0o5JN3-Jn9uE6UBMcSs-IeRN1QzPmys50C3-Mh4ZJ6VuFQAHw1L_Tx7gmA_tUuf-br4SEqKEjg/s5020/DSC07079.JPG" style="margin-left: 1em; margin-right: 1em;"><span style="font-family: courier;"><img border="0" data-original-height="4016" data-original-width="5020" height="512" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhTyHpir0gONjWpTtVqLk6Y3rOqrbROmTO-YV_NWpOo3b5jJ_bMgqw36YmcjzPTsGn0hdzOogSzC4_6fFDd9H1TIsU3snE6TPzL3k8EK1dZei9Csm5S0o5JN3-Jn9uE6UBMcSs-IeRN1QzPmys50C3-Mh4ZJ6VuFQAHw1L_Tx7gmA_tUuf-br4SEqKEjg/w640-h512/DSC07079.JPG" width="640" /></span></a></div><div class="separator" style="clear: both; text-align: left;"><span style="font-family: courier;"><br /></span></div><div class="separator" style="clear: both; text-align: left;"><span style="font-family: courier;">Mark IV - These cups are beechwood. I was more conservative with the paper backing removal, exposing only a single hole in each driver. The interesting bit about these is that each side has 2 speakers, for a total of 4. Each side has a titanium diaphragm driver and a composite driver from a JBL club. The wool driver went in at a bit of an angle slightly behind the titanium driver with the intent being that dips in the frequency response of one driver would be catered for by the other driver. Clarity on these absolutely floored me. I'm didn't measure anything, but there were times while listening to music with these that I'd pause and try my previously made headsets. Could I what I heard on those? Why did it stand out? I'd flip back and forth listening wondering which was cleaner. The headband on these was from a racing headset. It's butch - made to last, yet quite configurable. I used a couple headband bands to cover up the headband and make it neater and more comfortable.</span></div><div class="separator" style="clear: both; text-align: left;"><span style="font-family: courier;"><br /></span></div><div class="separator" style="clear: both; text-align: left;"><span style="font-family: courier;"><br /></span></div><div class="separator" style="clear: both; text-align: left;"><span style="font-family: courier;"><br /></span></div><h2 style="text-align: left;"><span style="font-family: courier;">Getting serious on Mark V:</span></h2><div><span style="font-family: courier;">I really liked the dual diver setup on the Mark IV. After finding sources for cheap speakers off eBay, AliExpress, and earphonediylabs.com I had several options for my next (several) headphones. </span></div><div><span style="font-family: courier;"><br /></span></div><div><span style="font-family: courier;">The titanium 50mm diaphragms were always pleasing. I tried several other options bare before settling on some "Tesla" type secondary drivers. Beyerdynamic's higher-end units are advertised as using Tesla drivers. A Tesla driver is a driver where the magnetic field strength of the air gap the voice coil moves along in exceeds 1 Tesla. A Tesla is the unit of measurement for magnetic field strength.</span></div></div><div><span style="font-family: courier;"><br /></span></div><div><span style="font-family: courier;">I decided to stick to a similar layout as the Mark IV. slightly off-center titanium driver and angled secondary driver.</span></div><div><span style="font-family: courier;"><br /></span></div><div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjNTVnyS6PdlAchiBsThK30wo0vfb5rGMef3sB6i-1KRtElFgvGvti189vVNSM7VuF5w_6Kn2zZYgCd3nAUblCWzqMIV7e6wvbL_fIWVGtOCdDw8K9k4rsV4bAuDFOaDqpI-yM4Ty14ALduqrRnj1XlAW4NEMwsvHJANhI_kF0Dflk-PA58CsA3OPSywQ/s4330/W3125957.JPG" style="margin-left: 1em; margin-right: 1em;"><span style="font-family: courier;"><img border="0" data-original-height="3464" data-original-width="4330" height="512" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjNTVnyS6PdlAchiBsThK30wo0vfb5rGMef3sB6i-1KRtElFgvGvti189vVNSM7VuF5w_6Kn2zZYgCd3nAUblCWzqMIV7e6wvbL_fIWVGtOCdDw8K9k4rsV4bAuDFOaDqpI-yM4Ty14ALduqrRnj1XlAW4NEMwsvHJANhI_kF0Dflk-PA58CsA3OPSywQ/w640-h512/W3125957.JPG" width="640" /></span></a></div><span style="font-family: courier;"><br />So nice of the shipper to add a protective speaker grill for the 50mm titanium driver. The claim for most of these is that they are replacements for or directly from AKG 371 headphones. Maybe they are? I've no way to test. They do sound fantastic though!</span></div><div><span style="font-family: courier;"><br /></span></div><div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjFNIz0lcKRChB_mzrUSjJz99sJlTHM1fYYpeFg8-NjzsuRDi8iGotxj92S1sx0o2bfQDubGst_FoMWLPT0XFuSwSv8OZEpAYmD1-iXcf6OArUE2FK50HaP5TfxNNbQbdeDZ8KSkXmhjyGCy2ACtuGXGbGrYWAnANMo0F1w2evjQN8_ZsJz8h5KbVWAWw/s4616/W3125959.JPG" style="margin-left: 1em; margin-right: 1em;"><span style="font-family: courier;"><img border="0" data-original-height="3464" data-original-width="4616" height="480" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjFNIz0lcKRChB_mzrUSjJz99sJlTHM1fYYpeFg8-NjzsuRDi8iGotxj92S1sx0o2bfQDubGst_FoMWLPT0XFuSwSv8OZEpAYmD1-iXcf6OArUE2FK50HaP5TfxNNbQbdeDZ8KSkXmhjyGCy2ACtuGXGbGrYWAnANMo0F1w2evjQN8_ZsJz8h5KbVWAWw/w640-h480/W3125959.JPG" width="640" /></span></a></div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgiQ04oISTlF055W-bnL0x_RuOWzzfJGvAyR-KEdLdpEUoWAo8L5FYfOWZrocFs0qgkUyner4-jLIksKphAPD2DIHQu3O1PvrfgqZ_2o49CLFVss99lC8Db2ee5a5F3R33n5k8wGbohMAYsNOLq8Z4KOjhcwXp76Z9Tr1NiS0ZHoFS9-gLwQS_22PByYg/s4616/W3125960.JPG" style="margin-left: 1em; margin-right: 1em;"><span style="font-family: courier;"><img border="0" data-original-height="3464" data-original-width="4616" height="480" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgiQ04oISTlF055W-bnL0x_RuOWzzfJGvAyR-KEdLdpEUoWAo8L5FYfOWZrocFs0qgkUyner4-jLIksKphAPD2DIHQu3O1PvrfgqZ_2o49CLFVss99lC8Db2ee5a5F3R33n5k8wGbohMAYsNOLq8Z4KOjhcwXp76Z9Tr1NiS0ZHoFS9-gLwQS_22PByYg/w640-h480/W3125960.JPG" width="640" /></span></a></div><span style="font-family: courier;"><br />Measure twice cut once. Sticking with Kydex to hold my speakers. I used my soldering iron to burn a hole in the paper backing for the titanium driver.</span></div><div><span style="font-family: courier;"><br /></span></div><div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjidcRungue6woxUuB_gpVGMnPclKa07ydAyIbhASSBcwnnVysQBt-vv2tX_FmJNaoAsDHVS0vVf6V-A5g8Jmx7TqDL-0Bx8mpFV4wc7OihEhZwv3alSw8NYKFfZ3hfwKOLlNedGVzErPipWRO_8CRX95gZCnE2xbXzVc7MRIY9Sl9IDgBViJGbix0KcQ/s4039/W3125968.JPG" style="margin-left: 1em; margin-right: 1em;"><span style="font-family: courier;"><img border="0" data-original-height="3031" data-original-width="4039" height="480" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjidcRungue6woxUuB_gpVGMnPclKa07ydAyIbhASSBcwnnVysQBt-vv2tX_FmJNaoAsDHVS0vVf6V-A5g8Jmx7TqDL-0Bx8mpFV4wc7OihEhZwv3alSw8NYKFfZ3hfwKOLlNedGVzErPipWRO_8CRX95gZCnE2xbXzVc7MRIY9Sl9IDgBViJGbix0KcQ/w640-h480/W3125968.JPG" width="640" /></span></a></div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi1enYXP4bxkpo-g5OCLY2mJTah-RwyHuNBdt0sLkE3hGKskt-HR4iaXNQdiIITgeMFJ2mqhgJ50ZheQLjyHMkzxT3V89xbZhVc7Gfzmbw6Fy_g-kQ8AVdgV6ASxm0nyQRcRGJ5xG9usXdNQir3QoUHBXJHIcwSUn1JR3xIsL5ZOF4wsaS0FoNCA7y-jw/s4608/W3125971.JPG" style="margin-left: 1em; margin-right: 1em;"><span style="font-family: courier;"><img border="0" data-original-height="3456" data-original-width="4608" height="480" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi1enYXP4bxkpo-g5OCLY2mJTah-RwyHuNBdt0sLkE3hGKskt-HR4iaXNQdiIITgeMFJ2mqhgJ50ZheQLjyHMkzxT3V89xbZhVc7Gfzmbw6Fy_g-kQ8AVdgV6ASxm0nyQRcRGJ5xG9usXdNQir3QoUHBXJHIcwSUn1JR3xIsL5ZOF4wsaS0FoNCA7y-jw/w640-h480/W3125971.JPG" width="640" /></span></a></div><div class="separator" style="clear: both; text-align: left;"><span style="font-family: courier;"><br /></span></div><div class="separator" style="clear: both; text-align: left;"><span style="font-family: courier;">I used the 3D pen again to hold the speakers in place. The angled speaker does not rest against the 50mm. If it did, then the diaphragm would probably rattle against it at loud volumes. With the 3D pen, I was able to hold it off the speaker and "draw" some support in place before moving onto the rest of the receptacle.</span></div><div class="separator" style="clear: both; text-align: left;"><span style="font-family: courier;"><br /></span></div><div class="separator" style="clear: both; text-align: left;"><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjmhau7U7az5CUZC1RHxp00UTfEogUjdFtwnKgpO9BtCvhD6FWB15Eda89Dd-NTRlqZWOmsc-kY4JZGurYEsiqqwFZf5qZTNS5C_dHfDqA2Bh-YWapAVkYyTRDgvgpWuUEdXiFE56FqGUu822HIIB3HUHmJC2IorhkkFptH7yF0GI_jp6N-KKJlqXHcbw/s6016/DSC07264.JPG" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="4016" data-original-width="6016" height="428" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjmhau7U7az5CUZC1RHxp00UTfEogUjdFtwnKgpO9BtCvhD6FWB15Eda89Dd-NTRlqZWOmsc-kY4JZGurYEsiqqwFZf5qZTNS5C_dHfDqA2Bh-YWapAVkYyTRDgvgpWuUEdXiFE56FqGUu822HIIB3HUHmJC2IorhkkFptH7yF0GI_jp6N-KKJlqXHcbw/w640-h428/DSC07264.JPG" width="640" /></a></div><br /><span style="font-family: courier;">I think the final result looked fantastic. The speakers won't budge from there or rattle. The carbon fiber texture looks great, and those speaker grills <i>just</i> fit flush in the holes I cut with the scroll saw.</span></div><div class="separator" style="clear: both; text-align: left;"><span style="font-family: courier;"><br /></span></div><div class="separator" style="clear: both; text-align: left;"><span style="font-family: courier;"><br /></span></div><div class="separator" style="clear: both; text-align: left;"><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgupvJ8JXzmsiumhOO9SKjE1F2ORrXxhhOIZVRyHKq9TRCihaizwQ9VP9hhJxRePm9FgZHec7y0x70d3qT8aE9aVHEwWvFlNEGb0QYIZiDdOUrVcKxs_7aISnC0DarFY9jp-Py8D5X4C0YlX6wsrgSJHmissFHKbdohtfcnQKJ9aAgWmiBBccINzfRnRw/s4616/W3196051.JPG" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="4616" data-original-width="3464" height="640" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgupvJ8JXzmsiumhOO9SKjE1F2ORrXxhhOIZVRyHKq9TRCihaizwQ9VP9hhJxRePm9FgZHec7y0x70d3qT8aE9aVHEwWvFlNEGb0QYIZiDdOUrVcKxs_7aISnC0DarFY9jp-Py8D5X4C0YlX6wsrgSJHmissFHKbdohtfcnQKJ9aAgWmiBBccINzfRnRw/w480-h640/W3196051.JPG" width="480" /></a></div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEijo5n3bRxLqHSsUvQ_BANN8e8g28mx3ztHeHIyfztBm5HTzoMt_s2_kyBcx5N-a3dp8TSgHvr329zCyLg-AQA-DLOWIVa2yfRj9ylg4Ow4bzGYuUCX7EZ15oNov-Ne7nOoC5ZMuA1pAXBonvm9Myl087jSYWQ_3JSO-lfYmDMSX9eGPBUl4Dwi_Ct8dQ/s4616/W3196053.JPG" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="3464" data-original-width="4616" height="480" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEijo5n3bRxLqHSsUvQ_BANN8e8g28mx3ztHeHIyfztBm5HTzoMt_s2_kyBcx5N-a3dp8TSgHvr329zCyLg-AQA-DLOWIVa2yfRj9ylg4Ow4bzGYuUCX7EZ15oNov-Ne7nOoC5ZMuA1pAXBonvm9Myl087jSYWQ_3JSO-lfYmDMSX9eGPBUl4Dwi_Ct8dQ/w640-h480/W3196053.JPG" width="640" /></a></div><br /><span style="font-family: courier;"><br /></span></div><div class="separator" style="clear: both; text-align: left;"><span style="font-family: courier;">The headband is a DIY replacement from AliExpress. I used the same beechwood cups I used in the previous 4-speaker headphones because it's large enough to hold the speakers. So large, I didn't really have space to pass the cable through the top, so instead, it's coming from the sides. The 3.5mm unbalanced jack is not dead center, but slightly forwards. This way the jack isn't constantly hitting my shoulder when I move my head. With cups this large, it's difficult to find pads. These are generic 110mm pads, stretched to fit over the 113mm discs. If I were to build these again, I'd make the cups a bit deeper. The cable is knotted inside to prevent it from being pulled externally and breaking a solder joint. That knot barely fits with the speaker in the available space. The angle also helps with the V-Moda boom mic positioning.</span></div><div class="separator" style="clear: both; text-align: left;"><span style="font-family: courier;"><br /></span></div><div class="separator" style="clear: both; text-align: left;"><span style="font-family: courier;">Up till now, I've been making all my headphones use unbalanced jacks. I'll have to try a split balanced cable next time. I doubt I can hear a difference, but it will make design a little easier without having the overhead cable to worry about.</span></div><div class="separator" style="clear: both; text-align: left;"><span style="font-family: courier;"><br /></span></div><div class="separator" style="clear: both; text-align: left;"><span style="font-family: courier;">I did end up opening this up and opening another hole in the titanium paper backing, and 2 on the tesla speakers to increase bass response. Satisfied for now 😊</span></div><div class="separator" style="clear: both; text-align: left;"><span style="font-family: courier;"><br /></span></div><span style="font-family: courier;"><br /><br /></span></div>Beomagihttp://www.blogger.com/profile/00469223835355067867noreply@blogger.com0tag:blogger.com,1999:blog-2974094041951992980.post-46810694990631658242022-01-18T19:53:00.029-08:002022-03-19T17:57:29.126-07:00Making my own headphones<h2 style="text-align: left;"><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/a/AVvXsEjjf-KNJyoeYTKLsLsExUDGVY4cm0DhyEY88xT5wPl2bsQE1K6JTXsKafhoDispEKSB43wFOYrR9X_AoBarNMvq10yyaRfPb4cBTSFlkFybOF3vuI_HzjBH_1Jn5KaYrLwukcCVbarJa30ZoeUXPBE3jQAcxxn9Gaknv23D0y8cExNl5w-XvMahyHcaWw=s4330" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="3464" data-original-width="4330" height="512" src="https://blogger.googleusercontent.com/img/a/AVvXsEjjf-KNJyoeYTKLsLsExUDGVY4cm0DhyEY88xT5wPl2bsQE1K6JTXsKafhoDispEKSB43wFOYrR9X_AoBarNMvq10yyaRfPb4cBTSFlkFybOF3vuI_HzjBH_1Jn5KaYrLwukcCVbarJa30ZoeUXPBE3jQAcxxn9Gaknv23D0y8cExNl5w-XvMahyHcaWw=w640-h512" width="640" /></a></div><br /><span style="font-family: courier;"><br /></span></h2><h2 style="text-align: left;"><span style="font-family: courier;">Make what?</span></h2><div><span style="font-family: courier;">I decided to make my own headphones. I came across the drivers on ebay while looking for some replacement headphones. It seems in general - great sound, great build quality, low cost - pick any two.</span></div><div><span style="font-family: courier;"><br /></span></div><div><span style="font-family: courier;">I am not an audiophile, nor do I have high end audio gear. My main listening devices are my PC with a iFi Zen DAC. For exercise, I use my phone with a Qudelix-5K bluetooth DAC. These are easily adequate, but in no way represent "high end" audio equipment.</span></div><div><span style="font-family: courier;"><br /></span></div><h2 style="text-align: left;"><span style="font-family: courier;">But...why make headphones?</span></h2><div><span style="font-family: courier;">I started to appreciate decent audio quality when my Razer Kraken died. I picked up a Philips Fidelio L2 and V-Moda cable+headset mic as a replacement. The Razer had extremely solid build quality. Good use of metal. I complained about the non-detachable cable as a weakness on their forum and a rep contacted me and even sent a replacement. I cannot fault their customer service. </span></div><div><span style="font-family: courier;"><span> </span>The Philips however had wonderful clean tuning. Bass, mids and highs were all present. Nothing felt like it dipped too low. It was clearer than my Razer too. The build quality was OK. Lot of metal, but I think there's a couple weak points. I still have it, so it lasts. Comfort was missing in one area - the headband pressed in a small area at the top of my head. Why did it sound better? Driver? Pads? something about the way it let sound out with the semi-open nature?</span></div><div><span style="font-family: courier;"><span> So I looked around, adamant that I'll buy something more comfortable with good build quality after a particularly long call. The top of my head was smarting - I swear I could feel a dent 😛. I came across the </span>Symphonized Wraith 2.0. It was relatively cheap, but used good materials. Metal brackets, headband. the extension mechanism was also metal. The cups used plastic and wood. It was comfortable to the top of my head, but had horrible pads. It didn't sound great.</span></div><div><span style="font-family: courier;"><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjzFMjZQfusl6tYW-ri5aqWY67LlE40PRr9C3LLLrnUWFBQhrlu0S1mbX2oVTNbnr5BSRcNgJJFDKIG_wIMVwmK14gnhwYydXmQzsrjWwmi7QHaeWzrU7UBpaxybi_KDFFVuFWSMo5pS53q/" style="margin-left: 1em; margin-right: 1em;"><img alt="" data-original-height="499" data-original-width="394" height="640" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjzFMjZQfusl6tYW-ri5aqWY67LlE40PRr9C3LLLrnUWFBQhrlu0S1mbX2oVTNbnr5BSRcNgJJFDKIG_wIMVwmK14gnhwYydXmQzsrjWwmi7QHaeWzrU7UBpaxybi_KDFFVuFWSMo5pS53q/w504-h640/image.png" width="504" /></a></div><br /><br /></span></div><div><span style="font-family: courier;"><span> </span>By now I understood from numerous reviews and youtube research (that's a potentially painful phrase, but honestly makes more sense than it should) that I can change the sound with some mods. I bought a couple types of pads. Plain leather didn't sound much better, but the headphones at least weren't resting on my ears. The next up were fenestrated pads - pads with perforations. </span><span style="font-family: courier;">The sound had changed dramatically better. Probably still not as good as the Philips, but close. So much more comfortable though. If I were to guess, w</span><span style="font-family: courier;">hen the speaker diaphragm moves, it creates pressure changes. If air on either side of the diaphragm has nowhere to go, then the pressure builds up - between the speaker and headphone cup, or between the speaker and your ear. I believe the perforations on the fenestrated pad lets the air move more freely between the speaker and ear letting the diaphragm move easier.</span></div><div><span style="font-family: courier;"><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhGNmV6i1Ne_a5vciMFrJBEG-vItHAM2YUfDr6-cRJ3RUGngVO5iZVMxMxjgjf1pVON4jg4-WdbPkqS8IIN5GitBO8n00SdW9yf3nS7lrPxY0K7g0lyKMiIBPOhf1ZrsooCRaewfzZmsUfi/" style="margin-left: 1em; margin-right: 1em;"><img alt="" data-original-height="1500" data-original-width="1394" height="640" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhGNmV6i1Ne_a5vciMFrJBEG-vItHAM2YUfDr6-cRJ3RUGngVO5iZVMxMxjgjf1pVON4jg4-WdbPkqS8IIN5GitBO8n00SdW9yf3nS7lrPxY0K7g0lyKMiIBPOhf1ZrsooCRaewfzZmsUfi/w595-h640/image.png" width="595" /></a></div><br /><br /></span></div><h2 style="text-align: left;"><span style="font-family: courier;">IEMs were next!</span></h2><div><span style="font-family: courier;">In my quest for bang for buck audio, it was hard not to try some in-ear monitors. I.e. the little earphones that enter your ear canal.</span></div><div><ul style="text-align: left;"><li><span style="font-family: courier;"><span style="color: #01ffff;">KZ zs10 pro</span> - I was wowed by the sound and price. I picked this up because I needed a small headset to work with from my phone. This really surprised me. Strong bass, and good mids. Highs were nice - lower than others. This was good in a way - it gets tiresome listening to shrill noises after a while. It did lack detail though.</span></li><li><span style="font-family: courier;"><span style="color: #01ffff;">Tin Audio T2</span> - The KZ brought a comfortable listening experience. The Tin Audio T2 brought more detail than I was accustomed to. The weak point here was a lack of lower bass. Everything was wonderfully detailed. This is considered a neutral sound from online reviews.</span></li><li><span style="font-family: courier;"><span style="color: #01ffff;">Shuoer Tape</span> - I had finally decided to spend a little more on these. When you're buying small IEMs, you think to yourself you shouldn't spend much on them, but it's really worth it. These had a nice bass kick and extreme detail. It's just really shrill at times. Some songs would feel harsh. This was somewhat mitigated by using Shure tips with a narrow opening, but this costs a little of that extreme detail.</span></li><li><span style="font-family: courier;"><span style="color: #01ffff;">KZ ZSX</span> - Can be uncomfortable, but a nice "v" shaped tuning that stresses the bass and elevates some highs. Details were probably not as good as the T2 and the mids weren't as well represented as the highs and bass, but this took my top spot for a time.</span></li><li><span style="font-family: courier;"><span style="color: #01ffff;">Etymotic ER3XR</span> - I bought these because it was on a really steep discount. Honestly one of the most detailed IEMs I've ever used, but it's too uncomfortable for me to appreciate it.</span></li><li><span style="font-family: courier;"><span style="color: #01ffff;">Fiio FH3</span> - this is my current goto. This uses a beryllium plated diaphragm providing substantial bass. 2 Balanced armatures provide more mid/highs. Balanced armatures are quicker to react than a diaphragm, so they can provide more detail in general. A diaphragm moves more air, so it provides better bass normally. By coating the diaphragm in beryllium, it's stiffer and can react to the rapid movements of the coil better. The result isn't just good bass, but details that I wouldn't notice with anything but the Etymotic. These had a nice slight V shaped emphasis on the bass and treble.<br /><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh5yoRVIHXGb1huie_5Fr7ah7bH6_w5PQ-sPBjk2JgkyE5LdNcC7JW7J7ii1UYw0ImT2CXYxlN22wA4Yte7JuQVEEv-Uh0-jyh5tR2JhHCcIY1xRm1h7rHWuj9r0n8-ER_HTnNO9805NGgE/" style="margin-left: 1em; margin-right: 1em;"><img alt="" data-original-height="719" data-original-width="818" height="563" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh5yoRVIHXGb1huie_5Fr7ah7bH6_w5PQ-sPBjk2JgkyE5LdNcC7JW7J7ii1UYw0ImT2CXYxlN22wA4Yte7JuQVEEv-Uh0-jyh5tR2JhHCcIY1xRm1h7rHWuj9r0n8-ER_HTnNO9805NGgE/w640-h563/image.png" width="640" /></a></div><br /></span></li></ul><div><span style="font-family: courier;">By this point, my IEM's sound far surpassed my over-ear headphones. Over-ear does provide a nice <i>feel</i> to the music. Ever stand next to a speaker and <i>feel</i> the music with your body? An over-ear accomplishes this to a much smaller degree. You're not going to feel it on every song, but when you do (on your face not your body :P), you'll look at your stash of IEMs, and wistfully wish they could do this too. Instruments and sounds also seem to come from further away. This helps with interpreting where the sound is coming from. Finally I don't trust listening to music using IEMs constantly. I believe that being this close to my eardrum, it's more likely to affect my hearing. </span><span style="font-family: courier;">Yeah, something I noticed on these headphones forums was the number of people that would complain, question or meme about </span><a href="https://www.nidcd.nih.gov/health/tinnitus" rel="nofollow" style="font-family: courier;" target="_blank">tinnitus</a><span style="font-family: courier;">. </span></div></div><div><span style="font-family: courier;"><br /></span></div><h2 style="text-align: left;"><span style="font-family: courier;">Where am I going with this?</span></h2><div><span style="font-family: courier;">So after experiencing aural bliss with the FH3 but wishing it were over-ear, I figured it was time to make my own headphones. I had been seeing replacement drivers for several makes of headphones online - even higher end units like the titanium driver in the AKG 371. They weren't too expensive either. So well why not ¯\_(ツ)_/¯</span></div><div><span style="font-family: courier;"><br /></span></div><h2 style="text-align: left;"><span style="font-family: courier;">The build!</span></h2><div><span style="font-family: courier;">I started with some Bamboo containers. These are meant to hold cooking spices. They were definitely too deep to use directly. I used a rotary cutting tool and my clamp as a jig to maintain a specific depth as I cut it down to size.</span></div><div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/a/AVvXsEiaJLdL-zCIXPFFwFKPEvV4CMjGR3CcxxiuBU43a0ZyGeZaTY4f9fHZLYZ8GnlbLoSrtX7p43_5UH6pQL4khAeZW7nXRcGtUTK5CaNltk9FTvxOaU8oowD9u32byKAG_rcXJBNBy7VoRJdsCuOF0g8fMwMSTNKqEFlTmJNHP6GeWRgE3MIsaClpjUkIGA=s4616" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="3464" data-original-width="4616" height="480" src="https://blogger.googleusercontent.com/img/a/AVvXsEiaJLdL-zCIXPFFwFKPEvV4CMjGR3CcxxiuBU43a0ZyGeZaTY4f9fHZLYZ8GnlbLoSrtX7p43_5UH6pQL4khAeZW7nXRcGtUTK5CaNltk9FTvxOaU8oowD9u32byKAG_rcXJBNBy7VoRJdsCuOF0g8fMwMSTNKqEFlTmJNHP6GeWRgE3MIsaClpjUkIGA=w640-h480" width="640" /></a></div></div><div><span style="font-family: courier;"><div class="separator" style="clear: both; text-align: center;"><br /></div><br />In the process, flaws in the bamboo container caused the bottom of one to fall out, and a split along the side. This was resolved with copious amounts of wood glue and a couple clamps. I ended up coating the insides of both cups hoping it would increase the strength of each.</span></div><div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/a/AVvXsEiNi1HFIX8o-xoVzEmzp8OfMP0sg2C64UNq1faK3-XpfoCczXyh9HuIv8x7DbABt8oKaXixncajaFjUyxWJwf7MrHPv8zV8weenLRZwMou7qnwdaKeXfrdRG41r1ZQycB2YcBwWt2joVwNULkhGjhNUGKMScaX2QwX1ObJ1-B0auW664ae262N2Lv9R7Q=s4616" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="3464" data-original-width="4616" height="480" src="https://blogger.googleusercontent.com/img/a/AVvXsEiNi1HFIX8o-xoVzEmzp8OfMP0sg2C64UNq1faK3-XpfoCczXyh9HuIv8x7DbABt8oKaXixncajaFjUyxWJwf7MrHPv8zV8weenLRZwMou7qnwdaKeXfrdRG41r1ZQycB2YcBwWt2joVwNULkhGjhNUGKMScaX2QwX1ObJ1-B0auW664ae262N2Lv9R7Q=w640-h480" width="640" /></a></div><br /></div><div><span style="font-family: courier;"><br />Next up drilling holes. I cut out a cardboard circle with some holes as a template for where to drill. The same template was used to get holes made on plastic discs, cut to 107mm diameter. This size produced enough of a lip to squeeze 105/110mm pads over. Plastic used was kydex. It's tough and used in knife sheaths. I had olive wood cups I started working on as well as a secondary set.</span></div><div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/a/AVvXsEjrIodfDiETYwyn5JgDdlibGxi0cOUlihCu_u6x13L_w-ZbEjt2X5SvLqFpGNU7hN8jRDsSfqXdmK-Q6irfZUHIjPI7Vrr4-mM2IthuSV_ywyjQQxlkPR9oJ4bcY-9WIbl3y6fsBs0iEiCJ82yuMkDwl-DOxJj7S-fOcUEU0lUnhGaj6yds6fIQBR0V7Q=s4616" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="3464" data-original-width="4616" height="480" src="https://blogger.googleusercontent.com/img/a/AVvXsEjrIodfDiETYwyn5JgDdlibGxi0cOUlihCu_u6x13L_w-ZbEjt2X5SvLqFpGNU7hN8jRDsSfqXdmK-Q6irfZUHIjPI7Vrr4-mM2IthuSV_ywyjQQxlkPR9oJ4bcY-9WIbl3y6fsBs0iEiCJ82yuMkDwl-DOxJj7S-fOcUEU0lUnhGaj6yds6fIQBR0V7Q=w640-h480" width="640" /></a></div></div><div><span style="font-family: courier;"><div><span style="font-family: courier;"><br /></span></div><br />The cups were sanded. The glued cup needed some in particular. 4 holes from back to front to clamp down the plastic disc to the bamboo cup. 2 on the sides which will bolt the cup to the headband. One on the top for the wires connecting left and right cups. One on the bottom for the female jack. I put a female jack on both cups - You can plug into either one, or even connect a second headphone. A light varnish coating was applied to protect the bamboo.</span></div><div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/a/AVvXsEiXT6_XXpFeqdyip1z72J2ircwOAD2I19a3U2U_NguaO-c3pH5YaAPvJuqBYEQXiniOT1srBbksXTTUvvGUoP6q6lKxVvo_GySxadWG0n-GF4cexCy6k2Li2sYk9ITGSdeCECZmURWfLZbaMaz0CiNtjR1Qz8thDtlYleZelAWYZbnTF-twZ3fCuF3oCA=s4242" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="3183" data-original-width="4242" height="480" src="https://blogger.googleusercontent.com/img/a/AVvXsEiXT6_XXpFeqdyip1z72J2ircwOAD2I19a3U2U_NguaO-c3pH5YaAPvJuqBYEQXiniOT1srBbksXTTUvvGUoP6q6lKxVvo_GySxadWG0n-GF4cexCy6k2Li2sYk9ITGSdeCECZmURWfLZbaMaz0CiNtjR1Qz8thDtlYleZelAWYZbnTF-twZ3fCuF3oCA=w640-h480" width="640" /></a></div></div><div><span style="font-family: courier;"><br /><br /></span></div><div><span style="font-family: courier;">For the discs, my plan was the speaker would attach directly. For this, I traced out the speaker, and drilled 4 holes around the outline.</span></div><div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/a/AVvXsEhwaIn4-jJXfhQwjCliDIvQTM92rLvdmzDeIert8ieCZLyyJMpET9J_yCXXcSCGpo0DeQS_HiKAhMYOzjIJpBTMDFxra6LCDHuD4UyUtIN6GBsEMUOdHtozT521CJu5qa82BNsKMm3J0EvWWAZ5TwMh7ZR25h9im3o9alHnqlQw2BJX4k9PXzqaiq3afA=s3944" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="2960" data-original-width="3944" height="480" src="https://blogger.googleusercontent.com/img/a/AVvXsEhwaIn4-jJXfhQwjCliDIvQTM92rLvdmzDeIert8ieCZLyyJMpET9J_yCXXcSCGpo0DeQS_HiKAhMYOzjIJpBTMDFxra6LCDHuD4UyUtIN6GBsEMUOdHtozT521CJu5qa82BNsKMm3J0EvWWAZ5TwMh7ZR25h9im3o9alHnqlQw2BJX4k9PXzqaiq3afA=w640-h480" width="640" /></a></div></div><div><span style="font-family: courier;"><br /><br /></span></div><div><span style="font-family: courier;">M2.5 screws and a small nut through each hole acted as anchors for the speaker. A 3d pen was used to "draw" the bracket in place around the speaker.</span></div><div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/a/AVvXsEgJ_XcYAIpzvX2uhwG9F_uo6vRvQNK4-SVstAlHQVZAvlVODcWb10aKblAkN2hp4yrEBpEPyZo_Ut3hh4C5kqppO6r0zLk6LEg0U3qxpqlx_Ekw8CoTha81xKBFrFIOV1v7TX1ALrHYS0Go5kYT4OhEQON19a0Aa0H6cD8Ay4OPIfojxQtfPK_j4LQpCg=s4616" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="3464" data-original-width="4616" height="480" src="https://blogger.googleusercontent.com/img/a/AVvXsEgJ_XcYAIpzvX2uhwG9F_uo6vRvQNK4-SVstAlHQVZAvlVODcWb10aKblAkN2hp4yrEBpEPyZo_Ut3hh4C5kqppO6r0zLk6LEg0U3qxpqlx_Ekw8CoTha81xKBFrFIOV1v7TX1ALrHYS0Go5kYT4OhEQON19a0Aa0H6cD8Ay4OPIfojxQtfPK_j4LQpCg=w640-h480" width="640" /></a></div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/a/AVvXsEidboyZkgzTs0cNODYu9weac_cxhY-C_96jdLcDO5XcIYKyTpthH8RKt0eRMGD2cY6wDLnqVfmYlRlKbzy5Utx1QiMEZP-2g-GEJaTuHTcW7TXJKekLmo5g94PWoaHHkjPDIrKwh-Adi8GMdx-cFZmplDN6LPnN-1XoTksN4xn4J7DcaA39HfTyAVwJag=s3791" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="2845" data-original-width="3791" height="480" src="https://blogger.googleusercontent.com/img/a/AVvXsEidboyZkgzTs0cNODYu9weac_cxhY-C_96jdLcDO5XcIYKyTpthH8RKt0eRMGD2cY6wDLnqVfmYlRlKbzy5Utx1QiMEZP-2g-GEJaTuHTcW7TXJKekLmo5g94PWoaHHkjPDIrKwh-Adi8GMdx-cFZmplDN6LPnN-1XoTksN4xn4J7DcaA39HfTyAVwJag=w640-h480" width="640" /></a></div></div><div><span style="font-family: courier;"><br /><br />With the speaker secured, it's time to look at the grille. Here's a shot of that titanium goodness.</span></div><div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/a/AVvXsEhQskjJVFprUV1qBLETHvILHODmSLiGDm1g_0IEAGKmUdp6XQbuxacE1UksUV6N2luOM79YuqiyxYwjmNGM4LszR2_9x6WARs6rImWgmzTWxa-9jWmammsEFEubvfggMGiGyj54-wfhADOY956kRb3DoqK9PlCg0bGVXLAM5_7isrflzXdL9mq1-yYQfw=s4356" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="2766" data-original-width="4356" height="406" src="https://blogger.googleusercontent.com/img/a/AVvXsEhQskjJVFprUV1qBLETHvILHODmSLiGDm1g_0IEAGKmUdp6XQbuxacE1UksUV6N2luOM79YuqiyxYwjmNGM4LszR2_9x6WARs6rImWgmzTWxa-9jWmammsEFEubvfggMGiGyj54-wfhADOY956kRb3DoqK9PlCg0bGVXLAM5_7isrflzXdL9mq1-yYQfw=w640-h406" width="640" /></a></div></div><div><span style="font-family: courier;"><br /><br /></span></div><div><span style="font-family: courier;">To connect the left and right cups, I needed 3 wires. I didn't have anything premade, so I sacrificed a power cable. Stripping away the outer insulation left the inner wires. I plaited the wires with the ends clamped. This way it would neatly carry the signal needed between the cups.</span></div><div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/a/AVvXsEgn6n22c0qfEGBugaptg-PqmpR5xnqEjWY2dc1bW4mIXSQ-x5bUjaXWQWWG3UtIU7_HZsiHZkc-uLihsM4oVGYpTpNmQXHmtSreZ756QK4EuATxACM_0dmpd9qm_ucbYy22oubBFHJe3i31UzhsFlDVTFNf3Q1YCeWQ0dzdse8tb4qso3XKMJz2TfmqRA=s2956" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="2871" data-original-width="2956" height="622" src="https://blogger.googleusercontent.com/img/a/AVvXsEgn6n22c0qfEGBugaptg-PqmpR5xnqEjWY2dc1bW4mIXSQ-x5bUjaXWQWWG3UtIU7_HZsiHZkc-uLihsM4oVGYpTpNmQXHmtSreZ756QK4EuATxACM_0dmpd9qm_ucbYy22oubBFHJe3i31UzhsFlDVTFNf3Q1YCeWQ0dzdse8tb4qso3XKMJz2TfmqRA=w640-h622" width="640" /></a></div></div><div><span style="font-family: courier;"><br /><br /></span></div><div><span style="font-family: courier;">Here's a view of the cups wired to the jack. The black wire connects the central prong of the jack. The white and green connect to left and right prongs respectively. The red/black wires for each cup connect to white/black and green/black for the left and white cups. I mentioned using copious amounts of glue. Well, there you can see it. The red glop is liquid tape. It's convenient. Gets in there to cover the contacts so nothing accidentally shorts out the headphones.</span></div><div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/a/AVvXsEi0TSUFr8lIIYA7SgAkAuFIS78_IFgnQi8HBGdUOZJHQX_KFW5elZHsV8bhHOlHN-x8U7JrzGX-9986JRr9qONJ98ud02sSf8nOVHtuyw05_nc4Zw8PCN8oVqx5ko1MBZuJrOQnSHVKw16fl6mcrmf3dqTxnFXAim0gJQK9VvDW2qv7mHYUvUyqezDkVw=s3970" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="2979" data-original-width="3970" height="480" src="https://blogger.googleusercontent.com/img/a/AVvXsEi0TSUFr8lIIYA7SgAkAuFIS78_IFgnQi8HBGdUOZJHQX_KFW5elZHsV8bhHOlHN-x8U7JrzGX-9986JRr9qONJ98ud02sSf8nOVHtuyw05_nc4Zw8PCN8oVqx5ko1MBZuJrOQnSHVKw16fl6mcrmf3dqTxnFXAim0gJQK9VvDW2qv7mHYUvUyqezDkVw=w640-h480" width="640" /></a></div></div><div><span style="font-family: courier;"><br /><br /></span></div><div><span style="font-family: courier;">Once the glue and goop are dry, it's time to add hardware, then foam. Foam dampens sound - absorbs the pressure wave, stopping sound from reflecting off the back of the cup. I'm using safety earmuffs for the headband, and it also comes with foam. These are cheap and quite sturdy, making this pretty effective.</span></div><div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/a/AVvXsEjPb6fztRkiZH1DmoffaeEJT8mZpCgyzvqaxuTkqUSNPLkp9jiHVVzXwQe520-Jb2gV7pLpybV98gLyruZ8fJ9QzQR7v711AqOWJhGFUJ5ig7QsQkBQZkAHBnE-3Cvcqdz6cd8wyapgdkVWaEbJXQgDBYD3ZrXa7EyJQRgO29O1nMviH36HIJvCtcuXXQ=s2988" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="2988" data-original-width="2988" height="640" src="https://blogger.googleusercontent.com/img/a/AVvXsEjPb6fztRkiZH1DmoffaeEJT8mZpCgyzvqaxuTkqUSNPLkp9jiHVVzXwQe520-Jb2gV7pLpybV98gLyruZ8fJ9QzQR7v711AqOWJhGFUJ5ig7QsQkBQZkAHBnE-3Cvcqdz6cd8wyapgdkVWaEbJXQgDBYD3ZrXa7EyJQRgO29O1nMviH36HIJvCtcuXXQ=w640-h640" width="640" /></a></div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/a/AVvXsEiSl2JwHpe3a65uv1uHn_lO0yNtQDcKCuKDypFmKP3VhQBw692UUCjnoDtM2f29VvRphsMoMYSykFx6SFo9rshig7TZ83A-1Q9w29TWszzF6rgItGws4fFRjLDjCk8cUSlnOFKT9bvOR0OoO-QoQiVINW-3IlXX-O5YI94_bLREs6Z5pVfLGpholbJ6eQ=s4280" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="2940" data-original-width="4280" height="440" src="https://blogger.googleusercontent.com/img/a/AVvXsEiSl2JwHpe3a65uv1uHn_lO0yNtQDcKCuKDypFmKP3VhQBw692UUCjnoDtM2f29VvRphsMoMYSykFx6SFo9rshig7TZ83A-1Q9w29TWszzF6rgItGws4fFRjLDjCk8cUSlnOFKT9bvOR0OoO-QoQiVINW-3IlXX-O5YI94_bLREs6Z5pVfLGpholbJ6eQ=w640-h440" width="640" /></a></div></div><div class="separator" style="clear: both; text-align: center;"><br /></div><div><span style="font-family: courier;"><br /></span></div><div><span style="font-family: courier;">Once the speakers were soldered to the red/black cables, I experimented with the screw/nut combination that would leave enough screw outside the cup to bolt on to the headband. I used 4 thumbscrews for each cup. On either side of the cup, one thumbscrew secured the bolt to the cup, and another tightened down on that. The narrow end of the thumbscrews formed a nice saddle for the headband to pivot off of. With that over, the foam can be stuffed in the cup.</span></div><div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/a/AVvXsEjjy7Mi71tUzQeFscAM6mAOlC4AqH4NO5exByOEID5hkbvRgUBWnKyutTiVQdU1k20tCMgBpxwGPo0Bgy-FKNTeOI7UtOqPFIfld9a7mQmCQJSTvkp8kLp-S7XGVYwaCC-BuGkW0DW1PYh9LZKFD5XZlS8r_ukJXxuohvPeE_a28aM-13VlG42Gzanmsg=s3464" style="margin-left: 1em; margin-right: 1em;"></a><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/a/AVvXsEjjy7Mi71tUzQeFscAM6mAOlC4AqH4NO5exByOEID5hkbvRgUBWnKyutTiVQdU1k20tCMgBpxwGPo0Bgy-FKNTeOI7UtOqPFIfld9a7mQmCQJSTvkp8kLp-S7XGVYwaCC-BuGkW0DW1PYh9LZKFD5XZlS8r_ukJXxuohvPeE_a28aM-13VlG42Gzanmsg=s3464" style="margin-left: 1em; margin-right: 1em;"></a><a href="https://blogger.googleusercontent.com/img/a/AVvXsEgSEeuF4yO0s2IBWB8IT9-kCBYIA5D8rcKToWvQpLl6VY7FzlPTAEFfe5NSzS6Rop-5WHIQwOPHzDeJyhokybmKdLm5OBHHwQaGqUk2A1uS3ndPR0zYWjWNxpRqrfwwzK1cOPfQNXOmQ-kSX2fmg9gERoxaPg309GW_MdfxEDtAic9iyN4DJQ0FD7nUbA=s3296" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="3296" data-original-width="3087" height="640" src="https://blogger.googleusercontent.com/img/a/AVvXsEgSEeuF4yO0s2IBWB8IT9-kCBYIA5D8rcKToWvQpLl6VY7FzlPTAEFfe5NSzS6Rop-5WHIQwOPHzDeJyhokybmKdLm5OBHHwQaGqUk2A1uS3ndPR0zYWjWNxpRqrfwwzK1cOPfQNXOmQ-kSX2fmg9gERoxaPg309GW_MdfxEDtAic9iyN4DJQ0FD7nUbA=w600-h640" width="600" /></a><img border="0" data-original-height="3464" data-original-width="3464" height="640" src="https://blogger.googleusercontent.com/img/a/AVvXsEjjy7Mi71tUzQeFscAM6mAOlC4AqH4NO5exByOEID5hkbvRgUBWnKyutTiVQdU1k20tCMgBpxwGPo0Bgy-FKNTeOI7UtOqPFIfld9a7mQmCQJSTvkp8kLp-S7XGVYwaCC-BuGkW0DW1PYh9LZKFD5XZlS8r_ukJXxuohvPeE_a28aM-13VlG42Gzanmsg=w640-h640" style="font-family: courier;" width="640" /></div></div></div><div><span style="font-family: courier;"><br /><br /></span></div><div><span style="font-family: courier;">Looking good so far. I kept testing the sound using a generic "left right speaker test" I searched for on youtube. I used 45mm screws to bolt the red plastic disks from before to the cup. The bolt held the speaker grille down against the disk as well. A non slip nut holds it from the other end, and this was topped off using an acorn nut to keep it smooth.<div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/a/AVvXsEj1CxJ2d9cEivigtBWA3opAuhtsVRiJvwkC43q2Gi8aGRE7hD7lFrRLWztMQyH1zFnC4hVfFMz61wSL8MNhoiA5ZIbUxLtpIvvyTI4V_vqJrvGoEkLf8d6OLgdepts6YZN4GwQy7Fn8dN6CRX4YrLW7U87dmeHT-ubN8rVrdH-BGDrMTaWlalRZ_xKeQA=s4616" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="2654" data-original-width="4616" height="368" src="https://blogger.googleusercontent.com/img/a/AVvXsEj1CxJ2d9cEivigtBWA3opAuhtsVRiJvwkC43q2Gi8aGRE7hD7lFrRLWztMQyH1zFnC4hVfFMz61wSL8MNhoiA5ZIbUxLtpIvvyTI4V_vqJrvGoEkLf8d6OLgdepts6YZN4GwQy7Fn8dN6CRX4YrLW7U87dmeHT-ubN8rVrdH-BGDrMTaWlalRZ_xKeQA=w640-h368" width="640" /></a></div></span></div><div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/a/AVvXsEhZjjifHovOb9hbEkmsFS-g5wCNHZPDUBne5l08ltlT-kFfjpyz0nxI_jT1DYGYe_hCsAhCIPVPZ9lJO7YvaD-1bxUmwtLz_oJntpNfVAO4OcWsCd1NABNX8cDWczeqfQSswoAqTTZ3ZT-ns3NXvjr8z1x1SRrhqwrt78W8j2r2Nw9Xc1tPUDNSRMTHew=s4616" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="3464" data-original-width="4616" height="480" src="https://blogger.googleusercontent.com/img/a/AVvXsEhZjjifHovOb9hbEkmsFS-g5wCNHZPDUBne5l08ltlT-kFfjpyz0nxI_jT1DYGYe_hCsAhCIPVPZ9lJO7YvaD-1bxUmwtLz_oJntpNfVAO4OcWsCd1NABNX8cDWczeqfQSswoAqTTZ3ZT-ns3NXvjr8z1x1SRrhqwrt78W8j2r2Nw9Xc1tPUDNSRMTHew=w640-h480" width="640" /></a></div></div><div><span style="font-family: courier;"><div><span style="font-family: courier;"><br /></span></div><br />The final piece was the headband. The brackets were bolted to the cups already, so this part just snaps in place. I used a headband pad to pass the wire through and make it more presentable.</span></div><div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/a/AVvXsEidM_o_aTR-Ly3odfd18WZ2hD-mB9kKhdbe0Gr62Dzoza0vzjiVQBqglj7PqNH9Q_kGU975xkIiq-gvwRkcEEeQ8YgsvrN-YBkTKFU94uQjk5u3b4hR_-4hxBCu8KS5mXYXl49zZ324-zHrrQNqeLxo8pd_XA_oVsW5XrYUVsH64cFXDLVA5k-Jwo8Tnw=s4616" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="3464" data-original-width="4616" height="480" src="https://blogger.googleusercontent.com/img/a/AVvXsEidM_o_aTR-Ly3odfd18WZ2hD-mB9kKhdbe0Gr62Dzoza0vzjiVQBqglj7PqNH9Q_kGU975xkIiq-gvwRkcEEeQ8YgsvrN-YBkTKFU94uQjk5u3b4hR_-4hxBCu8KS5mXYXl49zZ324-zHrrQNqeLxo8pd_XA_oVsW5XrYUVsH64cFXDLVA5k-Jwo8Tnw=w640-h480" width="640" /></a></div></div><div><span style="font-family: courier;"><br /><br />Here's a view on my head. The clamping pressure of the headband is higher than regular headphones. I'll be experimenting with a hot-air gun to see if I can make it a bit more relaxed. I'm really enjoying the sound though. Did I accomplish my goal? Maybe. It's definitely beyond my Philips and modified Symphonized headphones. Details are crystal clear, and I'll have to really compare my Fh3 closely to determine which one has more - so that is a big win already. I can hear positions better. Nothing is lacking, and treble isn't pressing into painful levels.</span></div><div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/a/AVvXsEgDs4e03ohe9yb3S_-QH0Ok2cin9qYWOVBDzvokUufdaxBSUJzYZVqj3ovVLhqrMeX2A2Q_GwiHFx9GLVStEtF5eWElJFllZi1Ma2-F2dETwmvJHaASLNaO3pF-vjBFlG7BFfEKCp7OzbCprdkk1PaFHnQJJBy19tQc_Yyvwld135X7yXSyTrrF177wEA=s6016" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="4016" data-original-width="6016" height="428" src="https://blogger.googleusercontent.com/img/a/AVvXsEgDs4e03ohe9yb3S_-QH0Ok2cin9qYWOVBDzvokUufdaxBSUJzYZVqj3ovVLhqrMeX2A2Q_GwiHFx9GLVStEtF5eWElJFllZi1Ma2-F2dETwmvJHaASLNaO3pF-vjBFlG7BFfEKCp7OzbCprdkk1PaFHnQJJBy19tQc_Yyvwld135X7yXSyTrrF177wEA=w640-h428" width="640" /></a><a href="https://blogger.googleusercontent.com/img/a/AVvXsEi7hKg3OBkfLONHLUBYSqvzmtfJy7AuS8Wnn6RvRsBynC1jw7fVCIXfJn3C1IxKZIoJfI8qAsS3WhZmvRh_NXcCYoT5l-CXqUWNdLUa_RuUUgnWxEUTllw8uyS2I9zIw239JV8yzPiwHmfYt3QzFASrgF4bC6OFqidQ1e8HabSXyieP5TJSHmE3Kyxm3w=s4616" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="4616" data-original-width="3462" height="640" src="https://blogger.googleusercontent.com/img/a/AVvXsEi7hKg3OBkfLONHLUBYSqvzmtfJy7AuS8Wnn6RvRsBynC1jw7fVCIXfJn3C1IxKZIoJfI8qAsS3WhZmvRh_NXcCYoT5l-CXqUWNdLUa_RuUUgnWxEUTllw8uyS2I9zIw239JV8yzPiwHmfYt3QzFASrgF4bC6OFqidQ1e8HabSXyieP5TJSHmE3Kyxm3w=w480-h640" width="480" /></a></div></div><div><span style="font-family: courier;"><br />Some tracks I've been testing with.</span></div><div><ul style="text-align: left;"><li><span style="font-family: courier;">Massive Attack - "Angel" and "Teardrop". Bass heavy tracks. Test here is if it's substantial while providing detail.</span></li><li><span style="font-family: courier;">Ennio Morricone - "The Good, The Bad and The Ugly" soundtrack, "The Ecstasy of Gold" and "The Trio". This is my treble test. Both have points that can bring out painful shell noise, or smooth sweet highs. Note the vocals in "Ecstasy" and trumpet in "The Trio". If the female vocals aren't enough of a stress test for your earpiece, the trumpet may be. Playing those without painful shrill noise, but sweet highs is an accomplishment. There's a lot of instruments at the end of "Ecstasy" making it a decent test, being able to pick out the different instruments. A lot of potential there to produce a cacophony. </span></li><li><span style="font-family: courier;">Chuck Mangione - "Feels So Good", Dave Brubeck Quartet - "Take Five". Instrumental jazz provides solid range in tone and harmonics in the notes, testing range and clarity, instrument separation, position etc.</span></li><li><span style="font-family: courier;">My brother gave me this one. Alan Walker - "Faded". Listen for the seagulls at the start and end. Decent test for sensitivity and detail.</span></li></ul></div><div><span style="font-family: courier;"><br /></span></div><div><span style="font-family: courier;"><br /></span></div>
<iframe allow="autoplay" frameborder="no" height="300" scrolling="no" src="https://w.soundcloud.com/player/?url=https%3A//api.soundcloud.com/tracks/330147077&color=%23ff5500&auto_play=false&hide_related=false&show_comments=true&show_user=true&show_reposts=false&show_teaser=true&visual=true" width="100%"></iframe><div style="color: #cccccc; font-family: Interstate, "Lucida Grande", "Lucida Sans Unicode", "Lucida Sans", Garuda, Verdana, Tahoma, sans-serif; font-size: 10px; font-weight: 100; line-break: anywhere; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; word-break: normal;"><a href="https://soundcloud.com/ennio-morricone" style="color: #cccccc; text-decoration: none;" target="_blank" title="Ennio Morricone">Ennio Morricone</a> · <a href="https://soundcloud.com/ennio-morricone/the-ecstasy-of-gold-2" style="color: #cccccc; text-decoration: none;" target="_blank" title="The Ecstasy of Gold">The Ecstasy of Gold</a></div>
<iframe allow="autoplay" frameborder="no" height="300" scrolling="no" src="https://w.soundcloud.com/player/?url=https%3A//api.soundcloud.com/tracks/330147541&color=%23ff5500&auto_play=false&hide_related=false&show_comments=true&show_user=true&show_reposts=false&show_teaser=true&visual=true" width="100%"></iframe><div style="color: #cccccc; font-family: Interstate, "Lucida Grande", "Lucida Sans Unicode", "Lucida Sans", Garuda, Verdana, Tahoma, sans-serif; font-size: 10px; font-weight: 100; line-break: anywhere; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; word-break: normal;"><a href="https://soundcloud.com/ennio-morricone" style="color: #cccccc; text-decoration: none;" target="_blank" title="Ennio Morricone">Ennio Morricone</a> · <a href="https://soundcloud.com/ennio-morricone/the-trio-il-triello-from-the" style="color: #cccccc; text-decoration: none;" target="_blank" title="The Trio - Il Triello (From "The Good, the Bad and the Ugly")">The Trio - Il Triello (From "The Good, the Bad and the Ugly")</a></div>
<iframe allow="autoplay" frameborder="no" height="300" scrolling="no" src="https://w.soundcloud.com/player/?url=https%3A//api.soundcloud.com/tracks/256119829&color=%23ff5500&auto_play=false&hide_related=false&show_comments=true&show_user=true&show_reposts=false&show_teaser=true&visual=true" width="100%"></iframe><div style="color: #cccccc; font-family: Interstate, "Lucida Grande", "Lucida Sans Unicode", "Lucida Sans", Garuda, Verdana, Tahoma, sans-serif; font-size: 10px; font-weight: 100; line-break: anywhere; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; word-break: normal;"><a href="https://soundcloud.com/alanwalker" style="color: #cccccc; text-decoration: none;" target="_blank" title="Alan Walker">Alan Walker</a> · <a href="https://soundcloud.com/alanwalker/faded-1" style="color: #cccccc; text-decoration: none;" target="_blank" title="Alan Walker - Faded">Alan Walker - Faded</a></div>Beomagihttp://www.blogger.com/profile/00469223835355067867noreply@blogger.com0tag:blogger.com,1999:blog-2974094041951992980.post-49800068726657655462021-10-16T12:30:00.000-07:002021-10-16T12:30:38.000-07:00Add a multithreaded http stats service to an existing app<p><span style="font-family: courier;"> Quite often when we have a running app, we'd be curious about what's going on in it <i>right now</i>. Often we'd want to see some stats of some sort. Maybe have a way to trigger a test or see if the system is healthy. Whatever it is., we can reference the previous <a href="https://beomagi.blogspot.com/2021/01/a-simple-multithreaded-rest-service.html" rel="nofollow" target="_blank">multithreaded http server example</a>.</span></p><p><span style="font-family: courier;">The only difference is we'll run the request loop in it's own thread. This will let the app carry out whatever it needs to, and in between heavy cpu operations, trigger the http request. We are restricted by the GIL, so if the app has long CPU bound operations, this isn't ideal obviously.</span></p><p><span style="font-family: courier;"><br /></span></p><p><span style="font-family: courier;">Here's a very basic sample:</span></p><div data-darkreader-inline-bgcolor="" data-darkreader-inline-color="" style="--darkreader-inline-bgcolor: #16161e; --darkreader-inline-color: #ffffff; background-color: #16171d; color: #f8f8f0; font-family: Consolas, "Courier New", monospace; font-size: 14px; line-height: 19px; white-space: pre;"><div><span data-darkreader-inline-color="" style="--darkreader-inline-color: #ffff6e; color: #ffd945;">''' Add a threaded non blocking http response to an app '''</span></div><div><span data-darkreader-inline-color="" style="--darkreader-inline-color: #fff6e4; color: #5c6370; font-style: italic;">#!/usr/bin/env python3</span></div><div><span data-darkreader-inline-color="" style="--darkreader-inline-color: #ff6880; color: #ff3f4f; font-style: italic;">import</span> socketserver</div><div><span data-darkreader-inline-color="" style="--darkreader-inline-color: #ff6880; color: #ff3f4f; font-style: italic;">import</span> http.server</div><div><span data-darkreader-inline-color="" style="--darkreader-inline-color: #ff6880; color: #ff3f4f; font-style: italic;">import</span> sys</div><div><span data-darkreader-inline-color="" style="--darkreader-inline-color: #ff6880; color: #ff3f4f; font-style: italic;">import</span> time</div><div><span data-darkreader-inline-color="" style="--darkreader-inline-color: #ff6880; color: #ff3f4f; font-style: italic;">import</span> urllib</div><div><span data-darkreader-inline-color="" style="--darkreader-inline-color: #ff6880; color: #ff3f4f; font-style: italic;">import</span> threading</div><div><span data-darkreader-inline-color="" style="--darkreader-inline-color: #47ffff; color: #19d1e5;">HTPORT</span> <span data-darkreader-inline-color="" style="--darkreader-inline-color: #ff6880; color: #ff3f4f; font-style: italic;">=</span> <span data-darkreader-inline-color="" style="--darkreader-inline-color: #ffafff; color: #e373ce;">8000</span></div><br /><div><span data-darkreader-inline-color="" style="--darkreader-inline-color: #47ffff; color: #19d1e5; font-style: italic;">class</span> <span data-darkreader-inline-color="" style="--darkreader-inline-color: #94ffff; color: #61afef;">Handler</span>(<span data-darkreader-inline-color="" style="--darkreader-inline-color: #e0ff29; color: #81f900;">http</span>.<span data-darkreader-inline-color="" style="--darkreader-inline-color: #e0ff29; color: #81f900;">server</span>.<span data-darkreader-inline-color="" style="--darkreader-inline-color: #e0ff29; color: #81f900;">BaseHTTPRequestHandler</span>):</div><div> <span data-darkreader-inline-color="" style="--darkreader-inline-color: #ffff6e; color: #ffd945;">''' use our own handlers functions '''</span></div><br /><div> <span data-darkreader-inline-color="" style="--darkreader-inline-color: #47ffff; color: #19d1e5; font-style: italic;">def</span> <span data-darkreader-inline-color="" style="--darkreader-inline-color: #e0ff29; color: #81f900;">sendtextinfo</span>(<span data-darkreader-inline-color="" style="--darkreader-inline-color: #fff723; color: #ff9700; font-style: italic;">self</span>, <span data-darkreader-inline-color="" style="--darkreader-inline-color: #fff723; color: #ff9700; font-style: italic;">code</span>, <span data-darkreader-inline-color="" style="--darkreader-inline-color: #fff723; color: #ff9700; font-style: italic;">text</span>):</div><div> <span data-darkreader-inline-color="" style="--darkreader-inline-color: #ff6880; color: #ff3f4f; font-style: italic;">self</span>.send_response(code)</div><div> <span data-darkreader-inline-color="" style="--darkreader-inline-color: #ff6880; color: #ff3f4f; font-style: italic;">self</span>.send_header(<span data-darkreader-inline-color="" style="--darkreader-inline-color: #ffff6e; color: #ffd945;">'Content-type'</span>, <span data-darkreader-inline-color="" style="--darkreader-inline-color: #ffff6e; color: #ffd945;">'text/html'</span>)</div><div> <span data-darkreader-inline-color="" style="--darkreader-inline-color: #ff6880; color: #ff3f4f; font-style: italic;">self</span>.end_headers()</div><div> <span data-darkreader-inline-color="" style="--darkreader-inline-color: #ff6880; color: #ff3f4f; font-style: italic;">self</span>.wfile.write((<span data-darkreader-inline-color="" style="--darkreader-inline-color: #47ffff; color: #19d1e5;">str</span>(text)<span data-darkreader-inline-color="" style="--darkreader-inline-color: #ff6880; color: #ff3f4f; font-style: italic;">+</span><span data-darkreader-inline-color="" style="--darkreader-inline-color: #ffff6e; color: #ffd945;">"</span><span data-darkreader-inline-color="" style="--darkreader-inline-color: #47ffff; color: #19d1e5;">\n</span><span data-darkreader-inline-color="" style="--darkreader-inline-color: #ffff6e; color: #ffd945;">"</span>).encode())</div><br /><div> <span data-darkreader-inline-color="" style="--darkreader-inline-color: #47ffff; color: #19d1e5; font-style: italic;">def</span> <span data-darkreader-inline-color="" style="--darkreader-inline-color: #e0ff29; color: #81f900;">do_GET</span>(<span data-darkreader-inline-color="" style="--darkreader-inline-color: #fff723; color: #ff9700; font-style: italic;">self</span>):</div><div> <span data-darkreader-inline-color="" style="--darkreader-inline-color: #ffff6e; color: #ffd945;">''' handle get '''</span></div><div> tnow <span data-darkreader-inline-color="" style="--darkreader-inline-color: #ff6880; color: #ff3f4f; font-style: italic;">=</span> time.time()</div><div> gnow <span data-darkreader-inline-color="" style="--darkreader-inline-color: #ff6880; color: #ff3f4f; font-style: italic;">=</span> time.strftime(<span data-darkreader-inline-color="" style="--darkreader-inline-color: #ffff6e; color: #ffd945;">'%Y-%m-</span><span data-darkreader-inline-color="" style="--darkreader-inline-color: #47ffff; color: #19d1e5;">%d</span><span data-darkreader-inline-color="" style="--darkreader-inline-color: #ffff6e; color: #ffd945;"> %H:%M:%S'</span>, time.gmtime(tnow)) <span data-darkreader-inline-color="" style="--darkreader-inline-color: #fff6e4; color: #5c6370; font-style: italic;">#Formatted UTC time</span></div><div> parsed_data <span data-darkreader-inline-color="" style="--darkreader-inline-color: #ff6880; color: #ff3f4f; font-style: italic;">=</span> urllib.parse.urlparse(<span data-darkreader-inline-color="" style="--darkreader-inline-color: #ff6880; color: #ff3f4f; font-style: italic;">self</span>.path)</div><div> <span data-darkreader-inline-color="" style="--darkreader-inline-color: #ff6880; color: #ff3f4f; font-style: italic;">if</span> parsed_data.geturl().lower() <span data-darkreader-inline-color="" style="--darkreader-inline-color: #ff6880; color: #ff3f4f; font-style: italic;">==</span> <span data-darkreader-inline-color="" style="--darkreader-inline-color: #ffff6e; color: #ffd945;">"/time"</span>:</div><div> message <span data-darkreader-inline-color="" style="--darkreader-inline-color: #ff6880; color: #ff3f4f; font-style: italic;">=</span> gnow</div><div> <span data-darkreader-inline-color="" style="--darkreader-inline-color: #ff6880; color: #ff3f4f; font-style: italic;">else</span> : message<span data-darkreader-inline-color="" style="--darkreader-inline-color: #ff6880; color: #ff3f4f; font-style: italic;">=</span><span data-darkreader-inline-color="" style="--darkreader-inline-color: #ffff6e; color: #ffd945;">"Secondary thread for http server does not block main loop<br/></span><span data-darkreader-inline-color="" style="--darkreader-inline-color: #47ffff; color: #19d1e5;">{}</span><span data-darkreader-inline-color="" style="--darkreader-inline-color: #ffff6e; color: #ffd945;">"</span>.format(gnow)</div><div> <span data-darkreader-inline-color="" style="--darkreader-inline-color: #ff6880; color: #ff3f4f; font-style: italic;">self</span>.sendtextinfo(<span data-darkreader-inline-color="" style="--darkreader-inline-color: #ffafff; color: #e373ce;">200</span>,message)</div><br /><div><span data-darkreader-inline-color="" style="--darkreader-inline-color: #47ffff; color: #19d1e5; font-style: italic;">class</span> <span data-darkreader-inline-color="" style="--darkreader-inline-color: #94ffff; color: #61afef;">ThreadedHTTPServer</span>(<span data-darkreader-inline-color="" style="--darkreader-inline-color: #e0ff29; color: #81f900;">socketserver</span>.<span data-darkreader-inline-color="" style="--darkreader-inline-color: #e0ff29; color: #81f900;">ThreadingMixIn</span>, <span data-darkreader-inline-color="" style="--darkreader-inline-color: #e0ff29; color: #81f900;">http</span>.<span data-darkreader-inline-color="" style="--darkreader-inline-color: #e0ff29; color: #81f900;">server</span>.<span data-darkreader-inline-color="" style="--darkreader-inline-color: #e0ff29; color: #81f900;">HTTPServer</span>):</div><div> <span data-darkreader-inline-color="" style="--darkreader-inline-color: #ffff6e; color: #ffd945;">''' Basic threaded server class '''</span></div><div> http.server.HTTPServer.request_queue_size <span data-darkreader-inline-color="" style="--darkreader-inline-color: #ff6880; color: #ff3f4f; font-style: italic;">=</span> <span data-darkreader-inline-color="" style="--darkreader-inline-color: #ffafff; color: #e373ce;">128</span></div><br /><br /><div><span data-darkreader-inline-color="" style="--darkreader-inline-color: #47ffff; color: #19d1e5; font-style: italic;">def</span> <span data-darkreader-inline-color="" style="--darkreader-inline-color: #e0ff29; color: #81f900;">backgroundfunction</span>():</div><div> <span data-darkreader-inline-color="" style="--darkreader-inline-color: #47ffff; color: #19d1e5;">HTSERVER</span> <span data-darkreader-inline-color="" style="--darkreader-inline-color: #ff6880; color: #ff3f4f; font-style: italic;">=</span> ThreadedHTTPServer((<span data-darkreader-inline-color="" style="--darkreader-inline-color: #ffff6e; color: #ffd945;">''</span>, <span data-darkreader-inline-color="" style="--darkreader-inline-color: #47ffff; color: #19d1e5;">HTPORT</span>), Handler)</div><div> <span data-darkreader-inline-color="" style="--darkreader-inline-color: #ff6880; color: #ff3f4f; font-style: italic;">while</span> <span data-darkreader-inline-color="" style="--darkreader-inline-color: #ffafff; color: #e373ce;">1</span>:</div><div> sys.stdout.flush()</div><div> <span data-darkreader-inline-color="" style="--darkreader-inline-color: #47ffff; color: #19d1e5;">HTSERVER</span>.handle_request()</div><br /><div>threading.Thread(<span data-darkreader-inline-color="" style="--darkreader-inline-color: #fff723; color: #ff9700; font-style: italic;">target</span><span data-darkreader-inline-color="" style="--darkreader-inline-color: #ff6880; color: #ff3f4f; font-style: italic;">=</span>backgroundfunction).start()</div><br /><div><span data-darkreader-inline-color="" style="--darkreader-inline-color: #fff6e4; color: #5c6370; font-style: italic;">#substitute this loop with main loop of your app</span></div><div><span data-darkreader-inline-color="" style="--darkreader-inline-color: #ff6880; color: #ff3f4f; font-style: italic;">while</span> <span data-darkreader-inline-color="" style="--darkreader-inline-color: #ffafff; color: #e373ce;">1</span>:</div><div> time.sleep(<span data-darkreader-inline-color="" style="--darkreader-inline-color: #ffafff; color: #e373ce;">1</span>)</div><div> <span data-darkreader-inline-color="" style="--darkreader-inline-color: #e0ff29; color: #81f900;">print</span>(<span data-darkreader-inline-color="" style="--darkreader-inline-color: #ffff6e; color: #ffd945;">"Other stuff here!"</span>)</div><br /></div><p><span style="font-family: courier;"><br /></span></p><p><span style="font-family: courier;">Now I've mucked about with the "get" method to simplify the message return a little for expansion, but the handler can really just be a single function. ThreadedHTTPServer is the heart of this being able to handle multiple requests in separate threads, and this runs in a thread before the main loop starts. </span></p><p><span style="font-family: courier;">How would we use this in a more practical example?</span></p><p><span style="font-family: courier;">Lets have the app read files in one folder and manipulate them, dumping the result in another. We'll have the service respond with stats.</span></p><p><span style="font-family: courier;"><br /></span></p><p><span style="font-family: courier;"><br /></span></p><p><span style="font-family: courier;">Example app to "encrypt" text files with rot 13. Takes a file from c:\tmp\a, and outputs the result in c:\tmp\b. File moved to c:\tmp\processed. </span></p><div data-darkreader-inline-bgcolor="" data-darkreader-inline-color="" style="--darkreader-inline-bgcolor: #16161e; --darkreader-inline-color: #ffffff; background-color: #16171d; color: #f8f8f0; font-family: Consolas, "Courier New", monospace; font-size: 14px; line-height: 19px; white-space: pre;"><div><span data-darkreader-inline-color="" style="--darkreader-inline-color: #ffff6e; color: #ffd945;">''' Add a threaded non blocking http response to an app '''</span></div><div><span data-darkreader-inline-color="" style="--darkreader-inline-color: #fff6e4; color: #5c6370; font-style: italic;">#!/usr/bin/env python3</span></div><div><span data-darkreader-inline-color="" style="--darkreader-inline-color: #ff6880; color: #ff3f4f; font-style: italic;">import</span> socketserver</div><div><span data-darkreader-inline-color="" style="--darkreader-inline-color: #ff6880; color: #ff3f4f; font-style: italic;">import</span> http.server</div><div><span data-darkreader-inline-color="" style="--darkreader-inline-color: #ff6880; color: #ff3f4f; font-style: italic;">import</span> sys</div><div><span data-darkreader-inline-color="" style="--darkreader-inline-color: #ff6880; color: #ff3f4f; font-style: italic;">import</span> time</div><div><span data-darkreader-inline-color="" style="--darkreader-inline-color: #ff6880; color: #ff3f4f; font-style: italic;">import</span> urllib</div><div><span data-darkreader-inline-color="" style="--darkreader-inline-color: #ff6880; color: #ff3f4f; font-style: italic;">import</span> threading</div><div><span data-darkreader-inline-color="" style="--darkreader-inline-color: #ff6880; color: #ff3f4f; font-style: italic;">import</span> glob</div><div><span data-darkreader-inline-color="" style="--darkreader-inline-color: #ff6880; color: #ff3f4f; font-style: italic;">import</span> codecs</div><div><span data-darkreader-inline-color="" style="--darkreader-inline-color: #ff6880; color: #ff3f4f; font-style: italic;">import</span> os</div><div><span data-darkreader-inline-color="" style="--darkreader-inline-color: #ff6880; color: #ff3f4f; font-style: italic;">import</span> shutil</div><div><span data-darkreader-inline-color="" style="--darkreader-inline-color: #ff6880; color: #ff3f4f; font-style: italic;">import</span> json</div><div><span data-darkreader-inline-color="" style="--darkreader-inline-color: #47ffff; color: #19d1e5;">HTPORT</span> <span data-darkreader-inline-color="" style="--darkreader-inline-color: #ff6880; color: #ff3f4f; font-style: italic;">=</span> <span data-darkreader-inline-color="" style="--darkreader-inline-color: #ffafff; color: #e373ce;">8000</span></div><div><span data-darkreader-inline-color="" style="--darkreader-inline-color: #47ffff; color: #19d1e5;">INPUT_FOLDER</span><span data-darkreader-inline-color="" style="--darkreader-inline-color: #ff6880; color: #ff3f4f; font-style: italic;">=</span><span data-darkreader-inline-color="" style="--darkreader-inline-color: #ffff6e; color: #ffd945;">"c:</span><span data-darkreader-inline-color="" style="--darkreader-inline-color: #47ffff; color: #19d1e5;">\\</span><span data-darkreader-inline-color="" style="--darkreader-inline-color: #ffff6e; color: #ffd945;">tmp</span><span data-darkreader-inline-color="" style="--darkreader-inline-color: #47ffff; color: #19d1e5;">\\</span><span data-darkreader-inline-color="" style="--darkreader-inline-color: #ffff6e; color: #ffd945;">a</span><span data-darkreader-inline-color="" style="--darkreader-inline-color: #47ffff; color: #19d1e5;">\\</span><span data-darkreader-inline-color="" style="--darkreader-inline-color: #ffff6e; color: #ffd945;">"</span></div><div><span data-darkreader-inline-color="" style="--darkreader-inline-color: #47ffff; color: #19d1e5;">PROCESSED_FOLDER</span><span data-darkreader-inline-color="" style="--darkreader-inline-color: #ff6880; color: #ff3f4f; font-style: italic;">=</span><span data-darkreader-inline-color="" style="--darkreader-inline-color: #ffff6e; color: #ffd945;">"c:</span><span data-darkreader-inline-color="" style="--darkreader-inline-color: #47ffff; color: #19d1e5;">\\</span><span data-darkreader-inline-color="" style="--darkreader-inline-color: #ffff6e; color: #ffd945;">tmp</span><span data-darkreader-inline-color="" style="--darkreader-inline-color: #47ffff; color: #19d1e5;">\\</span><span data-darkreader-inline-color="" style="--darkreader-inline-color: #ffff6e; color: #ffd945;">processed</span><span data-darkreader-inline-color="" style="--darkreader-inline-color: #47ffff; color: #19d1e5;">\\</span><span data-darkreader-inline-color="" style="--darkreader-inline-color: #ffff6e; color: #ffd945;">"</span></div><div><span data-darkreader-inline-color="" style="--darkreader-inline-color: #47ffff; color: #19d1e5;">OUTPUT_FOLDER</span><span data-darkreader-inline-color="" style="--darkreader-inline-color: #ff6880; color: #ff3f4f; font-style: italic;">=</span><span data-darkreader-inline-color="" style="--darkreader-inline-color: #ffff6e; color: #ffd945;">"c:</span><span data-darkreader-inline-color="" style="--darkreader-inline-color: #47ffff; color: #19d1e5;">\\</span><span data-darkreader-inline-color="" style="--darkreader-inline-color: #ffff6e; color: #ffd945;">tmp</span><span data-darkreader-inline-color="" style="--darkreader-inline-color: #47ffff; color: #19d1e5;">\\</span><span data-darkreader-inline-color="" style="--darkreader-inline-color: #ffff6e; color: #ffd945;">b</span><span data-darkreader-inline-color="" style="--darkreader-inline-color: #47ffff; color: #19d1e5;">\\</span><span data-darkreader-inline-color="" style="--darkreader-inline-color: #ffff6e; color: #ffd945;">"</span></div><div>timetoleave<span data-darkreader-inline-color="" style="--darkreader-inline-color: #ff6880; color: #ff3f4f; font-style: italic;">=</span><span data-darkreader-inline-color="" style="--darkreader-inline-color: #47ffff; color: #19d1e5;">False</span></div><div>stats<span data-darkreader-inline-color="" style="--darkreader-inline-color: #ff6880; color: #ff3f4f; font-style: italic;">=</span>{}</div><div>stats[<span data-darkreader-inline-color="" style="--darkreader-inline-color: #ffff6e; color: #ffd945;">"Errors"</span>]<span data-darkreader-inline-color="" style="--darkreader-inline-color: #ff6880; color: #ff3f4f; font-style: italic;">=</span>[]</div><div>stats[<span data-darkreader-inline-color="" style="--darkreader-inline-color: #ffff6e; color: #ffd945;">"RecentRequests"</span>]<span data-darkreader-inline-color="" style="--darkreader-inline-color: #ff6880; color: #ff3f4f; font-style: italic;">=</span>[]</div><br /><div><span data-darkreader-inline-color="" style="--darkreader-inline-color: #47ffff; color: #19d1e5; font-style: italic;">def</span> <span data-darkreader-inline-color="" style="--darkreader-inline-color: #e0ff29; color: #81f900;">gnow</span>():</div><div> tnow <span data-darkreader-inline-color="" style="--darkreader-inline-color: #ff6880; color: #ff3f4f; font-style: italic;">=</span> time.time()</div><div> <span data-darkreader-inline-color="" style="--darkreader-inline-color: #ff6880; color: #ff3f4f; font-style: italic;">return</span> time.strftime(<span data-darkreader-inline-color="" style="--darkreader-inline-color: #ffff6e; color: #ffd945;">'%Y-%m-</span><span data-darkreader-inline-color="" style="--darkreader-inline-color: #47ffff; color: #19d1e5;">%d</span><span data-darkreader-inline-color="" style="--darkreader-inline-color: #ffff6e; color: #ffd945;"> %H:%M:%S'</span>, time.gmtime(tnow)) <span data-darkreader-inline-color="" style="--darkreader-inline-color: #fff6e4; color: #5c6370; font-style: italic;">#Formatted UTC time</span></div><br /><br /><div><span data-darkreader-inline-color="" style="--darkreader-inline-color: #47ffff; color: #19d1e5; font-style: italic;">class</span> <span data-darkreader-inline-color="" style="--darkreader-inline-color: #94ffff; color: #61afef;">Handler</span>(<span data-darkreader-inline-color="" style="--darkreader-inline-color: #e0ff29; color: #81f900;">http</span>.<span data-darkreader-inline-color="" style="--darkreader-inline-color: #e0ff29; color: #81f900;">server</span>.<span data-darkreader-inline-color="" style="--darkreader-inline-color: #e0ff29; color: #81f900;">BaseHTTPRequestHandler</span>):</div><div> <span data-darkreader-inline-color="" style="--darkreader-inline-color: #ffff6e; color: #ffd945;">''' use our own handlers functions '''</span></div><br /><div> <span data-darkreader-inline-color="" style="--darkreader-inline-color: #47ffff; color: #19d1e5; font-style: italic;">def</span> <span data-darkreader-inline-color="" style="--darkreader-inline-color: #e0ff29; color: #81f900;">sendtextinfo</span>(<span data-darkreader-inline-color="" style="--darkreader-inline-color: #fff723; color: #ff9700; font-style: italic;">self</span>, <span data-darkreader-inline-color="" style="--darkreader-inline-color: #fff723; color: #ff9700; font-style: italic;">code</span>, <span data-darkreader-inline-color="" style="--darkreader-inline-color: #fff723; color: #ff9700; font-style: italic;">text</span>):</div><div> <span data-darkreader-inline-color="" style="--darkreader-inline-color: #ff6880; color: #ff3f4f; font-style: italic;">self</span>.send_response(code)</div><div> <span data-darkreader-inline-color="" style="--darkreader-inline-color: #ff6880; color: #ff3f4f; font-style: italic;">self</span>.send_header(<span data-darkreader-inline-color="" style="--darkreader-inline-color: #ffff6e; color: #ffd945;">'Content-type'</span>, <span data-darkreader-inline-color="" style="--darkreader-inline-color: #ffff6e; color: #ffd945;">'text/html'</span>)</div><div> <span data-darkreader-inline-color="" style="--darkreader-inline-color: #ff6880; color: #ff3f4f; font-style: italic;">self</span>.end_headers()</div><div> <span data-darkreader-inline-color="" style="--darkreader-inline-color: #ff6880; color: #ff3f4f; font-style: italic;">self</span>.wfile.write((<span data-darkreader-inline-color="" style="--darkreader-inline-color: #47ffff; color: #19d1e5;">str</span>(text)<span data-darkreader-inline-color="" style="--darkreader-inline-color: #ff6880; color: #ff3f4f; font-style: italic;">+</span><span data-darkreader-inline-color="" style="--darkreader-inline-color: #ffff6e; color: #ffd945;">"</span><span data-darkreader-inline-color="" style="--darkreader-inline-color: #47ffff; color: #19d1e5;">\n</span><span data-darkreader-inline-color="" style="--darkreader-inline-color: #ffff6e; color: #ffd945;">"</span>).encode())</div><br /><div> <span data-darkreader-inline-color="" style="--darkreader-inline-color: #47ffff; color: #19d1e5; font-style: italic;">def</span> <span data-darkreader-inline-color="" style="--darkreader-inline-color: #e0ff29; color: #81f900;">do_GET</span>(<span data-darkreader-inline-color="" style="--darkreader-inline-color: #fff723; color: #ff9700; font-style: italic;">self</span>):</div><div> <span data-darkreader-inline-color="" style="--darkreader-inline-color: #ff6880; color: #ff3f4f; font-style: italic;">global</span> timetoleave</div><div> <span data-darkreader-inline-color="" style="--darkreader-inline-color: #ff6880; color: #ff3f4f; font-style: italic;">global</span> stats</div><div> <span data-darkreader-inline-color="" style="--darkreader-inline-color: #ffff6e; color: #ffd945;">''' handle get '''</span></div><div> parsed_data <span data-darkreader-inline-color="" style="--darkreader-inline-color: #ff6880; color: #ff3f4f; font-style: italic;">=</span> urllib.parse.urlparse(<span data-darkreader-inline-color="" style="--darkreader-inline-color: #ff6880; color: #ff3f4f; font-style: italic;">self</span>.path)</div><div> <span data-darkreader-inline-color="" style="--darkreader-inline-color: #ff6880; color: #ff3f4f; font-style: italic;">if</span> parsed_data.geturl().lower() <span data-darkreader-inline-color="" style="--darkreader-inline-color: #ff6880; color: #ff3f4f; font-style: italic;">==</span> <span data-darkreader-inline-color="" style="--darkreader-inline-color: #ffff6e; color: #ffd945;">"/quit"</span>:</div><div> message <span data-darkreader-inline-color="" style="--darkreader-inline-color: #ff6880; color: #ff3f4f; font-style: italic;">=</span> <span data-darkreader-inline-color="" style="--darkreader-inline-color: #ffff6e; color: #ffd945;">"BYE!"</span></div><div> timetoleave<span data-darkreader-inline-color="" style="--darkreader-inline-color: #ff6880; color: #ff3f4f; font-style: italic;">=</span><span data-darkreader-inline-color="" style="--darkreader-inline-color: #47ffff; color: #19d1e5;">True</span></div><div> <span data-darkreader-inline-color="" style="--darkreader-inline-color: #ff6880; color: #ff3f4f; font-style: italic;">else</span> :</div><div> stats[<span data-darkreader-inline-color="" style="--darkreader-inline-color: #ffff6e; color: #ffd945;">"time"</span>]<span data-darkreader-inline-color="" style="--darkreader-inline-color: #ff6880; color: #ff3f4f; font-style: italic;">=</span>gnow()</div><div> tnow<span data-darkreader-inline-color="" style="--darkreader-inline-color: #ff6880; color: #ff3f4f; font-style: italic;">=</span>time.time()</div><div> <span data-darkreader-inline-color="" style="--darkreader-inline-color: #ff6880; color: #ff3f4f; font-style: italic;">if</span> <span data-darkreader-inline-color="" style="--darkreader-inline-color: #e0ff29; color: #81f900;">len</span>(stats[<span data-darkreader-inline-color="" style="--darkreader-inline-color: #ffff6e; color: #ffd945;">"RecentRequests"</span>])<span data-darkreader-inline-color="" style="--darkreader-inline-color: #ff6880; color: #ff3f4f; font-style: italic;">></span><span data-darkreader-inline-color="" style="--darkreader-inline-color: #ffafff; color: #e373ce;">0</span>:</div><div> time_for_last_n<span data-darkreader-inline-color="" style="--darkreader-inline-color: #ff6880; color: #ff3f4f; font-style: italic;">=</span>tnow<span data-darkreader-inline-color="" style="--darkreader-inline-color: #ff6880; color: #ff3f4f; font-style: italic;">-</span>stats[<span data-darkreader-inline-color="" style="--darkreader-inline-color: #ffff6e; color: #ffd945;">"RecentRequests"</span>][<span data-darkreader-inline-color="" style="--darkreader-inline-color: #ffafff; color: #e373ce;">0</span>][<span data-darkreader-inline-color="" style="--darkreader-inline-color: #ffff6e; color: #ffd945;">"Time"</span>]</div><div> <span data-darkreader-inline-color="" style="--darkreader-inline-color: #ff6880; color: #ff3f4f; font-style: italic;">if</span> time_for_last_n<span data-darkreader-inline-color="" style="--darkreader-inline-color: #ff6880; color: #ff3f4f; font-style: italic;">></span><span data-darkreader-inline-color="" style="--darkreader-inline-color: #ffafff; color: #e373ce;">0</span>:</div><div> rate<span data-darkreader-inline-color="" style="--darkreader-inline-color: #ff6880; color: #ff3f4f; font-style: italic;">=</span><span data-darkreader-inline-color="" style="--darkreader-inline-color: #e0ff29; color: #81f900;">len</span>(stats[<span data-darkreader-inline-color="" style="--darkreader-inline-color: #ffff6e; color: #ffd945;">"RecentRequests"</span>])<span data-darkreader-inline-color="" style="--darkreader-inline-color: #ff6880; color: #ff3f4f; font-style: italic;">/</span>time_for_last_n</div><div> stats[<span data-darkreader-inline-color="" style="--darkreader-inline-color: #ffff6e; color: #ffd945;">"Rate"</span>]<span data-darkreader-inline-color="" style="--darkreader-inline-color: #ff6880; color: #ff3f4f; font-style: italic;">=</span>rate</div><div> msgtext<span data-darkreader-inline-color="" style="--darkreader-inline-color: #ff6880; color: #ff3f4f; font-style: italic;">=</span>json.dumps(stats,<span data-darkreader-inline-color="" style="--darkreader-inline-color: #fff723; color: #ff9700; font-style: italic;">indent</span><span data-darkreader-inline-color="" style="--darkreader-inline-color: #ff6880; color: #ff3f4f; font-style: italic;">=</span><span data-darkreader-inline-color="" style="--darkreader-inline-color: #ffff6e; color: #ffd945;">" "</span>)</div><div> message<span data-darkreader-inline-color="" style="--darkreader-inline-color: #ff6880; color: #ff3f4f; font-style: italic;">=</span>msgtext</div><div> <span data-darkreader-inline-color="" style="--darkreader-inline-color: #ff6880; color: #ff3f4f; font-style: italic;">for</span> chk <span data-darkreader-inline-color="" style="--darkreader-inline-color: #ff6880; color: #ff3f4f; font-style: italic;">in</span> [<span data-darkreader-inline-color="" style="--darkreader-inline-color: #ffff6e; color: #ffd945;">"Chrome"</span>,<span data-darkreader-inline-color="" style="--darkreader-inline-color: #ffff6e; color: #ffd945;">"Mozilla"</span>,<span data-darkreader-inline-color="" style="--darkreader-inline-color: #ffff6e; color: #ffd945;">"Explorer"</span>,<span data-darkreader-inline-color="" style="--darkreader-inline-color: #ffff6e; color: #ffd945;">"Safari"</span>]:</div><div> <span data-darkreader-inline-color="" style="--darkreader-inline-color: #ff6880; color: #ff3f4f; font-style: italic;">if</span> chk <span data-darkreader-inline-color="" style="--darkreader-inline-color: #ff6880; color: #ff3f4f; font-style: italic;">in</span> <span data-darkreader-inline-color="" style="--darkreader-inline-color: #47ffff; color: #19d1e5;">str</span>(<span data-darkreader-inline-color="" style="--darkreader-inline-color: #ff6880; color: #ff3f4f; font-style: italic;">self</span>.headers):</div><div> message<span data-darkreader-inline-color="" style="--darkreader-inline-color: #ff6880; color: #ff3f4f; font-style: italic;">=</span>msgtext.replace(<span data-darkreader-inline-color="" style="--darkreader-inline-color: #ffff6e; color: #ffd945;">"</span><span data-darkreader-inline-color="" style="--darkreader-inline-color: #47ffff; color: #19d1e5;">\n</span><span data-darkreader-inline-color="" style="--darkreader-inline-color: #ffff6e; color: #ffd945;">"</span>,<span data-darkreader-inline-color="" style="--darkreader-inline-color: #ffff6e; color: #ffd945;">"<br/>"</span>).replace(<span data-darkreader-inline-color="" style="--darkreader-inline-color: #ffff6e; color: #ffd945;">" "</span>,<span data-darkreader-inline-color="" style="--darkreader-inline-color: #ffff6e; color: #ffd945;">"&nbsp;"</span>)</div><div> <span data-darkreader-inline-color="" style="--darkreader-inline-color: #ff6880; color: #ff3f4f; font-style: italic;">break</span></div><div> <span data-darkreader-inline-color="" style="--darkreader-inline-color: #ff6880; color: #ff3f4f; font-style: italic;">self</span>.sendtextinfo(<span data-darkreader-inline-color="" style="--darkreader-inline-color: #ffafff; color: #e373ce;">200</span>,message)</div><br /><div><span data-darkreader-inline-color="" style="--darkreader-inline-color: #47ffff; color: #19d1e5; font-style: italic;">class</span> <span data-darkreader-inline-color="" style="--darkreader-inline-color: #94ffff; color: #61afef;">ThreadedHTTPServer</span>(<span data-darkreader-inline-color="" style="--darkreader-inline-color: #e0ff29; color: #81f900;">socketserver</span>.<span data-darkreader-inline-color="" style="--darkreader-inline-color: #e0ff29; color: #81f900;">ThreadingMixIn</span>, <span data-darkreader-inline-color="" style="--darkreader-inline-color: #e0ff29; color: #81f900;">http</span>.<span data-darkreader-inline-color="" style="--darkreader-inline-color: #e0ff29; color: #81f900;">server</span>.<span data-darkreader-inline-color="" style="--darkreader-inline-color: #e0ff29; color: #81f900;">HTTPServer</span>):</div><div> http.server.HTTPServer.request_queue_size <span data-darkreader-inline-color="" style="--darkreader-inline-color: #ff6880; color: #ff3f4f; font-style: italic;">=</span> <span data-darkreader-inline-color="" style="--darkreader-inline-color: #ffafff; color: #e373ce;">128</span></div><br /><div><span data-darkreader-inline-color="" style="--darkreader-inline-color: #47ffff; color: #19d1e5; font-style: italic;">def</span> <span data-darkreader-inline-color="" style="--darkreader-inline-color: #e0ff29; color: #81f900;">backgroundfunction</span>():</div><div> <span data-darkreader-inline-color="" style="--darkreader-inline-color: #47ffff; color: #19d1e5;">HTSERVER</span> <span data-darkreader-inline-color="" style="--darkreader-inline-color: #ff6880; color: #ff3f4f; font-style: italic;">=</span> ThreadedHTTPServer((<span data-darkreader-inline-color="" style="--darkreader-inline-color: #ffff6e; color: #ffd945;">''</span>, <span data-darkreader-inline-color="" style="--darkreader-inline-color: #47ffff; color: #19d1e5;">HTPORT</span>), Handler)</div><div> <span data-darkreader-inline-color="" style="--darkreader-inline-color: #47ffff; color: #19d1e5;">HTSERVER</span>.socket.settimeout(<span data-darkreader-inline-color="" style="--darkreader-inline-color: #ffafff; color: #e373ce;">10</span>)</div><div> <span data-darkreader-inline-color="" style="--darkreader-inline-color: #ff6880; color: #ff3f4f; font-style: italic;">try</span>:</div><div> <span data-darkreader-inline-color="" style="--darkreader-inline-color: #ff6880; color: #ff3f4f; font-style: italic;">while</span> <span data-darkreader-inline-color="" style="--darkreader-inline-color: #ff6880; color: #ff3f4f; font-style: italic;">not</span> timetoleave:</div><div> sys.stdout.flush()</div><div> <span data-darkreader-inline-color="" style="--darkreader-inline-color: #47ffff; color: #19d1e5;">HTSERVER</span>.handle_request()</div><div> <span data-darkreader-inline-color="" style="--darkreader-inline-color: #ff6880; color: #ff3f4f; font-style: italic;">except</span> <span data-darkreader-inline-color="" style="--darkreader-inline-color: #47ffff; color: #19d1e5;">KeyboardInterrupt</span>:</div><div> <span data-darkreader-inline-color="" style="--darkreader-inline-color: #ff6880; color: #ff3f4f; font-style: italic;">pass</span></div><br /><div>threading.Thread(<span data-darkreader-inline-color="" style="--darkreader-inline-color: #fff723; color: #ff9700; font-style: italic;">target</span><span data-darkreader-inline-color="" style="--darkreader-inline-color: #ff6880; color: #ff3f4f; font-style: italic;">=</span>backgroundfunction).start()</div><br /><div><span data-darkreader-inline-color="" style="--darkreader-inline-color: #47ffff; color: #19d1e5; font-style: italic;">def</span> <span data-darkreader-inline-color="" style="--darkreader-inline-color: #e0ff29; color: #81f900;">processfiles</span>(<span data-darkreader-inline-color="" style="--darkreader-inline-color: #fff723; color: #ff9700; font-style: italic;">filelist</span>):</div><div> <span data-darkreader-inline-color="" style="--darkreader-inline-color: #ff6880; color: #ff3f4f; font-style: italic;">for</span> filename <span data-darkreader-inline-color="" style="--darkreader-inline-color: #ff6880; color: #ff3f4f; font-style: italic;">in</span> filelist:</div><div> reqnow<span data-darkreader-inline-color="" style="--darkreader-inline-color: #ff6880; color: #ff3f4f; font-style: italic;">=</span>{}</div><div> reqnow[<span data-darkreader-inline-color="" style="--darkreader-inline-color: #ffff6e; color: #ffd945;">"Time"</span>]<span data-darkreader-inline-color="" style="--darkreader-inline-color: #ff6880; color: #ff3f4f; font-style: italic;">=</span>time.time()</div><div> reqnow[<span data-darkreader-inline-color="" style="--darkreader-inline-color: #ffff6e; color: #ffd945;">"Request"</span>]<span data-darkreader-inline-color="" style="--darkreader-inline-color: #ff6880; color: #ff3f4f; font-style: italic;">=</span>filename</div><div> stats[<span data-darkreader-inline-color="" style="--darkreader-inline-color: #ffff6e; color: #ffd945;">"RecentRequests"</span>].append(reqnow)</div><div> stats[<span data-darkreader-inline-color="" style="--darkreader-inline-color: #ffff6e; color: #ffd945;">"RecentRequests"</span>]<span data-darkreader-inline-color="" style="--darkreader-inline-color: #ff6880; color: #ff3f4f; font-style: italic;">=</span>stats[<span data-darkreader-inline-color="" style="--darkreader-inline-color: #ffff6e; color: #ffd945;">"RecentRequests"</span>][<span data-darkreader-inline-color="" style="--darkreader-inline-color: #ff6880; color: #ff3f4f; font-style: italic;">-</span><span data-darkreader-inline-color="" style="--darkreader-inline-color: #ffafff; color: #e373ce;">10</span>:]</div><div> <span data-darkreader-inline-color="" style="--darkreader-inline-color: #ff6880; color: #ff3f4f; font-style: italic;">try</span>:</div><div> <span data-darkreader-inline-color="" style="--darkreader-inline-color: #ff6880; color: #ff3f4f; font-style: italic;">with</span> <span data-darkreader-inline-color="" style="--darkreader-inline-color: #e0ff29; color: #81f900;">open</span>(filename,<span data-darkreader-inline-color="" style="--darkreader-inline-color: #ffff6e; color: #ffd945;">"r"</span>) <span data-darkreader-inline-color="" style="--darkreader-inline-color: #ff6880; color: #ff3f4f; font-style: italic;">as</span> fh:</div><div> inputtext<span data-darkreader-inline-color="" style="--darkreader-inline-color: #ff6880; color: #ff3f4f; font-style: italic;">=</span>fh.read()</div><div> outputtext<span data-darkreader-inline-color="" style="--darkreader-inline-color: #ff6880; color: #ff3f4f; font-style: italic;">=</span>codecs.encode(inputtext,<span data-darkreader-inline-color="" style="--darkreader-inline-color: #ffff6e; color: #ffd945;">'rot_13'</span>)</div><div> outfile<span data-darkreader-inline-color="" style="--darkreader-inline-color: #ff6880; color: #ff3f4f; font-style: italic;">=</span><span data-darkreader-inline-color="" style="--darkreader-inline-color: #47ffff; color: #19d1e5;">OUTPUT_FOLDER</span><span data-darkreader-inline-color="" style="--darkreader-inline-color: #ff6880; color: #ff3f4f; font-style: italic;">+</span>os.path.basename(filename)</div><div> <span data-darkreader-inline-color="" style="--darkreader-inline-color: #ff6880; color: #ff3f4f; font-style: italic;">with</span> <span data-darkreader-inline-color="" style="--darkreader-inline-color: #e0ff29; color: #81f900;">open</span>(outfile,<span data-darkreader-inline-color="" style="--darkreader-inline-color: #ffff6e; color: #ffd945;">"w"</span>) <span data-darkreader-inline-color="" style="--darkreader-inline-color: #ff6880; color: #ff3f4f; font-style: italic;">as</span> fh:</div><div> fh.write(outputtext)</div><div> processedfile<span data-darkreader-inline-color="" style="--darkreader-inline-color: #ff6880; color: #ff3f4f; font-style: italic;">=</span><span data-darkreader-inline-color="" style="--darkreader-inline-color: #47ffff; color: #19d1e5;">PROCESSED_FOLDER</span><span data-darkreader-inline-color="" style="--darkreader-inline-color: #ff6880; color: #ff3f4f; font-style: italic;">+</span>os.path.basename(filename)</div><div> shutil.move(filename,processedfile)</div><div> <span data-darkreader-inline-color="" style="--darkreader-inline-color: #ff6880; color: #ff3f4f; font-style: italic;">except</span> <span data-darkreader-inline-color="" style="--darkreader-inline-color: #47ffff; color: #19d1e5;">Exception</span> <span data-darkreader-inline-color="" style="--darkreader-inline-color: #ff6880; color: #ff3f4f; font-style: italic;">as</span> err:</div><div> <span data-darkreader-inline-color="" style="--darkreader-inline-color: #e0ff29; color: #81f900;">print</span>(<span data-darkreader-inline-color="" style="--darkreader-inline-color: #ffff6e; color: #ffd945;">"Unable to open </span><span data-darkreader-inline-color="" style="--darkreader-inline-color: #47ffff; color: #19d1e5;">{}</span><span data-darkreader-inline-color="" style="--darkreader-inline-color: #ffff6e; color: #ffd945;">, </span><span data-darkreader-inline-color="" style="--darkreader-inline-color: #47ffff; color: #19d1e5;">{}</span><span data-darkreader-inline-color="" style="--darkreader-inline-color: #ffff6e; color: #ffd945;">"</span>.format(filename,err))</div><div> errnow<span data-darkreader-inline-color="" style="--darkreader-inline-color: #ff6880; color: #ff3f4f; font-style: italic;">=</span>{}</div><div> errnow[<span data-darkreader-inline-color="" style="--darkreader-inline-color: #ffff6e; color: #ffd945;">"Time"</span>]<span data-darkreader-inline-color="" style="--darkreader-inline-color: #ff6880; color: #ff3f4f; font-style: italic;">=</span>time.time()</div><div> errnow[<span data-darkreader-inline-color="" style="--darkreader-inline-color: #ffff6e; color: #ffd945;">"Error"</span>]<span data-darkreader-inline-color="" style="--darkreader-inline-color: #ff6880; color: #ff3f4f; font-style: italic;">=</span>err</div><div> stats[<span data-darkreader-inline-color="" style="--darkreader-inline-color: #ffff6e; color: #ffd945;">"Errors"</span>].append(errnow)</div><div> stats[<span data-darkreader-inline-color="" style="--darkreader-inline-color: #ffff6e; color: #ffd945;">"Errors"</span>]<span data-darkreader-inline-color="" style="--darkreader-inline-color: #ff6880; color: #ff3f4f; font-style: italic;">=</span>stats[<span data-darkreader-inline-color="" style="--darkreader-inline-color: #ffff6e; color: #ffd945;">"Errors"</span>][<span data-darkreader-inline-color="" style="--darkreader-inline-color: #ff6880; color: #ff3f4f; font-style: italic;">-</span><span data-darkreader-inline-color="" style="--darkreader-inline-color: #ffafff; color: #e373ce;">10</span>:]</div><br /><div><span data-darkreader-inline-color="" style="--darkreader-inline-color: #fff6e4; color: #5c6370; font-style: italic;">#substitute this loop with main loop of your app</span></div><div><span data-darkreader-inline-color="" style="--darkreader-inline-color: #ff6880; color: #ff3f4f; font-style: italic;">while</span> <span data-darkreader-inline-color="" style="--darkreader-inline-color: #ff6880; color: #ff3f4f; font-style: italic;">not</span> timetoleave:</div><div> allinputfiles<span data-darkreader-inline-color="" style="--darkreader-inline-color: #ff6880; color: #ff3f4f; font-style: italic;">=</span>glob.glob(<span data-darkreader-inline-color="" style="--darkreader-inline-color: #47ffff; color: #19d1e5;">INPUT_FOLDER</span><span data-darkreader-inline-color="" style="--darkreader-inline-color: #ff6880; color: #ff3f4f; font-style: italic;">+</span><span data-darkreader-inline-color="" style="--darkreader-inline-color: #ffff6e; color: #ffd945;">"*"</span>)</div><div> processfiles(allinputfiles)</div><div> time.sleep(<span data-darkreader-inline-color="" style="--darkreader-inline-color: #ffafff; color: #e373ce;">1</span>)</div></div><p><span style="font-family: courier;">Here the threaded server can give stats while this app is running. Moving a few files to the input folder and pulling up the stats in a browser gives the result:</span></p><p><span data-darkreader-inline-bgcolor="" style="--darkreader-inline-bgcolor: #212426; background-color: #1f2324; font-family: courier;"></span></p><div data-darkreader-inline-bgcolor="" data-darkreader-inline-color="" style="--darkreader-inline-bgcolor: #16161e; --darkreader-inline-color: #ffffff; background-color: #16171d; color: #f8f8f0; font-family: Consolas, "Courier New", monospace; font-size: 14px; line-height: 19px; white-space: pre;"><div>{</div><div> <span data-darkreader-inline-color="" style="--darkreader-inline-color: #47ffff; color: #19d1e5;">"Errors"</span>: [],</div><div> <span data-darkreader-inline-color="" style="--darkreader-inline-color: #47ffff; color: #19d1e5;">"RecentRequests"</span>: [</div><div> {</div><div> <span data-darkreader-inline-color="" style="--darkreader-inline-color: #47ffff; color: #19d1e5;">"Time"</span>: <span data-darkreader-inline-color="" style="--darkreader-inline-color: #ffafff; color: #e373ce;">1634412207.3869205</span>,</div><div> <span data-darkreader-inline-color="" style="--darkreader-inline-color: #47ffff; color: #19d1e5;">"Request"</span>: <span data-darkreader-inline-color="" style="--darkreader-inline-color: #ffff6e; color: #ffd945;">"c:</span><span data-darkreader-inline-color="" style="--darkreader-inline-color: #47ffff; color: #19d1e5;">\\</span><span data-darkreader-inline-color="" style="--darkreader-inline-color: #ffff6e; color: #ffd945;">tmp</span><span data-darkreader-inline-color="" style="--darkreader-inline-color: #47ffff; color: #19d1e5;">\\</span><span data-darkreader-inline-color="" style="--darkreader-inline-color: #ffff6e; color: #ffd945;">a</span><span data-darkreader-inline-color="" style="--darkreader-inline-color: #47ffff; color: #19d1e5;">\\</span><span data-darkreader-inline-color="" style="--darkreader-inline-color: #ffff6e; color: #ffd945;">a.txt"</span></div><div> },</div><div> {</div><div> <span data-darkreader-inline-color="" style="--darkreader-inline-color: #47ffff; color: #19d1e5;">"Time"</span>: <span data-darkreader-inline-color="" style="--darkreader-inline-color: #ffafff; color: #e373ce;">1634412207.3869205</span>,</div><div> <span data-darkreader-inline-color="" style="--darkreader-inline-color: #47ffff; color: #19d1e5;">"Request"</span>: <span data-darkreader-inline-color="" style="--darkreader-inline-color: #ffff6e; color: #ffd945;">"c:</span><span data-darkreader-inline-color="" style="--darkreader-inline-color: #47ffff; color: #19d1e5;">\\</span><span data-darkreader-inline-color="" style="--darkreader-inline-color: #ffff6e; color: #ffd945;">tmp</span><span data-darkreader-inline-color="" style="--darkreader-inline-color: #47ffff; color: #19d1e5;">\\</span><span data-darkreader-inline-color="" style="--darkreader-inline-color: #ffff6e; color: #ffd945;">a</span><span data-darkreader-inline-color="" style="--darkreader-inline-color: #47ffff; color: #19d1e5;">\\</span><span data-darkreader-inline-color="" style="--darkreader-inline-color: #ffff6e; color: #ffd945;">q.txt"</span></div><div> },</div><div> {</div><div> <span data-darkreader-inline-color="" style="--darkreader-inline-color: #47ffff; color: #19d1e5;">"Time"</span>: <span data-darkreader-inline-color="" style="--darkreader-inline-color: #ffafff; color: #e373ce;">1634412207.3869205</span>,</div><div> <span data-darkreader-inline-color="" style="--darkreader-inline-color: #47ffff; color: #19d1e5;">"Request"</span>: <span data-darkreader-inline-color="" style="--darkreader-inline-color: #ffff6e; color: #ffd945;">"c:</span><span data-darkreader-inline-color="" style="--darkreader-inline-color: #47ffff; color: #19d1e5;">\\</span><span data-darkreader-inline-color="" style="--darkreader-inline-color: #ffff6e; color: #ffd945;">tmp</span><span data-darkreader-inline-color="" style="--darkreader-inline-color: #47ffff; color: #19d1e5;">\\</span><span data-darkreader-inline-color="" style="--darkreader-inline-color: #ffff6e; color: #ffd945;">a</span><span data-darkreader-inline-color="" style="--darkreader-inline-color: #47ffff; color: #19d1e5;">\\</span><span data-darkreader-inline-color="" style="--darkreader-inline-color: #ffff6e; color: #ffd945;">test.txt"</span></div><div> },</div><div> {</div><div> <span data-darkreader-inline-color="" style="--darkreader-inline-color: #47ffff; color: #19d1e5;">"Time"</span>: <span data-darkreader-inline-color="" style="--darkreader-inline-color: #ffafff; color: #e373ce;">1634412207.3869205</span>,</div><div> <span data-darkreader-inline-color="" style="--darkreader-inline-color: #47ffff; color: #19d1e5;">"Request"</span>: <span data-darkreader-inline-color="" style="--darkreader-inline-color: #ffff6e; color: #ffd945;">"c:</span><span data-darkreader-inline-color="" style="--darkreader-inline-color: #47ffff; color: #19d1e5;">\\</span><span data-darkreader-inline-color="" style="--darkreader-inline-color: #ffff6e; color: #ffd945;">tmp</span><span data-darkreader-inline-color="" style="--darkreader-inline-color: #47ffff; color: #19d1e5;">\\</span><span data-darkreader-inline-color="" style="--darkreader-inline-color: #ffff6e; color: #ffd945;">a</span><span data-darkreader-inline-color="" style="--darkreader-inline-color: #47ffff; color: #19d1e5;">\\</span><span data-darkreader-inline-color="" style="--darkreader-inline-color: #ffff6e; color: #ffd945;">test1.txt"</span></div><div> }</div><div> ],</div><div> <span data-darkreader-inline-color="" style="--darkreader-inline-color: #47ffff; color: #19d1e5;">"time"</span>: <span data-darkreader-inline-color="" style="--darkreader-inline-color: #ffff6e; color: #ffd945;">"2021-10-16 19:23:29"</span>,</div><div> <span data-darkreader-inline-color="" style="--darkreader-inline-color: #47ffff; color: #19d1e5;">"Rate"</span>: <span data-darkreader-inline-color="" style="--darkreader-inline-color: #ffafff; color: #e373ce;">1.8133347398556916</span></div><div>}</div></div><p><br /></p><p><span style="font-family: courier;"><br /></span></p><p><span style="font-family: courier;"><br /></span></p><p><span style="font-family: courier;"><br /></span></p><p><span style="font-family: courier;"><br /></span></p><p><span style="font-family: courier;"><br /></span></p><p><span style="font-family: courier;"><br /></span></p><p><span style="font-family: courier;"><br /></span></p>Beomagihttp://www.blogger.com/profile/00469223835355067867noreply@blogger.com0tag:blogger.com,1999:blog-2974094041951992980.post-49674375017688657512021-08-21T17:37:00.010-07:002021-08-21T17:41:10.154-07:00Experimenting with Wikis on the Raspberry PI<h2 style="text-align: left;"><span style="font-family: courier;">Why would I want to run my own wiki?</span></h2><div><span style="font-family: courier;"><br /></span></div><div><span style="font-family: courier;">Why not? Searchable linked notes are awesome!</span></div><div><span style="font-family: courier;"><br /></span></div><div><span style="font-family: courier;"><br /></span></div><div><span style="font-family: courier;">For work, I use tiddlywiki. It's just an html file with embedded javascript that handles tagging, searching and saving a new copy of itself when changes are made. It's by far the single simplest to run wiki since, it's just a local html file, without the need for a webserver.</span></div><div><span data-darkreader-inline-color="" style="--darkreader-inline-color: #23ffff; color: #01ffff; font-family: courier;"><a href="https://tiddlywiki.com/">https://tiddlywiki.com/</a></span></div><div><span style="font-family: courier;"><br /></span></div><div><span style="font-family: courier;"><br /></span></div><div><span style="font-family: courier;">It's really useful for storing links, bits of code, bits if information that may be useful etc. Once written and tagged, it's a quick search from getting that bit of information you just can't remember. You can link the page to other relevant pages you wouldn't think of at the time, that may prove invaluable.</span></div><div><span style="font-family: courier;"><br /></span></div><div><span style="font-family: courier;"><br /></span></div><div><span style="font-family: courier;">But what if you want something you can access from multiple devices? Perhaps tiddlywiki on dropbox? A enticing as it sounds to take something I know and hack a solution around it, I decided to look at a couple other options.</span></div><div><br /></div><div><br /></div><div><span style="font-family: courier;">I really didn't want a large setup. I wanted something easy to manage - backup, restore, setup from scratch via script. Something light for the PI since it's pulling double duty as a NAS. </span></div><div><span style="font-family: courier;"><br /></span></div><div><span style="font-family: courier;">The first option I looked at was wiki.js. <span data-darkreader-inline-color="" style="--darkreader-inline-color: #23ffff; color: #01ffff;"><a href="https://js.wiki/">https://js.wiki/</a></span></span></div><div><span style="font-family: courier;">What made this enticing was that it can use several different databases - sqlite included. Sqlite isn't as powerful as other database packages, but it's light. It's simple. Backup and restore is just copying the single file the DB is contained in.</span></div><div><span style="font-family: courier;"><br /></span></div><div><span style="font-family: courier;"><br /></span></div><div><span style="font-family: courier;">I decided to try setting up a docker image pointing to the rather bare DB I setup.</span></div><div><span style="font-family: courier;"><br /></span></div><div><span data-darkreader-inline-color="" style="--darkreader-inline-color: #23ffff; color: #01ffff; font-family: courier;"><a href="https://github.com/beomagi/Pi-wikijs-docker">https://github.com/beomagi/Pi-wikijs-docker</a></span></div><blockquote><div><pre style="overflow-wrap: break-word; white-space: pre-wrap;"><span style="font-family: courier;"><span data-darkreader-inline-color="" style="--darkreader-inline-color: #27ff23; color: #04ff00;">#install docker
</span><span data-darkreader-inline-color="" style="--darkreader-inline-color: #ff23ff; color: #ff00fe;">installdocker</span>() {
curl -fsSL https://get.docker.com -o get-docker.sh
sudo sh get-docker.sh
#add pi user to docker group
sudo usermod -aG docker pi
}
type docker || installdocker
<span data-darkreader-inline-color="" style="--darkreader-inline-color: #27ff23; color: #04ff00;">#make folder</span>
mkdir /home/pi/wikidocker
cd /home/pi/wikidocker
config=<span data-darkreader-inline-color="" style="--darkreader-inline-color: #ffff23; color: #fcff01;">'port: 3000
db:
type: sqlite
ssl: false
storage: /wiki/ggnotes.sqlite
bindIP: 0.0.0.0
logLevel: info
offline: false
ha: false
dataPath: ./data'</span>
echo <span data-darkreader-inline-color="" style="--darkreader-inline-color: #ffff23; color: #fcff01;">"$config"</span> > wikidocker.conf
docker run -d -p 8080:3000 --name GiaWiki \
--restart unless-stopped -e <span data-darkreader-inline-color="" style="--darkreader-inline-color: #ffff23; color: #fcff01;">"DB_TYPE=sqlite"</span> \
-e <span data-darkreader-inline-color="" style="--darkreader-inline-color: #ffff23; color: #fcff01;">"DB_FILEPATH=/home/pi/wikidocker/ggnotes.sqlite"</span> \
-v /home/pi/wikidocker/wikidocker.conf:/wiki/config.yml \
-v /home/pi/wikidocker/ggnotes.sqlite:/wiki/ggnotes.sqlite \
requarks/wiki:2
</span></pre></div></blockquote><div><span style="font-family: courier;">So this little script starts by installing docker on the PI. It makes a folder, sets up a config, and kicks off a docker. </span></div><div><span style="font-family: courier;"><br /></span></div><div><span style="font-family: courier;"><div class="separator" style="clear: both; text-align: center;"><br /></div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjU1fAXQjAJcgHp1pfBKwgEMhfvLpmahO2zLCaYY4fOyMj2lzJnq96ef8Cu1c2F6q7JpzLaPfovtxJUI8raoMVAhLEbbiyFpPL_55c-HRjhhyphenhyphenI-0z1JXDiOtno7uK5Yvm6d_QxbLgMmFwmK/" style="margin-left: 1em; margin-right: 1em;"><img data-original-height="790" data-original-width="1217" height="416" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjU1fAXQjAJcgHp1pfBKwgEMhfvLpmahO2zLCaYY4fOyMj2lzJnq96ef8Cu1c2F6q7JpzLaPfovtxJUI8raoMVAhLEbbiyFpPL_55c-HRjhhyphenhyphenI-0z1JXDiOtno7uK5Yvm6d_QxbLgMmFwmK/w640-h416/image.png" width="640" /></a></div><div><span style="font-family: courier;"><br /></span></div>It's not bad. But minutes after setting this up I found out they will no longer support sqlite on subsequent major releases.<br /><br />I wanted a <i>light</i> system that would be relatively future proof. I'm not opposed to PostgreSQL, but I'd rather something easier to manage and lighter on resources for the PI. Maybe I'll try setting up PostgreSQL in a docker too. </span></div><div><span style="font-family: courier;"><br /></span></div><div><span style="font-family: courier;">Ah! Dokuwiki! It's small, light, quick to setup. https://www.dokuwiki.org</span></div><div><span style="font-family: courier;">This wiki doesn't use a DB, it's just files under a folder. I can grep out strings if I needed to, and backup is nothing more than tar - so, yay! Easy!</span></div><div><span style="font-family: courier;"><br /></span></div><div><span style="font-family: courier;">The install is scripted for us too - Thanks Dokuwiki :D</span></div><div><span data-darkreader-inline-color="" style="--darkreader-inline-color: #23ffff; color: #01ffff; font-family: courier;"><a href="https://www.dokuwiki.org/install:debian">https://www.dokuwiki.org/install:debian</a></span></div><div><span style="font-family: courier;"><br /></span></div><div><span style="font-family: courier;">Install apache, and move or symlink the dokuwiki folder to /var/www/html/dokuwiki.</span></div><div><span style="font-family: courier;"><br /></span></div><div><span style="font-family: courier;">The wiki isn't as full featured as wiki.js but it's still decent.</span></div><div><span style="font-family: courier;"><br /></span></div><div><span style="font-family: courier;"><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjzHHFt1vCgiZGSVgjsBjsRwqjG1MlEA0PelxhuuZLj9xPT3v4piEle_EixU9Z5KA_YiCBLi1VzewqvuYkd_L_CrVkCWbUuiTrKY13tGgC6p18DyqY8ZMz6_dNxbjk5r5nUygzu87zE9dcs/" style="margin-left: 1em; margin-right: 1em;"><img alt="" data-original-height="790" data-original-width="1084" height="466" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjzHHFt1vCgiZGSVgjsBjsRwqjG1MlEA0PelxhuuZLj9xPT3v4piEle_EixU9Z5KA_YiCBLi1VzewqvuYkd_L_CrVkCWbUuiTrKY13tGgC6p18DyqY8ZMz6_dNxbjk5r5nUygzu87zE9dcs/w640-h466/image.png" width="640" /></a></div><br />Going to stick with this one. Backup can be done in the /var/www/html/dokuwiki/data/ folder as described on their site. <span data-darkreader-inline-color="" style="--darkreader-inline-color: #23ffff; color: #01ffff;"><a href="https://www.dokuwiki.org/faq:backup">https://www.dokuwiki.org/faq:backup</a></span></span></div><div><span style="font-family: courier;"><br /></span></div><div><span style="font-family: courier;"><br /></span></div><div><span style="font-family: courier;">My daughter has been liking this. It's simple for her to use. Unlike wiki.js, there's no authentication needed. There's good and bad for that. It's nice for us since we're just using it on the local network. Bad if we wanted top open this up with read-only permission. This can be put behind another service that handles the authentication though.</span></div><div><span style="font-family: courier;"><br /></span></div><div><span style="font-family: courier;"><br /></span></div><div><span style="font-family: courier;">My future "todo" items:</span></div><div><ul style="text-align: left;"><li><span style="font-family: courier;">Use docker more. It's relatively quick to setup and a app container should have all it's prerequisites (in general).</span></li><li><span style="font-family: courier;">Revisit the wiki.js setup as 2 docker scripts. One for postgres, another for wiki.js. Include scripts for backup and restore too.</span></li></ul></div><div><span style="font-family: courier;"><br /></span></div><div><span style="font-family: courier;">Cheers.</span></div><div><span style="font-family: courier;"><br /></span></div><div><span style="font-family: courier;"><br /></span></div><div><br /></div>Beomagihttp://www.blogger.com/profile/00469223835355067867noreply@blogger.com0tag:blogger.com,1999:blog-2974094041951992980.post-50846740684939018182021-01-29T11:34:00.004-08:002021-01-31T10:55:14.428-08:00A Simple Multithreaded REST Service<p><span style="font-family: courier;">I've talked about threading a little already.</span></p><p><span style="font-family: courier;"><a href="https://beomagi.blogspot.com/2019/09/python-threading.html">https://beomagi.blogspot.com/2019/09/python-threading.html</a></span></p><p><span style="font-family: courier;"><a href="https://beomagi.blogspot.com/2019/09/threading-continued-timing-thread.html">https://beomagi.blogspot.com/2019/09/threading-continued-timing-thread.html</a></span></p><p><span style="font-family: courier;">Next up is a more complete application. Lets look at a simple multithreaded web service. Now this can be used for basic webpage services, but I think it really shines for making a REST API for quick tools.</span></p><p><span style="font-family: courier;"><br /></span></p><p><span style="font-family: courier;">Source:</span></p><p><span style="font-family: courier;"><a href="https://github.com/beomagi/BasicRestApp/blob/main/http_server_mt3.py">https://github.com/beomagi/BasicRestApp/blob/main/http_server_mt3.py</a></span></p><p><span style="font-family: courier;">snapshot below:</span></p><div style="background-color: #2d1011; color: #d7d7d7; font-family: Consolas, "Courier New", monospace; font-size: 14px; line-height: 19px; white-space: pre;"><div><span style="color: #e6db74;">''' Basic threaded http server implementation '''</span></div><div><span style="color: #677a83;">#!/usr/bin/env python3</span></div><div><span style="color: #f92672;">import</span> socketserver</div><div><span style="color: #f92672;">import</span> http.server</div><div><span style="color: #f92672;">import</span> sys</div><div><span style="color: #f92672;">import</span> time</div><div><span style="color: #f92672;">import</span> urllib</div><div><span style="color: #f92672;">import</span> json</div><br /></div><div style="background-color: #0d1011; color: #d7d7d7; font-family: Consolas, "Courier New", monospace; font-size: 14px; line-height: 19px; white-space: pre;"><div><span style="color: #677a83;">#-------------sample functions--------------------</span></div><div>keyval<span style="color: #f92672;">=</span>{}</div><div><span style="color: #66d9ef; font-style: italic;">def</span> <span style="color: #a6e22e;">kput</span>(<span style="color: #fd971f; font-style: italic;">a</span>,<span style="color: #fd971f; font-style: italic;">b</span>):</div><div> keyval[a]<span style="color: #f92672;">=</span>b</div><div> <span style="color: #f92672;">return</span> json.dumps({a:b})</div><br /><div><span style="color: #66d9ef; font-style: italic;">def</span> <span style="color: #a6e22e;">kget</span>(<span style="color: #fd971f; font-style: italic;">a</span>):</div><div> <span style="color: #f92672;">return</span> keyval.get(a)</div><br /><div><span style="color: #66d9ef; font-style: italic;">def</span> <span style="color: #a6e22e;">add2numbers</span>(<span style="color: #fd971f; font-style: italic;">a</span>,<span style="color: #fd971f; font-style: italic;">b</span>):</div><div> <span style="color: #f92672;">return</span> <span style="color: #6ca9e1; font-style: italic;">int</span>(a)<span style="color: #f92672;">+</span><span style="color: #6ca9e1; font-style: italic;">int</span>(b)</div><br /><div><span style="color: #66d9ef; font-style: italic;">def</span> <span style="color: #a6e22e;">handlejob</span>(<span style="color: #fd971f; font-style: italic;">func_and_params</span>):</div><div> func<span style="color: #f92672;">=</span>func_and_params[<span style="color: #ae81ff;">0</span>]</div><div> params<span style="color: #f92672;">=</span>func_and_params[<span style="color: #ae81ff;">1</span>:]</div><div> <span style="color: #f92672;">if</span> func<span style="color: #f92672;">==</span><span style="color: #e6db74;">"add"</span>: <span style="color: #f92672;">return</span> add2numbers(params[<span style="color: #ae81ff;">0</span>],params[<span style="color: #ae81ff;">1</span>])</div><div> <span style="color: #f92672;">if</span> func<span style="color: #f92672;">==</span><span style="color: #e6db74;">"put"</span>: <span style="color: #f92672;">return</span> kput(params[<span style="color: #ae81ff;">0</span>],params[<span style="color: #ae81ff;">1</span>])</div><div> <span style="color: #f92672;">if</span> func<span style="color: #f92672;">==</span><span style="color: #e6db74;">"get"</span>: <span style="color: #f92672;">return</span> kget(params[<span style="color: #ae81ff;">0</span>])</div><div> <span style="color: #f92672;">return</span> <span style="color: #e6db74;">"Unknown Command"</span></div><div><span style="color: #677a83;">#-^-^--^-^-^-^sample functions-^-^-^-^-^-^-^-^-^-^-</span></div><br /><br /></div><div style="background-color: #012020; color: #d7d7d7; font-family: Consolas, "Courier New", monospace; font-size: 14px; line-height: 19px; white-space: pre;"><div><span style="color: #66d9ef; font-style: italic;">class</span> Handler(<span style="color: #a6e22e; font-style: italic; text-decoration-line: underline;">http</span>.<span style="color: #a6e22e; font-style: italic; text-decoration-line: underline;">server</span>.<span style="color: #a6e22e; font-style: italic; text-decoration-line: underline;">BaseHTTPRequestHandler</span>):</div><div> <span style="color: #e6db74;">''' use our own handlers functions '''</span></div><br /></div><div style="background-color: #140811; color: #d7d7d7; font-family: Consolas, "Courier New", monospace; font-size: 14px; line-height: 19px; white-space: pre;"><div> <span style="color: #66d9ef; font-style: italic;">def</span> <span style="color: #a6e22e;">sendtextinfo</span>(<span style="color: #fd971f; font-style: italic;">self</span>, <span style="color: #fd971f; font-style: italic;">code</span>, <span style="color: #fd971f; font-style: italic;">text</span>):</div><div> self.send_response(code)</div><div> self.send_header(<span style="color: #e6db74;">'Content-type'</span>, <span style="color: #e6db74;">'text/html'</span>)</div><div> self.end_headers()</div><div> <span style="color: #f92672;">if</span> <span style="color: #6ca9e1; font-style: italic;">type</span>(text)<span style="color: #f92672;">==</span><span style="color: #6ca9e1; font-style: italic;">type</span>([]):</div><div> <span style="color: #f92672;">for</span> lines <span style="color: #f92672;">in</span> text:</div><div> self.wfile.write((<span style="color: #6ca9e1; font-style: italic;">str</span>(lines)<span style="color: #f92672;">+</span><span style="color: #e6db74;">"</span><span style="color: #ae81ff;">\n</span><span style="color: #e6db74;">"</span>).encode())</div><div> <span style="color: #f92672;">else</span>:</div><div> self.wfile.write((<span style="color: #6ca9e1; font-style: italic;">str</span>(text)<span style="color: #f92672;">+</span><span style="color: #e6db74;">"</span><span style="color: #ae81ff;">\n</span><span style="color: #e6db74;">"</span>).encode())</div><br /></div><div style="background-color: #08111d; color: #d7d7d7; font-family: Consolas, "Courier New", monospace; font-size: 14px; line-height: 19px; white-space: pre;"><div> <span style="color: #66d9ef; font-style: italic;">def</span> <span style="color: #a6e22e;">do_GET</span>(<span style="color: #fd971f; font-style: italic;">self</span>):</div><div> <span style="color: #e6db74;">''' handle get '''</span></div><div> tnow <span style="color: #f92672;">=</span> time.time()</div><div> gnow <span style="color: #f92672;">=</span> time.strftime(<span style="color: #e6db74;">'%Y-%m-</span><span style="color: #ae81ff;">%d</span><span style="color: #e6db74;"> %H:%M:%S'</span>, time.gmtime(tnow)) <span style="color: #677a83;">#Formatted UTC time</span></div><div> parsed_data <span style="color: #f92672;">=</span> urllib.parse.urlparse(self.path)</div><div> <span style="color: #f92672;">if</span> parsed_data.geturl().lower() <span style="color: #f92672;">==</span> <span style="color: #e6db74;">"/time"</span>:</div><div> message <span style="color: #f92672;">=</span> gnow</div><div> <span style="color: #f92672;">else</span> : message<span style="color: #f92672;">=</span><span style="color: #e6db74;">"this is a test of the multithreaded webservice"</span></div><div> self.sendtextinfo(<span style="color: #ae81ff;">200</span>,message)</div><br /><div> <span style="color: #66d9ef; font-style: italic;">def</span> <span style="color: #a6e22e;">do_POST</span>(<span style="color: #fd971f; font-style: italic;">self</span>):</div><div> <span style="color: #e6db74;">''' handle post like rest API '''</span></div><div> <span style="color: #f92672;">try</span>: <span style="color: #677a83;">#try getting the bytestream of the request</span></div><div> content_length <span style="color: #f92672;">=</span> <span style="color: #6ca9e1; font-style: italic;">int</span>(self.headers[<span style="color: #e6db74;">'Content-Length'</span>])</div><div> <span style="color: #f92672;">except</span> <span style="color: #6ca9e1; font-style: italic;">Exception</span> <span style="color: #f92672;">as</span> err:</div><div> <span style="color: #66d9ef;">print</span>(<span style="color: #e6db74;">"malformed headers"</span>)</div><div> self.sendtextinfo(<span style="color: #ae81ff;">200</span>,<span style="color: #6ca9e1; font-style: italic;">str</span>(err))</div><div> <span style="color: #f92672;">return</span></div><br /><div> <span style="color: #f92672;">if</span> content_length <span style="color: #f92672;">></span> <span style="color: #ae81ff;">0</span>:</div><div> rawrequest <span style="color: #f92672;">=</span> self.rfile.read(content_length).decode(<span style="color: #e6db74;">'utf-8'</span>)</div><div> <span style="color: #66d9ef;">print</span>(<span style="color: #e6db74;">"Received POST: </span><span style="color: #ae81ff;">{}</span><span style="color: #e6db74;">"</span>.format(rawrequest))</div><div> <span style="color: #f92672;">try</span>:</div><div> jrequest <span style="color: #f92672;">=</span> json.loads(rawrequest)</div><div> <span style="color: #f92672;">except</span> <span style="color: #6ca9e1; font-style: italic;">BaseException</span> <span style="color: #f92672;">as</span> anError:</div><div> self.sendtextinfo(<span style="color: #ae81ff;">200</span>,<span style="color: #e6db74;">"Error in JSON: </span><span style="color: #ae81ff;">{}</span><span style="color: #e6db74;">"</span>.format(<span style="color: #6ca9e1; font-style: italic;">str</span>(anError)))</div><div> <span style="color: #f92672;">return</span></div><br /><div> <span style="color: #f92672;">if</span> <span style="color: #e6db74;">"cmd"</span> <span style="color: #f92672;">in</span> jrequest:</div><div> commandandparams<span style="color: #f92672;">=</span>jrequest[<span style="color: #e6db74;">'cmd'</span>]</div><div> <span style="color: #66d9ef;">print</span>(<span style="color: #e6db74;">"Command received: </span><span style="color: #ae81ff;">{}</span><span style="color: #e6db74;">"</span>.format(commandandparams))</div><div> result<span style="color: #f92672;">=</span>handlejob(commandandparams)</div><div> <span style="color: #f92672;">if</span> result <span style="color: #f92672;">!=</span> <span style="color: #ae81ff;">None</span>:</div><div> self.sendtextinfo(<span style="color: #ae81ff;">200</span>,result)</div><div> <span style="color: #f92672;">else</span>:</div><div> self.sendtextinfo(<span style="color: #ae81ff;">200</span>,<span style="color: #e6db74;">"No Output"</span>)</div><div> <span style="color: #f92672;">return</span></div><br /></div><div style="background-color: #012020; color: #d7d7d7; font-family: Consolas, "Courier New", monospace; font-size: 14px; line-height: 19px; white-space: pre;"><br /><div><span style="color: #66d9ef; font-style: italic;">class</span> ThreadedHTTPServer(<span style="color: #a6e22e; font-style: italic; text-decoration-line: underline;">socketserver</span>.<span style="color: #a6e22e; font-style: italic; text-decoration-line: underline;">ThreadingMixIn</span>, <span style="color: #a6e22e; font-style: italic; text-decoration-line: underline;">http</span>.<span style="color: #a6e22e; font-style: italic; text-decoration-line: underline;">server</span>.<span style="color: #a6e22e; font-style: italic; text-decoration-line: underline;">HTTPServer</span>):</div><div> <span style="color: #e6db74;">''' Basic threaded server class '''</span></div><div> http.server.HTTPServer.request_queue_size <span style="color: #f92672;">=</span> <span style="color: #ae81ff;">128</span></div><br /></div><div style="background-color: #200120; color: #d7d7d7; font-family: Consolas, "Courier New", monospace; font-size: 14px; line-height: 19px; white-space: pre;"><div><span style="color: #f92672;">if</span> sys.argv[<span style="color: #ae81ff;">1</span>:]:</div><div> <span style="color: #ae81ff;">HTPORT</span> <span style="color: #f92672;">=</span> <span style="color: #6ca9e1; font-style: italic;">int</span>(sys.argv[<span style="color: #ae81ff;">1</span>])</div><div><span style="color: #f92672;">else</span>:</div><div> <span style="color: #ae81ff;">HTPORT</span> <span style="color: #f92672;">=</span> <span style="color: #ae81ff;">8000</span></div><br /><div><span style="color: #ae81ff;">HTSERVER</span> <span style="color: #f92672;">=</span> ThreadedHTTPServer((<span style="color: #e6db74;">''</span>, <span style="color: #ae81ff;">HTPORT</span>), Handler)</div><br /><div><span style="color: #f92672;">try</span>:</div><div> <span style="color: #f92672;">while</span> <span style="color: #ae81ff;">1</span>:</div><div> sys.stdout.flush()</div><div> <span style="color: #ae81ff;">HTSERVER</span>.handle_request()</div><div><span style="color: #f92672;">except</span> <span style="color: #6ca9e1; font-style: italic;">KeyboardInterrupt</span>:</div><div> <span style="color: #66d9ef;">print</span>(<span style="color: #e6db74;">"Server Stopped"</span>)</div><br /></div><p><span style="font-family: courier;"><br /></span></p><p><span style="font-family: courier;">Discussion:</span></p><p><span style="font-family: courier;">I've highlighted different sections of the code by altering the background of the div.</span></p><p><span style="font-family: courier;">The bottom section with the dark purple background is our main area - <i>could </i>stick this in a construct like "<span style="background-color: #080808; color: #32a2f2; font-size: 15px;">if __name__ == '__main__':</span>" but it's not necessary for our purposes.</span></p><p><span style="font-family: courier;">The main here does a check for passed parameters to override the default port the application will be served on. Then we have an infinite loop that keep calling handle_request(). The "flush" before that forces any buffering in the io to be handled before the next handle. Useful for problems where buffered output isn't yet written at the time of a crash.</span></p><p><span style="font-family: courier;">The main section makes a call to ThreadedHTTPServer. This manages threaded calls to the handler(3rd section). The handler implements calls for GET and POST. </span></p><p><span style="font-family: courier;">I've added some simple functions on POST calls for adding 2 numbers, storing, and getting values in a key-value store sort of setup.</span></p><p><span style="font-family: courier;">Interfacing with POST can be done from any other language. It's also nice to use CURL to test REST interfaces.</span></p><p><span style="font-family: courier;"><br /></span></p><p><span style="font-family: courier;"><br /></span></p><p><span style="font-family: courier;">e.g.</span></p><p><span style="color: #04ff00; font-family: courier;"><b>beomagi@BeoBalthazar ~/gits/beomagi/BasicRestApp (main) 2021-01-29 13:35:09</b></span></p><p><span style="font-family: courier;"><span style="color: #04ff00;">└─ $ ∙ </span>curl 127.0.0.1:8000</span></p><p><span style="font-family: courier;">this is a test of the multithreaded webservice</span></p><p><span style="color: #04ff00; font-family: courier;"><b>beomagi@BeoBalthazar ~/gits/beomagi/BasicRestApp (main) 2021-01-29 13:35:16</b></span></p><p><span style="font-family: courier;"><span style="color: #04ff00;">└─ $ ∙ </span>curl 127.0.0.1:8000/time</span></p><p><span style="font-family: courier;">2021-01-29 18:35:21</span></p><p><span style="color: #04ff00; font-family: courier;"><b>beomagi@BeoBalthazar ~/gits/beomagi/BasicRestApp (main) 2021-01-29 13:35:16</b></span></p><p><span style="color: #04ff00; font-family: courier;">└─ $ ∙</span><span style="font-family: courier;"> curl 127.0.0.1:8000 -X POST --data '{"cmd":["add",51,15]}'</span></p><p><span style="font-family: courier;"></span></p><p><span style="font-family: courier;">66</span></p><p><span style="font-family: courier;"><br /></span></p><p><span style="font-family: courier;">So this example shows how we can make a processing request to the server. Obviously this can be more complex. Maybe I'm sending a url to be parsed (get me ma comix!). Maybe I'm passing data I want to store. Numerous reasons for this. What's performance like?</span></p><p><span style="font-family: courier;"><br /></span></p><p><span style="color: #04ff00; font-family: courier;"><b>beomagi@BeoBalthazar ~/gits/beomagi/BasicRestApp (main) 2021-01-29 13:35:16</b></span></p><p><span style="color: #04ff00; font-family: courier;">└─ $ ∙</span><span style="font-family: courier;"> curl 127.0.0.1:8000 -X POST --data '{"cmd":["put","b","If A Technological Feat Is Possible, Man Will Do It. Almost As If It is Wired Into The Core Of Our Being."]}'</span></p><p><span style="font-family: courier;">{"b": "If A Technological Feat Is Possible, Man Will Do It. Almost As If It is Wired Into The Core Of Our Being."}</span></p><p><span style="color: #04ff00; font-family: courier;"><b>beomagi@BeoBalthazar ~/gits/beomagi/BasicRestApp (main) 2021-01-29 13:35:16</b></span></p><p><span style="color: #04ff00; font-family: courier;">└─ $ ∙</span><span style="font-family: courier;"> curl 127.0.0.1:8000 -X POST --data '{"cmd":["get","b"]}'</span></p><p><span style="font-family: courier;">If A Technological Feat Is Possible, Man Will Do It. Almost As If It is Wired Into The Core Of Our Being.</span></p><p><span style="font-family: courier;"><br /></span></p><p><span style="font-family: courier;"><br /></span></p><p><span style="font-family: courier;">Ok, so that's the get and put app level functions working. Let's try a bunch of gets.</span></p><p><span style="font-family: courier;"><br /></span></p><p><span style="color: #04ff00; font-family: courier;"><b>beomagi@BeoBalthazar ~/gits/beomagi/BasicRestApp (main) 2021-01-29 13:35:16</b></span></p><p><span style="color: #04ff00; font-family: courier;">└─ $ ∙</span><span style="font-family: courier;"> time (for a in {1..1000}; do (curl -s 127.0.0.1:8000 -X POST --data '{"cmd":["get","b"]}' ) & done |sort | uniq ; wait )</span></p><p><span style="font-family: courier;">If A Technological Feat Is Possible, Man Will Do It. Almost As If It is Wired Into The Core Of Our Being.</span></p><p><span style="font-family: courier;"><br /></span></p><p><span style="font-family: courier;">real 0m2.403s</span></p><p><span style="font-family: courier;">user 0m4.234s</span></p><p><span style="font-family: courier;">sys 0m20.688s</span></p><p><span style="font-family: courier;"></span></p><p><span style="color: #04ff00; font-family: courier;"><b>beomagi@BeoBalthazar ~/gits/beomagi/BasicRestApp (main) 2021-01-29 13:35:16</b></span></p><p><span style="color: #04ff00;"><span style="font-family: courier;">└─ $ ∙</span></span></p><p><span style="font-family: courier;"><br /></span></p><p><span style="font-family: courier;">The time it took is the <i>real</i> value. It took 2.4 seconds to pull this data a thousand times. If you want to pull a lot of data faster, this basic server can be expanded to use multi-put/multi-get</span></p><p><span style="font-family: courier;">This isn't great though. We're severely limiting the test by relying on bash to loop though and spawn requests. Bash is slow for this :)</span></p><p><span style="font-family: courier;">So let's try apache bench.</span></p><p><span style="font-family: courier;">Start by putting the request in a file.</span></p><p><span style="color: #04ff00; font-family: courier;"><b>beomagi@BeoBalthazar ~/gits/beomagi/BasicRestApp (main) 2021-01-29 13:35:16</b></span></p><p><span style="color: #04ff00; font-family: courier;">└─ $ ∙</span><span style="font-family: courier;"> cat postthis.txt</span></p><p><span style="font-family: courier;">'{"cmd":["get","b"]}'</span></p><div><span style="font-family: courier;"><br /></span></div><div><span style="font-family: courier;">Now lets run apache bench to stress this.</span></div><div><span style="font-family: courier;"><br /></span></div><div><p><span style="color: #04ff00; font-family: courier;"><b>beomagi@BeoBalthazar ~/gits/beomagi/BasicRestApp (main) 2021-01-29 13:35:16</b></span></p><span style="font-family: courier;"><div><span style="color: #04ff00;">└─ $ ∙</span> <b><span style="color: #01ffff;">ab -n 10000 -c 128 -p ./postthis.txt -T application/json http://127.0.0.1:8000/</span></b></div><div><div>This is ApacheBench, Version 2.3 <$Revision: 1807734 $></div><div>Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/</div><div>Licensed to The Apache Software Foundation, http://www.apache.org/</div><div><br /></div><div>Benchmarking 127.0.0.1 (be patient)</div><div>Completed 1000 requests</div><div>Completed 2000 requests</div><div>Completed 3000 requests</div><div>Completed 4000 requests</div><div>Completed 5000 requests</div><div>Completed 6000 requests</div><div>Completed 7000 requests</div><div>Completed 8000 requests</div><div>Completed 9000 requests</div><div>Completed 10000 requests</div><div>Finished 10000 requests</div><div><br /></div><div><br /></div><div>Server Software: BaseHTTP/0.6</div><div>Server Hostname: 127.0.0.1</div><div>Server Port: 8000</div><div><br /></div><div>Document Path: /</div><div>Document Length: 57 bytes</div><div><br /></div><div>Concurrency Level: 128</div><div><b><span style="color: #fcff01;">Time taken for tests: 3.378 seconds</span></b></div><div>Complete requests: 10000</div><div>Failed requests: 0</div><div>Total transferred: 1730000 bytes</div><div>Total body sent: 1570000</div><div>HTML transferred: 570000 bytes</div><div>Requests per second: 2960.29 [#/sec] (mean)</div><div>Time per request: 43.239 [ms] (mean)</div><div>Time per request: 0.338 [ms] (mean, across all concurrent requests)</div><div>Transfer rate: 500.13 [Kbytes/sec] received</div><div> 453.87 kb/s sent</div><div> 954.00 kb/s total</div><div><br /></div><div>Connection Times (ms)</div><div> min mean[+/-sd] median max</div><div>Connect: 0 2 5.1 0 47</div><div>Processing: 5 40 10.6 41 85</div><div>Waiting: 5 38 9.8 40 67</div><div>Total: 12 43 9.5 41 100</div><div><br /></div><div>Percentage of the requests served within a certain time (ms)</div><div> 50% 41</div><div> 66% 44</div><div> 75% 47</div><div> 80% 48</div><div> 90% 55</div><div> 95% 61</div><div> 98% 68</div><div> 99% 73</div><div> 100% 100 (longest request)</div></div></span></div><p><span style="font-family: courier;">_____________________________________________________________</span></p><p><span style="font-family: courier;"><br /></span></p><p><span style="font-family: courier;">Using apachebench (ab) loading the queue to the max 128 concurrent requests, we handle <b><span style="color: white;">10k requests in 3.378 seconds</span></b>.</span></p><p><span style="font-family: courier;"><br /></span></p><p><span style="font-family: courier;">I've used this in another system where getting outside software was quite restrictive. It was quicker to write something like the above to act as a cache for a monitoring system. The system would store various database counts and system checks for a monitoring system. Prior to that the monitoring system was making the DB queries directly and <i>wow did our DB hate that</i>!!. Granted it was far more fleshed out - there was get/put single value and multiple value commands. The default page would show all stored data, and the age of the data. There was a timing thread for stats on how heavy the system was being hit. While that system (cachewho) was written and made for that company, I do plan to rewrite in python3 (instead of 2).</span></p>Beomagihttp://www.blogger.com/profile/00469223835355067867noreply@blogger.com0tag:blogger.com,1999:blog-2974094041951992980.post-73397315169191150142021-01-16T11:01:00.008-08:002021-01-22T05:32:55.299-08:00Virus Infection Simulator<p><span style="font-family: courier;">Was talking to my S-I-L about some school projects and an idea for this came up. Out of scope from what her project required, but in scope for something to do on a day off!</span></p><p><span style="font-family: courier;"><a href="http://htmlpreview.github.io/?https://raw.githubusercontent.com/beomagi/html-tinkers/master/virus-sim/virus-sim.html" rel="nofollow" target="_blank">Direct link to github html preview.</a></span></p><p><span style="font-family: courier;">I started by defining a list of "cities" - x, y coordinates are simply distributed in a circle around the center of the screen.</span></p><p><span style="font-family: courier;">People is an array of persons. A person is in a city (thus having that city's x, y location as a base point. The person wanders based on sin/cos curves.</span></p><p><span style="font-family: courier;">e.g. lets say the person wanders around the city. Cities are arranged in a circle. we can describe a function given a time to determine the location of a person as they wander the city.</span></p><p><span style="font-family: courier;">It's not hard to think this through. A "person" will need some stats. Direction, speed, wandering constants, home city. "Cities" will have constants too - size, location. We can consider population density. Maybe some cities have mandates that reduce infection rate.</span></p><p><span style="font-family: courier;"></span></p><blockquote><p><span style="font-family: courier;">//Basic wandering idea...</span> </p></blockquote><blockquote><p><span style="font-family: courier;">//lets give a person a random direction, clockwise or anti</span></p><p><span style="font-family: courier;"><b><span data-darkreader-inline-color="" style="--darkreader-inline-color: #93c1e5; color: #9fc5e8;">persondirection</span>=random()-0.5</b></span></p><p><span style="font-family: courier;">//wander factor is how often the person will head to the center of a town while they run around.</span></p><p><span style="font-family: courier;"><b><span data-darkreader-inline-color="" style="--darkreader-inline-color: #93c1e5; color: #9fc5e8;">wanderfactor</span>=random()*4+2</b></span></p><p><span style="font-family: courier;">//Given a number of cities, we can distribute cities in a circle.</span></p><p><span style="font-family: courier;"><b><span data-darkreader-inline-color="" style="--darkreader-inline-color: #93c1e5; color: #9fc5e8;">cityx</span>=<span data-darkreader-inline-color="" style="--darkreader-inline-color: #afd39f; color: #b6d7a8;">sin</span>(2*<span data-darkreader-inline-color="" style="--darkreader-inline-color: #afd39f; color: #b6d7a8;">pi</span>*<span data-darkreader-inline-color="" style="--darkreader-inline-color: #ffd861; color: #ffd966;">personcitynumber</span>/<span data-darkreader-inline-color="" style="--darkreader-inline-color: #ffd861; color: #ffd966;">citycount</span>)*<span data-darkreader-inline-color="" style="--darkreader-inline-color: #ffd861; color: #ffd966;">cityspread</span></b></span></p><p><b><span style="font-family: courier;"><span data-darkreader-inline-color="" style="--darkreader-inline-color: #93c1e5; color: #9fc5e8;">cityy</span>=<span data-darkreader-inline-color="" style="--darkreader-inline-color: #afd39f; color: #b6d7a8;">cos</span>(2*<span data-darkreader-inline-color="" style="--darkreader-inline-color: #afd39f; color: #b6d7a8;">pi</span>*</span><span data-darkreader-inline-color="" style="--darkreader-inline-color: #ffd861; color: #ffd966; font-family: courier;">personcitynumber</span><span style="font-family: courier;">/<span data-darkreader-inline-color="" style="--darkreader-inline-color: #ffd861; color: #ffd966;">citycount</span>)*<span data-darkreader-inline-color="" style="--darkreader-inline-color: #ffd861; color: #ffd966;">cityspread</span></span></b></p><p><span style="font-family: courier;">//lets have the person walk in a circle in the direction/speed of their random pick. Time is a variable we can increment every frame. Offset is a random constant per person. It's so that that everyone doesn't seem to start at the same point at the same time.</span></p><p><b><span style="font-family: courier;"><span data-darkreader-inline-color="" style="--darkreader-inline-color: #93c1e5; color: #9fc5e8;">wanderingx</span>=<span data-darkreader-inline-color="" style="--darkreader-inline-color: #afd39f; color: #b6d7a8;">sin</span>(<span data-darkreader-inline-color="" style="--darkreader-inline-color: #ff1afe; color: #ff00fe;">time</span>*</span><span data-darkreader-inline-color="" style="--darkreader-inline-color: #93c1e5; color: #9fc5e8; font-family: courier;">persondirection</span><span style="font-family: courier;">+<span data-darkreader-inline-color="" style="--darkreader-inline-color: #e0bccc; color: #ead1dc;">offset</span>)*<span data-darkreader-inline-color="" style="--darkreader-inline-color: #ffd861; color: #ffd966;">citysize</span></span></b></p><p><b><span style="font-family: courier;"><span data-darkreader-inline-color="" style="--darkreader-inline-color: #93c1e5; color: #9fc5e8;">wanderingy</span>=<span data-darkreader-inline-color="" style="--darkreader-inline-color: #96c681; color: #93c47d;">cos</span>(</span></b><b><span style="font-family: courier;"><span data-darkreader-inline-color="" style="--darkreader-inline-color: #ff1afe; color: #ff00fe;">time</span></span></b><b><span style="font-family: courier;">*</span><span data-darkreader-inline-color="" style="--darkreader-inline-color: #93c1e5; color: #9fc5e8; font-family: courier;">persondirection</span><span style="font-family: courier;">+</span></b><b><span style="font-family: courier;"><span data-darkreader-inline-color="" style="--darkreader-inline-color: #e0bccc; color: #ead1dc;">offset</span></span></b><b><span style="font-family: courier;">)*<span data-darkreader-inline-color="" style="--darkreader-inline-color: #ffd861; color: #ffd966;">citysize</span></span></b></p><p><span style="font-family: courier;">//we can make the person wander a little more than just in a perfect circle. Sin/2 is -0.5 to 0.5. Add 0.5 and it's 0 to 1. </span></p><p><b><span style="font-family: courier;"><span data-darkreader-inline-color="" style="--darkreader-inline-color: #93c1e5; color: #9fc5e8;">centervisit</span>=0.5+<span data-darkreader-inline-color="" style="--darkreader-inline-color: #afd39f; color: #b6d7a8;">sin</span>(</span></b><b><span style="font-family: courier;"><span data-darkreader-inline-color="" style="--darkreader-inline-color: #ff1afe; color: #ff00fe;">time</span></span></b><b><span style="font-family: courier;">*</span><span data-darkreader-inline-color="" style="--darkreader-inline-color: #93c1e5; color: #9fc5e8; font-family: courier;">wanderfactor</span><span style="font-family: courier;">+</span></b><b><span style="font-family: courier;"><span data-darkreader-inline-color="" style="--darkreader-inline-color: #e0bccc; color: #ead1dc;">offset</span></span></b><b><span style="font-family: courier;">)/2</span></b></p><p><span style="font-family: courier;">//add the city coordinates with the wandering x,y multiplied by the wander factor, and they'll be moving around a city location, moving to the center and back out to their normal ring around the city.</span></p><p><b><span style="font-family: courier;"><span data-darkreader-inline-color="" style="--darkreader-inline-color: #93c1e5; color: #9fc5e8;">personx </span>= </span><span data-darkreader-inline-color="" style="--darkreader-inline-color: #93c1e5; color: #9fc5e8; font-family: courier;">cityx </span><span style="font-family: courier;">+ </span><span data-darkreader-inline-color="" style="--darkreader-inline-color: #93c1e5; color: #9fc5e8; font-family: courier;">centervisit </span><span style="font-family: courier;">* </span><span data-darkreader-inline-color="" style="--darkreader-inline-color: #93c1e5; color: #9fc5e8; font-family: courier;">wanderingx</span></b></p><p><b><span style="font-family: courier;"><span data-darkreader-inline-color="" style="--darkreader-inline-color: #93c1e5; color: #9fc5e8;">persony </span>= </span><span data-darkreader-inline-color="" style="--darkreader-inline-color: #93c1e5; color: #9fc5e8; font-family: courier;">cityy </span><span style="font-family: courier;">+ </span><span data-darkreader-inline-color="" style="--darkreader-inline-color: #93c1e5; color: #9fc5e8; font-family: courier;">centervisit </span><span style="font-family: courier;">* </span><span data-darkreader-inline-color="" style="--darkreader-inline-color: #93c1e5; color: #9fc5e8; font-family: courier;">wanderingy</span></b></p></blockquote><p><span style="font-family: courier;"></span></p><p><span style="font-family: courier;">Fleshed out a little more, the wandering patterns looked pretty decent. Throw these values in an object per person, make an array of people, and city variables, and add some more properties like what city the person is moving to, and progress there.</span></p><p><span style="font-family: courier;">See the source here</span></p><p><span style="font-family: courier;"><a href="https://github.com/beomagi/html-tinkers/blob/master/virus-sim/virus-sim.html">https://github.com/beomagi/html-tinkers/blob/master/virus-sim/virus-sim.html</a></span></p><p><span style="font-family: courier;">Edit: added some color, event log and graph. See the git repo for future changes.</span></p><p><span style="font-family: courier;">Thought: should make this an interactive game. Cities can have money saved that decreases if under lockdown. People can have a happiness factor that depends on safeguards and how they are doing in relation to other cities... </span></p>
<style>
#mcanvascontainer {
width: 100%;
height: 100%;
margin: 0px;
}
#mcanvas {
width: 100%;
height: 100%;
margin: 0px;
}
</style>
<script language="javascript">
rndseed=1000;
inittime=Date.now();
window.requestAnimFrame = (function(callback) {
return window.requestAnimationFrame ||
window.webkitRequestAnimationFrame ||
window.mozRequestAnimationFrame ||
window.oRequestAnimationFrame ||
window.msRequestAnimationFrame ||
function(callback) {
window.setTimeout(callback, 1000 / 60);
};
})();
function rgbToHex(r, g, b) { //thanks stackoverflow
return "#" + ((1 << 24) + (r << 16) + (g << 8) + b).toString(16).slice(1);
}
var RNGOD = rndseed;
function random() {
//var x = Math.sin(RNGOD+=100);
//return (x+1)/2;
return Math.random()
}
function mapx(midx, mscale, xco){ return midx+mscale*xco;}
function mapy(midy, mscale, yco){ return midy+mscale*yco;}
var cities=[];
var people=[];
var city_count=0;
var people_count=0;
var healthy_count=0;
var infected_count=0;
function initcities(citycount,citysizemin,citysizemax){
city_count=citycount;
for (i=0;i<citycount;i++){
var city = {};
city.x=Math.cos((i*2*Math.PI)/citycount)*0.74;
city.y=Math.sin((i*2*Math.PI)/citycount)*0.74;
city.size=Math.random()*(citysizemax-citysizemin)+citysizemin;
cities.push(city);
}
}
function populatecities(){
for (i=0;i<city_count;i++){
citysize=cities[i].size;
population=citysize*citysize*500;
for (j=0;j<population;j++){
var person={};
person.posa=Math.random()*Math.PI*2;
person.posr=cities[i].size*0.95; //from 0.05 to 0.95 of city size
person.posrv1=Math.random()*2;
person.posrv2=(Math.random()*Math.PI*2);
person.posv=(Math.random()-0.5);
person.city=i;
person.movetocity=i;
person.infected=0;
person.moving=-1;
person.movingposr=0;
people.push(person);
people_count+=1;
}
}
}
// initcities(7,0.1,0.25);
//initcities(Math.floor(random()*7)+4,0.1,0.25);
initcities(9,0.1,0.25);
populatecities();
people[Math.floor(random()*people_count)].infected=1;
function circle(ctx,cx,cy,cr,color){
ctx.beginPath();
ctx.strokeStyle=color;
ctx.fillStyle = color;
ctx.arc(cx, cy, cr, 0, 2 * Math.PI);
ctx.stroke();
ctx.fill();
}
function dista(x1,y1,x2,y2){
return (x2-x1)*(x2-x1)+(y2-y1)*(y2-y1);
}
ctime=0
ievents=[];
travelspeed=0.005;
infectionchance=0.05; //per frame if close
gtime=0;
infecteventgraph=[];
previnfect_count=0;
infecteventgraph.push({"t":0,"v":0});
function drawcities(){
wide=mcanvas.width;
high=mcanvas.height;
mx=wide/2;
my=high/2;
ms=Math.min(mx,my);
ctx.fillStyle=rgbToHex(255,255,220);
ctx.fillRect(0,0,wide,high);
ctime+=0.001;
citycolor=rgbToHex(140,220,255);
for (i=0;i<city_count;i++){
cities[i].x=Math.cos(ctime+(i*2*Math.PI)/city_count)*0.74; //apply gentle rotation of the world!
cities[i].y=Math.sin(ctime+(i*2*Math.PI)/city_count)*0.74;
cityx=mapx(mx,ms,cities[i].x);
cityy=mapy(my,ms,cities[i].y);
circle(ctx,cityx,cityy,cities[i].size*ms,citycolor);
}
personcolor=rgbToHex(100,100,105);
infectedcolor=rgbToHex(255,50,5);
//-- handle person movement
var chkpx=[]; //buffer with calculated people locations
var chkpy=[];
for (i=0;i<people_count;i++){
pcity=people[i].city;
pr=people[i].posr*Math.sin(moves*people[i].posrv1+people[i].posrv2); //radius of walk
pa=people[i].posa; //angle of walk
pv=people[i].posv; //speed of walk
cityx=mapx(mx,ms,cities[pcity].x); //to center walk around city
cityy=mapy(my,ms,cities[pcity].y);
px=cityx+Math.sin(pa)*pr*ms;
py=cityy+Math.cos(pa)*pr*ms;
if (people[i].moving>=0){ //if moving, calculate if at other city, and transition
pr2=people[i].movingposr*Math.sin(moves*people[i].posrv1+people[i].posrv2);
cityx2=mapx(mx,ms,cities[people[i].movetocity].x);
cityy2=mapy(my,ms,cities[people[i].movetocity].y);
px2=cityx2+Math.sin(pa)*pr2*ms;
py2=cityy2+Math.cos(pa)*pr2*ms;
px=px2*people[i].moving+px*(1-people[i].moving);
py=py2*people[i].moving+py*(1-people[i].moving);
people[i].moving+=travelspeed;
if (people[i].moving>=1){
people[i].city=people[i].movetocity;
people[i].moving=-1;
people[i].posr=people[i].movingposr;
}
}
pcolor=personcolor;
if (people[i].infected==1) { pcolor=infectedcolor; }
circle(ctx,px,py,0.01*ms,pcolor);
people[i].posa+=pv*0.05;
//-- travelocity stuff
if (people[i].city == people[i].movetocity){
if (Math.random()<0.00025){
people[i].movetocity=Math.floor(Math.random()*city_count);
if (people[i].city !== people[i].movetocity){
people[i].moving=0;
people[i].movingposr=cities[people[i].movetocity].size*0.95; //radius of new city
if (people[i].infected==1) {
ievents.push("P"+i+" infected to city"+people[i].movetocity);
}
}
}
}
//-- traveling ^^
//--post move, check location for infection
chkpx.push(px);
chkpy.push(py);
infected_count=0;
healthy_count=0;
for (j=0;j<i;j++){
if (dista(px,py,chkpx[j],chkpy[j])<(ms*ms*0.0005)){
if (Math.random()<infectionchance){
if (people[j].infected==1 && people[i].infected==0){
people[i].infected=1;
ievents.push("P"+j+" infected P"+i);
if (ievents.length>8){ievents.shift();}
}
if (people[j].infected==0 && people[i].infected==1){
people[j].infected=1;
ievents.push("P"+i+" infected P"+j);
}
}
}
if (people[j].infected==0){
healthy_count+=1;
} else {
infected_count+=1;
}
}
//--infection by locality ^^
}
while (ievents.length>8){ievents.shift();}
}
function drawstats(){
fsz=Math.floor(ms/20);
ctx.font=fsz+"px courier";
textoffset=ctx.measureText("Infected: 999").width
ctx.fillStyle=rgbToHex(180,0,0);
ctx.fillText("Infected: "+infected_count,mx-textoffset/2,my-ms*0.30);
ctx.fillStyle=rgbToHex(0,150,0);
ctx.fillText("Healthy : "+healthy_count,mx-textoffset/2,my-ms*0.25);
fsz=Math.floor(ms/30);
ctx.font=fsz+"px courier";
ctx.fillStyle=rgbToHex(190,90,190);
textoffset=ctx.measureText("P infected to city xx").width
for (id=0;id<ievents.length;id++){
ctx.fillText(ievents[id],mx-textoffset/2,my-ms*0.20+(ms*id/30));
}
// Graph it!
gxmin=mx-ms*0.2;
gxmax=gxmin+ms*0.4;
gymin=my+ms*0.25;
gymax=gymin-ms*0.2;
ctx.beginPath();
ctx.strokeStyle=rgbToHex(90,90,90);
ctx.fillStyle=rgbToHex(255,255,255);
ctx.globalAlpha=0.5;
ctx.fillRect(gxmin,gymin,gxmax-gxmin,gymax-gymin);
ctx.globalAlpha=1;
ctx.rect(gxmin,gymin,gxmax-gxmin,gymax-gymin);
ctx.stroke();
ctx.beginPath();
ctx.strokeStyle=rgbToHex(190,90,90);
ctx.moveTo(gxmin,gymin);
for (igc=0;igc<infecteventgraph.length;igc++){
gyval=gymin-((infecteventgraph[igc].v/infected_count)*(gymin-gymax));
gxval=gxmin+(gxmax-gxmin)*((infecteventgraph[igc].t)/gtime);
ctx.lineTo(gxval, gyval);
}
ctx.stroke();
//End of graphing ^^
}
moves=0;
var countdown=-1;
function animate(){
gtime+=1;
moves+=0.01;
RNGOD = rndseed+moves;
timerstart=Date.now();
previnfect_count=infected_count;
drawcities();
drawstats();
if (infected_count>previnfect_count) {
infecteventgraph.push({"t":gtime,"v":infected_count});
previnfect_count=infected_count;
}
if (healthy_count==0){
if (countdown<0) {
countdown=100;
ievents.push("-No healthy people-")
}
if (countdown>0){
countdown-=1;
}
if (countdown==0){ //this is rest status
countdown=-1;
cities=[];
people=[];
ievents=[];
city_count=0;
people_count=0;
healthy_count=0;
infected_count=0;
previnfect_count=0;
gtime=0;
infecteventgraph=[];
infecteventgraph.push({"t":0,"v":0});
initcities(Math.floor(random()*7)+3,0.1,0.25);
populatecities();
people[Math.floor(random()*people_count)].infected=1;
}
}
timerend=Date.now();
frametime=timerend-timerstart;
requestAnimFrame(animate);
}
function paint(cnvname){
mcanvas = document.getElementById(cnvname);
ctx = mcanvas.getContext('2d');
ctx.canvas.width = window.innerWidth;
ctx.canvas.height = window.innerHeight*0.95;
wide=mcanvas.width;
high=mcanvas.height;
x=wide/2;
y=high/2;
animate();
}
</script>
<body onload="paint("mcanvas")">
<div id="canvascontainer">
<canvas id="mcanvas"></canvas>
</div>
</body>
Beomagihttp://www.blogger.com/profile/00469223835355067867noreply@blogger.com2tag:blogger.com,1999:blog-2974094041951992980.post-6416578423344898902020-08-15T20:41:00.104-07:002020-08-20T12:15:37.925-07:00Project Yellow - An RC car build (and my radio control hobby's past)<p><span style="font-family: courier;"> I've been into radio control "seriously" since 2007. Back then I bought an RC18T, a Team Associated 1/18th scale truggy. It was a peppy, shaft driven 4wd, and oh boy did the idea of upgrading things appeal to me. Increase the power and speed and stuff started breaking. The a-arms, the gears, the out-drives, shafts, shocks, turnbuckles. I liked it really, I did, but oh boy did this not handle power that well. Even after the structure was fortified to survive powerful brushless motors, the servo and servo-saver were too weak and sloppy to keep the car pointed where you wanted it. </span></p><table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto;"><tbody><tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgwg-a8aRSWm3MzwuZkJZHZZUi0CVqkT_M7Wd50u3MUs2Ice_o23la5xb7kmqzMlK7LTFfqjpPuBpnyEd6xaKbHVhJZ5EXMjUVmzS21DIQWz0Cb8htF_UNyD77Jw_HAysLh8x2n9dLds9Nf/s1280/bugbody_front_angle.JPG" style="margin-left: auto; margin-right: auto;"><span style="font-family: courier;"><img border="0" data-original-height="960" data-original-width="1280" height="480" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgwg-a8aRSWm3MzwuZkJZHZZUi0CVqkT_M7Wd50u3MUs2Ice_o23la5xb7kmqzMlK7LTFfqjpPuBpnyEd6xaKbHVhJZ5EXMjUVmzS21DIQWz0Cb8htF_UNyD77Jw_HAysLh8x2n9dLds9Nf/w640-h480/bugbody_front_angle.JPG" width="640" /></span></a></td></tr><tr><td class="tr-caption" style="text-align: center;"><span style="font-family: courier; font-size: small;">My old RC18T - with several mods. Aftermarket diffs, outdrives, motor, shocks, wheels turnbuckles and body. This pic is the closest to the original stock form I have.</span></td></tr></tbody></table><p></p><table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto;"><tbody><tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhIU-qZKnK-Gojt5XNc_Ub4Q8qzHAwTa6JGDPp-6aG5hLla-r6b0Joq1-jo6ntXDIC_GZ_GGPlSaNrpSvZxFl1c1yTszVa-No5G_0uJUQekq_ONQVKBFVgMnTOJzTZrK2Xa9HTpQUpssxCS/s800/sideprofile.jpg" style="margin-left: auto; margin-right: auto;"><span style="font-family: courier;"><img border="0" data-original-height="600" data-original-width="800" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhIU-qZKnK-Gojt5XNc_Ub4Q8qzHAwTa6JGDPp-6aG5hLla-r6b0Joq1-jo6ntXDIC_GZ_GGPlSaNrpSvZxFl1c1yTszVa-No5G_0uJUQekq_ONQVKBFVgMnTOJzTZrK2Xa9HTpQUpssxCS/s640/sideprofile.jpg" width="640" /></span></a></td></tr><tr><td class="tr-caption" style="text-align: center;"><span style="font-family: courier; font-size: small;">What it morphed into. A more reasonable motor, custom 8 cell battery pack, chunky 1/10th scale shocks, aftermarket chassis. A low profile 1/10th scale servo that acted at half of the top brace massively improved the steering. Obviously I'm bashing this around. the weight of these parts won't make this a racer.<br /><br />NB: wow My pictures in the past were horrible. So glad I took photography seriously. Even casual shots are more pleasing now :D</span></td></tr></tbody></table><p></p><p><span style="font-family: courier;">With the RC18T, some parts were definitely better to buy than make - things where geometry was crucial like a-arms, I'd get RPM branded nylon arms. The nylon would bend on crashing. Aluminum arms would bend too, but they stay bent. You quickly learn that plastic (nylon) is definitely the material of choice for absorbing shock. Aluminum is great for precision - especially if it's static and quite chunky - e.g. gearboxes. Sometimes a chassis. </span></p><table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto;"><tbody><tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiifaDa3rb8JF8kAfKuLtvNr08klC0vdg_DP1VFH7Wc6Cnbs8PH6A-nWdviIHSiJe5Yo2kHA56YrUHhZW9Q46ZMKhOel7DZvVgoIIJ93TdtTBZkAvQJQL5Z4WqTPM5rDY_CM9r_Prdd6QoM/s2048/rc18tcustom.jpg" style="margin-left: auto; margin-right: auto;"><span style="font-family: courier;"><img border="0" data-original-height="1627" data-original-width="2048" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiifaDa3rb8JF8kAfKuLtvNr08klC0vdg_DP1VFH7Wc6Cnbs8PH6A-nWdviIHSiJe5Yo2kHA56YrUHhZW9Q46ZMKhOel7DZvVgoIIJ93TdtTBZkAvQJQL5Z4WqTPM5rDY_CM9r_Prdd6QoM/s640/rc18tcustom.jpg" width="640" /></span></a></td></tr><tr><td class="tr-caption" style="text-align: center;"><span style="font-family: courier; font-size: small;">This was a custom RC18. My second car. I skipped a lot of headaches with this. The aftermarket chassis used a stiff carbon fiber upper brace that I used to create a different steering setup. I swapped the main base of the chassis for a homemade piece. The plastic I used was UHMW (ultra high molecular weight) polyethylene. It's strong and relatively easy to manipulate with just a dremel. Skipping the stock car and using a custom chassis, I was able to get the steering as I liked. Cost wise it wasn't really better or worse than buying a new one, but I didn't really have anything to mod when it was done.</span></td></tr></tbody></table><p><span style="font-family: courier;"><br />Making a car chassis can be difficult because steering geometry comes into play. Accuracy is needed. the width of a cut into plastic can set a car's geometry off. I learned quickly how easy it is to use solid axles with their built in steering geometry to create a car. With a 4-link suspension setup, the geometry can be tweaked by increasing or decreasing the length of the rods a little. Even then, there were so many options for aftermarket crawler and trail chassis, and it wasn't hard to interchange them.</span></p><table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto;"><tbody><tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgSy776FP2GWUiO1DxP-XqxZN1SyfNsI0MfmmsNr14yyNbI4y6sospoXa66czE9TE2f9XiCG5lHXyuTDX0EffQh32bIgMkR6AOXR09ri-gNOQ2A6YK3xaNQX1Gg1vF_OETvzvvJM_GYjwLJ/s2048/P7075927.JPG" style="margin-left: auto; margin-right: auto;"><span style="font-family: courier;"><img border="0" data-original-height="1536" data-original-width="2048" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgSy776FP2GWUiO1DxP-XqxZN1SyfNsI0MfmmsNr14yyNbI4y6sospoXa66czE9TE2f9XiCG5lHXyuTDX0EffQh32bIgMkR6AOXR09ri-gNOQ2A6YK3xaNQX1Gg1vF_OETvzvvJM_GYjwLJ/s640/P7075927.JPG" width="640" /></span></a></td></tr><tr><td class="tr-caption" style="text-align: center;"><span style="font-family: courier; font-size: small;">One of my crawler-axle based RC cars. this one ended up with 4 wheel steer. Solid axles like these have steering built on the axle making it easy to setup. The servo goes on that green flat platform above the axle differential. The axle is held in place by 4 links. In this case it's 4 brass covered links. The shocks aren't attached to the body but can be attached just about anywhere to give the desired level of suspension travel.</span></td></tr></tbody></table><p><span style="font-family: courier;"><br /><br /></span></p><h2 style="text-align: left;"><span style="font-family: courier;">Onto the project...</span></h2><p></p><p><span style="font-family: courier;">I started this a couple of weeks ago. I had bought the axles online years ago, and just had them lying there begging to be used for something. I just got in mind to make a car as the last use of my scrollsaw before I upgrade it. I worked with HDPE - High Density Polyethylene. Seaboard, as hinted in the name, is commonly used in boats. It's flexible, so it will bend on serious impact. It's very easy to work with. It won't melt and fuse behind the blade cutting it. My chassis was simple. 2 side pieces using 1/2 inch HDPE, and a center skid plate using 1/4". The sides will slant inward to the front like a pizza slice to make more room for steering.</span></p><p></p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhNvPcwzhqjHgz8XmIrUZiGYJlejSnXg5oUDkODdHqwfOhRXdMAiAjF5uNrMsYeQNBhVJS6QgHy-kWBJyi2kNjGynZizKVIvPIbc5BBWqmoNRDycskhsYeTuxGoEnjfQyPQCRiYSp0r9N0E/s2048/P7300044.JPG" style="margin-left: 1em; margin-right: 1em;"><span style="font-family: courier;"><img border="0" data-original-height="1536" data-original-width="2048" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhNvPcwzhqjHgz8XmIrUZiGYJlejSnXg5oUDkODdHqwfOhRXdMAiAjF5uNrMsYeQNBhVJS6QgHy-kWBJyi2kNjGynZizKVIvPIbc5BBWqmoNRDycskhsYeTuxGoEnjfQyPQCRiYSp0r9N0E/s640/P7300044.JPG" width="640" /></span></a></div><span style="font-family: courier;"><div><span style="font-family: courier;"><br /></span></div><br /></span><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhYI_pbl-2HrZFMB_XXL33Nfh7MdhyTSdRCeTLpYlGm_WbPhGIoy_ZQZQ3UDn_1vonMphE-p80grXaj09aafVoDW5bgd7GHg6dG8JhPM78GiDlV5C6yqlT48_In54nixcZIGjeXpmg7BL-0/s2048/P7300048.JPG" style="margin-left: 1em; margin-right: 1em;"><span style="font-family: courier;"><img border="0" data-original-height="1536" data-original-width="2048" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhYI_pbl-2HrZFMB_XXL33Nfh7MdhyTSdRCeTLpYlGm_WbPhGIoy_ZQZQ3UDn_1vonMphE-p80grXaj09aafVoDW5bgd7GHg6dG8JhPM78GiDlV5C6yqlT48_In54nixcZIGjeXpmg7BL-0/s640/P7300048.JPG" width="640" /></span></a></div><span style="font-family: courier;"><br /></span><p></p><p><span style="font-family: courier;">The links are 4mm threaded rod available from many hardware stores. The ends are generic aluminum rod ends. This is a 4 link setup, and those shocks are touring car shocks. The wheels had also been lying about unused, so the presence of them - and a car body too - convinced me to make a (mostly onroad) car with the solid axles. The chassis sides curve up higher than most normal crawler/scale chassis because I want the transmission and internals lower.</span></p><table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto;"><tbody><tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhzW-dIzQEEqittpBPEjNF8au_OfeC_w_9Q09KTRKGZUucjA1XP_lANqvjhtdckRfqQCl34xmgY9EIC2QObqmg84JxQITfPawr2EvI1SA0FZGWTirXOSBI-CzH8w3TFmFlFf4ZJBA8vTnt6/s2048/P7300006.JPG" style="margin-left: auto; margin-right: auto;"><span style="font-family: courier;"><img border="0" data-original-height="1536" data-original-width="2048" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhzW-dIzQEEqittpBPEjNF8au_OfeC_w_9Q09KTRKGZUucjA1XP_lANqvjhtdckRfqQCl34xmgY9EIC2QObqmg84JxQITfPawr2EvI1SA0FZGWTirXOSBI-CzH8w3TFmFlFf4ZJBA8vTnt6/s640/P7300006.JPG" width="640" /></span></a></td></tr><tr><td class="tr-caption" style="text-align: center;"><span style="font-family: courier; font-size: small;">Quick mock-up using tape to hold the batteries in place. It ran well and felt nicely planted. Since the chassis is just some cut sheets of plastic and a set of 3mm screws, it's very cheap. The links are also cheap since they're made. The Speed controller and brushless motor on this cost $35. That price for brushless anything was unheard of when I started.<br /></span></td></tr></tbody></table><p><span style="font-family: courier;">As in a previous post, the transmission is held in place using a bracket, drawn by a 3d pen, and made of PETG. This is an experiment to see how it holds up. So far so good - though I may use Kydex next time. With the transmission and driveshafts mounted, getting the car running is a lot of finishing touches. How shall I mount the body? The battery?</span></p><p><span style="font-family: courier;">I wanted to experiment more with kydex - Used in a previous RC car to make a battery cover. I wanted to make a platform for the battery which curved down and around the motor, gearbox and shafts.</span></p><p></p><div class="separator" style="clear: both; text-align: center;"><span style="font-family: courier;"><iframe allowfullscreen="" class="BLOG_video_class" height="266" src="https://www.youtube.com/embed/W3nCYKuMVGc" width="320" youtube-src-id="W3nCYKuMVGc"></iframe><iframe allowfullscreen="" class="BLOG_video_class" height="266" src="https://www.youtube.com/embed/I_4UdLPf5hw" width="320" youtube-src-id="I_4UdLPf5hw"></iframe></span></div><span style="font-family: courier;"><div><span style="font-family: courier;"><br /></span></div>I cut the sheet with my scrollsaw first - a rectangular piece with some tabs. I heated the piece over the stove until it went soft - Kydex is a thermoplastic. It's perfect for this. I was able to curve the kydex to fit perfectly, offering a place to mount batteries and electronics and keeping out dust too.</span><p></p><p><span style="font-family: courier;">Finally it's time to put on body posts to mount the body. In the front I used 1/4" HDEP. I used kydex to make a hinge for the rear.</span></p><p><span style="font-family: courier;"><br /></span></p><p><span style="font-family: courier;">Here is is completed. The kydex in place holding 4 18650 cells. I was testing the cells in here so I ran it with a data logger. that's the black box on top the green batteries with the blue LCD.</span></p><p></p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi16I_v8ro-8YSStPWVQMh-C9GmdZwch9oBQhzUSDOfRib68Qo0Qez3wLRj9mN1TYyuaAsqU9LMwEsNXwpIwqh-ODasuiLRDMkx1bCzW2i4kyZnzCn0Kr3t26Ar2JOHjLfVq3lReKUE1yXs/s2048/W8150040.JPG" style="margin-left: 1em; margin-right: 1em;"><span style="font-family: courier;"><img border="0" data-original-height="1536" data-original-width="2048" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi16I_v8ro-8YSStPWVQMh-C9GmdZwch9oBQhzUSDOfRib68Qo0Qez3wLRj9mN1TYyuaAsqU9LMwEsNXwpIwqh-ODasuiLRDMkx1bCzW2i4kyZnzCn0Kr3t26Ar2JOHjLfVq3lReKUE1yXs/s640/W8150040.JPG" width="640" /></span></a></div><div><span style="font-family: courier;"><br /></span></div><div><span style="font-family: courier;"><br /></span></div><span style="font-family: courier;">The under-side of the car. You can clearly see the solid axles and 4 link setup. I swapped out the front locked diff for an open Axial differential. Obviously the aluminum axles aren't from Axial, but a generic Chinese company, but that's because my first set of Axial axles snapped and I just don't think they do well for bashing.<br /></span><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiLPCvaQivi4BK9ShwGZ3Sk0F70uytCP4ozzUumsjKvUJ0q1NItk8eBdvrIrYoFw8qraWTmSzo3v5xrGd9uVcIwsrLYDu35oGb89s0lGviQVrBal_MrXn6KGX_rZR139fAPZo-Ai9IjoY3K/s2048/W8150061.JPG" style="margin-left: 1em; margin-right: 1em;"><span style="font-family: courier;"><img border="0" data-original-height="2048" data-original-width="1536" height="640" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiLPCvaQivi4BK9ShwGZ3Sk0F70uytCP4ozzUumsjKvUJ0q1NItk8eBdvrIrYoFw8qraWTmSzo3v5xrGd9uVcIwsrLYDu35oGb89s0lGviQVrBal_MrXn6KGX_rZR139fAPZo-Ai9IjoY3K/s640/W8150061.JPG" /></span></a></div><div class="separator" style="clear: both; text-align: center;"><span style="font-family: courier;"><br /></span></div><div class="separator" style="clear: both; text-align: left;"><span style="font-family: courier;">The car's body has a high back, and I didn't want to make tall posts in the rear. Instead I bent Kydex around 4mm threaded rod, and cut out the center of the piece making a hinge. This was bolted to the car and the body. Kydex is nice to work with - both cutting, and shaping with heat. It's pretty durable too. It's often used in knife holsters and comes in a variety of patterns.</span></div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiomgliT9q-h19S2jbP_U9Q2aaLq-2TUChFg1EpMiJvmRfUqX6zgy4GBQT-fBTH0l4lLXg6g6BvaiaM1OfIv37zS6LA1lASEhE1-fDcv4WS2s0MmioGVE4qYIvQU9Fy5HieZ3DUdN9SsZkC/s2048/W8150042.JPG" style="margin-left: 1em; margin-right: 1em;"><span style="font-family: courier;"><img border="0" data-original-height="1536" data-original-width="2048" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiomgliT9q-h19S2jbP_U9Q2aaLq-2TUChFg1EpMiJvmRfUqX6zgy4GBQT-fBTH0l4lLXg6g6BvaiaM1OfIv37zS6LA1lASEhE1-fDcv4WS2s0MmioGVE4qYIvQU9Fy5HieZ3DUdN9SsZkC/s640/W8150042.JPG" width="640" /></span></a></div><span style="font-family: courier;"><br /></span><div class="separator" style="clear: both; text-align: center;"><span style="font-family: courier;"><br /></span></div><span style="font-family: courier;">Here's a view of the car from behind. The transmitter in the background is a Radiolink RC6GS. It's a 6 channel pistol grip transmitter. It comes with a receiver that has a gyroscope - so I may use it and turn this into a drift machine. With the locked rear differential and open front, the rear is easy to break free by stomping on the throttle in a turn. This view shows the rear bumper - the hinge that the body is attached to the car by.<br /></span><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhv4K_2Z7ob2OGAk6f4kgnzLHMVV517Xn7PeveZJf5nFT6jJQVGgVOKwaZe3bNpyjPJTArQDQMfb-d52t0WZ_SCehXxHHI3SfsM-3OJ-AdlUhzu4gr-d5QX1bnV0tToPKFujsaAHlivxdwk/s2048/W8150048.JPG" style="margin-left: 1em; margin-right: 1em;"><span style="font-family: courier;"><img border="0" data-original-height="2048" data-original-width="1536" height="640" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhv4K_2Z7ob2OGAk6f4kgnzLHMVV517Xn7PeveZJf5nFT6jJQVGgVOKwaZe3bNpyjPJTArQDQMfb-d52t0WZ_SCehXxHHI3SfsM-3OJ-AdlUhzu4gr-d5QX1bnV0tToPKFujsaAHlivxdwk/s640/W8150048.JPG" /></span></a></div><div><span style="font-family: courier;"><br /></span></div><span style="font-family: courier;">Here's the front of Project Yellow. I added a red stripe to make it go faster. I don't think it worked, but it looks nice :)<br /></span><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgx-4qQaQWrWqrl15VobrhL9xxZB4RPZjXsno3VjpqcdmO4X_4VDWoWYMdgYPi0BKweeDEjyXkaskSVIC4gtItcFY6eR0r0jMq-zo3P3yxs80q_5z3cGXTqjhK8ipuFXoQrjiMA21PCOjVN/s2048/W8150049.JPG" style="margin-left: 1em; margin-right: 1em;"><span style="font-family: courier;"><img border="0" data-original-height="1536" data-original-width="2048" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgx-4qQaQWrWqrl15VobrhL9xxZB4RPZjXsno3VjpqcdmO4X_4VDWoWYMdgYPi0BKweeDEjyXkaskSVIC4gtItcFY6eR0r0jMq-zo3P3yxs80q_5z3cGXTqjhK8ipuFXoQrjiMA21PCOjVN/s640/W8150049.JPG" width="640" /></span></a></div><div><span style="font-family: courier;"><br /></span></div><span style="font-family: courier;">Side profile. Considering using bigger wheels to make better use of the wheel wells.<br /></span><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjXWfhsg8wX_fGFlh1xhttEFE5Y8CWwytS8H6MJkbX_B7FQxg3BFa16ah5Iv_SqOEzmI8US_DZntKijEWXUYG0Gb6HdUqcRCQZ5ohjuwjwFVMSe3aNXfQ0WwJAE1dPYjXlizgUNWRtRGQUl/s2048/W8150050.JPG" style="margin-left: 1em; margin-right: 1em;"><span style="font-family: courier;"><img border="0" data-original-height="1536" data-original-width="2048" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjXWfhsg8wX_fGFlh1xhttEFE5Y8CWwytS8H6MJkbX_B7FQxg3BFa16ah5Iv_SqOEzmI8US_DZntKijEWXUYG0Gb6HdUqcRCQZ5ohjuwjwFVMSe3aNXfQ0WwJAE1dPYjXlizgUNWRtRGQUl/s640/W8150050.JPG" width="640" /></span></a></div><div><span style="font-family: courier;"><br /></span></div><span style="font-family: courier;">Here it is with the body up, and the batteries still connected to the data logger. the foam used to pad the body posts is actually spare nerf darts ziptied to a cross bar. From testing the car under max acceleration on carpet (high traction) the peak current draw was 35Amps. This is pretty low for a 1/10 scale car, so there's room for more load - like bigger tires. The 18650s I'm using are Sony/Murata VTC5A cells. These cells can handle 35 amps each, and since I'm running them in parallel, we're looking at 70 amps maximum. <br /></span><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgH4OVq04qm_MBFhZ1cNMhyCy23VeGSrhT0xkyHTP_iD0TAJtPjQk_2sAFhPURcSmUNhRMuNWn6k9aCbR8F8UUwNAvxno7heH4KPOwahAxlE5DirXQZoY9I47MwPLO3EU2Oj7my0zVAem1A/s2048/W8150056.JPG" style="margin-left: 1em; margin-right: 1em;"><span style="font-family: courier;"><img border="0" data-original-height="1536" data-original-width="2048" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgH4OVq04qm_MBFhZ1cNMhyCy23VeGSrhT0xkyHTP_iD0TAJtPjQk_2sAFhPURcSmUNhRMuNWn6k9aCbR8F8UUwNAvxno7heH4KPOwahAxlE5DirXQZoY9I47MwPLO3EU2Oj7my0zVAem1A/s640/W8150056.JPG" width="640" /></span></a></div><span style="font-family: courier;"><div><span style="font-family: courier;"><br /></span></div>I thought it looked a little bare so I added some detailing with vinyl, and some googly eyes as headlights of course. <br /></span><div class="separator" style="clear: both; text-align: center;"><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgah0GsMyFIMZ5NAcuGHH39J5gk7HWd5gohbI90CQMFmX5dE6vUr6bzSefHjcfV8Cc7j7Fl7A3hvxLsTDVOwNHEEjPCVOWPd3gkck02i-PLFDOYYWhWbzl0Ny07XMW33WL22XYaoHwZWdSc/s2048/W8160066.JPG" style="margin-left: 1em; margin-right: 1em;"><span style="font-family: courier;"><img border="0" data-original-height="1537" data-original-width="2048" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgah0GsMyFIMZ5NAcuGHH39J5gk7HWd5gohbI90CQMFmX5dE6vUr6bzSefHjcfV8Cc7j7Fl7A3hvxLsTDVOwNHEEjPCVOWPd3gkck02i-PLFDOYYWhWbzl0Ny07XMW33WL22XYaoHwZWdSc/s640/W8160066.JPG" width="640" /></span></a></div><span style="font-family: courier;"><br /></span></div><p><span style="font-family: courier;">Future ideas:</span></p><p></p><ul style="text-align: left;"><li><span style="font-family: courier;">Add mount for FPV camera. Not sure if I should make it inside or on the roof.</span></li><li><span style="font-family: courier;">Bigger tires.</span></li><li><span style="font-family: courier;">Maybe push the body back a little and give more room to the front wheels.</span></li><li><span style="font-family: courier;">I'd like to try some 21700 cells, or even 26650s. If I can do 3s1p it will be a bit easier to manage.</span></li><li><span style="font-family: courier;">Try using UHMW polyethylene again and compare to HDPE. HDPE is softer and more malleable, but I need to really put UHMW PE under some load testing again.</span></li></ul><div><span style="font-family: courier;"><br /></span></div><div><span style="font-family: courier;">Update:</span></div><div><span style="font-family: courier;">Pet-G brace shattered like glass after a rollover on concrete. Had to replace with kydex sheet - now I know that would be tougher. My guess is the filament absorbed moisture before use leading to a brittle part.</span></div><div><table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto;"><tbody><tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhf8I1i1BSfCQ1mgNJUuBlxwJOfSp8fVEQLUdPxp7dHeWwsaxsDIrAd5cANhMCotFl-wogEUU1ocsznlmLBz_iRYcwmmtvCl5POV8aKFZMW1L1fIPGpl1SXQ6w7zst3OnX0VY71FSVyoWqg/s2048/W8180070.JPG" imageanchor="1" style="margin-left: auto; margin-right: auto;"><span style="font-family: courier;"><img border="0" data-original-height="2048" data-original-width="1537" height="640" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhf8I1i1BSfCQ1mgNJUuBlxwJOfSp8fVEQLUdPxp7dHeWwsaxsDIrAd5cANhMCotFl-wogEUU1ocsznlmLBz_iRYcwmmtvCl5POV8aKFZMW1L1fIPGpl1SXQ6w7zst3OnX0VY71FSVyoWqg/s640/W8180070.JPG" /></span></a></td></tr><tr><td class="tr-caption" style="text-align: center;"><span style="font-family: courier;">Never mind the comic book page I took the picture on. needed a light colored background and this was near. If Batman were driving this, it would fit :D<br /></span></td></tr></tbody></table><br /></div><p></p>Beomagihttp://www.blogger.com/profile/00469223835355067867noreply@blogger.com0tag:blogger.com,1999:blog-2974094041951992980.post-84572921345450522722020-07-31T11:24:00.002-07:002020-07-31T11:24:27.264-07:003d pens can be a useful tool.<span style="font-family: Courier New, Courier, monospace;">Most people have heard of 3d printing, but what happens if you take the printer's extruder, add a pen like grip, get rid of the rest of the printer, and add portable or lower power cables? Now you have a <b><span style="color: magenta;">3d pen</span></b>, much akin to a glue-gun for plastic.</span><br />
<span style="font-family: Courier New, Courier, monospace;"><br /></span>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjNOCaJJ9oT4eROQsZBJSJSGOCI_OpbNvcRuorv3lhs83lEaxxIzxuy4N7_5kBs2aI9LVb5UDk40_V1_vbMqZCnjahhL9cjmdhD92btMGyj9h1uFPzt6pQF0FQ5a2Sf5AsrZD7SmvTwEK5K/s1600/P7300054.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><span style="font-family: Courier New, Courier, monospace;"><img border="0" data-original-height="1200" data-original-width="1600" height="480" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjNOCaJJ9oT4eROQsZBJSJSGOCI_OpbNvcRuorv3lhs83lEaxxIzxuy4N7_5kBs2aI9LVb5UDk40_V1_vbMqZCnjahhL9cjmdhD92btMGyj9h1uFPzt6pQF0FQ5a2Sf5AsrZD7SmvTwEK5K/s640/P7300054.JPG" width="640" /></span></a></div>
<span style="font-family: Courier New, Courier, monospace;"><br /></span>
<span style="font-family: Courier New, Courier, monospace;"><br /></span>
<span style="font-family: Courier New, Courier, monospace;">Despite the name, a 3d pen is not going to let you draw in the air. You CAN pull up plastic from a point and wait for that stretch of plastic just formed to harden a little, then go back... It's not easy, it's not ideal. The 3d pen however is really good at laying down plastic on surfaces though. So if you want to draw in 2d over a paper design you drew, on glass of a silicone mat - you'll get a decent output. Then you can hold multiple 2d pieces together, and use the 3d pen to connect pieces using molten plastic like a glue.</span><br />
<span style="font-family: Courier New, Courier, monospace;"><br /></span>
<span style="font-family: Courier New, Courier, monospace;">The other really useful application is fixing things. broken pieces of plastic? Mend it! weak plastic arm? Use the pen to reinforce it. I've been using it for modifying toys - reinforce weak points, sometimes heavy modifications breaking parts off and adding back plastic using the pen in a different way.</span><br />
<span style="font-family: Courier New, Courier, monospace;"><br /></span>
<span style="font-family: Courier New, Courier, monospace;"><br /></span>
<span style="font-family: Courier New, Courier, monospace;">My most recent usage has been with radiocontrol toys. Durability is an issue, especially impact and heat. ABS isn't a bad choice, but PET-G has more flex which lends it toughness. Nylon would be ideal, but it's more expensive, and You need need more temperature than pens allow to handle nylon. 250-260C is ideal, but my pen only gets to 230. I'm using PET-G.</span><br />
<span style="font-family: Courier New, Courier, monospace;"><br /></span>
<span style="font-family: Courier New, Courier, monospace;">I started with a WPL B1 - It's a non-hobby-class toy - initially. But with steel c-channel chassis rails, metal leaf springs, and lots of upgrades including metal axles, gears, shafts etc - it becomes hobby grade. The "servo" is a laughable thing. An all or nothing design consisting of a motor with an obstruction to act as end points. As a result, when turning, there's no proportional control, and the straining motor acts like a short reducing battery life and starving the motor of power. I used a soldering iron to melt away excess plastic to make room for a real servo. The pen was used to "draw" a bracket in place. The bracket goes around the existing screws and can be removed if I ever need to change to servo. This just took a few minutes.</span><br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhs-pFiOdkHyq93R7O5cnoFAbjWDZgQZc9_hQRuCqtZZHgn2DmaOu04FFepB9AL6eASYOv-0HvBtrP701__OlXT-SrOZ-3Ok7jloeSWXuQXKKaJo22E8UJtQfuopeiaPl_Sx7CoaPtlIeyj/s1600/IMG_20200706_103624727.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><span style="font-family: Courier New, Courier, monospace;"><img border="0" data-original-height="1600" data-original-width="1200" height="640" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhs-pFiOdkHyq93R7O5cnoFAbjWDZgQZc9_hQRuCqtZZHgn2DmaOu04FFepB9AL6eASYOv-0HvBtrP701__OlXT-SrOZ-3Ok7jloeSWXuQXKKaJo22E8UJtQfuopeiaPl_Sx7CoaPtlIeyj/s640/IMG_20200706_103624727.jpg" width="480" /></span></a></div>
<span style="font-family: Courier New, Courier, monospace;"><br /></span>
<span style="font-family: Courier New, Courier, monospace;"><br /></span>
<span style="font-family: Courier New, Courier, monospace;"><br /></span>
<span style="font-family: Courier New, Courier, monospace;">For another example, I needed a bracket to hold a Axial SCX type transmission onto a car I've been working on. I needed a bracket because there wasn't room for it. The transmission would need to go in at an angle.</span><br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiwjyvCvIBtokvMonpZCazQx1seAjWEvPo2bgOf2xAaImzHRTpbN3NMAhivpkpNT7nlFFUt0f13x0j-fwCdUBg1yUzOM5vhzfXbAOGf0sXJ5nfgjzvhnh8JcakDrPy6utD62qkLZ9V1rfir/s1600/P7300050.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><span style="font-family: Courier New, Courier, monospace;"><img border="0" data-original-height="1600" data-original-width="1200" height="640" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiwjyvCvIBtokvMonpZCazQx1seAjWEvPo2bgOf2xAaImzHRTpbN3NMAhivpkpNT7nlFFUt0f13x0j-fwCdUBg1yUzOM5vhzfXbAOGf0sXJ5nfgjzvhnh8JcakDrPy6utD62qkLZ9V1rfir/s640/P7300050.JPG" width="480" /></span></a></div>
<span style="font-family: Courier New, Courier, monospace;"><br /></span>
<span style="font-family: Courier New, Courier, monospace;"><br /></span>
<span style="font-family: Courier New, Courier, monospace;">I started by drawing plastic around the screws in the base of the RC car, and plastic at the base of the transmission around the screws.</span><br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjGMpzBM551wSVpq-Ol3NU7wh4DaLRMnY85ECiNnn6Pf4BMoq_UA87XKo2MfPFNt2kAm_YTPTstw_VEKa0XBQ7zGcT4v7f3zR_e1ECR0SB8mf1XmXfL99jUCbCrUf_GsSL4u1DeAPEvDm2Z/s1600/P7300060.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><span style="font-family: Courier New, Courier, monospace;"><img border="0" data-original-height="1200" data-original-width="1600" height="480" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjGMpzBM551wSVpq-Ol3NU7wh4DaLRMnY85ECiNnn6Pf4BMoq_UA87XKo2MfPFNt2kAm_YTPTstw_VEKa0XBQ7zGcT4v7f3zR_e1ECR0SB8mf1XmXfL99jUCbCrUf_GsSL4u1DeAPEvDm2Z/s640/P7300060.JPG" width="640" /></span></a></div>
<br />
<span style="font-family: Courier New, Courier, monospace;"><br /></span>
<span style="font-family: Courier New, Courier, monospace;">I held the transmission in place and connected the base of the transmission to the plastic around the bottom screws. It doesn't stick to metal screws, but it can take some wiggling. Here it is with the bottom 2 screws. </span><br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj21NEtNc9mYzHlGndX5Hs-2l3lCbTH3754wNz0WT45i89HtjsYGvklPtJAc2lxnC474df6Cj5ZpzlGlqN1NSdQV7u8yV0IVn50CLnyqnl3479PuHlpdnMXDN-GjXhREp0tWHpqGx7Ovo7s/s1600/P7300062.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><span style="font-family: Courier New, Courier, monospace;"><img border="0" data-original-height="1200" data-original-width="1600" height="480" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj21NEtNc9mYzHlGndX5Hs-2l3lCbTH3754wNz0WT45i89HtjsYGvklPtJAc2lxnC474df6Cj5ZpzlGlqN1NSdQV7u8yV0IVn50CLnyqnl3479PuHlpdnMXDN-GjXhREp0tWHpqGx7Ovo7s/s640/P7300062.JPG" width="640" /></span></a></div>
<br />
<div class="separator" style="clear: both; text-align: center;">
</div>
<br />
<span style="font-family: Courier New, Courier, monospace;">Since space is limited, I can't even fit the pen where I need it. So I'm drawing plastic, Extending the base to a point I can get to. PS: that's a silicone coaster, not a floppy disk (though it is floppy).</span><br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgIpU8v1F9ixsw1kYcQqGBNWExF_58uTJx89b33ZzZiPvjZktsJ6Mh8ivmk9iWig25EStmae11D2ZSWSjpw7Tgm-Mt1wSUcfyXrS495wBVZgo5-woF-YdJkj0F3XacKEmWkKG8UkhsViBWi/s1600/P7300068.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><span style="font-family: Courier New, Courier, monospace;"><img border="0" data-original-height="1200" data-original-width="1600" height="480" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgIpU8v1F9ixsw1kYcQqGBNWExF_58uTJx89b33ZzZiPvjZktsJ6Mh8ivmk9iWig25EStmae11D2ZSWSjpw7Tgm-Mt1wSUcfyXrS495wBVZgo5-woF-YdJkj0F3XacKEmWkKG8UkhsViBWi/s640/P7300068.JPG" width="640" /></span></a></div>
<div class="separator" style="clear: both; text-align: center;">
<span style="font-family: Courier New, Courier, monospace;"><br /></span></div>
<div class="separator" style="clear: both; text-align: left;">
<span style="font-family: Courier New, Courier, monospace;"><br /></span></div>
<div class="separator" style="clear: both; text-align: left;">
<span style="font-family: Courier New, Courier, monospace;">I put the motor back on the 2 lower screws, and extend the bit I drew to connect to the other screws. After letting it cool and harden I pulled it off and reinforced the beams drawn.</span></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi3dE9Wrd3aDoaftuFjubUTP24JGLPh6vwdWRVEK1fDEFw3mbeDtQNheCjDzNkDMJ9KQsnAL66khj5dYujqU3R4Uco-K3PUqRT4AO9han7f30zE156MGSEb9A4BHFORfSu9PxRnv5571bAh/s1600/P7300075.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><span style="font-family: Courier New, Courier, monospace;"><img border="0" data-original-height="1200" data-original-width="1600" height="480" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi3dE9Wrd3aDoaftuFjubUTP24JGLPh6vwdWRVEK1fDEFw3mbeDtQNheCjDzNkDMJ9KQsnAL66khj5dYujqU3R4Uco-K3PUqRT4AO9han7f30zE156MGSEb9A4BHFORfSu9PxRnv5571bAh/s640/P7300075.JPG" width="640" /></span></a></div>
<br />
<span style="font-family: Courier New, Courier, monospace;"><br /></span>
<span style="font-family: Courier New, Courier, monospace;">Final product: The bracket is strong enough to take impacts. It hold the transmission in place firmly, while having a little give to dissipate energy of impacts. </span><br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjPxagAaf7hlPAiAUq21yQRSHPDEs91W1hAo3I0RQVv5XXFNCmRNPKws0-7w3yxOc51P-ahalhPlLmWVkf7LmatmDXGvgizU1HLQq8b2x71BhTUVUebSIxkrknjLO2ccay2sTyLHq28bX0E/s1600/P7300078.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><span style="font-family: Courier New, Courier, monospace;"><img border="0" data-original-height="1200" data-original-width="1600" height="480" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjPxagAaf7hlPAiAUq21yQRSHPDEs91W1hAo3I0RQVv5XXFNCmRNPKws0-7w3yxOc51P-ahalhPlLmWVkf7LmatmDXGvgizU1HLQq8b2x71BhTUVUebSIxkrknjLO2ccay2sTyLHq28bX0E/s640/P7300078.JPG" width="640" /></span></a></div>
<span style="font-family: Courier New, Courier, monospace;"><br /></span>
<span style="font-family: Courier New, Courier, monospace;"><br /></span>
<span style="font-family: Courier New, Courier, monospace;">Notes:</span><br />
<span style="font-family: Courier New, Courier, monospace;">It does look a little messy. These fixes aren't going to be that visible. That said, should a smoother look be required, practice does help - or use a soldering iron or wood burner to smooth the lumpy finish.</span>Beomagihttp://www.blogger.com/profile/00469223835355067867noreply@blogger.com0tag:blogger.com,1999:blog-2974094041951992980.post-36316604341415096072020-05-20T13:37:00.003-07:002020-05-20T15:29:18.470-07:00Odroid NAS died, Trying a Raspberry pi 4<span style="font-family: "courier new" , "courier" , monospace;">My Odroid died over the weekend. It's been running every day for 4 years so, I guess it did OK doing what it wasn't really meant to do.</span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><br /></span>
<span style="font-family: "courier new" , "courier" , monospace;"><br /></span>
<span style="font-family: "courier new" , "courier" , monospace;">So I'll use something else not meant to do it again :D</span><br />
<span style="font-family: "courier new" , "courier" , monospace;">This time a Raspberry Pi 4. USB 3 and gigabit ethernet.</span><br />
<span style="font-family: "courier new" , "courier" , monospace;">https://magpi.raspberrypi.org/articles/raspberry-pi-4-specs-benchmarks</span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><br /></span>
<span style="font-family: "courier new" , "courier" , monospace;"><br /></span><br />
<span style="color: cyan; font-family: "courier new" , "courier" , monospace;"><u><b>Using the Pi's Wifi:</b></u></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><br /></span>
<span style="font-family: "courier new" , "courier" , monospace;"><span style="color: yellow;">beomagi@BeoBalthazar</span> ~ 2020-05-19 21:46:24</span><br />
<span style="font-family: "courier new" , "courier" , monospace;">└─ $ ∙ iperf -c 192.168.1.42</span><br />
<span style="font-family: "courier new" , "courier" , monospace;">------------------------------------------------------------</span><br />
<span style="font-family: "courier new" , "courier" , monospace;">Client connecting to 192.168.1.42, TCP port 5001</span><br />
<span style="font-family: "courier new" , "courier" , monospace;">TCP window size: 512 KByte (default)</span><br />
<span style="font-family: "courier new" , "courier" , monospace;">------------------------------------------------------------</span><br />
<span style="font-family: "courier new" , "courier" , monospace;">[ 3] local 192.168.1.109 port 61000 connected with 192.168.1.42 port 5001</span><br />
<span style="font-family: "courier new" , "courier" , monospace;">[ ID] Interval Transfer Bandwidth</span><br />
<span style="font-family: "courier new" , "courier" , monospace;">[ 3] 0.0-10.0 sec 91.2 MBytes <b style="background-color: #783f04;">76.5 Mbits/sec</b></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><br /></span>
<span style="font-family: "courier new" , "courier" , monospace;"><span style="color: yellow;">beomagi@BeoBalthazar</span> ~ 2020-05-19 21:46:45</span><br />
<span style="font-family: "courier new" , "courier" , monospace;">└─ $ ∙ iperf -c 192.168.1.42</span><br />
<span style="font-family: "courier new" , "courier" , monospace;">------------------------------------------------------------</span><br />
<span style="font-family: "courier new" , "courier" , monospace;">Client connecting to 192.168.1.42, TCP port 5001</span><br />
<span style="font-family: "courier new" , "courier" , monospace;">TCP window size: 512 KByte (default)</span><br />
<span style="font-family: "courier new" , "courier" , monospace;">------------------------------------------------------------</span><br />
<span style="font-family: "courier new" , "courier" , monospace;">[ 3] local 192.168.1.109 port 61509 connected with 192.168.1.42 port 5001</span><br />
<span style="font-family: "courier new" , "courier" , monospace;">[ ID] Interval Transfer Bandwidth</span><br />
<span style="font-family: "courier new" , "courier" , monospace;">[ 3] 0.0-10.0 sec 99.5 MBytes <b style="background-color: #783f04;">83.4 Mbits/sec</b></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><br /></span>
<span style="font-family: "courier new" , "courier" , monospace;">2 runs showing this will generally be ~80 Mbps, so I can expect about 10 megabytes per second. It's not great, though it will handle HD videos (ish).</span><br />
<span style="font-family: "courier new" , "courier" , monospace;">Benchmarking the wireless has not been great - so I'll have to hook it up to my router via gigabit ethernet.</span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><br /></span>
<span style="font-family: "courier new" , "courier" , monospace;"><br /></span>
<span style="font-family: "courier new" , "courier" , monospace;"><br /></span>
<span style="font-family: "courier new" , "courier" , monospace;">Using the Pi's ethernet to my router, then over AC wifi:</span><br />
<span style="font-family: "courier new" , "courier" , monospace;">Hooked up to my AC router, via gigabit ethernet, my PC over AC is getting much better bandwidth.</span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><br /></span>
<span style="font-family: "courier new" , "courier" , monospace;"><br /></span>
<span style="color: cyan; font-family: "courier new" , "courier" , monospace;"><u><b>Using the Pi's ethernet to my router, then over AC wifi:</b></u></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><br /></span>
<span style="font-family: "courier new" , "courier" , monospace;"><span style="color: yellow;">beomagi@BeoBalthazar</span> ~ 2020-05-19 22:07:18</span><br />
<span style="font-family: "courier new" , "courier" , monospace;">└─ $ ∙ iperf -c 192.168.1.42</span><br />
<span style="font-family: "courier new" , "courier" , monospace;">------------------------------------------------------------</span><br />
<span style="font-family: "courier new" , "courier" , monospace;">Client connecting to 192.168.1.42, TCP port 5001</span><br />
<span style="font-family: "courier new" , "courier" , monospace;">TCP window size: 512 KByte (default)</span><br />
<span style="font-family: "courier new" , "courier" , monospace;">------------------------------------------------------------</span><br />
<span style="font-family: "courier new" , "courier" , monospace;">[ 3] local 192.168.1.109 port 49435 connected with 192.168.1.42 port 5001</span><br />
<span style="font-family: "courier new" , "courier" , monospace;">[ ID] Interval Transfer Bandwidth</span><br />
<span style="font-family: "courier new" , "courier" , monospace;">[ 3] 0.0-10.0 sec 468 MBytes <b style="background-color: #783f04;">392 Mbits/sec</b></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><br /></span>
<span style="font-family: "courier new" , "courier" , monospace;"><span style="color: yellow;">beomagi@BeoBalthazar</span> ~ 2020-05-20 12:57:16</span><br />
<span style="font-family: "courier new" , "courier" , monospace;">└─ $ ∙ iperf -c 192.168.1.42</span><br />
<span style="font-family: "courier new" , "courier" , monospace;">------------------------------------------------------------</span><br />
<span style="font-family: "courier new" , "courier" , monospace;">Client connecting to 192.168.1.42, TCP port 5001</span><br />
<span style="font-family: "courier new" , "courier" , monospace;">TCP window size: 512 KByte (default)</span><br />
<span style="font-family: "courier new" , "courier" , monospace;">------------------------------------------------------------</span><br />
<span style="font-family: "courier new" , "courier" , monospace;">[ 3] local 192.168.1.109 port 49454 connected with 192.168.1.42 port 5001</span><br />
<span style="font-family: "courier new" , "courier" , monospace;">[ ID] Interval Transfer Bandwidth</span><br />
<span style="font-family: "courier new" , "courier" , monospace;">[ 3] 0.0-10.0 sec 483 MBytes <b style="background-color: #783f04;">405 Mbits/sec</b></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><br /></span>
<span style="font-family: "courier new" , "courier" , monospace;">My HTPC is directly connected to the same router via cable, so pure wired numbers look excellent.</span><br />
<span style="font-family: "courier new" , "courier" , monospace;">Downloading files are near 50MB/s so this is quite nice.</span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><br /></span>
<span style="font-family: "courier new" , "courier" , monospace;"><br /></span>
<span style="font-family: "courier new" , "courier" , monospace;"><br /></span>
<span style="color: cyan; font-family: "courier new" , "courier" , monospace;"><u><b>Using the Pi's purely over gigabit ethernet:</b></u></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><br /></span>
<span style="font-family: "courier new" , "courier" , monospace;"><span style="color: yellow;">beomagi@beo-htpc</span> ~ 2020-05-20 13:11:17</span><br />
<span style="font-family: "courier new" , "courier" , monospace;">└─ $ ∙ iperf -c 192.168.1.42</span><br />
<span style="font-family: "courier new" , "courier" , monospace;">------------------------------------------------------------</span><br />
<span style="font-family: "courier new" , "courier" , monospace;">Client connecting to 192.168.1.42, TCP port 5001</span><br />
<span style="font-family: "courier new" , "courier" , monospace;">TCP window size: 604 KByte (default)</span><br />
<span style="font-family: "courier new" , "courier" , monospace;">------------------------------------------------------------</span><br />
<span style="font-family: "courier new" , "courier" , monospace;">[ 3] local 192.168.1.108 port 54694 connected with 192.168.1.42 port 5001</span><br />
<span style="font-family: "courier new" , "courier" , monospace;">[ ID] Interval Transfer Bandwidth</span><br />
<span style="font-family: "courier new" , "courier" , monospace;">[ 3] 0.0-10.0 sec 1.10 GBytes <b style="background-color: #783f04;">943 Mbits/sec</b></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><br /></span>
<span style="font-family: "courier new" , "courier" , monospace;"><span style="color: yellow;">beomagi@beo-htpc</span> ~ 2020-05-20 13:17:44</span><br />
<span style="font-family: "courier new" , "courier" , monospace;">└─ $ ∙ iperf -c 192.168.1.42</span><br />
<span style="font-family: "courier new" , "courier" , monospace;">------------------------------------------------------------</span><br />
<span style="font-family: "courier new" , "courier" , monospace;">Client connecting to 192.168.1.42, TCP port 5001</span><br />
<span style="font-family: "courier new" , "courier" , monospace;">TCP window size: 408 KByte (default)</span><br />
<span style="font-family: "courier new" , "courier" , monospace;">------------------------------------------------------------</span><br />
<span style="font-family: "courier new" , "courier" , monospace;">[ 3] local 192.168.1.108 port 54706 connected with 192.168.1.42 port 5001</span><br />
<span style="font-family: "courier new" , "courier" , monospace;">[ ID] Interval Transfer Bandwidth</span><br />
<span style="font-family: "courier new" , "courier" , monospace;">[ 3] 0.0-10.0 sec 1.09 GBytes <b style="background-color: #783f04;">940 Mbits/sec</b></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><br /></span>
<span style="font-family: "courier new" , "courier" , monospace;">Now we're talking. This should be good for ~115MBps</span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><br /></span>
<span style="font-family: "courier new" , "courier" , monospace;"><br /></span>
<span style="font-family: "courier new" , "courier" , monospace;"><br /></span>
<span style="color: cyan; font-family: "courier new" , "courier" , monospace;"><u><b>Bottleneck - harddrive:</b></u></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><br /></span>
<span style="font-family: "courier new" , "courier" , monospace;"><span style="color: yellow;">pi@raspberrypi</span>:~/shares/major $ dd if=/dev/zero of=./testfile bs=1000M count=1 oflag=direct</span><br />
<span style="font-family: "courier new" , "courier" , monospace;">1+0 records in</span><br />
<span style="font-family: "courier new" , "courier" , monospace;">1+0 records out</span><br />
<span style="font-family: "courier new" , "courier" , monospace;">1048576000 bytes (1.0 GB, 1000 MiB) copied, 10.8304 s, <b style="background-color: #783f04;">96.8 MB/s</b></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="color: yellow;">pi@raspberrypi</span>:~/shares/major $ dd if=./testfile of=/dev/null bs=1000M count=1</span><br />
<span style="font-family: "courier new" , "courier" , monospace;">1+0 records in</span><br />
<span style="font-family: "courier new" , "courier" , monospace;">1+0 records out</span><br />
<span style="font-family: "courier new" , "courier" , monospace;">1048576000 bytes (1.0 GB, 1000 MiB) copied, 8.92268 s, <b style="background-color: #783f04;">118 MB/s</b></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><br /></span>
<span style="font-family: "courier new" , "courier" , monospace;"><br /></span>
<span style="font-family: "courier new" , "courier" , monospace;">These are directly on the pi, so they give a decent indication of that USB 3 capability with harddrive storage. It's not far off from the gigabit throughput so it's well matched. The numbers are actually slightly better than the odroid, which is excellent.</span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><br /></span>
<span style="font-family: "courier new" , "courier" , monospace;"><b>Previous NAS setup:</b></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><a href="https://beomagi.blogspot.com/2016/09/odroid-xu4-my-new-nas.html">https://beomagi.blogspot.com/2016/09/odroid-xu4-my-new-nas.html</a></span>Beomagihttp://www.blogger.com/profile/00469223835355067867noreply@blogger.com0tag:blogger.com,1999:blog-2974094041951992980.post-18912515739088979022019-09-18T11:46:00.003-07:002021-01-31T10:40:27.420-08:00Threading continued - timing thread<span style="font-family: "courier new" , "courier" , monospace;"><b>Thread for timing is useful:</b></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><br /></span>
<span style="font-family: "courier new" , "courier" , monospace;">Last post discussed parallelism. Threads can be useful for timing stats. In this example, a single thread is spawned for the timing function. Obviously you can spawn purpose specific threads to do whatever you need. Communication with threads is simple because you can just use local variables. Python built in types are thread safe, so it's quite simple, no need to use threading.Lock().</span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><br /></span>
<br />
<div style="background-color: #0b1015; line-height: 19px;">
<div>
<div style="line-height: 19px;">
<div>
<span style="color: #fb4934; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;">import</span><span style="color: #c7d0d9; font-family: "consolas" , "courier new" , monospace;"><span style="font-size: 14px; white-space: pre;"> random</span></span><br />
<span style="color: #fb4934; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;">import</span><span style="color: #c7d0d9; font-family: "consolas" , "courier new" , monospace;"><span style="font-size: 14px; white-space: pre;"> threading</span></span><br />
<span style="color: #fb4934; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;">import</span><span style="color: #c7d0d9; font-family: "consolas" , "courier new" , monospace;"><span style="font-size: 14px; white-space: pre;"> json</span></span><br />
<span style="color: #fb4934; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;">import</span><span style="color: #c7d0d9; font-family: "consolas" , "courier new" , monospace;"><span style="font-size: 14px; white-space: pre;"> time</span></span><br />
<span style="color: #c7d0d9; font-family: "consolas" , "courier new" , monospace;"><span style="font-size: 14px; white-space: pre;"><br /></span></span><span style="color: #c7d0d9; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;">timingstats</span><span style="color: #8ec07c; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;">=</span><span style="color: #a89984; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;">{</span><span style="color: #98c378; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;">"</span><span style="color: #b8bb26; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;">starttime</span><span style="color: #98c378; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;">"</span><span style="color: #a89984; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;">:</span><span style="color: #d8985f; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;">0</span><span style="color: #a89984; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;">,</span><span style="color: #98c378; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;">"</span><span style="color: #b8bb26; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;">processtime</span><span style="color: #98c378; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;">"</span><span style="color: #a89984; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;">:</span><span style="color: #d8985f; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;">0</span><span style="color: #a89984; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;">,</span><span style="color: #98c378; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;">"</span><span style="color: #b8bb26; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;">rate</span><span style="color: #98c378; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;">"</span><span style="color: #a89984; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;">:</span><span style="color: #d8985f; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;">0</span><span style="color: #a89984; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;">,</span><span style="color: #98c378; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;">"</span><span style="color: #b8bb26; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;">requests</span><span style="color: #98c378; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;">"</span><span style="color: #a89984; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;">:</span><span style="color: #d8985f; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;">0</span><span style="color: #a89984; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;">,</span><span style="color: #98c378; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;">"</span><span style="color: #b8bb26; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;">lastreq</span><span style="color: #98c378; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;">"</span><span style="color: #a89984; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;">:</span><span style="color: #d8985f; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;">0</span><span style="color: #a89984; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;">}</span><br />
<span style="color: #c7d0d9; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;">exitflag</span><span style="color: #8ec07c; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;">=</span><span style="color: #d8985f; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;">0</span><br />
<span style="color: #c7d0d9; font-family: "consolas" , "courier new" , monospace;"><span style="font-size: 14px; white-space: pre;"><br /></span></span><span style="color: #fb4934; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;">def</span><span style="color: #8ec07c; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;"> timingfunction</span><span style="color: #a89984; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;">():</span><br />
<span style="color: #c7d0d9; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;"> a</span><span style="color: #8ec07c; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;">=</span><span style="color: #d8985f; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;">0</span><br />
<span style="color: #c7d0d9; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;"> </span><span style="color: #fb4934; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;">while</span><span style="color: #c7d0d9; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;"> </span><span style="color: #d3869b; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;">True</span><span style="color: #a89984; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;">:</span><br />
<span style="color: #c7d0d9; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;"> time</span><span style="color: #a89984; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;">.</span><span style="color: #52adf2; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;">sleep</span><span style="color: #aab1c0; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;">(</span><span style="color: #d8985f; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;">0.01</span><span style="color: #aab1c0; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;">)</span><br />
<span style="color: #c7d0d9; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;"> a</span><span style="color: #8ec07c; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;">+=</span><span style="color: #d8985f; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;">1</span><br />
<span style="color: #c7d0d9; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;"> </span><span style="color: #fb4934; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;">if</span><span style="color: #c7d0d9; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;"> a</span><span style="color: #2bbac5; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;">%</span><span style="color: #d8985f; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;">500</span><span style="color: #2bbac5; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;">==</span><span style="color: #d8985f; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;">0</span><span style="color: #c7d0d9; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;"> </span><span style="color: #d55fde; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;">or</span><span style="color: #c7d0d9; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;"> exitflag</span><span style="color: #2bbac5; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;">==</span><span style="color: #d8985f; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;">1</span><span style="color: #a89984; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;">:</span><br />
<span style="color: #c7d0d9; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;"> </span><span style="color: #fe8019; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;">print</span><span style="color: #aab1c0; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;">(</span><span style="color: #98c378; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;">"</span><span style="color: #b8bb26; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;">## WORD RATE ## : </span><span style="color: #98c379; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;">{}</span><span style="color: #98c378; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;">"</span><span style="color: #a89984; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;">.</span><span style="color: #52adf2; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;">format</span><span style="color: #aab1c0; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;">(timingstats[</span><span style="color: #98c378; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;">"</span><span style="color: #b8bb26; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;">rate</span><span style="color: #98c378; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;">"</span><span style="color: #aab1c0; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;">]))</span><br />
<span style="color: #c7d0d9; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;"> </span><span style="color: #fb4934; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;">if</span><span style="color: #c7d0d9; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;"> exitflag</span><span style="color: #2bbac5; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;">==</span><span style="color: #d8985f; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;">1</span><span style="color: #a89984; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;">:</span><span style="color: #c7d0d9; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;"> </span><span style="color: #fb4934; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;">return</span><br />
<span style="color: #c7d0d9; font-family: "consolas" , "courier new" , monospace;"><span style="font-size: 14px; white-space: pre;"><br /></span></span><span style="color: #fb4934; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;">def</span><span style="color: #8ec07c; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;"> req</span><span style="color: #a89984; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;">(</span><span style="color: #d8985f; font-family: "consolas" , "courier new" , monospace; font-size: 14px; font-style: italic; white-space: pre;">n</span><span style="color: #a89984; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;">):</span><br />
<span style="color: #c7d0d9; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;"> </span><span style="color: #fb4934; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;">global</span><span style="color: #c7d0d9; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;"> exitflag</span><br />
<span style="color: #c7d0d9; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;"> entry</span><span style="color: #8ec07c; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;">=</span><span style="color: #98c378; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;">""</span><br />
<span style="color: #c7d0d9; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;"> </span><span style="color: #fb4934; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;">while</span><span style="color: #c7d0d9; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;"> entry </span><span style="color: #2bbac5; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;">!=</span><span style="color: #c7d0d9; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;"> n</span><span style="color: #a89984; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;">:</span><br />
<span style="color: #c7d0d9; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;"> entry</span><span style="color: #8ec07c; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;">=</span><span style="color: #fe8019; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;">input</span><span style="color: #aab1c0; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;">(</span><span style="color: #98c378; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;">"</span><span style="color: #b8bb26; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;">Type: </span><span style="color: #98c379; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;">{}</span><span style="color: #b8bb26; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;"> :</span><span style="color: #98c378; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;">"</span><span style="color: #a89984; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;">.</span><span style="color: #52adf2; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;">format</span><span style="color: #aab1c0; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;">(n))</span><br />
<span style="color: #c7d0d9; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;"> </span><span style="color: #fb4934; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;">if</span><span style="color: #c7d0d9; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;"> entry</span><span style="color: #2bbac5; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;">==</span><span style="color: #98c378; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;">"</span><span style="color: #b8bb26; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;">exit</span><span style="color: #98c378; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;">"</span><span style="color: #a89984; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;">:</span><br />
<span style="color: #c7d0d9; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;"> exitflag</span><span style="color: #8ec07c; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;">=</span><span style="color: #d8985f; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;">1</span><br />
<span style="color: #c7d0d9; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;"> </span><span style="color: #fe8019; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;">exit</span><span style="color: #aab1c0; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;">()</span><br />
<span style="color: #c7d0d9; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;"> timingstats</span><span style="color: #aab1c0; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;">[</span><span style="color: #98c378; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;">"</span><span style="color: #b8bb26; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;">requests</span><span style="color: #98c378; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;">"</span><span style="color: #aab1c0; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;">]</span><span style="color: #8ec07c; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;">+=</span><span style="color: #d8985f; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;">1</span><br />
<span style="color: #c7d0d9; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;"> now</span><span style="color: #8ec07c; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;">=</span><span style="color: #c7d0d9; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;">time</span><span style="color: #a89984; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;">.</span><span style="color: #52adf2; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;">time</span><span style="color: #aab1c0; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;">()</span><br />
<span style="color: #c7d0d9; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;"> timingstats</span><span style="color: #aab1c0; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;">[</span><span style="color: #98c378; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;">"</span><span style="color: #b8bb26; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;">lastreq</span><span style="color: #98c378; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;">"</span><span style="color: #aab1c0; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;">]</span><span style="color: #8ec07c; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;">=</span><span style="color: #c7d0d9; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;">now</span><br />
<span style="color: #c7d0d9; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;"> timingstats</span><span style="color: #aab1c0; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;">[</span><span style="color: #98c378; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;">"</span><span style="color: #b8bb26; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;">rate</span><span style="color: #98c378; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;">"</span><span style="color: #aab1c0; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;">]</span><span style="color: #8ec07c; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;">=</span><span style="color: #2bbac5; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;">float</span><span style="color: #aab1c0; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;">(timingstats[</span><span style="color: #98c378; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;">"</span><span style="color: #b8bb26; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;">requests</span><span style="color: #98c378; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;">"</span><span style="color: #aab1c0; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;">])</span><span style="color: #2bbac5; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;">/</span><span style="color: #a89984; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;">(</span><span style="color: #c7d0d9; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;">now</span><span style="color: #2bbac5; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;">-</span><span style="color: #c7d0d9; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;">timingstats</span><span style="color: #aab1c0; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;">[</span><span style="color: #98c378; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;">"</span><span style="color: #b8bb26; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;">starttime</span><span style="color: #98c378; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;">"</span><span style="color: #aab1c0; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;">]</span><span style="color: #a89984; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;">)</span><br />
<span style="color: #c7d0d9; font-family: "consolas" , "courier new" , monospace;"><br /><br /><span style="font-size: 14px; white-space: pre;"><br /></span></span><span style="color: #c7d0d9; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;">timingthread</span><span style="color: #8ec07c; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;">=</span><span style="color: #c7d0d9; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;">threading</span><span style="color: #a89984; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;">.</span><span style="color: #52adf2; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;">Thread</span><span style="color: #aab1c0; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;">(</span><span style="color: #83a598; font-family: "consolas" , "courier new" , monospace; font-size: 14px; font-style: italic; white-space: pre;">target</span><span style="color: #8ec07c; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;">=</span><span style="color: #aab1c0; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;">timingfunction)</span><br />
<span style="color: #c7d0d9; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;">timingthread</span><span style="color: #a89984; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;">.</span><span style="color: #52adf2; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;">start</span><span style="color: #aab1c0; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;">()</span><br />
<span style="color: #c7d0d9; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;">timingstats</span><span style="color: #aab1c0; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;">[</span><span style="color: #98c378; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;">"</span><span style="color: #b8bb26; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;">starttime</span><span style="color: #98c378; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;">"</span><span style="color: #aab1c0; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;">]</span><span style="color: #8ec07c; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;">=</span><span style="color: #c7d0d9; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;">time</span><span style="color: #a89984; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;">.</span><span style="color: #52adf2; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;">time</span><span style="color: #aab1c0; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;">()</span><br />
<span style="color: #c7d0d9; font-family: "consolas" , "courier new" , monospace;"><span style="font-size: 14px; white-space: pre;"><br /></span></span><span style="color: #c7d0d9; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;">words</span><span style="color: #8ec07c; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;">=</span><span style="color: #98c378; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;">"</span><span style="color: #b8bb26; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;">hairy,scary,mary,carbon,chief,hat,blah,lunchbox,cloud,crap</span><span style="color: #98c378; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;">"</span><br />
<span style="color: #c7d0d9; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;">wordlist</span><span style="color: #8ec07c; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;">=</span><span style="color: #c7d0d9; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;">words</span><span style="color: #a89984; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;">.</span><span style="color: #52adf2; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;">split</span><span style="color: #aab1c0; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;">(</span><span style="color: #98c378; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;">"</span><span style="color: #b8bb26; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;">,</span><span style="color: #98c378; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;">"</span><span style="color: #aab1c0; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;">)</span><br />
<span style="color: #fb4934; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;">while</span><span style="color: #c7d0d9; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;"> </span><span style="color: #d3869b; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;">True</span><span style="color: #a89984; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;">:</span><br />
<span style="color: #c7d0d9; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;"> chk</span><span style="color: #8ec07c; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;">=</span><span style="color: #c7d0d9; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;">random</span><span style="color: #a89984; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;">.</span><span style="color: #52adf2; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;">randint</span><span style="color: #aab1c0; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;">(</span><span style="color: #d8985f; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;">0</span><span style="color: #aab1c0; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;">,</span><span style="color: #fe8019; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;">len</span><span style="color: #aab1c0; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;">(wordlist)</span><span style="color: #2bbac5; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;">-</span><span style="color: #d8985f; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;">1</span><span style="color: #aab1c0; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;">)</span><br />
<span style="color: #c7d0d9; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;"> </span><span style="color: #52adf2; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;">req</span><span style="color: #aab1c0; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;">(wordlist[chk])</span></div>
</div>
</div>
</div>
<span style="font-family: "courier new" , "courier" , monospace;"><br /></span>
<span style="font-family: "courier new" , "courier" , monospace;">sample output:</span><br />
<span style="font-family: "courier new" , "courier" , monospace;">python3 tst3.py</span><br />
<span style="background-color: #660000; color: yellow; font-family: "courier new" , "courier" , monospace;">Type: chief :chief</span><br />
<span style="background-color: #660000; color: yellow; font-family: "courier new" , "courier" , monospace;">Type: blah :blah</span><br />
<span style="background-color: #660000; color: yellow; font-family: "courier new" , "courier" , monospace;">Type: chief :chief</span><br />
<span style="background-color: #660000; color: yellow; font-family: "courier new" , "courier" , monospace;">Type: blah :## WORD RATE ## : 0.6276005416066457</span><br />
<span style="background-color: #660000; color: yellow; font-family: "courier new" , "courier" , monospace;">blah</span><br />
<span style="background-color: #660000; color: yellow; font-family: "courier new" , "courier" , monospace;">Type: blah :blah</span><br />
<span style="background-color: #660000; color: yellow; font-family: "courier new" , "courier" , monospace;">Type: lunchbox :lunchbox</span><br />
<span style="background-color: #660000; color: yellow; font-family: "courier new" , "courier" , monospace;">Type: hat :## WORD RATE ## : 0.5847226421265149</span><br />
<span style="background-color: #660000; color: yellow; font-family: "courier new" , "courier" , monospace;">hat</span><br />
<span style="background-color: #660000; color: yellow; font-family: "courier new" , "courier" , monospace;">Type: blah :blah</span><br />
<span style="background-color: #660000; color: yellow; font-family: "courier new" , "courier" , monospace;">Type: crap :crap</span><br />
<span style="background-color: #660000; color: yellow; font-family: "courier new" , "courier" , monospace;">Type: lunchbox :## WORD RATE ## : 0.6115188345845941</span><br />
<span style="background-color: #660000; color: yellow; font-family: "courier new" , "courier" , monospace;">exit</span><br />
<span style="background-color: #660000; color: yellow; font-family: "courier new" , "courier" , monospace;">## WORD RATE ## : 0.6115188345845941</span><br />
<div>
<span style="background-color: #660000;"><br /></span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace;"><br /></span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace;">The timing thread is running on it's own, interrupting me mid-word etc. This is useful if you're making a network app and want statistics, checks, monitoring etc. </span><span style="font-family: "courier new" , "courier" , monospace;">Maybe the output is to a file, or over the network. </span><span style="font-family: "courier new" , "courier" , monospace;">For terminal apps, it can be used well if you specify text position. </span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace;">e.g.</span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace;">print("\033[6;53H###Hello")</span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace;">will output ###Hello at row 5, column 53 in the terminal (not windows).</span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace;">e.g. you can use several different checks on different threads, and their output status can write data to different areas of the screen. Alternatively (and generrally better idea for bigger things), different threads for different checks write status to status list variable, and a screen updater thread uses that status to draw the screen.</span></div>
<span style="font-family: "courier new" , "courier" , monospace;"><br /></span>
Beomagihttp://www.blogger.com/profile/00469223835355067867noreply@blogger.com0tag:blogger.com,1999:blog-2974094041951992980.post-54289056882997929382019-09-17T15:30:00.004-07:002021-01-31T10:40:45.083-08:00Python Threading and a little Pypy<h2>
<span style="font-family: "courier new" , "courier" , monospace; font-size: small;">Multithreading in Python - useful for io...</span></h2>
<div>
<span style="font-family: "courier new" , "courier" , monospace;">Python is really easy to pick up and learn. It comes with almost any Linux distribution. Once you know what you're doing, it's quick to put together an application. </span><span style="font-family: "courier new" , "courier" , monospace;">That said, it's slow. If you're hitting databases, elasticsearch, http pulls, running external programs etc - then perhaps that doesn't matter - but if you're doing cpu bound operations, it's slowwwww. </span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace;"><br /></span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace;">There are useful ways to speed up processing. The first to consider is probably pypy. This is often quick to implement (no code change) - though don't do it in production unless your company is fine with it :P. The next step - parallelism.</span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace;"><br /></span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace;">So let's talk threading. Python has something called the GIL - Global Interpreter Lock. It is there to protect non-thread safe threads, and it makes it simpler to write the interpreter. More <a href="https://en.wikipedia.org/wiki/Global_interpreter_lock" target="_blank">here</a>.</span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace;"><br /></span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace;">In Python threading works fine for IO bound threads. It does not work for CPU bound threads because of the implemented GIL. e.g. lets say you write a simple Fibonacci function which if done recursively can be heavy on CPU. If I wanted to handle generating nth term on a list, multithreading in python wont help get this done faster. Multiprocessing can though, but we're looking at threading here.</span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace;"><br /></span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace;">Here's what it looks like running a cpu heavy function in series:</span></div>
<div>
<br /></div>
<div>
<div style="background-color: #0b1015; line-height: 19px;">
<div style="text-align: justify;">
<span style="color: #fb4934; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;">import</span><span style="color: #c7d0d9; font-family: "consolas" , "courier new" , monospace;"><span style="font-size: 14px; white-space: pre;"> time</span></span><br />
<span style="color: #c7d0d9; font-family: "consolas" , "courier new" , monospace;"><span style="font-size: 14px; white-space: pre;"><br /></span></span><span style="color: #fb4934; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;">def</span><span style="color: #8ec07c; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;"> fib</span><span style="color: #a89984; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;">(</span><span style="color: #d8985f; font-family: "consolas" , "courier new" , monospace; font-size: 14px; font-style: italic; white-space: pre;">n</span><span style="color: #a89984; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;">):</span><br />
<span style="color: #c7d0d9; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;"> </span><span style="color: #fb4934; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;">if</span><span style="color: #c7d0d9; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;"> n</span><span style="color: #2bbac5; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;"><</span><span style="color: #d8985f; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;">2</span><span style="color: #a89984; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;">:</span><span style="color: #fb4934; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;">return</span><span style="color: #c7d0d9; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;"> </span><span style="color: #d8985f; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;">1</span><br />
<span style="color: #c7d0d9; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;"> </span><span style="color: #fb4934; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;">return</span><span style="color: #c7d0d9; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;"> </span><span style="color: #52adf2; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;">fib</span><span style="color: #aab1c0; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;">(n</span><span style="color: #2bbac5; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;">-</span><span style="color: #d8985f; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;">1</span><span style="color: #aab1c0; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;">)</span><span style="color: #2bbac5; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;">+</span><span style="color: #52adf2; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;">fib</span><span style="color: #aab1c0; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;">(n</span><span style="color: #2bbac5; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;">-</span><span style="color: #d8985f; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;">2</span><span style="color: #aab1c0; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;">)</span><br />
<span style="color: #c7d0d9; font-family: "consolas" , "courier new" , monospace;"><span style="font-size: 14px; white-space: pre;"><br /></span></span><span style="color: #fb4934; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;">def</span><span style="color: #8ec07c; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;"> fiblist</span><span style="color: #a89984; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;">(</span><span style="color: #d8985f; font-family: "consolas" , "courier new" , monospace; font-size: 14px; font-style: italic; white-space: pre;">ns</span><span style="color: #a89984; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;">):</span><br />
<span style="color: #c7d0d9; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;"> na</span><span style="color: #8ec07c; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;">=</span><span style="color: #aab1c0; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;">[]</span><br />
<span style="color: #c7d0d9; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;"> </span><span style="color: #fb4934; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;">for</span><span style="color: #c7d0d9; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;"> n </span><span style="color: #d55fde; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;">in</span><span style="color: #c7d0d9; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;"> ns</span><span style="color: #a89984; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;">:</span><br />
<span style="color: #c7d0d9; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;"> na</span><span style="color: #a89984; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;">.</span><span style="color: #52adf2; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;">append</span><span style="color: #aab1c0; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;">(</span><span style="color: #52adf2; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;">fib</span><span style="color: #aab1c0; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;">(n))</span><br />
<span style="color: #c7d0d9; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;"> </span><span style="color: #fb4934; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;">return</span><span style="color: #c7d0d9; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;"> na</span><br />
<span style="color: #c7d0d9; font-family: "consolas" , "courier new" , monospace;"><span style="font-size: 14px; white-space: pre;"><br /></span></span><span style="color: #fb4934; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;">def</span><span style="color: #8ec07c; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;"> timeathing</span><span style="color: #a89984; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;">(</span><span style="color: #d8985f; font-family: "consolas" , "courier new" , monospace; font-size: 14px; font-style: italic; white-space: pre;">f</span><span style="color: #a89984; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;">,</span><span style="color: #d8985f; font-family: "consolas" , "courier new" , monospace; font-size: 14px; font-style: italic; white-space: pre;">v</span><span style="color: #a89984; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;">):</span><br />
<span style="color: #c7d0d9; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;"> tstart</span><span style="color: #8ec07c; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;">=</span><span style="color: #c7d0d9; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;">time</span><span style="color: #a89984; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;">.</span><span style="color: #52adf2; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;">time</span><span style="color: #aab1c0; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;">()</span><br />
<span style="color: #c7d0d9; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;"> </span><span style="color: #52adf2; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;">f</span><span style="color: #aab1c0; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;">(v)</span><br />
<span style="color: #c7d0d9; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;"> tfinsh</span><span style="color: #8ec07c; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;">=</span><span style="color: #c7d0d9; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;">time</span><span style="color: #a89984; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;">.</span><span style="color: #52adf2; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;">time</span><span style="color: #aab1c0; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;">()</span><br />
<span style="color: #c7d0d9; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;"> </span><span style="color: #fe8019; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;">print</span><span style="color: #aab1c0; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;">(</span><span style="color: #98c378; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;">"</span><span style="color: #b8bb26; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;">timetaken=</span><span style="color: #98c379; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;">{}</span><span style="color: #b8bb26; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;">s</span><span style="color: #98c378; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;">"</span><span style="color: #a89984; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;">.</span><span style="color: #52adf2; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;">format</span><span style="color: #aab1c0; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;">(tfinsh</span><span style="color: #2bbac5; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;">-</span><span style="color: #aab1c0; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;">tstart))</span><br />
<span style="color: #c7d0d9; font-family: "consolas" , "courier new" , monospace;"><span style="font-size: 14px; white-space: pre;"><br /></span></span><span style="color: #52adf2; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;">timeathing</span><span style="color: #aab1c0; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;">(fiblist,[</span><span style="color: #d8985f; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;">30</span><span style="color: #a89984; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;">,</span><span style="color: #d8985f; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;">31</span><span style="color: #a89984; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;">,</span><span style="color: #d8985f; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;">29</span><span style="color: #a89984; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;">,</span><span style="color: #d8985f; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;">30</span><span style="color: #a89984; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;">,</span><span style="color: #d8985f; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;">31</span><span style="color: #a89984; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;">,</span><span style="color: #d8985f; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;">29</span><span style="color: #aab1c0; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;">])</span></div>
</div>
</div>
<div>
<span style="font-family: "courier new" , "courier" , monospace;"><br /></span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace;">So fib will find the n'th term of Fibonacci. Fiblist calls fib for each element in the list, and does this in a loop - one after the other. "timeathing" simply outputs the time a function took.</span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace;">So dropping this in python 3 the output is:</span></div>
<div>
<span style="color: yellow; font-family: "courier new" , "courier" , monospace;"><b style="background-color: #660000;">timetaken=2.3240543842315674s</b></span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace;"><br /></span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace;">So lets try threading.</span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace;"><br /></span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace;">Again using fibonacci - <b>an area where we do NOT expect any improvement.</b></span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace;"><br /></span></div>
<div>
<div style="background-color: #0b1015; line-height: 19px;">
<div>
<span style="color: #fe8019; font-family: "consolas" , "courier new" , monospace;"><span style="font-size: 14px; white-space: pre;"><br /></span></span><span style="color: #fb4934; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;">import</span><span style="color: #c7d0d9; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;"> time</span><br />
<span style="color: #fb4934; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;">import</span><span style="color: #c7d0d9; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;"> threading</span><br />
<span style="color: #c7d0d9; font-family: "consolas" , "courier new" , monospace;"><span style="font-size: 14px; white-space: pre;"><br /></span></span><span style="color: #fb4934; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;">def</span><span style="color: #8ec07c; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;"> fib</span><span style="color: #a89984; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;">(</span><span style="color: #d8985f; font-family: "consolas" , "courier new" , monospace; font-size: 14px; font-style: italic; white-space: pre;">n</span><span style="color: #a89984; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;">):</span><br />
<span style="color: #c7d0d9; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;"> </span><span style="color: #fb4934; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;">if</span><span style="color: #c7d0d9; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;"> n</span><span style="color: #2bbac5; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;"><</span><span style="color: #d8985f; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;">2</span><span style="color: #a89984; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;">:</span><span style="color: #fb4934; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;">return</span><span style="color: #c7d0d9; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;"> </span><span style="color: #d8985f; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;">1</span><br />
<span style="color: #c7d0d9; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;"> </span><span style="color: #fb4934; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;">return</span><span style="color: #c7d0d9; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;"> </span><span style="color: #52adf2; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;">fib</span><span style="color: #aab1c0; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;">(n</span><span style="color: #2bbac5; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;">-</span><span style="color: #d8985f; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;">1</span><span style="color: #aab1c0; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;">)</span><span style="color: #2bbac5; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;">+</span><span style="color: #52adf2; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;">fib</span><span style="color: #aab1c0; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;">(n</span><span style="color: #2bbac5; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;">-</span><span style="color: #d8985f; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;">2</span><span style="color: #aab1c0; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;">)</span><br />
<span style="color: #c7d0d9; font-family: "consolas" , "courier new" , monospace;"><span style="font-size: 14px; white-space: pre;"><br /></span></span><span style="color: #fb4934; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;">def</span><span style="color: #8ec07c; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;"> fiblist</span><span style="color: #a89984; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;">(</span><span style="color: #d8985f; font-family: "consolas" , "courier new" , monospace; font-size: 14px; font-style: italic; white-space: pre;">ns</span><span style="color: #a89984; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;">):</span><br />
<span style="color: #c7d0d9; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;"> na</span><span style="color: #8ec07c; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;">=</span><span style="color: #aab1c0; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;">[]</span><br />
<span style="color: #c7d0d9; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;"> </span><span style="color: #fb4934; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;">for</span><span style="color: #c7d0d9; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;"> n </span><span style="color: #d55fde; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;">in</span><span style="color: #c7d0d9; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;"> ns</span><span style="color: #a89984; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;">:</span><br />
<span style="color: #c7d0d9; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;"> na</span><span style="color: #a89984; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;">.</span><span style="color: #52adf2; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;">append</span><span style="color: #aab1c0; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;">(</span><span style="color: #52adf2; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;">fib</span><span style="color: #aab1c0; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;">(n))</span><br />
<span style="color: #c7d0d9; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;"> </span><span style="color: #fb4934; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;">return</span><span style="color: #c7d0d9; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;"> na</span><br />
<span style="color: #c7d0d9; font-family: "consolas" , "courier new" , monospace;"><span style="font-size: 14px; white-space: pre;"><br /></span></span><span style="color: #c7d0d9; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;">threadoutput</span><span style="color: #8ec07c; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;">=</span><span style="color: #aab1c0; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;">[]</span><br />
<span style="color: #fb4934; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;">def</span><span style="color: #8ec07c; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;"> threadhelper</span><span style="color: #a89984; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;">(</span><span style="color: #d8985f; font-family: "consolas" , "courier new" , monospace; font-size: 14px; font-style: italic; white-space: pre;">func</span><span style="color: #a89984; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;">,</span><span style="color: #d8985f; font-family: "consolas" , "courier new" , monospace; font-size: 14px; font-style: italic; white-space: pre;">arg</span><span style="color: #a89984; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;">):</span><br />
<span style="color: #c7d0d9; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;"> threadoutput</span><span style="color: #a89984; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;">.</span><span style="color: #52adf2; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;">append</span><span style="color: #aab1c0; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;">(</span><span style="color: #a89984; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;">(</span><span style="color: #aab1c0; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;">arg</span><span style="color: #a89984; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;">,</span><span style="color: #52adf2; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;">func</span><span style="color: #aab1c0; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;">(arg)</span><span style="color: #a89984; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;">)</span><span style="color: #aab1c0; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;">)</span><br />
<span style="color: #c7d0d9; font-family: "consolas" , "courier new" , monospace;"><span style="font-size: 14px; white-space: pre;"><br /></span></span><span style="color: #fb4934; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;">def</span><span style="color: #8ec07c; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;"> fibthreading</span><span style="color: #a89984; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;">(</span><span style="color: #d8985f; font-family: "consolas" , "courier new" , monospace; font-size: 14px; font-style: italic; white-space: pre;">tasklist</span><span style="color: #a89984; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;">):</span><br />
<span style="color: #c7d0d9; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;"> </span><span style="color: #928374; font-family: "consolas" , "courier new" , monospace; font-size: 14px; font-style: italic; white-space: pre;">#start a bunch of threads and save handles to a list</span><br />
<span style="color: #c7d0d9; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;"> threadlist</span><span style="color: #8ec07c; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;">=</span><span style="color: #aab1c0; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;">[]</span><br />
<span style="color: #c7d0d9; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;"> </span><span style="color: #fb4934; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;">for</span><span style="color: #c7d0d9; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;"> task </span><span style="color: #d55fde; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;">in</span><span style="color: #c7d0d9; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;"> tasklist</span><span style="color: #a89984; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;">:</span><br />
<span style="color: #c7d0d9; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;"> threadlist</span><span style="color: #a89984; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;">.</span><span style="color: #52adf2; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;">append</span><span style="color: #aab1c0; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;">(threading</span><span style="color: #a89984; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;">.</span><span style="color: #52adf2; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;">Thread</span><span style="color: #aab1c0; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;">(</span><span style="color: #83a598; font-family: "consolas" , "courier new" , monospace; font-size: 14px; font-style: italic; white-space: pre;">target</span><span style="color: #8ec07c; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;">=</span><span style="color: #aab1c0; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;">threadhelper,</span><span style="color: #83a598; font-family: "consolas" , "courier new" , monospace; font-size: 14px; font-style: italic; white-space: pre;">args</span><span style="color: #8ec07c; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;">=</span><span style="color: #a89984; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;">(</span><span style="color: #aab1c0; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;">fib</span><span style="color: #a89984; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;">,</span><span style="color: #aab1c0; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;">task</span><span style="color: #a89984; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;">,)</span><span style="color: #aab1c0; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;">))</span><br />
<span style="color: #c7d0d9; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;"> threadlist</span><span style="color: #aab1c0; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;">[</span><span style="color: #2bbac5; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;">-</span><span style="color: #d8985f; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;">1</span><span style="color: #aab1c0; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;">]</span><span style="color: #a89984; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;">.</span><span style="color: #52adf2; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;">start</span><span style="color: #aab1c0; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;">()</span><br />
<span style="color: #c7d0d9; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;"> </span><span style="color: #928374; font-family: "consolas" , "courier new" , monospace; font-size: 14px; font-style: italic; white-space: pre;">#poll list of threads until all are done</span><br />
<span style="color: #c7d0d9; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;"> notdone</span><span style="color: #8ec07c; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;">=</span><span style="color: #d3869b; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;">True</span><br />
<span style="color: #c7d0d9; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;"> </span><span style="color: #fb4934; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;">while</span><span style="color: #c7d0d9; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;"> notdone</span><span style="color: #a89984; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;">:</span><br />
<span style="color: #c7d0d9; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;"> notdone</span><span style="color: #8ec07c; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;">=</span><span style="color: #d3869b; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;">False</span><br />
<span style="color: #c7d0d9; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;"> </span><span style="color: #fb4934; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;">for</span><span style="color: #c7d0d9; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;"> task </span><span style="color: #d55fde; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;">in</span><span style="color: #c7d0d9; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;"> threadlist</span><span style="color: #a89984; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;">:</span><br />
<span style="color: #c7d0d9; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;"> </span><span style="color: #fb4934; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;">if</span><span style="color: #c7d0d9; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;"> task</span><span style="color: #a89984; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;">.</span><span style="color: #52adf2; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;">isAlive</span><span style="color: #aab1c0; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;">()</span><span style="color: #a89984; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;">:</span><br />
<span style="color: #c7d0d9; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;"> notdone</span><span style="color: #8ec07c; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;">=</span><span style="color: #d3869b; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;">True</span><br />
<span style="color: #c7d0d9; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;"> time</span><span style="color: #a89984; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;">.</span><span style="color: #52adf2; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;">sleep</span><span style="color: #aab1c0; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;">(</span><span style="color: #d8985f; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;">0.001</span><span style="color: #aab1c0; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;">)</span><br />
<span style="color: #c7d0d9; font-family: "consolas" , "courier new" , monospace;"><span style="font-size: 14px; white-space: pre;"><br /></span></span><span style="color: #fb4934; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;">def</span><span style="color: #8ec07c; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;"> timeathing</span><span style="color: #a89984; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;">(</span><span style="color: #d8985f; font-family: "consolas" , "courier new" , monospace; font-size: 14px; font-style: italic; white-space: pre;">f</span><span style="color: #a89984; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;">,</span><span style="color: #d8985f; font-family: "consolas" , "courier new" , monospace; font-size: 14px; font-style: italic; white-space: pre;">v</span><span style="color: #a89984; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;">):</span><br />
<span style="color: #c7d0d9; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;"> tstart</span><span style="color: #8ec07c; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;">=</span><span style="color: #c7d0d9; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;">time</span><span style="color: #a89984; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;">.</span><span style="color: #52adf2; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;">time</span><span style="color: #aab1c0; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;">()</span><br />
<span style="color: #c7d0d9; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;"> </span><span style="color: #52adf2; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;">f</span><span style="color: #aab1c0; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;">(v)</span><br />
<span style="color: #c7d0d9; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;"> tfinsh</span><span style="color: #8ec07c; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;">=</span><span style="color: #c7d0d9; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;">time</span><span style="color: #a89984; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;">.</span><span style="color: #52adf2; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;">time</span><span style="color: #aab1c0; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;">()</span><br />
<span style="color: #c7d0d9; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;"> </span><span style="color: #fe8019; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;">print</span><span style="color: #aab1c0; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;">(</span><span style="color: #98c378; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;">"</span><span style="color: #b8bb26; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;">timetaken=</span><span style="color: #98c379; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;">{}</span><span style="color: #b8bb26; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;">s</span><span style="color: #98c378; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;">"</span><span style="color: #a89984; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;">.</span><span style="color: #52adf2; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;">format</span><span style="color: #aab1c0; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;">(tfinsh</span><span style="color: #2bbac5; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;">-</span><span style="color: #aab1c0; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;">tstart))</span><br />
<span style="color: #c7d0d9; font-family: "consolas" , "courier new" , monospace;"><span style="font-size: 14px; white-space: pre;"><br /></span></span><span style="color: #52adf2; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;">timeathing</span><span style="color: #aab1c0; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;">(fiblist,[</span><span style="color: #d8985f; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;">30</span><span style="color: #a89984; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;">,</span><span style="color: #d8985f; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;">31</span><span style="color: #a89984; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;">,</span><span style="color: #d8985f; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;">29</span><span style="color: #a89984; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;">,</span><span style="color: #d8985f; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;">30</span><span style="color: #a89984; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;">,</span><span style="color: #d8985f; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;">31</span><span style="color: #a89984; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;">,</span><span style="color: #d8985f; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;">29</span><span style="color: #aab1c0; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;">])</span><br />
<span style="color: #52adf2; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;">timeathing</span><span style="color: #aab1c0; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;">(fibthreading,[</span><span style="color: #d8985f; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;">30</span><span style="color: #a89984; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;">,</span><span style="color: #d8985f; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;">31</span><span style="color: #a89984; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;">,</span><span style="color: #d8985f; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;">29</span><span style="color: #a89984; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;">,</span><span style="color: #d8985f; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;">30</span><span style="color: #a89984; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;">,</span><span style="color: #d8985f; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;">31</span><span style="color: #a89984; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;">,</span><span style="color: #d8985f; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;">29</span><span style="color: #aab1c0; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;">])</span><br />
<span style="color: #c7d0d9; font-family: "consolas" , "courier new" , monospace;"><span style="font-size: 14px; white-space: pre;"><br /></span></span><span style="color: #fe8019; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;">print</span><span style="color: #aab1c0; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;">(threadoutput)</span></div>
</div>
</div>
<div>
<span style="font-family: "courier new" , "courier" , monospace;"><br /></span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace;">Running this we get the following :</span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace;"></span><br />
<div>
<span style="color: yellow; font-family: "courier new" , "courier" , monospace;"><b style="background-color: #660000;">timetaken=2.200274705886841s</b></span><br />
<span style="background-color: #660000; color: yellow; font-family: "courier new" , "courier" , monospace;"><b>timetaken=2.2959671020507812s</b></span><br />
<span style="background-color: #660000; color: yellow; font-family: "courier new" , "courier" , monospace;">[(29, 832040), (29, 832040), (30, 1346269), (30, 1346269), (31, 2178309), (31, 2178309)]</span></div>
<span style="font-family: "courier new" , "courier" , monospace;">
</span>
<br />
<div>
<span style="font-family: "courier new" , "courier" , monospace;"><br /></span></div>
<span style="font-family: "courier new" , "courier" , monospace;">
</span>
<br />
<div>
<span style="font-family: "courier new" , "courier" , monospace;">So we see no time improvement - as expected really. But <b>threading can help if our function was IO based</b> - e.g. calling external commands, polling web pages etc. The output is shown to show this works.</span></div>
<span style="font-family: "courier new" , "courier" , monospace;">
</span>
<br />
<div>
<span style="font-family: "courier new" , "courier" , monospace;"><br /></span></div>
<span style="font-family: "courier new" , "courier" , monospace;">
</span>
<br />
<div>
<span style="font-family: "courier new" , "courier" , monospace;">Lets try that.</span></div>
<span style="font-family: "courier new" , "courier" , monospace;">
</span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace;">So, here I'll pull weather data sequentially, then in parallel using threads. </span></div>
<div>
<div style="background-color: #0b1015; line-height: 19px;">
<div>
<span style="color: #52adf2; font-family: "consolas" , "courier new" , monospace;"><span style="font-size: 14px; white-space: pre;"><br /></span></span><span style="color: #fb4934; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;">import</span><span style="color: #c7d0d9; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;"> time</span><br />
<span style="color: #fb4934; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;">import</span><span style="color: #c7d0d9; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;"> threading</span><br />
<span style="color: #fb4934; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;">import</span><span style="color: #c7d0d9; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;"> requests</span><br />
<span style="color: #c7d0d9; font-family: "consolas" , "courier new" , monospace;"><span style="font-size: 14px; white-space: pre;"><br /></span></span><span style="color: #fb4934; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;">def</span><span style="color: #8ec07c; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;"> urlpull</span><span style="color: #a89984; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;">(</span><span style="color: #d8985f; font-family: "consolas" , "courier new" , monospace; font-size: 14px; font-style: italic; white-space: pre;">url</span><span style="color: #a89984; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;">):</span><br />
<span style="color: #c7d0d9; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;"> r</span><span style="color: #8ec07c; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;">=</span><span style="color: #c7d0d9; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;">requests</span><span style="color: #a89984; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;">.</span><span style="color: #52adf2; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;">get</span><span style="color: #aab1c0; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;">(url)</span><br />
<span style="color: #c7d0d9; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;"> </span><span style="color: #fb4934; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;">return</span><span style="color: #c7d0d9; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;"> r</span><span style="color: #a89984; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;">.</span><span style="color: #c7d0d9; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;">text</span><br />
<span style="color: #c7d0d9; font-family: "consolas" , "courier new" , monospace;"><span style="font-size: 14px; white-space: pre;"><br /></span></span><span style="color: #fb4934; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;">def</span><span style="color: #8ec07c; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;"> urllist</span><span style="color: #a89984; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;">(</span><span style="color: #d8985f; font-family: "consolas" , "courier new" , monospace; font-size: 14px; font-style: italic; white-space: pre;">ns</span><span style="color: #a89984; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;">):</span><br />
<span style="color: #c7d0d9; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;"> na</span><span style="color: #8ec07c; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;">=</span><span style="color: #aab1c0; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;">[]</span><br />
<span style="color: #c7d0d9; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;"> </span><span style="color: #fb4934; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;">for</span><span style="color: #c7d0d9; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;"> n </span><span style="color: #d55fde; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;">in</span><span style="color: #c7d0d9; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;"> ns</span><span style="color: #a89984; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;">:</span><br />
<span style="color: #c7d0d9; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;"> na</span><span style="color: #a89984; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;">.</span><span style="color: #52adf2; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;">append</span><span style="color: #aab1c0; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;">(</span><span style="color: #a89984; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;">(</span><span style="color: #aab1c0; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;">n</span><span style="color: #a89984; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;">,</span><span style="color: #52adf2; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;">urlpull</span><span style="color: #aab1c0; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;">(n)</span><span style="color: #a89984; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;">)</span><span style="color: #aab1c0; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;">)</span><br />
<span style="color: #c7d0d9; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;"> </span><span style="color: #fb4934; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;">return</span><span style="color: #c7d0d9; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;"> na</span><br />
<span style="color: #c7d0d9; font-family: "consolas" , "courier new" , monospace;"><span style="font-size: 14px; white-space: pre;"><br /></span></span><span style="color: #c7d0d9; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;">threadoutput</span><span style="color: #8ec07c; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;">=</span><span style="color: #aab1c0; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;">[]</span><br />
<span style="color: #fb4934; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;">def</span><span style="color: #8ec07c; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;"> threadhelper</span><span style="color: #a89984; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;">(</span><span style="color: #d8985f; font-family: "consolas" , "courier new" , monospace; font-size: 14px; font-style: italic; white-space: pre;">func</span><span style="color: #a89984; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;">,</span><span style="color: #d8985f; font-family: "consolas" , "courier new" , monospace; font-size: 14px; font-style: italic; white-space: pre;">arg</span><span style="color: #a89984; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;">):</span><br />
<span style="color: #c7d0d9; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;"> threadoutput</span><span style="color: #a89984; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;">.</span><span style="color: #52adf2; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;">append</span><span style="color: #aab1c0; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;">(</span><span style="color: #a89984; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;">(</span><span style="color: #aab1c0; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;">arg</span><span style="color: #a89984; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;">,</span><span style="color: #52adf2; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;">func</span><span style="color: #aab1c0; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;">(arg)</span><span style="color: #a89984; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;">)</span><span style="color: #aab1c0; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;">)</span><br />
<span style="color: #c7d0d9; font-family: "consolas" , "courier new" , monospace;"><span style="font-size: 14px; white-space: pre;"><br /></span></span><span style="color: #fb4934; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;">def</span><span style="color: #8ec07c; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;"> urlthreading</span><span style="color: #a89984; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;">(</span><span style="color: #d8985f; font-family: "consolas" , "courier new" , monospace; font-size: 14px; font-style: italic; white-space: pre;">tasklist</span><span style="color: #a89984; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;">):</span><br />
<span style="color: #c7d0d9; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;"> </span><span style="color: #928374; font-family: "consolas" , "courier new" , monospace; font-size: 14px; font-style: italic; white-space: pre;">#start a bunch of threads and save handles to a list</span><br />
<span style="color: #c7d0d9; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;"> threadlist</span><span style="color: #8ec07c; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;">=</span><span style="color: #aab1c0; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;">[]</span><br />
<span style="color: #c7d0d9; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;"> </span><span style="color: #fb4934; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;">for</span><span style="color: #c7d0d9; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;"> task </span><span style="color: #d55fde; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;">in</span><span style="color: #c7d0d9; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;"> tasklist</span><span style="color: #a89984; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;">:</span><br />
<span style="color: #c7d0d9; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;"> threadlist</span><span style="color: #a89984; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;">.</span><span style="color: #52adf2; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;">append</span><span style="color: #aab1c0; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;">(threading</span><span style="color: #a89984; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;">.</span><span style="color: #52adf2; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;">Thread</span><span style="color: #aab1c0; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;">(</span><span style="color: #83a598; font-family: "consolas" , "courier new" , monospace; font-size: 14px; font-style: italic; white-space: pre;">target</span><span style="color: #8ec07c; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;">=</span><span style="color: #aab1c0; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;">threadhelper,</span><span style="color: #83a598; font-family: "consolas" , "courier new" , monospace; font-size: 14px; font-style: italic; white-space: pre;">args</span><span style="color: #8ec07c; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;">=</span><span style="color: #a89984; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;">(</span><span style="color: #aab1c0; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;">urlpull</span><span style="color: #a89984; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;">,</span><span style="color: #aab1c0; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;">task</span><span style="color: #a89984; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;">,)</span><span style="color: #aab1c0; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;">))</span><br />
<span style="color: #c7d0d9; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;"> threadlist</span><span style="color: #aab1c0; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;">[</span><span style="color: #2bbac5; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;">-</span><span style="color: #d8985f; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;">1</span><span style="color: #aab1c0; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;">]</span><span style="color: #a89984; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;">.</span><span style="color: #52adf2; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;">start</span><span style="color: #aab1c0; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;">()</span><br />
<span style="color: #c7d0d9; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;"> </span><span style="color: #928374; font-family: "consolas" , "courier new" , monospace; font-size: 14px; font-style: italic; white-space: pre;">#poll list of threads until all are done</span><br />
<span style="color: #c7d0d9; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;"> notdone</span><span style="color: #8ec07c; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;">=</span><span style="color: #d3869b; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;">True</span><br />
<span style="color: #c7d0d9; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;"> </span><span style="color: #fb4934; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;">while</span><span style="color: #c7d0d9; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;"> notdone</span><span style="color: #a89984; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;">:</span><br />
<span style="color: #c7d0d9; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;"> notdone</span><span style="color: #8ec07c; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;">=</span><span style="color: #d3869b; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;">False</span><br />
<span style="color: #c7d0d9; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;"> </span><span style="color: #fb4934; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;">for</span><span style="color: #c7d0d9; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;"> task </span><span style="color: #d55fde; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;">in</span><span style="color: #c7d0d9; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;"> threadlist</span><span style="color: #a89984; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;">:</span><br />
<span style="color: #c7d0d9; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;"> </span><span style="color: #fb4934; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;">if</span><span style="color: #c7d0d9; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;"> task</span><span style="color: #a89984; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;">.</span><span style="color: #52adf2; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;">isAlive</span><span style="color: #aab1c0; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;">()</span><span style="color: #a89984; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;">:</span><br />
<span style="color: #c7d0d9; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;"> notdone</span><span style="color: #8ec07c; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;">=</span><span style="color: #d3869b; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;">True</span><br />
<span style="color: #c7d0d9; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;"> time</span><span style="color: #a89984; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;">.</span><span style="color: #52adf2; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;">sleep</span><span style="color: #aab1c0; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;">(</span><span style="color: #d8985f; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;">0.001</span><span style="color: #aab1c0; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;">)</span><br />
<span style="color: #c7d0d9; font-family: "consolas" , "courier new" , monospace;"><span style="font-size: 14px; white-space: pre;"><br /></span></span><span style="color: #fb4934; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;">def</span><span style="color: #8ec07c; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;"> timeathing</span><span style="color: #a89984; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;">(</span><span style="color: #d8985f; font-family: "consolas" , "courier new" , monospace; font-size: 14px; font-style: italic; white-space: pre;">f</span><span style="color: #a89984; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;">,</span><span style="color: #d8985f; font-family: "consolas" , "courier new" , monospace; font-size: 14px; font-style: italic; white-space: pre;">v</span><span style="color: #a89984; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;">):</span><br />
<span style="color: #c7d0d9; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;"> tstart</span><span style="color: #8ec07c; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;">=</span><span style="color: #c7d0d9; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;">time</span><span style="color: #a89984; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;">.</span><span style="color: #52adf2; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;">time</span><span style="color: #aab1c0; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;">()</span><br />
<span style="color: #c7d0d9; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;"> </span><span style="color: #52adf2; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;">f</span><span style="color: #aab1c0; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;">(v)</span><br />
<span style="color: #c7d0d9; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;"> tfinsh</span><span style="color: #8ec07c; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;">=</span><span style="color: #c7d0d9; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;">time</span><span style="color: #a89984; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;">.</span><span style="color: #52adf2; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;">time</span><span style="color: #aab1c0; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;">()</span><br />
<span style="color: #c7d0d9; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;"> </span><span style="color: #fe8019; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;">print</span><span style="color: #aab1c0; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;">(</span><span style="color: #98c378; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;">"</span><span style="color: #b8bb26; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;">timetaken=</span><span style="color: #98c379; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;">{}</span><span style="color: #b8bb26; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;">s</span><span style="color: #98c378; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;">"</span><span style="color: #a89984; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;">.</span><span style="color: #52adf2; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;">format</span><span style="color: #aab1c0; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;">(tfinsh</span><span style="color: #2bbac5; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;">-</span><span style="color: #aab1c0; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;">tstart))</span><br />
<span style="color: #c7d0d9; font-family: "consolas" , "courier new" , monospace;"><span style="font-size: 14px; white-space: pre;"><br /></span></span><span style="color: #c7d0d9; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;">urls</span><span style="color: #8ec07c; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;">=</span><span style="color: #aab1c0; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;">[]</span><br />
<span style="color: #c7d0d9; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;">url</span><span style="color: #8ec07c; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;">=</span><span style="color: #98c378; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;">"</span><span style="color: #b8bb26; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;">https://www.wrh.noaa.gov/mesowest/getobext.php?sid=</span><span style="color: #98c379; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;">{}</span><span style="color: #b8bb26; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;">&table=1&num=168&banner=off</span><span style="color: #98c378; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;">"</span><br />
<span style="color: #fb4934; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;">for</span><span style="color: #c7d0d9; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;"> a </span><span style="color: #d55fde; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;">in</span><span style="color: #c7d0d9; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;"> </span><span style="color: #aab1c0; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;">[</span><span style="color: #98c378; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;">"</span><span style="color: #b8bb26; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;">KNYC</span><span style="color: #98c378; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;">"</span><span style="color: #a89984; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;">,</span><span style="color: #98c378; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;">"</span><span style="color: #b8bb26; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;">KHTO</span><span style="color: #98c378; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;">"</span><span style="color: #a89984; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;">,</span><span style="color: #98c378; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;">"</span><span style="color: #b8bb26; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;">KFRG</span><span style="color: #98c378; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;">"</span><span style="color: #a89984; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;">,</span><span style="color: #98c378; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;">"</span><span style="color: #b8bb26; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;">KISP</span><span style="color: #98c378; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;">"</span><span style="color: #a89984; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;">,</span><span style="color: #98c378; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;">"</span><span style="color: #b8bb26; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;">KJFK</span><span style="color: #98c378; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;">"</span><span style="color: #aab1c0; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;">]</span><span style="color: #a89984; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;">:</span><br />
<span style="color: #c7d0d9; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;"> urls</span><span style="color: #a89984; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;">.</span><span style="color: #52adf2; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;">append</span><span style="color: #aab1c0; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;">(url</span><span style="color: #a89984; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;">.</span><span style="color: #52adf2; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;">format</span><span style="color: #aab1c0; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;">(a))</span><br />
<span style="color: #c7d0d9; font-family: "consolas" , "courier new" , monospace;"><span style="font-size: 14px; white-space: pre;"><br /></span></span><span style="color: #52adf2; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;">timeathing</span><span style="color: #aab1c0; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;">(urllist,urls)</span><br />
<span style="color: #52adf2; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;">timeathing</span><span style="color: #aab1c0; font-family: "consolas" , "courier new" , monospace; font-size: 14px; white-space: pre;">(urlthreading,urls)</span></div>
</div>
</div>
<div>
<span style="font-family: "courier new" , "courier" , monospace;"><br /></span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace;">Running this gives the following:</span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace;"></span><br />
<div>
<span style="color: yellow; font-family: "courier new" , "courier" , monospace;"><b style="background-color: #660000;">timetaken=2.074526071548462s</b></span><br />
<b style="background-color: #660000; color: yellow; font-family: "courier new", courier, monospace;">timetaken=0.4535403251647949s</b></div>
<span style="font-family: "courier new" , "courier" , monospace;">
</span>
<br />
<div>
<span style="font-family: "courier new" , "courier" , monospace;"><br /></span></div>
<span style="font-family: "courier new" , "courier" , monospace;">
</span>
<br />
<div>
<span style="font-family: "courier new" , "courier" , monospace;">Sequential time is the first. Threaded time to pull 5 urls is the second. That's pretty huge time savings. Printing "threadoutput" shows the data successfully acquired. Of course you'll probably want to limit the number of threads actually alive - that's not difficult, just a couple more loops really.</span></div>
<span style="font-family: "courier new" , "courier" , monospace;">
</span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace;"><br /></span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace;">PS: You can have a cpubound function called in a subprocess, and threading <i>WILL </i>actually help - because you're no longer actually threading, you're calling external processes, but having threads manage them. Of course if you want to run python functions in this way, just use multiprocessing :P</span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace;"><br /></span>
<span style="font-family: "courier new" , "courier" , monospace;"><br /></span>
<span style="font-family: "courier new" , "courier" , monospace;">PS2: Pypy was mentioned as well. Here's what it looks like running pypy:</span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><br /></span>
<span style="font-family: "courier new" , "courier" , monospace;">Running the fibonacci function sequential and threaded:</span><br />
<span style="color: yellow; font-family: "courier new" , "courier" , monospace;"><b style="background-color: #660000;">timetaken=0.303519964218s</b></span><br />
<span style="color: yellow; font-family: "courier new" , "courier" , monospace;"><b style="background-color: #660000;">timetaken=0.300674200058s</b></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><br /></span>
<span style="font-family: "courier new" , "courier" , monospace;">Note the HUGE gain here - from 2.2 seconds or so, down to 0.3 seconds. <span style="color: yellow;">Running pypy genericname.py instead of python3 was a</span> <b><span style="color: yellow;">7x speedup here</span></b>! My dual core has no chance catching up with parallelism.</span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><br /></span>
<span style="font-family: "courier new" , "courier" , monospace;">Running the urlfetch function sequential and threaded:</span><br />
<span style="color: yellow; font-family: "courier new" , "courier" , monospace;"><b style="background-color: #660000;">timetaken=2.09613394737s</b></span><br />
<span style="color: yellow; font-family: "courier new" , "courier" , monospace;"><b style="background-color: #660000;">timetaken=0.464855194092s</b></span><br />
<div>
<br /></div>
<span style="font-family: "courier new" , "courier" , monospace;"><b><br /></b></span>
<span style="font-family: "courier new" , "courier" , monospace;">Note there is really no gain here. The times here match those from python3. This is an IO bound operation. A faster python cannot help here - but the threading used shows a similar boost as in regular python.</span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><br /></span>
</div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
Beomagihttp://www.blogger.com/profile/00469223835355067867noreply@blogger.com1tag:blogger.com,1999:blog-2974094041951992980.post-12114770924304619042019-04-06T11:38:00.001-07:002019-09-02T09:15:46.406-07:00Git better - organized my terminal scripts and setups for all my linux installs<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: small;">Git has become pretty much standard for many developers now. It's still not always liked though. I've do like how well it works with scripting, and implementations like gitlab have decent support for pipelines making it useful as the interface for deployment.</span></span><br />
<br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: small;">After having to reinstall Linux recently on my main server, I decided to automate the general setup. I had my terminal working so nicely, and painstakingly setup my bash profiles, vim etc. I've had a github account for a while, but had not really been using it for much. Figured it was time I make a general setup for linux, vim and whatever else I needed.</span></span><br />
<br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: small;"><a href="https://github.com/beomagi/general-setup">https://github.com/beomagi/general-setup</a></span></span><br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<span style="font-family: "courier new" , "courier" , monospace;"><br /></span></div>
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: small;"><u><b>I'm all in for VIM.</b></u> </span></span><br />
<br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: small;">I start by </span><span style="font-size: small;">installing all general purpose stuff I'd want, then setup vim. Just the standard vim, but I add plug for managing plugins, and a few plugins like lightline (status line at bottom), nerdtree (file browser) and neocomplete (a general autocomplete plugin). The result is I now spend more time in VIM than I do in VSCode.</span></span><br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgsiIfimBYlaMUJFyuj1PqTIdDZhcJ_SS2BjJNiAiTZt6p_Unj9lmwD3MDmweMJVmrrj7wsEUc9vH-FpzTY1ClE0YwiLrjGHL39lD_doSl7XLFz6uepU535VrzjohHhaCNw76ABw97-Y-KI/s1600/Screenshot_2019-04-06_13-27-59.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="1041" data-original-width="1080" height="616" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgsiIfimBYlaMUJFyuj1PqTIdDZhcJ_SS2BjJNiAiTZt6p_Unj9lmwD3MDmweMJVmrrj7wsEUc9vH-FpzTY1ClE0YwiLrjGHL39lD_doSl7XLFz6uepU535VrzjohHhaCNw76ABw97-Y-KI/s640/Screenshot_2019-04-06_13-27-59.png" width="640" /></a></div>
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: small;"><br /></span></span>
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: small;">I've also edited an existing "molokai" colorscheme. With dim laptop screens, I've found some colors to be a little hard to see (or maybe my eyes are going? :P). Either way, I've edited the colors to be brighter.</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: small;"><br /></span></span>
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: small;"><br /></span></span>
<u><b><span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: small;">When I execute things, it's a terminal case...</span></span></b></u><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: small;"><br /></span></span>
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: small;">On colors, I've edited my terminal to better reflect what I've been working on.</span></span><br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjcBp9HjcgtUGr-3l_5omd2LwygQWPzAeFZDskLcKfSB4N51-mI58fViTWkY7qe84DgecWeOP5rDV39EhDhyphenhyphenvrW0quOw60PDp0Gaoi10u0dcEoUBE6ldVrTmDsbGund7BKSCbsr5Ff4hlgJ/s1600/Screenshot_2019-04-06_13-35-32.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="1041" data-original-width="1280" height="520" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjcBp9HjcgtUGr-3l_5omd2LwygQWPzAeFZDskLcKfSB4N51-mI58fViTWkY7qe84DgecWeOP5rDV39EhDhyphenhyphenvrW0quOw60PDp0Gaoi10u0dcEoUBE6ldVrTmDsbGund7BKSCbsr5Ff4hlgJ/s640/Screenshot_2019-04-06_13-35-32.png" width="640" /></a></div>
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: small;">Some fluff like weather, but that's only on startup. The prompt includes time, so I can see what I ran and when. The GIT branch is also displayed.</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: small;"><br /></span></span>
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: small;">At the start, several functions are declared as well. </span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: small;">"<span style="color: cyan;">displayset</span>" is mostly for my work laptop's linux VM. It takes the IP from "pinky" so that it can export the DISPLAY variable there.</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: small;"><br /></span></span>
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: small;">"<span style="color: cyan;">cd</span>" has been written so it stores the current folder before changing to another folder. "<span style="color: cyan;">cdr</span>" uses this to go to the previous folder. "<span style="color: cyan;">cdl</span>" lists the folder history (sorted, uniques). This is just to make like in terminal a little quicker. Note that functions like the original "<span style="color: cyan;">cd</span>" are easily accessed using "<span style="color: cyan;">builtin cd</span>". </span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: small;"><br /></span></span>
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: small;">"<span style="color: cyan;">gitlog</span>" lets me see for a branch what commits were made, and gives me the hashcode so I can easily cherrypick (git cherry-pick <HASHKEY> ).</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: small;">e.g.</span></span><br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEixlO0zUL634lfyb10cgdqMDzgrfYseHIi37B_x394uBWUyVHXDtdIQgj2Yrl9uyaFypebJsmSSIsBL6PhOYSz6TvW6NKxfnHhYxmKKIQ64JIZO2Tj05gaeVa3MmR8gV7alffzstl4IKF5b/s1600/Screenshot_2019-04-06_13-46-30.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="491" data-original-width="1280" height="244" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEixlO0zUL634lfyb10cgdqMDzgrfYseHIi37B_x394uBWUyVHXDtdIQgj2Yrl9uyaFypebJsmSSIsBL6PhOYSz6TvW6NKxfnHhYxmKKIQ64JIZO2Tj05gaeVa3MmR8gV7alffzstl4IKF5b/s640/Screenshot_2019-04-06_13-46-30.png" width="640" /></a></div>
<br />
<br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: small;">"<span style="color: cyan;">yaml2json</span>" converts yaml to json. I've not found anything for yaml that's as good as jq, so dealing with a large yaml file sucks.</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: small;"><br /></span></span>
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: small;">"<span style="color: cyan;">spacechk</span>" is my way of figuring out what is taking up so much space on my drive :P</span></span><br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh0JbvbHR-K4XaDZr5nV2CDP2IBwt4o8PDz4LjMIF8laNjwGXT0DcIXCdWysaB7JvoTt50iT-zp-xpc58zAa49wSV0tlxLkKGPyq50Zk3Dmq4v7HGL_yUel5N2Y2Z45PZP3N03oACbbCO7a/s1600/Screenshot_2019-04-06_13-52-41.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="1041" data-original-width="1280" height="520" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh0JbvbHR-K4XaDZr5nV2CDP2IBwt4o8PDz4LjMIF8laNjwGXT0DcIXCdWysaB7JvoTt50iT-zp-xpc58zAa49wSV0tlxLkKGPyq50Zk3Dmq4v7HGL_yUel5N2Y2Z45PZP3N03oACbbCO7a/s640/Screenshot_2019-04-06_13-52-41.png" width="640" /></a></div>
<span style="font-family: "courier new" , "courier" , monospace;">For each file/folder on the current level, it displays the size, usage of the drive it's on and the mount point.</span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><br /></span>
<span style="font-family: "courier new" , "courier" , monospace;"><br /></span>
<span style="font-family: "courier new" , "courier" , monospace;">Why git?</span><br />
<ul>
<li><span style="font-family: "courier new" , "courier" , monospace;">Because it's easy for me to setup a new pc and get the terminal and VIM just how I like it.</span></li>
<li><span style="font-family: "courier new" , "courier" , monospace;">Sharing functions and bits of code is easy</span></li>
<li><span style="font-family: "courier new" , "courier" , monospace;">I'm constantly making changes to things here, and like that these changes easily propagate to my other machines.</span></li>
</ul>
Beomagihttp://www.blogger.com/profile/00469223835355067867noreply@blogger.com0tag:blogger.com,1999:blog-2974094041951992980.post-40758551085857331242017-10-05T11:06:00.001-07:002017-10-05T16:00:58.847-07:00Summer PC upgrade: $340 = 12 cores, 24 threads, 48GB RAM, with a Minty OS<h3>
<span style="font-family: "courier new" , "courier" , monospace;">I Love the smell of new hardware in the morning!</span></h3>
<span style="font-family: "courier new" , "courier" , monospace;">I really wanted a parallel processing monster of a machine, and </span><span style="font-family: "courier new" , "courier" , monospace;">while my "6" *cough-3-cough* core 6300FX worked fine, simply not everything would scale nicely on it. In a way, it's gotten better as software is more optimized now, but my own scripting really lagged compared to running on my core i5. The FX 6 core cpu's are really 3 modules with a pair of pipelines sharing some units. Floating point for example gets shared, so performance drops in those scenarios.</span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><br /></span>
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-family: "courier new" , "courier" , monospace;"><br /></span><span style="font-family: "courier new" , "courier" , monospace;"><span style="color: lime;">AMD</span>'s Ryzen is here. Looking at Ryzen 1700, that $300 would have gotten me a nice new 8 core beast of a CPU, but I'd still have to purchase memory and motherboard. </span><span style="font-family: "courier new" , "courier" , monospace;">Had I gone with 24GB of memory, this upgrade would be $260. DDR4 for a modern CPU is about $160 for 16GB. A decent upgrade here would be closer to $600, and I wasn't ready to spend that much.</span></span><br />
<div>
<span style="font-family: "courier new" , "courier" , monospace;"><br /></span></div>
<span style="font-family: "courier new" , "courier" , monospace;">Time to embrace old Xeons. Of note, Xeon boards are incredibly expensive, even old ones. Buy used, but be prepared to return them - those pins are fragile. I purchased a EATX board that wouldn't post. Ebay return went smoothly, and I ended up with a decent ATX dual xeon board. </span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-family: "courier new" , "courier" , monospace;"><br /></span>
<span style="font-family: "courier new" , "courier" , monospace;">Rounding up:</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;">Xeon x5670 (2)..........$70</span><br />
<span style="font-family: "courier new" , "courier" , monospace;">Asus Z8na-d6c..........$110</span><br />
<span style="font-family: "courier new" , "courier" , monospace;">Hynix 48GB DDR3 1600...$160</span><br />
<span style="font-family: "courier new" , "courier" , monospace;">___________________________</span><br />
<span style="font-family: "courier new" , "courier" , monospace;">Total..................$340</span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-family: "courier new" , "courier" , monospace;"><br /></span><span style="font-family: "courier new" , "courier" , monospace;">I could have gone with half the RAM and saved a bunch, but I figure I can mess around with a 32GB ramdrive and still have oodles of memory left over.</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-family: "courier new" , "courier" , monospace;"><br /></span>
<span style="font-family: "courier new" , "courier" , monospace;">I probably went a little farther back in time than intended but the performance is surprising. </span><span style="font-family: "courier new" , "courier" , monospace;">I picked up a "Gulftown" Xeon pair - x5670 at $35 a processor. This is 7 years old, hence the price being equivalent to a raspberry pi...</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-family: "courier new" , "courier" , monospace;"><br /></span>
<span style="font-family: "courier new" , "courier" , monospace;"><br /></span>
</span><br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi5uFTV_IVYx71I_a-OZLlR_zhV7_rVpLhWlY0v_MxKJH83RuOKM7Ikbt7k-H5EM1hpLxJwCFQEY2pRH19ZzwuUxCQ-hsWWxMrtoRMmwqYQG8oB8vAKSv4A3418TBHia_jTr8LjDizPGLpi/s1600/PA010119.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><span style="font-family: "courier new" , "courier" , monospace;"><img border="0" data-original-height="1200" data-original-width="1600" height="480" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi5uFTV_IVYx71I_a-OZLlR_zhV7_rVpLhWlY0v_MxKJH83RuOKM7Ikbt7k-H5EM1hpLxJwCFQEY2pRH19ZzwuUxCQ-hsWWxMrtoRMmwqYQG8oB8vAKSv4A3418TBHia_jTr8LjDizPGLpi/s640/PA010119.JPG" width="640" /></span></a></div>
<span style="font-family: "courier new" , "courier" , monospace;"><br /></span>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhKHyqOKbiIqMo6yzueZX88sL8byOUDp8NCpKAbhnZuYZmU1jxxnYfjXkS0rFGA_i5wKOJbkzaNM2stzZLQzqJ3QtuFBMJWCQj7VkUATiJqIPTPmmwjOjlXPLY31MlaDs6aQ290TPo2e8II/s1600/PA010122.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><span style="font-family: "courier new" , "courier" , monospace;"><img border="0" data-original-height="1200" data-original-width="1600" height="480" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhKHyqOKbiIqMo6yzueZX88sL8byOUDp8NCpKAbhnZuYZmU1jxxnYfjXkS0rFGA_i5wKOJbkzaNM2stzZLQzqJ3QtuFBMJWCQj7VkUATiJqIPTPmmwjOjlXPLY31MlaDs6aQ290TPo2e8II/s640/PA010122.JPG" width="640" /></span></a></div>
<div class="separator" style="clear: both; text-align: center;">
<span style="font-family: "courier new" , "courier" , monospace;"><br /></span></div>
<div class="separator" style="clear: both; text-align: left;">
<span style="font-family: "courier new" , "courier" , monospace;"><br /></span></div>
<div class="separator" style="clear: both; text-align: left;">
<span style="font-family: "courier new" , "courier" , monospace;">Obligatory Htop ;)</span></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiJk2cD-oJRisycKQLI9vU1QA8YXoLHeCNFQHp_Aowo-mOexoaQoHFNt5Ds2ZSq_cNDtvDZ27CDpj3Hg4TJwVbOkCtKe0gYShSW5XvzsT6F1LW7_hVELBDRXiKRcBaXYB1OS5zkCYAgzPb1/s1600/htop.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><span style="font-family: "courier new" , "courier" , monospace;"><img border="0" data-original-height="855" data-original-width="907" height="603" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiJk2cD-oJRisycKQLI9vU1QA8YXoLHeCNFQHp_Aowo-mOexoaQoHFNt5Ds2ZSq_cNDtvDZ27CDpj3Hg4TJwVbOkCtKe0gYShSW5XvzsT6F1LW7_hVELBDRXiKRcBaXYB1OS5zkCYAgzPb1/s640/htop.png" width="640" /></span></a></div>
<div class="separator" style="clear: both; text-align: center;">
<span style="font-family: "courier new" , "courier" , monospace;"><br /></span></div>
<div class="separator" style="clear: both; text-align: left;">
<span style="font-family: "courier new" , "courier" , monospace;"><br /></span></div>
<div class="separator" style="clear: both; text-align: left;">
<span style="font-family: "courier new" , "courier" , monospace;">After all this time, I'm still a compiz fan.</span></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEilHNrnMlFZ3-YqYJ-ifRxil_rTcOYJC9drKrhlqufmy2Qs4DH0c9iTss3d5KA2rE5pN_l89XAnuSzMP56KFGkvNSf2noVEuU7hYkk_W_QOfLcE_4ltedyWFsuBPput7xksGcteGei7MIWp/s1600/2017-10-05-095546_1920x1080_scrot.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><span style="font-family: "courier new" , "courier" , monospace;"><img border="0" data-original-height="900" data-original-width="1600" height="360" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEilHNrnMlFZ3-YqYJ-ifRxil_rTcOYJC9drKrhlqufmy2Qs4DH0c9iTss3d5KA2rE5pN_l89XAnuSzMP56KFGkvNSf2noVEuU7hYkk_W_QOfLcE_4ltedyWFsuBPput7xksGcteGei7MIWp/s640/2017-10-05-095546_1920x1080_scrot.png" width="640" /></span></a></div>
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-family: "courier new" , "courier" , monospace;"><br /></span>
<span style="font-family: "courier new" , "courier" , monospace;"><br />/proc/cpuinfo shows that the CPU's idle at only 1.6GHz saving power. Cores in use jump to 2.93GHz.</span></span><br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhffgTdhSPA9V9bYLMP-7VfQ-gFAeE7MFllmY08zd67q4RXFaGcccsScgrgk2G6MOdxn7ju8oApHSCwjo2XXwV2Xs23J-e7Btv9mcenj4asI60D2Oo-u06NyqmQ6Rw813fmWBKS3uzZCsmZ/s1600/2017-10-05-144453_1920x1080_scrot.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="585" data-original-width="1341" height="278" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhffgTdhSPA9V9bYLMP-7VfQ-gFAeE7MFllmY08zd67q4RXFaGcccsScgrgk2G6MOdxn7ju8oApHSCwjo2XXwV2Xs23J-e7Btv9mcenj4asI60D2Oo-u06NyqmQ6Rw813fmWBKS3uzZCsmZ/s640/2017-10-05-144453_1920x1080_scrot.png" width="640" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
</div>
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-family: "courier new" , "courier" , monospace;"><br /><br />It's so nice to install an OS and have it detect everything. Add-in cards like sound (no sound on xeon boards usually), USB3.0 (predates the board), USB devices like the WiFi AC adapter - nothing to worry about. Linux Mint is awesome ;)</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-family: "courier new" , "courier" , monospace;"><br /></span></span>
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-family: "courier new" , "courier" , monospace;"><a href="https://linuxmint.com/" target="_blank">https://linuxmint.com/</a><br /><br /></span></span><br />
<h3>
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-family: "courier new" , "courier" , monospace;"><b>Why go with old Xeons? Why not new ones?</b></span></span></h3>
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-family: "courier new" , "courier" , monospace;">Well, my reasoning is cost, and a lack of substantial improvement in IPC with newer versions.</span>
<span style="font-family: "courier new" , "courier" , monospace;">Here's a general comparison on how this old architecture fared over time using geekbench.</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-family: "courier new" , "courier" , monospace;"><br /></span>
<span style="font-family: "courier new" , "courier" , monospace;"><b>Disclaimer</b> - looking at 1 benchmark of different architectures, is not a very accurate way to gauge performance. A different architecture may offer specific advantages or disadvantages for that benchmark. Newer models of xeons are an evolution of the previous model where much of the architecture stays the same so I'm still considering this a fair comparison across the xeons.</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-family: "courier new" , "courier" , monospace;"><br /></span>
<span style="font-family: "courier new" , "courier" , monospace;">Looking at 4 cores and ~3.0GHz as the 6 core models aren't as common throughout frequency ranges.</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;">Scores obtained from geekbench - https://browser.geekbench.com/v4/cpu/ using a median score from the median page, strictly for 4 cores (multiple results from the same person considered as one result):</span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><br /></span>
<span style="font-family: "courier new" , "courier" , monospace;">Looking at prices is tricky. The gulftown can be used in dual processor config at $17 a processor. Intel's 1xxx lines however cannot (and are cheap as a result). Lets consider the closest in spec 2xxx series, here the performance numbers can skew because the CPUs start using higher turbo rates - but this shows how price jumps for newer multi-CPU models.</span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-family: "courier new" , "courier" , monospace;"><br /></span>
<span style="font-family: "courier new" , "courier" , monospace;">2x4 cores:</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="color: yellow;">2010 Gulftown</span>....<span style="color: cyan;">X5667 3.06GHz</span>.........<span style="color: lime;">2737/15270</span> - <span style="color: magenta;">$34</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="color: yellow;">2010 Gulftown</span>....<span style="color: cyan;">X5677 3.47GHz.</span>........<span style="color: lime;">2897/16724</span> - <span style="color: magenta;">$70</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="color: yellow;">2012 Ivy Bridge</span>..<span style="color: cyan;">E5 2637-v2 3.5GHz</span>.....<span style="color: lime;">3125/18078</span> - <span style="color: magenta;">$460</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="color: yellow;">2013 Haswell</span>.....<span style="color: cyan;">E5 2623-v3 3.0GHz+</span>....<span style="color: lime;">3373/17361</span> - <span style="color: magenta;">$960</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="color: yellow;">2015 Broadwell</span>...<span style="color: cyan;">E5 2623-v4 2.6GHz</span>.....<span style="color: lime;">3427/17053</span> - <span style="color: magenta;">$960</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="color: yellow;">2015 Broadwell</span>...<span style="color: cyan;">E5 2637-v4 3.5GHz</span>.....<span style="color: lime;">3510/22771</span> - <span style="color: magenta;">$2400</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="color: yellow;">2016 Skylake</span>.....Unable to find close comparison</span><br />
<span style="font-family: "courier new" , "courier" , monospace;">2x6 cores (my pick):</span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><b><span style="color: yellow;">2010 Gulftown</span>....<span style="color: cyan;">X5760 2.97GHz</span>.........<span style="color: lime;">2599/23882</span> - <span style="color: magenta;">$70</span></b></span><br />
<div>
<span style="font-family: "courier new" , "courier" , monospace;">1x8 cores (new AMD alternative over my budget):</span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace;"><span style="color: yellow;">2017 Ryzen</span>.......<span style="color: cyan;">1700 3.0-3.7GHz</span>.......<span style="color: lime;">4244/22447</span> - <span style="color: magenta;">$300</span></span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-family: "courier new" , "courier" , monospace;"><br /></span>
<span style="font-family: "courier new" , "courier" , monospace;">To be fair to Intel, the new architecture isn't ALL about IPC. Frequency and the number of cores has increased, while dropping power usage - a pretty tough feat. However the cost can be high. e.g. A recent high core count xeons pair:</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-family: "courier new" , "courier" , monospace;"></span><br /></span>
<span style="font-family: "courier new" , "courier" , monospace;"><span style="color: yellow;">2016 Broadwell</span>...<span style="color: cyan;">E5 2699-v4 2.2-3.6GHz</span>.<span style="color: lime;">3000/66305</span> - <span style="color: magenta;">$8000</span></span><br />
<div>
<span style="font-family: "courier new" , "courier" , monospace;"><br /></span></div>
<span style="font-family: "courier new" , "courier" , monospace;"><br /></span>
<span style="font-family: "courier new" , "courier" , monospace;">I'm looking for a general comparison on how this architecture has aged. How does single core and multicore performance change with each generation? Is it worth it buying old xeons? </span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-family: "courier new" , "courier" , monospace;"><br /></span><span style="font-family: "courier new" , "courier" , monospace;">By the numbers, this old architecture holds up surprisingly well. I'm sure you can probably get some hardware features for encryption or video encoding on the more modern architectures; some more SIMD etc. </span><span style="font-family: "courier new" , "courier" , monospace;">Keep in mind that xeon architecture evolved from previous generations, so it's rare for there to be a huge difference.</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-family: "courier new" , "courier" , monospace;"><br /></span></span>
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-family: "courier new" , "courier" , monospace;">Going for the 6 cores, I'm sacrificing some single core speed, for a lot more multi-processes performance. I think my CPU governor choice may be contributing to a lower than expected single core performance compared to others on geekbench. I'll have to experiment with that.</span></span><br />
<div>
<span style="font-family: "courier new" , "courier" , monospace;"><br /></span></div>
<span style="font-family: "courier new" , "courier" , monospace;">The Ryzen is an interesting addition in these comparisons. It's a single CPU and was released as I was building my machine. That single CPU score is pretty solid. I'm quite surprised the old xeons can keep up in multicore score (12 cores vs 8 though...). Granted, the benchmark may simply be favorable to AMD's Ryzen architecture (completely different from Intel's), but it's a strong result regardless.</span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace;"><br /></span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace;">Hardware.info ran benchmarks of a more practical nature:</span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace;">From: <a href="https://us.hardware.info/reviews/6215/2/intel-five-generation-ipc-test-broadwell-haswell-ivy-bridge-sandy-bridge-and-nehalem-results">https://us.hardware.info/reviews/6215/2/intel-five-generation-ipc-test-broadwell-haswell-ivy-bridge-sandy-bridge-and-nehalem-results</a></span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-family: "courier new" , "courier" , monospace;"><br /></span>
<span style="font-family: "courier new" , "courier" , monospace;">NB: Gulftown used above is the last iteration of Nehalem in below's charts.<br />NB: Following charts are from hardware.info. Click the link above for their full article.</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><br /></span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace;"><img src="https://content.hwigroup.net/images/articles/ipctest-jul2015-v2-cbst.png" /></span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace;"><img src="https://content.hwigroup.net/images/articles/ipctest-jul2015-v2-cbmt.png" /></span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace;"><img src="https://content.hwigroup.net/images/articles/ipctest-jul2015-v2-tamt.png" /></span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace;"><img src="https://content.hwigroup.net/images/articles/ipctest-jul2015-v2-tast.png" /></span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace;"><br /></span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace;">The CPUs used in hardware.info testing are:</span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace;"><span style="border: 0px none; margin: 0px; padding: 0px;">Nehalem: </span>Intel Core i7 875K 2.93-3.6GHz, 4 cores<br /><span style="border: 0px none; margin: 0px; padding: 0px;">Sandy Bridge: </span>Intel Core i7 2600K 3.4-3.8GHz, 4 cores<br /><span style="border: 0px none; margin: 0px; padding: 0px;">Ivy Bridge:</span> Intel Core i7 3770K<span style="border: 0px none; margin: 0px; outline: 0px; padding: 0px;"> 3.5-3.9GHz, 4 cores</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="border: 0px none; margin: 0px; padding: 0px;">Haswell:</span> Intel Core i7 4790K 4.0-4.4GHz, 4 cores<br /><span style="border: 0px none; margin: 0px; padding: 0px;">Broadwell:</span> Intel Core i7 5775C 3.3-3.7GHz, 4 cores</span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-family: "courier new" , "courier" , monospace;"><br /></span>
<span style="font-family: "courier new" , "courier" , monospace;">NB: Gulftown was the last of the Nehalem line.</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><br /></span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace;">It should be noted that the biggest jump on their testing also matches the big jump in processor frequency. </span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace;"><br /></span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace;">Basically, we ARE getting improvements in each new processor family, but they aren't huge in general. Over time it does add up - in single core performance, the newest chips are maybe 20-40% faster. Multicore increases don't seem to be as dramatic, but they are indeed there. The question is is it worth it to you?</span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace;"><br /></span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace;">If you should consider going old xeon route for whatever reason - namely you found a cheap motherboard and have access to cheap EC memory, then consider <b><a href="https://en.wikipedia.org/wiki/List_of_Intel_Xeon_microprocessors" rel="nofollow" target="_blank">this wiki page</a> </b>listing all xeons.</span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-family: "courier new" , "courier" , monospace;"><br /></span>
<span style="font-family: "courier new" , "courier" , monospace;">That said, Ryzen is a pretty solid pick if you have the money for a full setup. I think for an upgrade, the old xeons were pretty solid ;)</span></span></div>
Beomagihttp://www.blogger.com/profile/00469223835355067867noreply@blogger.com10tag:blogger.com,1999:blog-2974094041951992980.post-18946475703296776542017-09-30T16:48:00.002-07:002017-09-30T16:50:09.852-07:00Using an old camera to make a microscope<span style="font-family: "courier new" , "courier" , monospace;">My kid just turned 7. My wife and I generally look for toys that cultivate more creative interests, especially in science and math. We were looking at "toy" microscopes. A decent toy is perhaps $30-$40. Will magnify but lenses aren't great. At this price point, lenses are fixed.</span><br />
<span style="font-family: "courier new" , "courier" , monospace;">Going up to $50-$60, you get a much better build - and lenses are replaceable, but not standard lab microscope lenses (RMS mount). Going up to $70 gets you an <i>actual </i>microscope, with metal body and RMS thread lenses. So, maybe the best both worlds is a real microscope, painted pink. ¯\_(ツ)_/¯</span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><br /></span>
<span style="font-family: "courier new" , "courier" , monospace;">While looking at these I got to thinking. I've just purchased the Sony A7. My wife took my last purchase - the Olympus E-M10, so the EP3 is my backup. My Olympus E-PL1 is just going to gather dust.</span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><br /></span>
<span style="font-family: "courier new" , "courier" , monospace;">I decided to try taking this spare camera (its going for < $100 used at this time. KEH had it for $67) and mount it on a bellows using an adapter for a microscope lens - the same standard RMS lenses that would work on a regular microscope. This is all well and good, but I need a way to hold this up to a slide quite steady, and a way to light it from the back. So I mounted the bellows on video rails, with a couple blocks to hold microscope slides and another for a flashlight. I also experimented with lighting. Using a simple folded paper shroud and flash, images look very different compared to regular back-lighting.</span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><br /></span>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjqiPLDAlMbI8m1ohIlNlwOCAsWdaxhbhSuLuy41KbAwBWQ8zAjm759NXDU3H5BWBJoT880ALgwwdxklEp-2AfMIyUN7mxw5i6XMZH3MXuSqKM531cthrQhTK85C2K8gGVHTHBaNT7uba2c/s1600/DSC00267.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><span style="font-family: "courier new" , "courier" , monospace;"><img border="0" data-original-height="1200" data-original-width="1600" height="480" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjqiPLDAlMbI8m1ohIlNlwOCAsWdaxhbhSuLuy41KbAwBWQ8zAjm759NXDU3H5BWBJoT880ALgwwdxklEp-2AfMIyUN7mxw5i6XMZH3MXuSqKM531cthrQhTK85C2K8gGVHTHBaNT7uba2c/s640/DSC00267.JPG" width="640" /></span></a></div>
<span style="font-family: "courier new" , "courier" , monospace;"><br /></span>
<span style="font-family: "courier new" , "courier" , monospace;">The end result is better than I thought it would be. I did learn quite a bit about microscope lenses along the way.</span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><br /></span>
<span style="font-family: "courier new" , "courier" , monospace;">Rather than a lens, a bellows is mounted on the camera. The bellows in this case is M42 (old pentax mount) so a M42 to RMS adapter is used to mount the microscope lens on the bellows. An M42 to Micro Four Thirds adapter lets this old bellows mount to the modern camera.</span><br />
<span style="font-family: "courier new" , "courier" , monospace;">The bellows,, and a couple blocks are all on photo rails. A couple threaded rods holds the slides in place, and the other block holds a flashlight with built in lens. To diffuse the light and change the look of the image, a simple paper hood can be added to scatter the light from the flashlight and the flash. While not a standard microscopy lighting method, it is normal in photography.</span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><br /></span>
<span style="font-family: "courier new" , "courier" , monospace;"><br /></span>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiZq62qtrSpwcnzhq4rnMQsClLSQPybABSM1asNf5jbukZkNkVAnXYmJrXYPQ7oQoBVTnDN5_ovD00YINyzw9pZzRLY_DJ4BD7pzEjZ8sMUttfbiEy6AejnzI93Jq0PRjXGUtqUxMWC4tXi/s1600/EPL13484.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="1204" data-original-width="1600" height="480" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiZq62qtrSpwcnzhq4rnMQsClLSQPybABSM1asNf5jbukZkNkVAnXYmJrXYPQ7oQoBVTnDN5_ovD00YINyzw9pZzRLY_DJ4BD7pzEjZ8sMUttfbiEy6AejnzI93Jq0PRjXGUtqUxMWC4tXi/s640/EPL13484.JPG" width="640" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgOo3VfcUyRPayJDA798KtqFd7NG7zWy981Ie9yoX578oZIEWaaZ-5S669lHW8R2xxCxlc7e7tcOVqpCV2MjaoJdPrNMdmCd0MlC8Iq22vuvbkHZWK1_1C_1-y_r0Inxj5N9mWU3spZk4Hm/s1600/EPL13429.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="1204" data-original-width="1600" height="481" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgOo3VfcUyRPayJDA798KtqFd7NG7zWy981Ie9yoX578oZIEWaaZ-5S669lHW8R2xxCxlc7e7tcOVqpCV2MjaoJdPrNMdmCd0MlC8Iq22vuvbkHZWK1_1C_1-y_r0Inxj5N9mWU3spZk4Hm/s640/EPL13429.JPG" width="640" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEivv_SeBi85DeD9sPweVCRTjOvOwy9vSreJPgD-uTMOz-9ZryL3hzVVFtIHLnkSOOARLvayY3VOCCdiptTr5Sk7jjZlS2oBqJLCVhg9jDN60eVPlGHyIx6j7rxPo8Z_6shb9eIlT1A_4Mdp/s1600/EPL13373.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="1600" data-original-width="1600" height="640" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEivv_SeBi85DeD9sPweVCRTjOvOwy9vSreJPgD-uTMOz-9ZryL3hzVVFtIHLnkSOOARLvayY3VOCCdiptTr5Sk7jjZlS2oBqJLCVhg9jDN60eVPlGHyIx6j7rxPo8Z_6shb9eIlT1A_4Mdp/s640/EPL13373.JPG" width="640" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjam4ErPn3oKx-D9ChOXOoifgx1OaPZ08lVKYMSBAwhU42fz7C18vcHmMBQzTw5nmhPX3wVwNF9wSALYgOodn59SuoZ0CxFJ2pOdnPNkZ3N_sy2A2h04MQlwIaSvE4gRK41nnS0IDnchbIr/s1600/P1019317.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="1204" data-original-width="1600" height="480" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjam4ErPn3oKx-D9ChOXOoifgx1OaPZ08lVKYMSBAwhU42fz7C18vcHmMBQzTw5nmhPX3wVwNF9wSALYgOodn59SuoZ0CxFJ2pOdnPNkZ3N_sy2A2h04MQlwIaSvE4gRK41nnS0IDnchbIr/s640/P1019317.jpg" width="640" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhkz0iwXhEY9SBSNbcC_ebHm_RbmjXCVW40RdlwR1gx65V-gu7esqJQSHVSma6Dv0ndyywy5lA9bFlYvmxXLsqefVCGl1eCNXDNunr7huXKlhXlmTXAXb9EAnRUd8cFtof7-HD_9rkuREKq/s1600/P1019355.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="1204" data-original-width="1600" height="480" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhkz0iwXhEY9SBSNbcC_ebHm_RbmjXCVW40RdlwR1gx65V-gu7esqJQSHVSma6Dv0ndyywy5lA9bFlYvmxXLsqefVCGl1eCNXDNunr7huXKlhXlmTXAXb9EAnRUd8cFtof7-HD_9rkuREKq/s640/P1019355.JPG" width="640" /></a></div>
<span style="font-family: "courier new" , "courier" , monospace;"><br /></span>
<span style="font-family: "courier new" , "courier" , monospace;"><br /></span><span style="font-family: "courier new" , "courier" , monospace;">Look closely on the leaf and you'll see stomata!<br /><br />What's important here is the camera, extension tube/bellows, microscope lens, a way to hold the subject steady, and lighting.</span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><br /></span>
<span style="font-family: "courier new" , "courier" , monospace;">Many people have a relatively modern camera capable of live view. This camera used is among the first cheap mirrorless cameras, the E-PL1. At the time of writing, this was seen for $67 on keh.com. The bellows set me back $30 at the time, but has risen over time. granted, there's many other means of getting the microscope lens mounted. M42 focusing tubes can also be used to vary the distance of the objective from the camera. Flashlights were 2 for $10. the flash is a generic amazon basic flash for $30. Lenses can be purchased used. A plan lens gives a flatter field and is better for these large sensors, though you can find "lot" sales with several lenses on ebay for quite cheap.</span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><br /></span>
<span style="font-family: "courier new" , "courier" , monospace;">Bellows alternative:</span><br />
<div class="separator" style="clear: both; text-align: center;">
<span style="font-family: "courier new" , "courier" , monospace; margin-left: 1em; margin-right: 1em;"><img height="371" src="https://images-na.ssl-images-amazon.com/images/I/614h4Vht7fL._SL1064_.jpg" width="400" /></span></div>
<div class="separator" style="clear: both; text-align: center;">
<span style="font-family: "courier new" , "courier" , monospace; margin-left: 1em; margin-right: 1em;"><br /></span></div>
<div class="separator" style="clear: both; text-align: center;">
<span style="font-family: "courier new" , "courier" , monospace; margin-left: 1em; margin-right: 1em;"><br /></span></div>
<div class="separator" style="clear: both; text-align: center;">
<span style="font-family: "courier new" , "courier" , monospace; margin-left: 1em; margin-right: 1em;"><br /></span></div>
<br />
<span style="font-family: "courier new" , "courier" , monospace;">Lens lots on ebay:</span><br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjJrsuEWKkxtoQGzocYookdfKM94XDB-pFy8OqxbyvjKhUk2EH-CltJUf_IKtXy1Lo1YYWD24VfqyysTNpDFcj48vn68qGiYdISijAlKt2LpRYBY1dxUdxYRa74E8LI7Erfs88RTxOF02vL/s1600/lenslot.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="457" data-original-width="629" height="462" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjJrsuEWKkxtoQGzocYookdfKM94XDB-pFy8OqxbyvjKhUk2EH-CltJUf_IKtXy1Lo1YYWD24VfqyysTNpDFcj48vn68qGiYdISijAlKt2LpRYBY1dxUdxYRa74E8LI7Erfs88RTxOF02vL/s640/lenslot.png" width="640" /></a></div>
<span style="font-family: "courier new" , "courier" , monospace;"><br /></span>
<span style="font-family: "courier new" , "courier" , monospace;"><br /></span>
<span style="font-family: "courier new" , "courier" , monospace;"><br /></span>
<span style="font-family: "courier new" , "courier" , monospace;">The point of the bellows or focusing tubes is to vary the magnification of the subject. The farther away the lens is from the camera, the closer the front of the lens can be to it, and larger the image is on the sensor. A fixed adapter from M42 to your camera's mount will work fine.</span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><br /></span>
<span style="font-family: "courier new" , "courier" , monospace;">Focusing is achieved by racking the bellows forwards or away from the slide. Altering magnification by expanding/contracting the bellows also alters focus a little and can be used to fine-tune the focus.</span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><br /></span>
<span style="font-family: "courier new" , "courier" , monospace;">I didn't make my own sildes for this, though the ant used was just stuck on some scotch tape. The box of slides was a generic set purchased online.</span>Beomagihttp://www.blogger.com/profile/00469223835355067867noreply@blogger.com2tag:blogger.com,1999:blog-2974094041951992980.post-22289899704422807342017-07-02T11:28:00.000-07:002020-01-10T05:28:12.404-08:00Chromebook II - a linux laptop<span style="font-family: "courier new" , "courier" , monospace;"><a href="http://beomagi.blogspot.com/2015/05/chromebookery-ii-chromebook-harder.html" target="_blank">My previous foray into chromebooks</a></span><br />
<span style="font-family: "courier new";"></span><br />
<span style="font-family: "courier new";"></span><br />
<span style="font-family: "courier new";"><br /></span>
<span style="font-family: "courier new" , "courier" , monospace;">Edit 2019-04-06:</span><br />
<span style="font-family: "courier new" , "courier" , monospace;">Crouton install has changed a little because of changes in ChromeOS security.</span><br />
<ul>
<li><span style="font-family: "courier new" , "courier" , monospace;">sudo install -Dt /usr/local/bin -m 755 ~/Downloads/crouton</span></li>
<li><span style="font-family: "courier new" , "courier" , monospace;">sudo crouton -r xenial -t xfce-desktop,audio,xorg,xiwi,keyboard,extension</span></li>
</ul>
<div>
<span style="font-family: courier new, courier, monospace;"><br /></span></div>
<span style="font-family: "courier new" , "courier" , monospace;">So it was about time again to get a new laptop. While I did have a recent windows laptop, my wife needed it more than I did, so $500 later, I was the owner of the fairly recent Asus c302 <b><span style="color: #6fa8dc;">C</span><span style="color: #ea9999;">h</span><span style="color: #ffe599;">r</span><span style="color: #9fc5e8;">o</span><span style="color: #b6d7a8;">m</span><span style="color: #ea9999;">e</span><span style="color: #ffd966;">b</span><span style="color: #6fa8dc;">o</span><span style="color: #93c47d;">o</span><span style="color: #e06666;">k</span></b>.</span><br />
<span style="font-family: "courier new" , "courier" , monospace;"></span><span style="font-family: "courier new" , "courier" , monospace;"></span><span style="font-family: "courier new" , "courier" , monospace;"></span><br />
<span style="font-family: "courier new" , "courier" , monospace;">This <b><span style="color: #6fa8dc;">C</span><span style="color: #ea9999;">h</span><span style="color: #ffe599;">r</span><span style="color: #9fc5e8;">o</span><span style="color: #b6d7a8;">m</span><span style="color: #ea9999;">e</span><span style="color: #ffd966;">b</span><span style="color: #6fa8dc;">o</span><span style="color: #93c47d;">o</span><span style="color: #e06666;">k</span></b> is one of the nicest laptops I've ever owned. The all aluminum smooth lines make "it looks like a mac" comments common. The keyboard is wonderful to work on. The screen is above average brightness, full HD and touch capable, decent CPU etc.</span><br />
<span style="font-family: "courier new" , "courier" , monospace;"></span><span style="font-family: "courier new" , "courier" , monospace;"></span><span style="font-family: "courier new" , "courier" , monospace;"></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"></span><span style="font-family: "courier new" , "courier" , monospace;"></span><span style="font-family: "courier new" , "courier" , monospace;"></span><br />
<u><b><span style="font-family: "courier new" , "courier" , monospace;">Specs:</span></b></u><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-family: "courier new" , "courier" , monospace;"><u><b><span style="font-family: "courier new" , "courier" , monospace;"></span><br /></b></u>
<span style="font-family: "courier new" , "courier" , monospace;">The CPU is fairly powerful while sipping current (4.5W "TDP"). Not much different from the MacBook 12". 4GB of RAM is an upgrade compared to my previous 2GB RAM <b><span style="color: #6fa8dc;">C</span><span style="color: #ea9999;">h</span><span style="color: #ffe599;">r</span><span style="color: #9fc5e8;">o</span><span style="color: #b6d7a8;">m</span><span style="color: #ea9999;">e</span><span style="color: #ffd966;">b</span><span style="color: #6fa8dc;">o</span><span style="color: #93c47d;">o</span><span style="color: #e06666;">k</span></b>. I really wish I could get 8 or 16GB but the laptop is proving itself capable even at 4, so no real complaints there. The onboard SSD works at a decent clip, and 64GB is plenty for a <b><span style="color: #6fa8dc;">C</span><span style="color: #ea9999;">h</span><span style="color: #ffe599;">r</span><span style="color: #9fc5e8;">o</span><span style="color: #b6d7a8;">m</span><span style="color: #ea9999;">e</span><span style="color: #ffd966;">b</span><span style="color: #6fa8dc;">o</span><span style="color: #93c47d;">o</span><span style="color: #e06666;">k</span></b>'s standard kit plus some Android apps, and Linux installs. While it does have 2 USB-C ports, I do wish they included the old USB-A 3.0 receptacle. The larger ports would have allowed tiny drives and micro-SD card adapters to fit nearly flush with the case. At the current time, there's nothing for USB-C that fits the bill as "low profile". It does have a regular micro-SD card slot though and I wasted no time dropping in a 128GB card for more storage.</span></span></span><br />
<div>
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-family: "courier new" , "courier" , monospace;"></span><span style="font-family: "courier new" , "courier" , monospace;"></span><br /></span>
<span style="font-family: "courier new" , "courier" , monospace;">Here's what $500 got me:</span><br />
<span style="font-family: "courier new" , "courier" , monospace;">CPU : Core M3 6Y30 (0.9-2.2GHz dual core, hyperthreading)</span><br />
<span style="font-family: "courier new" , "courier" , monospace;">RAM : 4GB</span><br />
<span style="font-family: "courier new" , "courier" , monospace;">Storage : 64GB (emmc)</span><br />
<span style="font-family: "courier new" , "courier" , monospace;">Screen : 12.5" 1920x1080, touch capable, folds for "tablet mode"</span><br />
<span style="font-family: "courier new" , "courier" , monospace;">Battery : 6-8 hours moderate usage, 8ish hours of video playback,<br /> several days of standby</span><br />
<span style="font-family: "courier new" , "courier" , monospace;">Ports : 2 USB-C, a micro SD slot, audio/mic</span><br />
<span style="font-family: "courier new" , "courier" , monospace;">Weight : 2.6 pounds</span><br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjHoKjjUA6EgZX1kc386nqnHOC3XPg2mdY1J6fSYLKw-_TLmqS096nswJGCPeFJ-e0uQslNFBlvlZaxhantllcn9M6wtCr9LIMICzcQ9RKf61-neElWOE6C82nlsreMXyASa-PZgVBj4r4o/s1600/DSC00292.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="1600" data-original-width="1200" height="640" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjHoKjjUA6EgZX1kc386nqnHOC3XPg2mdY1J6fSYLKw-_TLmqS096nswJGCPeFJ-e0uQslNFBlvlZaxhantllcn9M6wtCr9LIMICzcQ9RKf61-neElWOE6C82nlsreMXyASa-PZgVBj4r4o/s640/DSC00292.JPG" width="480" /></a></div>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiD25kyBpDfEiQPaYs2YvFfyFXZURc86LohD6oZILoVUzZxNQtfKLiue8JZeGl7WPHosjNSO8xpyTuCBVtAB-s5Tdl-SlqzG1xBzC5Vi3lSxBseSKv6Pk-3wnaFjwj8d8_tNnH1tVlmZ4w3/s1600/asusc302ca_sides.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="389" data-original-width="1600" height="154" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiD25kyBpDfEiQPaYs2YvFfyFXZURc86LohD6oZILoVUzZxNQtfKLiue8JZeGl7WPHosjNSO8xpyTuCBVtAB-s5Tdl-SlqzG1xBzC5Vi3lSxBseSKv6Pk-3wnaFjwj8d8_tNnH1tVlmZ4w3/s640/asusc302ca_sides.JPG" width="640" /></a></div>
<br /></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-family: "courier new" , "courier" , monospace;"></span><span style="font-family: "courier new" , "courier" , monospace;"></span><br /></span>
<span style="font-family: "courier new" , "courier" , monospace;">My previous Acer cb3 11" is going for $80 on ebay. It's incredible for the price, but sluggish with more than moderate use.</span><br />
<span style="font-family: "courier new" , "courier" , monospace;">The CPU of the Acer 11" cb3 is a Celeron N2840 (baytrail). That CPU runs from 2.16-2.58GHz - and it's trounced by the lower clocked 0.9-2.2GHz </span><span style="font-family: "courier new" , "courier" , monospace;">core</span><span style="font-family: "courier new" , "courier" , monospace;"> </span><span style="font-family: "courier new" , "courier" , monospace;">M3 (skylake). A prime example of how a better IPC ratio works.</span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><br /></span>
<span style="font-family: "courier new" , "courier" , monospace;"><br /></span></div>
<div>
<b><u><span style="font-family: "courier new" , "courier" , monospace;">Pros and Cons of <span style="color: #6fa8dc;">C</span><span style="color: #ea9999;">h</span><span style="color: #ffe599;">r</span><span style="color: #9fc5e8;">o</span><span style="color: #b6d7a8;">m</span><span style="color: #ea9999;">e</span><span style="color: #ffd966;">b</span><span style="color: #6fa8dc;">o</span><span style="color: #93c47d;">o</span><span style="color: #e06666;">k</span>s:</span></u></b></div>
<div>
<b><u><span style="font-family: "courier new" , "courier" , monospace;"><span style="font-family: "courier new" , "courier" , monospace;"></span><span style="font-family: "courier new" , "courier" , monospace;"></span><br /></span></u></b></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace;">The Good:</span></div>
<ul>
<li><span style="font-family: "courier new" , "courier" , monospace;"><span style="color: #6fa8dc;">C</span><span style="color: #ea9999;">h</span><span style="color: #ffe599;">r</span><span style="color: #9fc5e8;">o</span><span style="color: #b6d7a8;">m</span><span style="color: #ea9999;">e</span><span style="color: #ffd966;">b</span><span style="color: #6fa8dc;">o</span><span style="color: #93c47d;">o</span><span style="color: #e06666;">k</span>s are cheap.</span></li>
<li><span style="font-family: "courier new" , "courier" , monospace;">Usually light and slim formfactor.</span></li>
<li><span style="font-family: "courier new" , "courier" , monospace;">Excellent battery life.</span></li>
<li><span style="font-family: "courier new" , "courier" , monospace;">Keyboard dumps lesser used keys, so even small keyboards have larger than average keys.</span></li>
<li><span style="font-family: "courier new" , "courier" , monospace;">The boot time is fantastically short - <10 seconds.</span></li>
<li><span style="font-family: "courier new" , "courier" , monospace;">Relatively decent specs for the price.</span></li>
<li><span style="font-family: "courier new" , "courier" , monospace;">Security - the OS is designed to protect the user from malicious code.</span></li>
<li><span style="font-family: "courier new" , "courier" , monospace;">Recovery - the OS is designed to reset to a new state.</span></li>
<li><span style="font-family: "courier new" , "courier" , monospace;">Backup - The OS is designed to load all user settings and apps from the cloud if wiped or new.</span></li>
<li><span style="font-family: "courier new" , "courier" , monospace;">The OS auto updates.</span></li>
<li><span style="font-family: "courier new" , "courier" , monospace;">NEW <span style="color: #6fa8dc;">C</span><span style="color: #ea9999;">h</span><span style="color: #ffe599;">r</span><span style="color: #9fc5e8;">o</span><span style="color: #b6d7a8;">m</span><span style="color: #ea9999;">e</span><span style="color: #ffd966;">b</span><span style="color: #6fa8dc;">o</span><span style="color: #93c47d;">o</span><span style="color: #e06666;">k</span>s can run Android Apps.</span></li>
<li><span style="font-family: "courier new" , "courier" , monospace;">Can run Linux chroots.</span></li>
<li><span style="font-family: "courier new" , "courier" , monospace;">Linux chroot runs in parallel, no reboot needed.</span></li>
<li><span style="font-family: "courier new" , "courier" , monospace;">Chroot can be backed up, restored, updated in simple one line commands.</span></li>
<li><span style="font-family: "courier new" , "courier" , monospace;">Can manage chroots while still getting full use from ChromeOS.</span></li>
</ul>
<div>
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-family: "courier new" , "courier" , monospace;"></span><span style="font-family: "courier new" , "courier" , monospace;"></span><br /></span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace;">The Bad:</span></div>
<ul>
<li><span style="font-family: "courier new" , "courier" , monospace;">Need to get used to a slightly different kind of keyboard</span></li>
<li><span style="font-family: "courier new" , "courier" , monospace;">ChromeOS itself has a limited selection of offline applications</span></li>
<li><span style="font-family: "courier new" , "courier" , monospace;">Heavy reliance on Google accounts (all your info in one place isn't good)</span></li>
<li><span style="font-family: "courier new" , "courier" , monospace;">Setting up Chroots is mildly technical. The warning screen should be completely blockable but isn't unless you modify the bios.</span></li>
</ul>
<div>
<span style="font-family: "courier new" , "courier" , monospace;">The Ugly:</span></div>
<ul>
<li><span style="font-family: "courier new" , "courier" , monospace;">ChromeOS update potentially can break a chroot install, requiring a chroot update to fix.</span></li>
<li><span style="font-family: "courier new" , "courier" , monospace;">Warning screen is annoying long, and pressing <SPACE> will powerwash the laptop. </span></li>
<li><span style="font-family: "courier new" , "courier" , monospace;">Warning screen cannot be eliminated, but reduced to 2 seconds and beep disabled. Required opening the laptop.</span></li>
</ul>
<div>
<span style="font-family: "courier new" , "courier" , monospace;"></span><span style="font-family: "courier new" , "courier" , monospace;"><br /></span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace;">Given the bad and the ugly, this is still something I really want.</span></div>
<div>
<span style="font-family: "courier new";">once the laptop is opened and warning screen mostly neutered, it's mostly fine. One line backup/restore also mitigates that problem. Stopping the update system when entering linux also prevents updates from breaking a chroot unless you specifically let your laptop update.</span></div>
<div>
<span style="font-family: "courier new";"><br /></span></div>
<div>
<br /></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace;"><br /></span></div>
<span style="font-family: "courier new" , "courier" , monospace;"></span><br />
<u><b><span style="font-family: "courier new" , "courier" , monospace;">My intention:</span></b></u><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-family: "courier new" , "courier" , monospace;"><u><b><span style="font-family: "courier new" , "courier" , monospace;"></span><br /></b></u>
<span style="font-family: "courier new" , "courier" , monospace;">This <b><span style="color: #6fa8dc;">C</span><span style="color: #ea9999;">h</span><span style="color: #ffe599;">r</span><span style="color: #9fc5e8;">o</span><span style="color: #b6d7a8;">m</span><span style="color: #ea9999;">e</span><span style="color: #ffd966;">b</span><span style="color: #6fa8dc;">o</span><span style="color: #93c47d;">o</span><span style="color: #e06666;">k</span></b> is among the first to be released with the intended purpose of running android applications. Initially the Google Play Store wasn't available. This was remedied by switching to the beta channel.</span></span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"></span><span style="font-family: "courier new" , "courier" , monospace;"></span><span style="font-family: "courier new" , "courier" , monospace;"></span><br />
<span style="font-family: "courier new" , "courier" , monospace;">My intended purpose of this was to replace my old "supercheap" Acer <b><span style="color: #6fa8dc;">C</span><span style="color: #ea9999;">h</span><span style="color: #ffe599;">r</span><span style="color: #9fc5e8;">o</span><span style="color: #b6d7a8;">m</span><span style="color: #ea9999;">e</span><span style="color: #ffd966;">b</span><span style="color: #6fa8dc;">o</span><span style="color: #93c47d;">o</span><span style="color: #e06666;">k</span></b> 11 cb3-111. It should be noted that the cb3-111 is trending on ebay at ~$80. This is dirt cheap and actually quite a decent laptop for casual work. This meant I'm really using <b><span style="color: #6fa8dc;">C</span><span style="color: #ea9999;">h</span><span style="color: #ffe599;">r</span><span style="color: #9fc5e8;">o</span><span style="color: #b6d7a8;">m</span><span style="color: #ea9999;">e</span><span style="color: #ffd966;">O</span><span style="color: #6fa8dc;">S</span></b> as a stepping stone to the new Android application the Play Store can provide and the majority of usage is in a Linux chroot.</span><br />
<span style="font-family: "courier new" , "courier" , monospace;"></span><span style="font-family: "courier new" , "courier" , monospace;"></span><span style="font-family: "courier new" , "courier" , monospace;"></span><br />
<span style="font-family: "courier new" , "courier" , monospace;">Setting up a Linux chroot is quite simple. going a step further and removing the write protect screw further helps by reducing a blaring warning screen that dangerously gives the option to overwrite your work by pressing space. That's really it. </span><br />
<ul>
<li><span style="font-family: "courier new" , "courier" , monospace;">put device in developer mode</span></li>
<li><span style="font-family: "courier new" , "courier" , monospace;">download crouton and run to install Linux chroot</span></li>
<li><span style="font-family: "courier new" , "courier" , monospace;">open laptop and remove write protect screw</span></li>
<li><span style="font-family: "courier new" , "courier" , monospace;">run command to shorten warning screen to minimum and stop beep</span></li>
<li><span style="font-family: "courier new" , "courier" , monospace;">put screw back and close laptop</span></li>
</ul>
<div>
<span style="font-family: "courier new" , "courier" , monospace;">That's the plan. </span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace;"></span><span style="font-family: "courier new" , "courier" , monospace;"></span><span style="font-family: "courier new" , "courier" , monospace;"></span><br /></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace;"></span><span style="font-family: "courier new" , "courier" , monospace;"></span><span style="font-family: "courier new" , "courier" , monospace;"></span><br /></div>
<div>
<u><b><span style="font-family: "courier new" , "courier" , monospace;">Get Android and Linux on there:</span></b></u></div>
<div>
<u><b><span style="font-family: "courier new" , "courier" , monospace;"></span><span style="font-family: "courier new" , "courier" , monospace;"></span><span style="font-family: "courier new" , "courier" , monospace;"></span><br /></b></u></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace;">The first thing I did when I got this was just test out the basic functionality. browse the web a little, pull up the system information, run a benchmark or two. Then I put the device on the beta channel and the playstore installed. I didn't see any problems running the beta channel, so I left it. I actually don't seem to be using Android apps much really anyway, so maybe I'll switch to stable later on.</span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace;"></span><span style="font-family: "courier new" , "courier" , monospace;"></span><span style="font-family: "courier new" , "courier" , monospace;"></span><br /></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace;">Next I wanted this to run Linux. Here's the steps:</span></div>
<ul>
<li><span style="font-family: "courier new" , "courier" , monospace;">Enable developer mode (ESC + F3 + Power), ctrl+D on start up. I didn't enable debugger features.</span></li>
<li><span style="font-family: "courier new" , "courier" , monospace;"><span style="font-family: "courier new" , "courier" , monospace;"><span style="font-family: "courier new" , "courier" , monospace;">Download crouton <a href="https://github.com/dnschneid/crouton">https://github.com/dnschneid/crouton</a></span></span></span></li>
<li><span style="font-family: "courier new" , "courier" , monospace;">Open crosh (ctrl+alt+t), type "<span style="color: yellow;">shell</span>" for bash</span></li>
<li><span style="color: yellow; font-family: "courier new" , "courier" , monospace;">cd ~/Downloads</span></li>
<li><span style="color: yellow; font-family: "courier new" , "courier" , monospace;">sudo sh crouton -r xenial -t xfce,xorg,xiwi,extension</span></li>
</ul>
<div>
<span style="font-family: "courier new" , "courier" , monospace;"></span><span style="font-family: "courier new" , "courier" , monospace;"></span><span style="color: yellow;"></span><span style="font-family: "courier new" , "courier" , monospace;"></span><br /></div>
<div>
<u><b><span style="font-family: "courier new" , "courier" , monospace;">Cleaner Linux Setup:</span></b></u></div>
<div>
<u><b><span style="font-family: "courier new" , "courier" , monospace;"></span><span style="font-family: "courier new" , "courier" , monospace;"></span><span style="font-family: "courier new" , "courier" , monospace;"></span><br /></b></u></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace;">That's it. I now have Linux installed. Doing this means booting the laptop is met with a <i>looooong</i> beep on startup and 60 second warning screen saying "OS verification is disabled, press space to re-enable" which will powerwash the <b><span style="color: #6fa8dc;">C</span><span style="color: #ea9999;">h</span><span style="color: #ffe599;">r</span><span style="color: #9fc5e8;">o</span><span style="color: #b6d7a8;">m</span><span style="color: #ea9999;">e</span><span style="color: #ffd966;">b</span><span style="color: #6fa8dc;">o</span><span style="color: #93c47d;">o</span><span style="color: #e06666;">k </span></b>and undo all of this. To get around it I opened the laptop and removed the write protect screw.</span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-family: "courier new" , "courier" , monospace;"></span><br /></span></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh3rfVVKE-cIGi8HfBDFwOTHUGvyc_FT0zjppKgBVhTGXLUIhuQEXGWmBKhjJOh-4AmRyQwRcMAkgNnLBMudQHWw2vkdyf-aKea6jVWEr4Fwc7RwxlU9nqpIpXuBAczbYeSkBY99l8A4Iuw/s1600/P1019281.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><span style="font-family: "courier new" , "courier" , monospace;"><img border="0" data-original-height="1200" data-original-width="1600" height="480" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh3rfVVKE-cIGi8HfBDFwOTHUGvyc_FT0zjppKgBVhTGXLUIhuQEXGWmBKhjJOh-4AmRyQwRcMAkgNnLBMudQHWw2vkdyf-aKea6jVWEr4Fwc7RwxlU9nqpIpXuBAczbYeSkBY99l8A4Iuw/s640/P1019281.JPG" width="640" /></span></a></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace;">Do yourself a favor and use a GOOD screwdriver to handle the screws. Cheap metal tips can strip the screw head - and then you're screwed. You need a fine T5 torx tip to get at them too. </span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace;"></span><br /></div>
<div class="separator" style="clear: both; text-align: center;">
</div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjkcWQGkr198TZ9VBReUJKHPUIAF46AOBYSwikf0KNLsemCb39c6Dk-JhxcBSYdRkBx8M-FWvEzPs0xMOthqtj25PIyP4hqWCenHxQ-ige55KQz7N4a9xaote75rZgCtrIYai7Wvhy2rqcS/s1600/PO298052h.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><span style="font-family: "courier new" , "courier" , monospace;"><img border="0" data-original-height="1200" data-original-width="1600" height="480" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjkcWQGkr198TZ9VBReUJKHPUIAF46AOBYSwikf0KNLsemCb39c6Dk-JhxcBSYdRkBx8M-FWvEzPs0xMOthqtj25PIyP4hqWCenHxQ-ige55KQz7N4a9xaote75rZgCtrIYai7Wvhy2rqcS/s640/PO298052h.JPG" width="640" /></span></a></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace;">The write protect screw is under a padded flap (circled in the image above). Unscrew and remove for now. </span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-family: "courier new" , "courier" , monospace;"></span><br /></span>
<span style="font-family: "courier new" , "courier" , monospace;"></span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace;">Just as two years before, the following commands are run to reduce the delay and disable the beep:</span></div>
<div>
<span style="color: yellow; font-family: "courier new" , "courier" , monospace;">sudo /usr/share/vboot/bin/set_gbb_flags.sh 0x1<br />sudo /usr/share/vboot/bin/set_gbb_flags.sh 0x8</span></div>
<div>
<span style="color: yellow;"><span style="font-family: "courier new" , "courier" , monospace;"></span><span style="font-family: "courier new" , "courier" , monospace;"></span><span style="font-family: "courier new" , "courier" , monospace;"></span><br /></span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace;">I should note that after this the delay was still there. I had to enter these in crosh again to get it working. Not sure what happened there.</span></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj-TP3Fvb8YgRXnqHQhYm0P5S0PKlbHqjwSr8ybGZj_GoIM7CXO334TpjshGxwwIhJdBRp3Hg2PTQSfveg8o3TwwB0YrpkwIIXoxxK00xOtGBdld8LrU8Y1CvReSAtaO-ZD5uzLyLXagT2Q/s1600/PO298048.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><span style="font-family: "courier new" , "courier" , monospace;"><img border="0" data-original-height="1600" data-original-width="1200" height="640" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj-TP3Fvb8YgRXnqHQhYm0P5S0PKlbHqjwSr8ybGZj_GoIM7CXO334TpjshGxwwIhJdBRp3Hg2PTQSfveg8o3TwwB0YrpkwIIXoxxK00xOtGBdld8LrU8Y1CvReSAtaO-ZD5uzLyLXagT2Q/s640/PO298048.JPG" width="480" /></span></a></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace;"></span><span style="font-family: "courier new" , "courier" , monospace;"></span><span style="font-family: "courier new" , "courier" , monospace;"></span><br /></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace;"></span><span style="font-family: "courier new" , "courier" , monospace;"></span><span style="font-family: "courier new" , "courier" , monospace;"></span><br /></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace;"></span><span style="font-family: "courier new" , "courier" , monospace;"></span><span style="font-family: "courier new" , "courier" , monospace;"></span><br /></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace;"></span><span style="font-family: "courier new" , "courier" , monospace;"></span><span style="font-family: "courier new" , "courier" , monospace;"></span><br /></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace;"></span><span style="font-family: "courier new" , "courier" , monospace;"></span><br /></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace;">in order to develop stuff for servers, if you want to host anything:</span><br />
<span style="font-family: "courier new" , "courier" , monospace;">in crouton, install IP tables:</span></div>
<div>
<span style="color: yellow; font-family: "courier new" , "courier" , monospace;">sudo apt-get install iptables</span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace;"></span><span style="font-family: "courier new" , "courier" , monospace;"></span><span style="color: yellow;"></span><span style="font-family: "courier new" , "courier" , monospace;"></span><br /></div>
<div>
<span style="color: yellow; font-family: "courier new" , "courier" , monospace;">vi /etc/rc.local</span></div>
<div>
<span style="color: yellow; font-family: "courier new" , "courier" , monospace;">add:</span></div>
<div>
<div>
<span style="color: yellow; font-family: "courier new" , "courier" , monospace;">/sbin/iptables -P INPUT ACCEPT</span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace;"></span><span style="font-family: "courier new" , "courier" , monospace;"></span><span style="color: yellow;"></span><span style="font-family: "courier new" , "courier" , monospace;"></span><br /></div>
</div>
<div>
<span style="font-family: "courier new" , "courier" , monospace;"></span><span style="font-family: "courier new" , "courier" , monospace;"></span><span style="color: yellow;"></span><span style="font-family: "courier new" , "courier" , monospace;"></span><br /></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace;"></span><span style="font-family: "courier new" , "courier" , monospace;"></span><br /></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace;">Linux gaming lives! just install libraries for i386 as a lot of game binaries are still 32bit, not 64.</span><span style="font-family: "courier new" , "courier" , monospace;"></span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace;">libraries for games:</span><br />
<span style="font-family: "courier new" , "courier" , monospace;"></span><span style="font-family: "courier new" , "courier" , monospace;"></span><span style="font-family: "courier new" , "courier" , monospace;"></span><br />
<span style="color: yellow; font-family: "courier new" , "courier" , monospace;">sudo dpkg --add-architecture i386</span><br />
<span style="color: yellow; font-family: "courier new" , "courier" , monospace;">sudo apt-get update</span><br />
<span style="color: yellow; font-family: "courier new" , "courier" , monospace;">sudo apt-get upgrade</span><br />
<span style="color: yellow; font-family: "courier new" , "courier" , monospace;">sudo apt-get install libjson0:i386</span></div>
<div>
<div>
<span style="color: yellow; font-family: "courier new" , "courier" , monospace;">sudo apt-get install libopenal1:i386</span></div>
</div>
<div>
<div>
<span style="color: yellow; font-family: "courier new" , "courier" , monospace;">sudo apt-get install libgl1-mesa-glx:i386</span></div>
</div>
<div>
<span style="color: yellow; font-family: "courier new" , "courier" , monospace;">sudo apt-get install openssl:i386</span><br />
<span style="color: yellow; font-family: "courier new" , "courier" , monospace;">sudo apt-get install lib32z1</span><br />
<span style="color: yellow; font-family: "courier new" , "courier" , monospace;">sudo apt-get install libgtk2.0-0:i386 libidn11:i386 libglu1-mesa:i386 libxmu6:i386</span><br />
<span style="color: yellow; font-family: "courier new" , "courier" , monospace;">sudo apt-get install libpangox-1.0-0:i386 libpangoxft-1.0-0:i386</span></div>
<div>
<span style="color: yellow; font-family: "courier new" , "courier" , monospace;">sudo apt autoremove</span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace;"></span><span style="font-family: "courier new" , "courier" , monospace;"></span><span style="color: yellow;"></span><span style="font-family: "courier new" , "courier" , monospace;"></span><br /></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace;"></span><span style="font-family: "courier new" , "courier" , monospace;"><br /></span>
<span style="font-family: "courier new" , "courier" , monospace;">Lets make crouton a little easier to manage...</span><br />
<span style="font-family: "courier new" , "courier" , monospace;"></span><br /></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace;">C<span style="font-family: "courier new" , "courier" , monospace;">reate the following files in /usr/local/bin:</span></span><br />
<span style="color: cyan;"><span style="font-family: "courier new" , "courier" , monospace;">l<span style="font-family: "courier new" , "courier" , monospace;">inux-backup:</span></span></span><br />
<span style="color: #ffe599; font-family: "courier new" , "courier" , monospace;">sudo edit-chroot -b -c /mnt/stateful_partition/chroots xenial</span><br />
<span style="font-family: "courier new" , "courier" , monospace;"></span></div>
<div>
<span style="color: cyan;"><span style="font-family: "courier new" , "courier" , monospace;">l<span style="font-family: "courier new" , "courier" , monospace;">inux-restore:</span></span></span></div>
<div>
<span style="color: #ffe599; font-family: "courier new" , "courier" , monospace;">sudo sh ~/Downloads/crouton -f -$1</span></div>
<div>
<span style="color: cyan; font-family: "courier new" , "courier" , monospace;">linux-update:</span></div>
<div>
<div>
<span style="color: #ffe599; font-family: "courier new" , "courier" , monospace;">sudo sh ~/Downloads/crouton -u -n xenial</span></div>
<div>
<span style="color: cyan; font-family: "courier new" , "courier" , monospace;">linux-xiwi:</span></div>
<div>
<div>
<span style="color: #ffe599; font-family: "courier new" , "courier" , monospace;">sudo /sbin/initctl stop update-engine</span></div>
<span style="color: #ffe599; font-family: "courier new" , "courier" , monospace;">sudo startxfce4 -X xiwi</span></div>
<div>
<span style="color: cyan; font-family: "courier new" , "courier" , monospace;">Linux-xorg:</span></div>
<div>
<span style="color: #ffe599; font-family: "courier new" , "courier" , monospace;">sudo /sbin/initctl stop update-engine</span></div>
<div>
<span style="color: #ffe599; font-family: "courier new" , "courier" , monospace;">sudo startxfce4 -X xorg</span></div>
<div>
<span style="color: #ffe599; font-family: "courier new" , "courier" , monospace;"><br /></span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace;">This simplifies your management of the setup chroot. Just type "linux-update" to update the chroot. Or "linux-restore [archive]" to restore from an archive.</span></div>
<div>
<br /></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace;">I've added stopping the ChromeOS updater as well to whenever the chroot is started. The reason for this is sometimes an update can stop the chroot from starting. This prevents that from happening unexpectedly. Automatic updates are awesome, but I much prefer control over it when it can break something. If I'm traveling for example, and happen to get wifi access momentarily, I wouldn't want an update pushed preventing me from using Linux for the rest of the trip.</span></div>
<div>
<br /></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace;">Last thing - within the chroot, make a script:</span></div>
<div>
<span style="color: cyan; font-family: "courier new" , "courier" , monospace;">remountSD:</span></div>
<div>
<span style="color: #ffe599; font-family: "courier new" , "courier" , monospace;">sudo mount -o remount,exec /var/host/media/removable/SD\ card</span></div>
<div>
<span style="color: #ffe599; font-family: "courier new" , "courier" , monospace;"><br /></span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace;">Normally removable media is mounted with noexec, so you can't execute binaries and scripts. Running this will remount it so you can. In this case, the label of my microSD was "SD card" so adjust that line to suit your needs.</span></div>
</div>
Beomagihttp://www.blogger.com/profile/00469223835355067867noreply@blogger.com0tag:blogger.com,1999:blog-2974094041951992980.post-78737014662298143582017-03-20T17:36:00.001-07:002017-03-20T17:40:09.148-07:00Nerf - or knocking over water bottles with foam...<span style="font-family: "courier new" , "courier" , monospace;">So I got into nerf blasters recently. For me that means not only getting a blaster and darts but looking at ways to increase potential. How can I make it fire darts faster and more accurately. </span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-family: "courier new" , "courier" , monospace;"><br /></span>
<span style="font-family: "courier new" , "courier" , monospace;">It's a nice way to unwind, and leave any workstress behind. I'm sure some view an actual firing range as perfect for this - but for me, knocking over empty Poland Springs water bottles in the comfort of my living room is perfect 😁. That's really all I'm doing - knocking over a row of water bottles.</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-family: "courier new" , "courier" , monospace;"><br /></span>
<span style="font-family: "courier new" , "courier" , monospace;">There's various types of mechanisms for launching darts. Spring based blasters force a piston down a tube compressing air quickly forcing a dart from a barrel. Flywheel based blasters use two spinning flywheels to project a dart. Air blasters build up air in a chamber, usually by pumping - and then eject the air all at once.</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-family: "courier new" , "courier" , monospace;"><br /></span>
<span style="font-family: "courier new" , "courier" , monospace;">I started with buying a few spring based blasters. There's no spinup time like electric blasters, and while compressed air blasters are the most powerful, I haven't seen that many. They're there, but really require modding to bring out their full potential.</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-family: "courier new" , "courier" , monospace;"><br /></span>
</span><br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjItBW0s-MMtOH8w9bXb25aOCcXHgJ5fQ0lUanTCjfjBuM-3U7mRKTjx4Qj9XyG901BlF8FM0QzgPuJJcrR3MvwjFXUKLTiAGVtlNnNLSQ06mdkuYjH9j6_jOJEhigSeodEsz_IEGgXfbts/s1600/PO287643.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><span style="font-family: "courier new" , "courier" , monospace;"><img border="0" height="480" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjItBW0s-MMtOH8w9bXb25aOCcXHgJ5fQ0lUanTCjfjBuM-3U7mRKTjx4Qj9XyG901BlF8FM0QzgPuJJcrR3MvwjFXUKLTiAGVtlNnNLSQ06mdkuYjH9j6_jOJEhigSeodEsz_IEGgXfbts/s640/PO287643.JPG" width="640" /></span></a></div>
<span style="font-family: "courier new" , "courier" , monospace;">One of the first blasters I went for was the above hammershot. Painted it, changed the spring, added a spacer for tension, sealed the plunger tube spaces better. A little tape for a tighter o-ring fit, and alternate 7 shot brass barrel from ebay. For comfort, I added the tennis racket handle wrap. Nice one handed blaster - but not quite powerful to really aim accurately.</span><br />
<div class="separator" style="clear: both; text-align: center;">
<span style="font-family: "courier new" , "courier" , monospace;"><br /></span></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj-KIDKqtboEVJTz8gkInbeGWi282Su8nohmumHKvrbyMoiNRqV4sY_k5i4cun0RKLDZ1nTE_TIv6dGsiz1QUkr2NvhZ60Akt1AgGiC1qACuR2JFS24pPwzgH1N6eaPblbko-Q7oRRrtWcl/s1600/P1019270.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><span style="font-family: "courier new" , "courier" , monospace;"><img border="0" height="480" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj-KIDKqtboEVJTz8gkInbeGWi282Su8nohmumHKvrbyMoiNRqV4sY_k5i4cun0RKLDZ1nTE_TIv6dGsiz1QUkr2NvhZ60Akt1AgGiC1qACuR2JFS24pPwzgH1N6eaPblbko-Q7oRRrtWcl/s640/P1019270.JPG" width="640" /></span></a></div>
<span style="font-family: "courier new" , "courier" , monospace;">Here's how The spacer was created - A roll of paper and 3d pen. A 3d pen is like the end tip of a 3d printer - but controlled by your hand.</span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-family: "courier new" , "courier" , monospace;"><br /></span>
</span><br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjh0iyVasrYE3-EYpDKBSAOfDpYdBbf95KzsLBOHAAWO4Oe3Cf_Akd6nO7LEJnZzusEZI_3I8ili86POqYnT1LQrIphaJT19CfS3CYljrhWSDCd0FpCgcDF4FXauRgGSOxc8ZewJ_13T2ag/s1600/P1019271.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><span style="font-family: "courier new" , "courier" , monospace;"><img border="0" height="480" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjh0iyVasrYE3-EYpDKBSAOfDpYdBbf95KzsLBOHAAWO4Oe3Cf_Akd6nO7LEJnZzusEZI_3I8ili86POqYnT1LQrIphaJT19CfS3CYljrhWSDCd0FpCgcDF4FXauRgGSOxc8ZewJ_13T2ag/s640/P1019271.JPG" width="640" /></span></a></div>
<span style="font-family: "courier new" , "courier" , monospace;">The spacer keep the spring under more tension, meaning more force and faster compression in the plunger tube. The roll of paper keeps the spacer hollow for the orange guide rod to pass.</span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-family: "courier new" , "courier" , monospace;"><br /></span>
<span style="font-family: "courier new" , "courier" , monospace;">While I was very pleased with the handling and look of the hammershot,I wasn't content with the performance. I also think that with a stronger spring than I was already using I'd break it. I picked up a cycloneshock next. The cycloneshock is another revolver but uses larger darts. By using a barrel mod, It fires the regular sized darts much much harder than other blasters. an extra spring at the back from another blaster and you're getting.</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-family: "courier new" , "courier" , monospace;"><br /></span>
<span style="font-family: "courier new" , "courier" , monospace;">From searching forums, one of the weakpoints of the cycloneshock is the plunger rod where the springs push against. 3D pen to the rescue. Some grinding later and it fits perfectly while keeping the rod from bending.</span></span><br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhNmPVAdep3mn-Y3GMG7LpG-U5SHR3bYgg4VjLJEoZ58kY8rFHTnuRqqf4f0llYFqbC_MNINiJV-p6dUzhJ2imML8flez-KUBsxilyQOeSLCpCxg6-y800A2c0x3bgF975UvEZOlgQTEgRq/s1600/P1019269.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><span style="font-family: "courier new" , "courier" , monospace;"><img border="0" height="480" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhNmPVAdep3mn-Y3GMG7LpG-U5SHR3bYgg4VjLJEoZ58kY8rFHTnuRqqf4f0llYFqbC_MNINiJV-p6dUzhJ2imML8flez-KUBsxilyQOeSLCpCxg6-y800A2c0x3bgF975UvEZOlgQTEgRq/s640/P1019269.JPG" width="640" /></span></a></div>
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-family: "courier new" , "courier" , monospace;"><br /></span>
<span style="font-family: "courier new" , "courier" , monospace;">After modding these of course I had to try building my own. </span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-family: "courier new" , "courier" , monospace;"><br /></span>
<span style="font-family: "courier new" , "courier" , monospace;">Turns out pneumatics are really interesting. Compressed air can do so much. Here's the gist. Using a pump - like a bike pump, to send air through one type of valve - a Quick Exhaust Valve, the air gets stored in a "tank". When ready to fire, lowering the pressure on the side of the QEV where it's getting pumped causes all the air to rush out from the tank. It's more efficient than using a regular switch, since as the switch is opening, the rate of exhaust starts slow. With the QEV, the air flow hits maximum almost immediately.</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-family: "courier new" , "courier" , monospace;"><br /></span>
<span style="font-family: "courier new" , "courier" , monospace;">The basics of the QEV can be seen below.</span></span><br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiMc1cqSQ0e1J1RwlJSJsEcMEXZhpRUmG42Hheflps9L6exIK6AJbdTc-lQVyMrpaXMnvu2I6WRMxxLcsxiH8e96opi32T3OA4FO1YLI0Y98S0j8bAK4jgDeghr7zfLBhPF8GtASQBArO5K/s1600/QEV+basic.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><span style="font-family: "courier new" , "courier" , monospace;"><img border="0" height="434" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiMc1cqSQ0e1J1RwlJSJsEcMEXZhpRUmG42Hheflps9L6exIK6AJbdTc-lQVyMrpaXMnvu2I6WRMxxLcsxiH8e96opi32T3OA4FO1YLI0Y98S0j8bAK4jgDeghr7zfLBhPF8GtASQBArO5K/s640/QEV+basic.png" width="640" /></span></a></div>
<div class="separator" style="clear: both; text-align: center;">
<span style="font-family: "courier new" , "courier" , monospace;"><br /></span></div>
<span style="font-family: "courier new" , "courier" , monospace;">Since the pump and release valve are at the same port on the QEV, a tee fitting works fine there. At the start, the release valve is closed. As you pump, the QEV directs air to the tank. The system pressure builds. the air between the pump, through the tee, through the QEV and in the tank is all the same pressure. When firing, the release valve opens and air rushes from the tee. As air starts flowing from the tank to the tee, it trips the QEV exhaust valve, and instead rushes out to the barrel.</span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-family: "courier new" , "courier" , monospace;"><br /></span>
</span><br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjji8R9Jw0BLg2ecdDLQ3xioDnPIV7Ebz4Zk_gvvLsNU0wNjLN9Dr2MviDvyCXIsM6ddc1sWV5c-zmI9MD2KEGy7PiamiHjjCip8TTmKyhNCVAdgpSpS1WB-RAXAmNz7ASQqm6LBir2t4df/s1600/PO237482.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><span style="font-family: "courier new" , "courier" , monospace;"><img border="0" height="360" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjji8R9Jw0BLg2ecdDLQ3xioDnPIV7Ebz4Zk_gvvLsNU0wNjLN9Dr2MviDvyCXIsM6ddc1sWV5c-zmI9MD2KEGy7PiamiHjjCip8TTmKyhNCVAdgpSpS1WB-RAXAmNz7ASQqm6LBir2t4df/s640/PO237482.JPG" width="640" /></span></a></div>
<span style="font-family: "courier new" , "courier" , monospace;">Putting this into practice isn't quite as hard as you may think. I definitely overbuilt my first blaster, with too large a tank, too high a pressure potential, and too much space between the release valve and QEV. The release valve does "waste" a little air to create the low pressure for the QEV - but it's miniscule in proportion to the air in the tank - it's the air between the pump and QEV that will rush out. In my build I redirect it to the back of the barrel - bit pointless since it's not going to add any extra performance really.</span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-family: "courier new" , "courier" , monospace;"><br /></span>
<span style="font-family: "courier new" , "courier" , monospace;">How hard can this overbuilt steampunkish blaster hit?</span></span><br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgD1AKAhX8LGnhrFa3gVsq95WF5XNaWoQvaSYcG-eSE9h7tQKxJ8-j1Y_xhFvDb9a6-Xz92ont6PtVXKNmqfLgfJEem4rQnYfnkPRly-iR8zKaeo-q0DFtwpWQJPro6lk1zpa-OELoBW9H9/s1600/PO237487.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><span style="font-family: "courier new" , "courier" , monospace;"><img border="0" height="480" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgD1AKAhX8LGnhrFa3gVsq95WF5XNaWoQvaSYcG-eSE9h7tQKxJ8-j1Y_xhFvDb9a6-Xz92ont6PtVXKNmqfLgfJEem4rQnYfnkPRly-iR8zKaeo-q0DFtwpWQJPro6lk1zpa-OELoBW9H9/s640/PO237487.jpg" width="640" /></span></a></div>
<span style="font-family: "courier new" , "courier" , monospace;">Really. Freaking. Hard.</span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-family: "courier new" , "courier" , monospace;"><br /></span>
<span style="font-family: "courier new" , "courier" , monospace;">Next up - make a spring based blaster and another air powered one that's more comfortable and practical. Perhaps design a barrel that can take a standard nerf magazine for reloading...</span></span>Beomagihttp://www.blogger.com/profile/00469223835355067867noreply@blogger.com2tag:blogger.com,1999:blog-2974094041951992980.post-32611667262635884052016-09-26T13:50:00.001-07:002016-09-27T08:19:49.617-07:00Odroid XU4 - My new NAS<span style="font-family: "courier new" , "courier" , monospace;"><b>Few thoughts on ARM:</b></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-family: "courier new" , "courier" , monospace;"><br /></span>
<span style="font-family: "courier new" , "courier" , monospace;">ARM has been kicking ass and taking names for several years now. It's no surprise that other companies would want to acquire it - Japanese company SoftBank finished it's acquisition of ARM a couple days ago, at an astonishing $32 Billion.</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-family: "courier new" , "courier" , monospace;"><br /></span>
<span style="font-family: "courier new" , "courier" , monospace;">ARM doesn't make anything physically - but they do create CPU designs and license them. ARM based processors are found everywhere today - in cameras, routers, smart TV, cellphones, game consoles, laptops, even servers.</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-family: "courier new" , "courier" , monospace;"><br /></span>
<span style="font-family: "courier new" , "courier" , monospace;">For ARM based servers, the goal is energy efficiency where raw performance is secondary. Rarely would one look at arm over the standard x86 and consider it for a performance advantage. Even newer Atom processors (though the line is effectively dead *supposedly?*) is generally more powerful.</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-family: "courier new" , "courier" , monospace;"><br /></span>
<span style="font-family: "courier new" , "courier" , monospace;">There are many use cases where processing power isn't quite necessary though. When I/O is the bottleneck, or where we need reliability, or need to keep a server running with little power, the importance of fast processors is far less. In multiprocessing environments, where a few heavy CPU bound processes can stymie a fast processor with low core count, a slower processor with high core count can still stay operational, letting a user do whatever else they may need to do.</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-family: "courier new" , "courier" , monospace;"><br /></span>
<span style="font-family: "courier new" , "courier" , monospace;"><b><br /></b></span>
<span style="font-family: "courier new" , "courier" , monospace;"><b>On the Odroid-xu4:</b></span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-family: "courier new" , "courier" , monospace;"><br /></span></span>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj7wDo9dDRolzBJHeNC9VYJlLm8kqGxlFZBFs_JcFBOgp0SdTP3tje3VhIslsOMA9v7BJ2EMZJOVizr2Qd2K4UfPiVOLuElSAUw6sBnCPCbBkCmV0I81QYlM8Qz4ePq34cAMdL_fmZwqud6/s1600/PO287029.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="480" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj7wDo9dDRolzBJHeNC9VYJlLm8kqGxlFZBFs_JcFBOgp0SdTP3tje3VhIslsOMA9v7BJ2EMZJOVizr2Qd2K4UfPiVOLuElSAUw6sBnCPCbBkCmV0I81QYlM8Qz4ePq34cAMdL_fmZwqud6/s640/PO287029.JPG" width="640" /></a></div>
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-family: "courier new" , "courier" , monospace;"><br /></span></span>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjIGHq1DCNxR-4AnXd8KrFdYZ_z_gCcJ1Q608fDlKutNTTRXdlt19xbv1mpk7ny8j1pVa4BNMgZRyctkYieH4UsVETIRw1YpOwq5QpF8cKx47KZXNVjKVJI1Dfl__I6wtizwiWK8oHTgjph/s1600/PO287028.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="480" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjIGHq1DCNxR-4AnXd8KrFdYZ_z_gCcJ1Q608fDlKutNTTRXdlt19xbv1mpk7ny8j1pVa4BNMgZRyctkYieH4UsVETIRw1YpOwq5QpF8cKx47KZXNVjKVJI1Dfl__I6wtizwiWK8oHTgjph/s640/PO287028.JPG" width="640" /></a></div>
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-family: "courier new" , "courier" , monospace;"><br /></span>
<span style="font-family: "courier new" , "courier" , monospace;">A good use case would be a webserver, file storage or network cache system (memcached, cachewho [my own thing...]), home automation server. For my own purchase of an Odroid-xu4, I am using it as a NAS, with minor web/development jobs.</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-family: "courier new" , "courier" , monospace;"><br /></span>
<span style="font-family: "courier new" , "courier" , monospace;">Here's the specs on the little bugger:</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="color: #f9cb9c;">CPU</span> : <span style="color: #6fa8dc;">Samsung Exynos 5422 (2GHz Cortex A15 x4 + 1.3GHz Cortex A7 x4)</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="color: #f9cb9c;">RAM</span> : <span style="color: #6fa8dc;">2GB LPDDR3, 933MHz (16bit interface, 14.9 GBps bandwidth)</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="color: #f9cb9c;">GPU</span> :<span style="color: #6fa8dc;"> Mali-T628</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="color: #f9cb9c;">Video</span> :<span style="color: #6fa8dc;"> HDMI (standard type-A), 1080p capable</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="color: #f9cb9c;">Audio</span> :<span style="color: #6fa8dc;"> HDMI, i2s (no audio jack)</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="color: #f9cb9c;">USB3.0</span> : <span style="color: #6fa8dc;">2 ports</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="color: #f9cb9c;">USB2.0</span> : <span style="color: #6fa8dc;">1 port</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="color: #f9cb9c;">Storage</span> : <span style="color: #6fa8dc;">EMMC, Micro-SD</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="color: #f9cb9c;">Network</span> : <span style="color: #6fa8dc;">RJ-45, Gigabit Ethernet</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="color: #f9cb9c;">GPIO </span><span style="color: #6fa8dc;"> : </span><span style="color: #6fa8dc;">30pin + 12pin section (i2s, i2c, spi, ADC etc.)</span></span><br />
<div>
<span style="font-family: "courier new" , "courier" , monospace;"><span style="color: #6fa8dc; font-family: "courier new" , "courier" , monospace;">
</span></span>
<br />
<div>
<span style="font-family: "courier new" , "courier" , monospace;"><span style="color: #6fa8dc; font-family: "courier new" , "courier" , monospace;"><span style="font-family: "courier new" , "courier" , monospace;"><span style="color: #6fa8dc; font-family: "courier new" , "courier" , monospace;"><br /></span></span></span></span></div>
<span style="font-family: "courier new" , "courier" , monospace;"><span style="color: #6fa8dc; font-family: "courier new" , "courier" , monospace;">
</span></span></div>
<span style="font-family: "courier new" , "courier" , monospace;">
<span style="font-family: "courier new" , "courier" , monospace;">Possible uses:</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="color: #93c47d;">HTPC</span> - video out via HDMI means this is a compact way to create an HTPC system. various operating systems are supported - several Linux distributions, and even Android.</span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="color: #93c47d;">NAS</span> - Standard Linux isn't too hard to turn into a NAS, but there's also dedicated storage distros like Open Media Vault.</span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="color: #93c47d;">Web Server </span>- Python, Ruby, Apache, Nginx, PHP, Node - loads of ways to get a web app running here.</span><br />
<span style="font-family: "courier new" , "courier" , monospace;">Media Streaming - Plex can turn this into a media streaming server.</span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-family: "courier new" , "courier" , monospace;"><span style="color: #93c47d;">Home Automation </span>- Much in the same manner as a Raspberry PI can be used. This is probably a little less optimal, since the extra power over a Raspberry PI isn't really needed.</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-family: "courier new" , "courier" , monospace;"><span style="font-family: "courier new" , "courier" , monospace;"><span style="color: #93c47d;">Robotics</span> - GPIO pins can communicate with servo boards and arduinos and other devices giving control over mechanical parts, input for sensors, and the device of course packs a lot of processing capability.</span></span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-family: "courier new" , "courier" , monospace;"><span style="font-family: "courier new" , "courier" , monospace;"><br /></span>
<span style="font-family: "courier new" , "courier" , monospace;">The advantages of this over an x86 device:</span></span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="color: #6fa8dc;">Cost</span> - $80 + SD card ($10?). x86 devices are quite cheap if you go with Atom, though not quite at this level. If you do find one, it's usually not a complete system, or lacks USB 3.0/gigabit ethernet.</span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="color: #6fa8dc;">Noise</span> - very quiet fan, optional no noise case. Not really much of an advantage over Atom which doesn't need a fan in many cases either.</span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="color: #6fa8dc;">Size</span> - while there ARE Intel Stick PC devices, they are lacking some connectivity - often USB3.0 and/or Gigabit Ethernet. The combination of these is necessary for a decent NAS, or any server where you want fast transfers. Looking at devices that offer USB3.0/Gigabit Ethernet means lots more money.</span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-family: "courier new" , "courier" , monospace;"><br /></span>
<span style="font-family: "courier new" , "courier" , monospace;">NB: recent SolidRun board can give this a run for its money, though it's more expensive, with some options at several times the price.</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><a href="http://techreport.com/news/30699/solidrun-microsom-offers-braswell-cpus-on-a-tiny-package">http://techreport.com/news/30699/solidrun-microsom-offers-braswell-cpus-on-a-tiny-package</a></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-family: "courier new" , "courier" , monospace;"><br /></span>
<span style="font-family: "courier new" , "courier" , monospace;"><br /></span>
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-family: "courier new" , "courier" , monospace;"><span style="font-family: "courier new" , "courier" , monospace;"><br /></span></span>
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-family: "courier new" , "courier" , monospace;"><br /></span></span>
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-family: "courier new" , "courier" , monospace;"><b>Why Odroid-xu4? Why not a Raspberry PI which has more community support?</b></span></span></span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-family: "courier new" , "courier" , monospace;"><br /></span>
<span style="font-family: "courier new" , "courier" , monospace;">I'm making a huge deal about Gigabit Ethernet and USB3.0 over the usual USB2.0 and 10/100Mbps Ethernet, because it's quite relevant to current media types.</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-family: "courier new" , "courier" , monospace;"><br /></span>
<span style="font-family: "courier new" , "courier" , monospace;"><br /></span>
<span style="font-family: "courier new" , "courier" , monospace;">
<span style="font-family: "courier new" , "courier" , monospace;">A Raspberry Pi 3 is a powerful device for it's size and cost being the same credit-card size as the XU4 with a retail value of $40. It has a solid quad core CPU, but USB2.0 and 100Mbps Ethernet. It's certainly usable for a storage server, but reading from a disk would be limited to the slowest speed in the chain - 12.5MBps. That's mind numbingly slow when you're syncing a terabyte or six. </span></span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-family: "courier new" , "courier" , monospace;"><span style="font-family: "courier new" , "courier" , monospace;"><br /></span></span>
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-family: "courier new" , "courier" , monospace;"><br /></span>
<span style="font-family: "courier new" , "courier" , monospace;">For perspective, lets consider how different bandwidths handle 1 TB of data:</span></span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-family: "courier new" , "courier" , monospace;"><span style="font-family: "courier new" , "courier" , monospace;">┌</span><span style="font-family: "courier new" , "courier" , monospace;">─</span><span style="font-family: "courier new" , "courier" , monospace;">─</span><span style="font-family: "courier new" , "courier" , monospace;">─</span><span style="font-family: "courier new" , "courier" , monospace;">─</span><span style="font-family: "courier new" , "courier" , monospace;">─</span><span style="font-family: "courier new" , "courier" , monospace;">─</span><span style="font-family: "courier new" , "courier" , monospace;">─</span><span style="font-family: "courier new" , "courier" , monospace;">─</span><span style="font-family: "courier new" , "courier" , monospace;">─</span><span style="font-family: "courier new" , "courier" , monospace;">─</span><span style="font-family: "courier new" , "courier" , monospace;">─</span><span style="font-family: "courier new" , "courier" , monospace;">─</span><span style="font-family: "courier new" , "courier" , monospace;">─</span><span style="font-family: "courier new" , "courier" , monospace;">─</span><span style="font-family: "courier new" , "courier" , monospace;">─</span><span style="font-family: "courier new" , "courier" , monospace;">─</span><span style="font-family: "courier new" , "courier" , monospace;">─┬</span><span style="font-family: "courier new" , "courier" , monospace;">─</span><span style="font-family: "courier new" , "courier" , monospace;">─</span><span style="font-family: "courier new" , "courier" , monospace;">─</span><span style="font-family: "courier new" , "courier" , monospace;">─</span><span style="font-family: "courier new" , "courier" , monospace;">─</span><span style="font-family: "courier new" , "courier" , monospace;">─</span><span style="font-family: "courier new" , "courier" , monospace;">─</span><span style="font-family: "courier new" , "courier" , monospace;">─</span><span style="font-family: "courier new" , "courier" , monospace;">─</span><span style="font-family: "courier new" , "courier" , monospace;">─</span><span style="font-family: "courier new" , "courier" , monospace;">─</span><span style="font-family: "courier new" , "courier" , monospace;">─</span><span style="font-family: "courier new" , "courier" , monospace;">─</span><span style="font-family: "courier new" , "courier" , monospace;">─</span><span style="font-family: "courier new" , "courier" , monospace;">─</span><span style="font-family: "courier new" , "courier" , monospace;">─</span><span style="font-family: "courier new" , "courier" , monospace;">─</span><span style="font-family: "courier new" , "courier" , monospace;">─</span><span style="font-family: "courier new" , "courier" , monospace;">─</span><span style="font-family: "courier new" , "courier" , monospace;">─</span></span><span style="font-family: "courier new" , "courier" , monospace;">┬<span style="font-family: "courier new" , "courier" , monospace;">─</span><span style="font-family: "courier new" , "courier" , monospace;">─</span><span style="font-family: "courier new" , "courier" , monospace;">─</span><span style="font-family: "courier new" , "courier" , monospace;">─</span><span style="font-family: "courier new" , "courier" , monospace;">─</span><span style="font-family: "courier new" , "courier" , monospace;">─</span><span style="font-family: "courier new" , "courier" , monospace;">─</span><span style="font-family: "courier new" , "courier" , monospace;">─</span><span style="font-family: "courier new" , "courier" , monospace;">─</span><span style="font-family: "courier new" , "courier" , monospace;">─</span><span style="font-family: "courier new" , "courier" , monospace;">─</span><span style="font-family: "courier new" , "courier" , monospace;">┐</span></span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-family: "courier new" , "courier" , monospace;">│ <span style="color: #ea9999;">Interface</span> </span><span style="font-family: "courier new" , "courier" , monospace;">│ <span style="color: #e06666;">B<span style="color: #ea9999;">andwidth</span> </span></span><span style="font-family: "courier new" , "courier" , monospace;">│</span><span style="font-family: "courier new" , "courier" , monospace;"> </span><span style="color: #e06666; font-family: "courier new" , "courier" , monospace;">Time/TB</span><span style="font-family: "courier new" , "courier" , monospace;"> </span><span style="font-family: "courier new" , "courier" , monospace;">│</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-family: "courier new" , "courier" , monospace;">│"Fast" Ethernet </span><span style="font-family: "courier new" , "courier" , monospace;">│ </span><span style="font-family: "courier new" , "courier" , monospace;"><span style="color: #ffd966;">12.5MB per second</span> </span><span style="font-family: "courier new" , "courier" , monospace;">│ <span style="color: red;">0.97 </span><b><span style="color: red;">days </span></b></span><span style="font-family: "courier new" , "courier" , monospace;">│</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-family: "courier new" , "courier" , monospace;">│</span><span style="font-family: "courier new" , "courier" , monospace;">USB2.0 </span><span style="font-family: "courier new" , "courier" , monospace;">│ </span><span style="font-family: "courier new" , "courier" , monospace;"><span style="color: #ffd966;">60MB per second</span> </span><span style="font-family: "courier new" , "courier" , monospace;">│</span> <span style="color: yellow;">4hr 51.3m</span> │</span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-family: "courier new" , "courier" , monospace;">│</span><span style="font-family: "courier new" , "courier" , monospace;">Gigabit Ethernet </span><span style="font-family: "courier new" , "courier" , monospace;">│ </span><span style="font-family: "courier new" , "courier" , monospace;"><span style="color: #6fa8dc;">125MB per second</span> </span><span style="font-family: "courier new" , "courier" , monospace;">│</span> <span style="color: #6fa8dc;">2hr 20m</span> │</span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-family: "courier new" , "courier" , monospace;">│</span><span style="font-family: "courier new" , "courier" , monospace;">USB3.0 </span><span style="font-family: "courier new" , "courier" , monospace;">│ </span><span style="font-family: "courier new" , "courier" , monospace;"><span style="color: #6fa8dc;">625MB per second</span> </span><span style="font-family: "courier new" , "courier" , monospace;">│</span> <span style="color: lime;">28m</span> │</span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-family: "courier new" , "courier" , monospace;">└</span><span style="font-family: "courier new" , "courier" , monospace;">─</span><span style="font-family: "courier new" , "courier" , monospace;">─</span><span style="font-family: "courier new" , "courier" , monospace;">─</span><span style="font-family: "courier new" , "courier" , monospace;">─</span><span style="font-family: "courier new" , "courier" , monospace;">─</span><span style="font-family: "courier new" , "courier" , monospace;">─</span><span style="font-family: "courier new" , "courier" , monospace;">─</span><span style="font-family: "courier new" , "courier" , monospace;">─</span><span style="font-family: "courier new" , "courier" , monospace;">─</span><span style="font-family: "courier new" , "courier" , monospace;">─</span><span style="font-family: "courier new" , "courier" , monospace;">─</span><span style="font-family: "courier new" , "courier" , monospace;">─</span><span style="font-family: "courier new" , "courier" , monospace;">─</span><span style="font-family: "courier new" , "courier" , monospace;">─</span><span style="font-family: "courier new" , "courier" , monospace;">─</span><span style="font-family: "courier new" , "courier" , monospace;">─</span><span style="font-family: "courier new" , "courier" , monospace;">─</span><span style="font-family: "courier new" , "courier" , monospace;">┴</span><span style="font-family: "courier new" , "courier" , monospace;">─</span><span style="font-family: "courier new" , "courier" , monospace;">─</span><span style="font-family: "courier new" , "courier" , monospace;">─</span><span style="font-family: "courier new" , "courier" , monospace;">─</span><span style="font-family: "courier new" , "courier" , monospace;">─</span><span style="font-family: "courier new" , "courier" , monospace;">─</span><span style="font-family: "courier new" , "courier" , monospace;">─</span><span style="font-family: "courier new" , "courier" , monospace;">─</span><span style="font-family: "courier new" , "courier" , monospace;">─</span><span style="font-family: "courier new" , "courier" , monospace;">─</span><span style="font-family: "courier new" , "courier" , monospace;">─</span><span style="font-family: "courier new" , "courier" , monospace;">─</span><span style="font-family: "courier new" , "courier" , monospace;">─</span><span style="font-family: "courier new" , "courier" , monospace;">─</span><span style="font-family: "courier new" , "courier" , monospace;">─</span><span style="font-family: "courier new" , "courier" , monospace;">─</span><span style="font-family: "courier new" , "courier" , monospace;">─</span><span style="font-family: "courier new" , "courier" , monospace;">─</span><span style="font-family: "courier new" , "courier" , monospace;">─</span><span style="font-family: "courier new" , "courier" , monospace;">─</span><span style="font-family: "courier new" , "courier" , monospace;">┴</span><span style="font-family: "courier new" , "courier" , monospace;">─</span><span style="font-family: "courier new" , "courier" , monospace;">─</span><span style="font-family: "courier new" , "courier" , monospace;">─</span><span style="font-family: "courier new" , "courier" , monospace;">─</span><span style="font-family: "courier new" , "courier" , monospace;">─</span><span style="font-family: "courier new" , "courier" , monospace;">─</span><span style="font-family: "courier new" , "courier" , monospace;">─</span><span style="font-family: "courier new" , "courier" , monospace;">─</span><span style="font-family: "courier new" , "courier" , monospace;">─</span><span style="font-family: "courier new" , "courier" , monospace;">─</span><span style="font-family: "courier new" , "courier" , monospace;">─</span><span style="font-family: "courier new" , "courier" , monospace;">┘</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-family: "courier new" , "courier" , monospace;"><br /></span>
<span style="font-family: "courier new" , "courier" , monospace;">While you won't always need to sync terabytes of information, you will be concerned with hundreds of gigabytes. Easily happens when you're getting back from holiday and took a lot of RAW images and uncompressed video. Of course you cannot expect these speeds - the harddrive itself has a limit. Of course when you're syncing from one external drive to another external drive (as is my plan) you're looking at half the bandwidth in the best case - the same bus handles reading from one drive and writing to the other. So that seemingly acceptable 12.5MBps drops to just over 6MBps - and we're assuming maximum theoretical speeds. With the USB3.0 speeds, I can comfortably sync one drive to another and not take much of a hit - I'd most likely bottleneck near the maximum write speed of my drive.</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-family: "courier new" , "courier" , monospace;"><br /></span>
<span style="font-family: "courier new" , "courier" , monospace;"><br /></span>
<span style="font-family: "courier new" , "courier" , monospace;"><b>To NTFS or not to NTFS....</b></span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-family: "courier new" , "courier" , monospace;"><br /></span>
<span style="font-family: "courier new" , "courier" , monospace;">Assuming I use the Odroid-xu4 for a LAN, what filesystem to use? NTFS is relatively limited compared to EXT4. The primary concern was the extra CPU utilization that NTFS would take over EXT4, however NTFS will be compatible with my other computers/laptop. My initial sync was over USB anyway directly connected to the windows machine that currently holds my library - so NTFS, purely for compatibility sake.</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-family: "courier new" , "courier" , monospace;"><br /></span>
<span style="font-family: "courier new" , "courier" , monospace;"><b><br />Setup:</b></span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-family: "courier new" , "courier" , monospace;"><b><br /></b></span>
<span style="font-family: "courier new" , "courier" , monospace;">I got the OpenMediaVault image from here.</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><a href="https://sourceforge.net/projects/openmediavault/files/Odroid-XU3_XU4/">https://sourceforge.net/projects/openmediavault/files/Odroid-XU3_XU4/</a></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-family: "courier new" , "courier" , monospace;"><br /></span>
<span style="font-family: "courier new" , "courier" , monospace;">Win32diskimager can put the ISO on an SD card.</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><a href="https://sourceforge.net/projects/win32diskimager/">https://sourceforge.net/projects/win32diskimager/</a></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-family: "courier new" , "courier" , monospace;"><br /></span>
<span style="font-family: "courier new" , "courier" , monospace;">From there that's it. Put the card in the mini server and boot up. No need for a directly connected mouse and keyboard, just ssh into it, or use the web interface. For most things NAS related, the web interface will suffice.</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-family: "courier new" , "courier" , monospace;"><br /></span>
</span><br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhKybufmO0rz38yggDE2-eHjPFKPp_cnOT1SFCM3xXODEilxcZqB9_lNZDdeMufy3FQBYnILCymSrmz25b-RyTfDNL75VY0NejCNlqyE7Z9Gn3rQYBQ37dpFzT8gTcciec7MO_hfbazs76F/s1600/omv1.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><span style="font-family: "courier new" , "courier" , monospace;"><img border="0" height="516" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhKybufmO0rz38yggDE2-eHjPFKPp_cnOT1SFCM3xXODEilxcZqB9_lNZDdeMufy3FQBYnILCymSrmz25b-RyTfDNL75VY0NejCNlqyE7Z9Gn3rQYBQ37dpFzT8gTcciec7MO_hfbazs76F/s640/omv1.png" width="640" /></span></a></div>
<span style="font-family: "courier new" , "courier" , monospace;"><br />So you can make users, shared on connected drives, mount/unmount the drives, make users, cronjobs etc. </span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-family: "courier new" , "courier" , monospace;"><br /></span>
<span style="font-family: "courier new" , "courier" , monospace;">I also came across this blog here <a href="http://obihoernchen.net/1235/odroid-xu4-with-openmediavault/">http://obihoernchen.net/1235/odroid-xu4-with-openmediavault/</a></span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;">which was invaluable in configuring the NTFS drives for better performance:</span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="color: #ea9999; font-family: "courier new" , "courier" , monospace;"><br /></span>
<span style="color: #ea9999; font-family: "courier new" , "courier" , monospace;">Use on demand CPU governor -</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;">in: /etc/default/openmediavault</span><br />
<span style="font-family: "courier new" , "courier" , monospace;">add:</span><br />
<span style="font-family: "courier new" , "courier" , monospace;"> OMV_CPUFREQUTILS_GOVERNOR="ondemand"</span><br />
<span style="font-family: "courier new" , "courier" , monospace;">run:</span><br />
<span style="font-family: "courier new" , "courier" , monospace;"> omv-mkconf cpufrequtils</span><br />
<span style="font-family: "courier new" , "courier" , monospace;"> update-rc.d cpufrequtils defaults</span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="color: #ea9999; font-family: "courier new" , "courier" , monospace;"><br /></span>
<span style="color: #ea9999; font-family: "courier new" , "courier" , monospace;">CPU governor tuning:</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;">run:</span><br />
<span style="font-family: "courier new" , "courier" , monospace;"> apt-get install sysfsutils</span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-family: "courier new" , "courier" , monospace;"><br /></span>
<span style="font-family: "courier new" , "courier" , monospace;">in: /etc/sysfs.conf</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;">add:</span><br />
<span style="font-family: "courier new" , "courier" , monospace;"> # cpu0 sets cpu[0-3], cpu4 sets cpu[4-7]</span><br />
<span style="font-family: "courier new" , "courier" , monospace;"> devices/system/cpu/cpu0/cpufreq/ondemand/io_is_busy = 1</span><br />
<span style="font-family: "courier new" , "courier" , monospace;"> devices/system/cpu/cpu4/cpufreq/ondemand/io_is_busy = 1 </span><br />
<span style="font-family: "courier new" , "courier" , monospace;"> devices/system/cpu/cpu0/cpufreq/ondemand/sampling_down_factor = 10</span><br />
<span style="font-family: "courier new" , "courier" , monospace;"> devices/system/cpu/cpu4/cpufreq/ondemand/sampling_down_factor = 10</span><br />
<span style="font-family: "courier new" , "courier" , monospace;"> devices/system/cpu/cpu0/cpufreq/ondemand/up_threshold = 80</span><br />
<span style="font-family: "courier new" , "courier" , monospace;"> devices/system/cpu/cpu4/cpufreq/ondemand/up_threshold = 80</span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-family: "courier new" , "courier" , monospace;"><br /></span>
<span style="font-family: "courier new" , "courier" , monospace;">run:</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"> cpufreq-set -g ondemand -c 0</span><br />
<span style="font-family: "courier new" , "courier" , monospace;"> cpufreq-set -g ondemand -c 4</span><br />
<span style="font-family: "courier new" , "courier" , monospace;"> service sysfsutils start</span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="color: #ea9999; font-family: "courier new" , "courier" , monospace;"><br /></span>
<span style="color: #ea9999; font-family: "courier new" , "courier" , monospace;">NTFS mount options:</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;">in: /etc/default/openmediavault</span><br />
<span style="font-family: "courier new" , "courier" , monospace;">add:</span><br />
<span style="font-family: "courier new" , "courier" , monospace;"> OMV_FSTAB_MNTOPS_NTFS="defaults,nofail,noexec,noatime,big_writes"</span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-family: "courier new" , "courier" , monospace;"><span style="font-family: "courier new" , "courier" , monospace;"><br /></span></span>
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-family: "courier new" , "courier" , monospace;">I strongly suggest you read the <a href="http://obihoernchen.net/1235/odroid-xu4-with-openmediavault/" target="_blank">original link</a> at </span>Obihörnchen's blog to understand what each command does.</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-family: "courier new" , "courier" , monospace;"><span style="font-family: "courier new" , "courier" , monospace;"><br /></span></span>
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-family: "courier new" , "courier" , monospace;"><br /></span>
<span style="font-family: "courier new" , "courier" , monospace;"><b>Drive performance:</b></span></span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-family: "courier new" , "courier" , monospace;"><br /></span>
<span style="font-family: "courier new" , "courier" , monospace;"><span style="color: cyan;">root@odroid</span>:~/major# <span style="color: magenta;">dd if=/dev/zero of=./testfile bs=1000M count=1 oflag=direct</span></span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;">1+0 records in</span><br />
<span style="font-family: "courier new" , "courier" , monospace;">1+0 records out</span><br />
<span style="font-family: "courier new" , "courier" , monospace;">1048576000 bytes (1.0 GB) copied, 12.7106 s, 82.5 MB/s</span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="color: cyan;">root@odroid</span>:~/major# <span style="color: magenta;">dd if=/dev/zero of=./testfile bs=1000M count=1 oflag=direct</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;">1+0 records in</span><br />
<span style="font-family: "courier new" , "courier" , monospace;">1+0 records out</span><br />
<span style="font-family: "courier new" , "courier" , monospace;">1048576000 bytes (1.0 GB) copied, 12.6035 s, 83.2 MB/s</span><br />
<div>
<span style="font-family: "courier new" , "courier" , monospace;"><br /></span></div>
<div>
<span style="color: lime; font-family: "courier new" , "courier" , monospace;">Getting over 80MBps write - that's much better than I was expecting.</span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace;"><br /></span></div>
<div>
<div>
<span style="font-family: "courier new" , "courier" , monospace;"><span style="color: cyan;">root@odroid</span>:~/major# <span style="color: magenta;">dd if=./testfile of=/dev/null bs=1000M count=1</span></span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace;">1+0 records in</span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace;">1+0 records out</span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace;">1048576000 bytes (1.0 GB) copied, 11.272 s, 93.0 MB/s</span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace;"><span style="color: cyan;">root@odroid</span>:~/major# <span style="color: magenta;">dd if=./testfile of=/dev/null bs=1000M count=1</span></span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace;">1+0 records in</span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace;">1+0 records out</span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace;">1048576000 bytes (1.0 GB) copied, 11.313 s, 92.7 MB/s</span></div>
</div>
<div>
<span style="font-family: "courier new" , "courier" , monospace;"><br /></span></div>
<div>
<span style="color: lime; font-family: "courier new" , "courier" , monospace;">Getting over 90MBps read - again a really decent result for a single disk.</span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace;"><br /></span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace;">My understanding is the drive I'm using (Western Digital RED 6TB should handle double that - 175MB/s read/write - and it's possible I might achieve that with EXT4 on this same platform. More testing is needed when I purchase another drive. For now, I'll enjoy the speeds that are near the maximum of the interface, and easily faster than my AC Wifi provides.</span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><br /></span>
<span style="font-family: "courier new" , "courier" , monospace;"><br /></span>
<span style="font-family: "courier new" , "courier" , monospace;">The drive I'm currently using will be accompanied by a few more later. This is achieved by using an external 4-bay harddrive enclosure.</span><br />
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhUMrGNOG6DqW2NGfuPI6jtJ0PSNW33bVmRaUeKcbhPvbakj4xogVOTkGT_-9eBX-jRohzB9HgLsiDvVyavMuSW_h8gfmp4uYDdAYA-KwrWcrKB0qwcOzuMsVp4nhkgupUdVgHQjERYLUgi/s1600/PO267067.JPG" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" height="480" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhUMrGNOG6DqW2NGfuPI6jtJ0PSNW33bVmRaUeKcbhPvbakj4xogVOTkGT_-9eBX-jRohzB9HgLsiDvVyavMuSW_h8gfmp4uYDdAYA-KwrWcrKB0qwcOzuMsVp4nhkgupUdVgHQjERYLUgi/s640/PO267067.JPG" width="640" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;"><span style="font-family: "courier new" , "courier" , monospace;">Next to the Odroid, this stack of drive bays looks huge. It isn't :D<br />This is a Vantec HX4R.</span></td></tr>
</tbody></table>
<br />
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh0PX0qY_7HCgpualhPtjmN416CEgggCk3vM1sd2R8bsvtyY64x5OrO3olloxHBjf80pC_NtCKe_A67rLQI6am4HqwWwk3v-YQPhyZmenKV772ERO3g5buyeHR-AiuUIa_CP4s-tQEy1EIn/s1600/PO267071.JPG" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" height="640" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh0PX0qY_7HCgpualhPtjmN416CEgggCk3vM1sd2R8bsvtyY64x5OrO3olloxHBjf80pC_NtCKe_A67rLQI6am4HqwWwk3v-YQPhyZmenKV772ERO3g5buyeHR-AiuUIa_CP4s-tQEy1EIn/s640/PO267071.JPG" width="480" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;"><span style="font-family: "courier new" , "courier" , monospace;">Bays lock in place with a clip. The enclosure supports SATA and USB3.0, and from the sticker you can also see RAID settings - 0, 1, 0+1, 5 JBOD - and in the way I use it, just as a hub for all drives. That top drive is a drive I removed all drive parts and interfaces from. It's just a shell - holding some screws for the other bays but makes for a good hidden storage unit.</span></td></tr>
</tbody></table>
<span style="font-family: "courier new" , "courier" , monospace;"><br /></span>
<span style="font-family: "courier new" , "courier" , monospace;"><br /></span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-family: "courier new" , "courier" , monospace;"><br /></span>
<b><span style="font-family: "courier new" , "courier" , monospace;">Benchmarks:</span></b></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-family: "courier new" , "courier" , monospace;"><br /></span>
<span style="font-family: "courier new" , "courier" , monospace;">These benchmarks were taken using the on demand CPU governor configuration described. I've compared it against my laptop, and desktop.</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-family: "courier new" , "courier" , monospace;"><br /></span>
<span style="font-family: "courier new" , "courier" , monospace;">Desktop: Core i5 2400 (Sandy Bridge), 16GB RAM</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;">Laptop: Celeron N2940 (BayTrail-m), 8GB RAM</span><br />
<span style="font-family: "courier new" , "courier" , monospace;">Odroid-XU4: Exynos 5422, 2GB RAM</span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-family: "courier new" , "courier" , monospace;"><br /></span>
<span style="font-family: "courier new" , "courier" , monospace;">It's interesting noting the specifications of these:</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"><br /></span>
<span style="font-size: x-small;"><br /></span>
<span style="color: #999999; font-family: "courier new" , "courier" , monospace;">▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="color: #999999;">█ </span><span style="color: #f3f3f3;">CPU </span><span style="color: #999999;">█ </span><span style="color: #f3f3f3;">Power? </span><span style="color: #999999;"> █ </span><span style="color: #f3f3f3;">Cores </span><span style="color: #999999;">█ </span><span style="color: #f3f3f3;">Frequency </span><span style="color: #999999;">█ </span><span style="color: #f3f3f3;">intro </span><span style="color: #999999;">█</span></span><br />
<span style="color: #999999; font-family: "courier new" , "courier" , monospace;"><span style="font-family: "courier new" , "courier" , monospace;">█</span>▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀█▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀█▀▀▀▀▀▀▀▀█▀▀▀▀▀▀▀▀▀▀▀█▀▀▀▀▀▀▀█</span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="color: #999999;">█</span><span style="color: #999999;"> </span><span style="color: cyan;">Core i5 2400</span><span style="color: #999999;"> █ </span><span style="color: cyan;">95W TDP</span><span style="color: #999999;"> █ </span><span style="color: cyan;">4 </span><span style="color: #999999;">█ </span><span style="color: cyan;">3.1-3.4</span><span style="color: #999999;"> █ </span><span style="color: cyan;">2011 </span><span style="color: #999999;">█</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="color: #999999; font-family: "courier new" , "courier" , monospace;">█ </span><span style="color: lime; font-family: "courier new" , "courier" , monospace;">Celeron N2940</span><span style="color: #999999; font-family: "courier new" , "courier" , monospace;"> █ </span><span style="color: lime; font-family: "courier new" , "courier" , monospace;">7.5W/4.5W TDP/SDP</span><span style="color: #999999; font-family: "courier new" , "courier" , monospace;"> █ </span><span style="color: lime; font-family: "courier new" , "courier" , monospace;">4 </span><span style="color: #999999; font-family: "courier new" , "courier" , monospace;">█ </span><span style="color: lime; font-family: "courier new" , "courier" , monospace;">1.83-2.25</span><span style="color: #999999; font-family: "courier new" , "courier" , monospace;"> █ </span><span style="color: lime; font-family: "courier new" , "courier" , monospace;">2014 </span><span style="color: #999999; font-family: "courier new" , "courier" , monospace;">█</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="color: #999999; font-family: "courier new" , "courier" , monospace;">█ </span><span style="color: yellow; font-family: "courier new" , "courier" , monospace;">Exynos 5422</span><span style="color: #999999; font-family: "courier new" , "courier" , monospace;"> █ </span><span style="color: yellow; font-family: "courier new" , "courier" , monospace;">10W/14W max CPU/GPU</span><span style="color: #999999; font-family: "courier new" , "courier" , monospace;"> █ </span><span style="color: yellow; font-family: "courier new" , "courier" , monospace;">8 </span><span style="color: #999999; font-family: "courier new" , "courier" , monospace;">█ </span><span style="color: yellow; font-family: "courier new" , "courier" , monospace;">2.0/1.3</span><span style="color: #999999; font-family: "courier new" , "courier" , monospace;"> █ </span><span style="color: yellow; font-family: "courier new" , "courier" , monospace;">2015 </span><span style="color: #999999; font-family: "courier new" , "courier" , monospace;">█</span></span><br />
<span style="color: #999999; font-family: "courier new" , "courier" , monospace;"> ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀</span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-family: "courier new" , "courier" , monospace;"><br /></span>
<span style="font-family: "courier new" , "courier" , monospace;">While it may seem that the Exynos 5422 is a higher watt CPU, this was achieved from <a href="http://forum.odroid.com/viewtopic.php?f=97&t=14988&p=142464&hilit=xu4+power+consumption#p142464" target="_blank">tests from the odroid forum</a>. Typically the entire system hovers at a wattage my laptop's processor will only dream of. There's further tweaks that lower power too - such as down clocking the GPU to reduce power as a server even more. It should also be noted, the Thermal Design Power (TDP) and Scenario Design Power (SDP). The Intel-AMD war brought in marketing departments that spread BS over these numbers. TDP was the rating the silicone was designed to handle. SDP was a typical workload. Nothing really was equal in comparing AMD and Intel CPUs that stated these. </span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><br /></span>
<span style="font-family: "courier new" , "courier" , monospace;">The power supply for the odroid system is 5 Volts, 4 Amps. That's 20 Watts. Consider that in several cases here, the GPU is also adding to power consumption: <a href="http://www.mikronauts.com/hardkernel/hardkernel-odroid-xu4-review/11/">http://www.mikronauts.com/hardkernel/hardkernel-odroid-xu4-review/11/</a></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><br /></span>
<span style="font-family: "courier new" , "courier" , monospace;">Either way you compare the Baytrail Celeron against the Exynos 5422, the Core i5 is sorely out of place. The question is is the performance also that far out there, or do the lower powered processors give it a disadvantage in efficiency?</span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><br /></span>
<span style="font-family: "courier new" , "courier" , monospace;">I ran each test a several times to get 3 close results, and kept the middle.</span><br />
<br />
<span style="background-color: black; color: #fff2cc; font-family: "courier new" , "courier" , monospace;">+---------------+------------+-----------------+------------+</span><br />
<span style="background-color: black; color: #fff2cc; font-family: "courier new" , "courier" , monospace;">| | </span><span style="background-color: black; color: #d9ead3; font-family: "courier new" , "courier" , monospace;">Odroid-Xu4</span><span style="background-color: black; color: #fff2cc; font-family: "courier new" , "courier" , monospace;"> | </span><span style="background-color: black; color: #cfe2f3; font-family: "courier new" , "courier" , monospace;">Baytrail Laptop</span><span style="background-color: black; color: #fff2cc; font-family: "courier new" , "courier" , monospace;"> | </span><span style="background-color: black; color: #d0e0e3; font-family: "courier new" , "courier" , monospace;">i5 Desktop</span><span style="background-color: black; color: #fff2cc; font-family: "courier new" , "courier" , monospace;"> |</span><br />
<span style="background-color: black; color: #fff2cc; font-family: "courier new" , "courier" , monospace;">+---------------+------------+-----------------+------------+</span><br />
<span style="background-color: black;"><span style="font-family: "courier new" , "courier" , monospace;"><span style="color: #fff2cc;">| </span><span style="color: yellow;">Mencoder </span><span style="color: #fff2cc;">|</span></span><span style="color: #fff2cc; font-family: "courier new" , "courier" , monospace;"> </span><span style="color: #fff2cc; font-family: "courier new" , "courier" , monospace;"> </span><span style="font-family: "courier new" , "courier" , monospace;"><span style="color: magenta;">3148</span></span><span style="color: #fff2cc; font-family: "courier new" , "courier" , monospace;"> |</span><span style="color: #fff2cc; font-family: "courier new" , "courier" , monospace;"> </span><span style="color: #fff2cc; font-family: "courier new" , "courier" , monospace;"> </span><span style="font-family: "courier new" , "courier" , monospace;"><span style="color: magenta;">2478</span></span><span style="color: #fff2cc; font-family: "courier new" , "courier" , monospace;"> |</span><span style="color: #fff2cc; font-family: "courier new" , "courier" , monospace;"> </span><span style="color: #fff2cc; font-family: "courier new" , "courier" , monospace;"> </span><span style="font-family: "courier new" , "courier" , monospace;"><span style="color: magenta;">795</span></span><span style="color: #fff2cc; font-family: "courier new" , "courier" , monospace;"> |</span></span><br />
<span style="background-color: black;"><span style="font-family: "courier new" , "courier" , monospace;"><span style="color: #fff2cc;">| </span><span style="color: yellow;">p7zip (text)</span><span style="color: #fff2cc;"> |</span></span><span style="color: #fff2cc; font-family: "courier new" , "courier" , monospace;"> </span><span style="color: #fff2cc; font-family: "courier new" , "courier" , monospace;"> </span><span style="font-family: "courier new" , "courier" , monospace;"><span style="color: magenta;">7.342</span></span><span style="color: #fff2cc; font-family: "courier new" , "courier" , monospace;"> |</span><span style="color: #fff2cc; font-family: "courier new" , "courier" , monospace;"> </span><span style="color: #fff2cc; font-family: "courier new" , "courier" , monospace;"> </span><span style="font-family: "courier new" , "courier" , monospace;"><span style="color: magenta;">6.708</span></span><span style="color: #fff2cc; font-family: "courier new" , "courier" , monospace;"> |</span><span style="color: #fff2cc; font-family: "courier new" , "courier" , monospace;"> </span><span style="color: #fff2cc; font-family: "courier new" , "courier" , monospace;"> </span><span style="font-family: "courier new" , "courier" , monospace;"><span style="color: magenta;">2.675</span></span><span style="color: #fff2cc; font-family: "courier new" , "courier" , monospace;"> |</span></span><br />
<span style="background-color: black;"><span style="font-family: "courier new" , "courier" , monospace;"><span style="color: #fff2cc;">| </span><span style="color: yellow;">p7zip (video)</span><span style="color: #fff2cc;"> |</span></span><span style="color: #fff2cc; font-family: "courier new" , "courier" , monospace;"> </span><span style="color: #fff2cc; font-family: "courier new" , "courier" , monospace;"> </span><span style="font-family: "courier new" , "courier" , monospace;"><span style="color: magenta;">174 </span></span><span style="color: #fff2cc; font-family: "courier new" , "courier" , monospace;">|</span><span style="color: #fff2cc; font-family: "courier new" , "courier" , monospace;"> </span><span style="color: #fff2cc; font-family: "courier new" , "courier" , monospace;"> </span><span style="font-family: "courier new" , "courier" , monospace;"><span style="color: magenta;">143 </span></span><span style="color: #fff2cc; font-family: "courier new" , "courier" , monospace;">|</span><span style="color: #fff2cc; font-family: "courier new" , "courier" , monospace;"> </span><span style="color: #fff2cc; font-family: "courier new" , "courier" , monospace;"> </span><span style="font-family: "courier new" , "courier" , monospace;"><span style="color: magenta;">32</span></span><span style="color: #fff2cc; font-family: "courier new" , "courier" , monospace;"> |</span></span><br />
<span style="background-color: black;"><span style="font-family: "courier new" , "courier" , monospace;"><span style="color: #fff2cc;">| </span><span style="color: yellow;">ImageMagick </span><span style="color: #fff2cc;"> |</span></span><span style="color: magenta;"><span style="font-family: "courier new" , "courier" , monospace;"> </span><span style="font-family: "courier new" , "courier" , monospace;"> </span></span><span style="color: #fff2cc; font-family: "courier new" , "courier" , monospace;">|</span><span style="color: magenta;"><span style="font-family: "courier new" , "courier" , monospace;"> </span><span style="font-family: "courier new" , "courier" , monospace;"> </span></span><span style="color: #fff2cc; font-family: "courier new" , "courier" , monospace;">|</span><span style="color: magenta;"><span style="font-family: "courier new" , "courier" , monospace;"> </span><span style="font-family: "courier new" , "courier" , monospace;"> </span></span><span style="color: #fff2cc; font-family: "courier new" , "courier" , monospace;">|</span></span><br />
<span style="background-color: black;"><span style="font-family: "courier new" , "courier" , monospace;"><span style="color: #fff2cc;">| </span><span style="color: yellow;">Apache bench </span><span style="color: #fff2cc;"> |</span></span><span style="color: magenta;"><span style="font-family: "courier new" , "courier" , monospace;"> </span><span style="font-family: "courier new" , "courier" , monospace;"> </span></span><span style="color: #fff2cc; font-family: "courier new" , "courier" , monospace;">|</span><span style="color: magenta;"><span style="font-family: "courier new" , "courier" , monospace;"> </span><span style="font-family: "courier new" , "courier" , monospace;"> </span></span><span style="color: #fff2cc; font-family: "courier new" , "courier" , monospace;">|</span><span style="color: magenta;"><span style="font-family: "courier new" , "courier" , monospace;"> </span><span style="font-family: "courier new" , "courier" , monospace;"> </span></span><span style="color: #fff2cc; font-family: "courier new" , "courier" , monospace;">|</span></span><br />
<span style="background-color: black; color: #fff2cc; font-family: "courier new" , "courier" , monospace;">+---------------+------------+-----------------+------------+</span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace;"><br /></span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace;"><br /></span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace;">It's apparent that the i5 desktop is several times faster - but maybe it's not fast enough. This CPU <a href="http://www.bit-tech.net/hardware/cpus/2011/01/03/intel-sandy-bridge-review/11" target="_blank">power can jump over 70Watts</a> when under heavy load. That puts it at least 10 times the power of the other CPUs. It's really interesting the see the large difference in 7zip on data that can't be compressed well (video) compared to data that compresses a lot (text). My laptop's CPU is never that far ahead of the Xu4 either. Expect laptops with ARM to gain in popularity (there's already Chromebooks and Android). Especially with the Atom line no longer available for that purpose.</span></div>
Beomagihttp://www.blogger.com/profile/00469223835355067867noreply@blogger.com6tag:blogger.com,1999:blog-2974094041951992980.post-55111539390346547782016-09-09T06:21:00.002-07:002020-09-08T09:23:03.646-07:00Arduino is fun - great for custom Radio Control signal handling<span style="font-family: "courier new" , "courier" , monospace;">I've been having some fun with arduino. They're quite cheap boards, with arduino nano coming in at ~$3 per board. That's $3 - THREE. That's pretty awesome for a small amount of custom processing power. Unlike a board like the Raspberry PI which has to run a full Linux kernel, this just runs whatever script you write. As such, the timings are very consistent - it's excellent for handling servo PWN signals where you need to measure pulses from ~1000-2000 microseconds accurately. From my experience the resolution was 4μs.</span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><br /></span>
<span style="font-family: "courier new" , "courier" , monospace;">This makes it excellent for managing radiocontrol PWM signals in complex RC vehicles. </span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><br /></span>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi88Lj7gb5sYoJmclwVZnkDZ7zluelr259guHROuVQfNOnbVHp3OPXrbmzXJBtKWCKSGZlgGavFc_91jKj8wwIOmluYSylX0KSOUZUq3T-7DolV73R5Sn-EIw0bKHS9ZtqwlWXNc7x6ieXZ/s1600/PO286595.JPG" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="480" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi88Lj7gb5sYoJmclwVZnkDZ7zluelr259guHROuVQfNOnbVHp3OPXrbmzXJBtKWCKSGZlgGavFc_91jKj8wwIOmluYSylX0KSOUZUq3T-7DolV73R5Sn-EIw0bKHS9ZtqwlWXNc7x6ieXZ/s640/PO286595.JPG" width="640" /></a></div>
<span style="font-family: "courier new" , "courier" , monospace;"><br /></span>
<span style="font-family: "courier new" , "courier" , monospace;">That wrapped up red component in my latest RC vehicle (another hobby, I build RC cars...) is an arduino that reads in steering and another channel and processes it to output a new signal that lets me choose if I want the truck to have 4 wheel steering, or crabwalk (both wheels point the same way making it go mostly sideways).</span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><br /></span>
<span style="font-family: "courier new" , "courier" , monospace;"><br /></span>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh-LLJhvu0odbCahf9l7lVjkhDOuVQ0Ni5g6nyp9Yzpp7NfajKhN3kXnsl6_YSsROtkNK5wtQ1LJ7plmq3kE3zhys6E7y0GGXfT7Wta9Iy6X1EBVN7N2HDkr1NzQkkbgk6ANon56t3XIWQA/s1600/PO286593.JPG" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="480" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh-LLJhvu0odbCahf9l7lVjkhDOuVQ0Ni5g6nyp9Yzpp7NfajKhN3kXnsl6_YSsROtkNK5wtQ1LJ7plmq3kE3zhys6E7y0GGXfT7Wta9Iy6X1EBVN7N2HDkr1NzQkkbgk6ANon56t3XIWQA/s640/PO286593.JPG" width="640" /></a></div>
<br />
<span style="font-family: "courier new" , "courier" , monospace;">Definitely one of the more interesting vehicles I've built, and a decent summer project (though I did start last year wrecking the transmission pushing myself in a chair). </span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><br /></span>
<span style="font-family: "courier new" , "courier" , monospace;">This actually started out with me receiving a non-working unit for handling quadsteer that I had purchased on amazon. When using the unit, the servos lacked power, wouldn't center, and were slow. I used an oscilloscope to diagnose the signal and saw the pulses were 40 milliseconds apart. For Radio control PWM signals, the leading edge should be 20 milliseconds apart. What was essentially happening was the server would get a signal and act on it for 20 milliseconds, and then not do anything for the next 20 milliseconds.</span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><br /></span>
<span style="font-family: "courier new" , "courier" , monospace;">So I turned to arduino nano in the hopes to making my own. Below I've setup that arduino nano on the breadboard to mix signals as I'd like. Each square on the oscilloscope is 10 ms, so my working prototype is showing the proper waveform. This is what was wrapped up in electrical tape in the first picture.</span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><br /></span>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj8gHiTbsTi8_RHqsTJsAGtrCZuyxuBYDhBNqiATurXleqFjBzZW6un74CijA-Jop0XeTpjj1C-z3l52s7hkimTo78GE0AbKvowbBx5wV9nIPpfo2Z9yM-StcMR-R4e5DMS-peeerw8r4MX/s1600/P8246696.JPG" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="478" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj8gHiTbsTi8_RHqsTJsAGtrCZuyxuBYDhBNqiATurXleqFjBzZW6un74CijA-Jop0XeTpjj1C-z3l52s7hkimTo78GE0AbKvowbBx5wV9nIPpfo2Z9yM-StcMR-R4e5DMS-peeerw8r4MX/s640/P8246696.JPG" width="640" /></a></div>
<span style="font-family: "courier new" , "courier" , monospace;"><br /></span>
<span style="font-family: "courier new" , "courier" , monospace;"><br /></span>
<span style="font-family: "courier new" , "courier" , monospace;">Below is the code I wrote to handle this. The idea is to read two channels - the steering and a spare channel to know if to invert the steering between front and rear. Since I'm reading the time of the pulse, I need a little math to normalize 1000-2000</span><span style="font-family: "courier new" , "courier" , monospace;">μs to -1 to 1 and back again. This lets me multiply the channels so I can then smoothly transition between crabwalk/quadsteer.</span><span style="font-family: "courier new" , "courier" , monospace;"> </span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><br /></span>
<span style="font-family: "courier new" , "courier" , monospace;">Should be noted we're using interrupts to gather input channel data. This is a non-blocking method for gathering the input. I just requires us to determine the time of the pulse by subtracting the time the clock had at the signal's leading edge.</span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><br />Edit: 20200907 - code had some bugs, turning off/on interrupts wasn't needed and led to jerky servo output. Tidied it up a bit.<br /></span>
<span style="font-family: "courier new" , "courier" , monospace;"><br /></span>
<br />
<blockquote class="tr_bq">
<pre style="background: rgb(255, 255, 255);"><pre><span style="color: #5e6d03;">#include</span> <span style="color: #434f54;"><</span><b><span style="color: #d35400;">Servo</span></b><span style="color: #434f54;">.</span><span style="color: black;">h</span><span style="color: #434f54;">></span>
<span style="color: #00979c;">volatile</span> <span style="color: #00979c;">unsigned</span> <span style="color: #00979c;">long</span> <span style="color: black;">leadingedge1</span><span style="color: black;">;</span>
<span style="color: #00979c;">volatile</span> <span style="color: #00979c;">unsigned</span> <span style="color: #00979c;">long</span> <span style="color: black;">leadingedge2</span><span style="color: black;">;</span>
<span style="color: #00979c;">volatile</span> <span style="color: #00979c;">int</span> <span style="color: black;">pulsetime1</span><span style="color: black;">;</span>
<span style="color: #00979c;">volatile</span> <span style="color: #00979c;">int</span> <span style="color: black;">pulsetime2</span><span style="color: black;">;</span>
<span style="color: #434f54;">//declare servo pins</span>
<span style="color: #00979c;">int</span> <span style="color: black;">servoin1</span> <span style="color: #434f54;">=</span> <span style="color: black;">2</span><span style="color: black;">;</span> <span style="color: #434f54;">// pin 2 - steering</span>
<span style="color: #00979c;">int</span> <span style="color: black;">servoin2</span> <span style="color: #434f54;">=</span> <span style="color: black;">3</span><span style="color: black;">;</span> <span style="color: #434f54;">// pin 3 - inversion channel</span>
<span style="color: #00979c;">int</span> <span style="color: black;">servoout1</span> <span style="color: #434f54;">=</span> <span style="color: black;">9</span><span style="color: black;">;</span> <span style="color: #434f54;">// output read servo is pin 9, front is pin 2</span>
<b><span style="color: #d35400;">Servo</span></b> <span style="color: black;">rearservo</span><span style="color: black;">;</span>
<span style="color: #00979c;">int</span> <span style="color: black;">ch1_hist</span><span style="color: black;">[</span><span style="color: black;">3</span><span style="color: black;">]</span><span style="color: black;">;</span>
<span style="color: #00979c;">int</span> <span style="color: black;">ch2_hist</span><span style="color: black;">[</span><span style="color: black;">3</span><span style="color: black;">]</span><span style="color: black;">;</span>
<span style="color: #00979c;">int</span> <span style="color: black;">execute</span><span style="color: #434f54;">=</span><span style="color: black;">0</span><span style="color: black;">;</span>
<span style="color: #00979c;">long</span> <span style="color: black;">RServo</span><span style="color: #434f54;">=</span><span style="color: black;">1500</span><span style="color: black;">;</span> <span style="color: #434f54;">//value to write to rear servo</span>
<span style="color: #00979c;">void</span> <span style="color: #5e6d03;">setup</span><span style="color: black;">(</span><span style="color: black;">)</span>
<span style="color: black;">{</span>
<span style="color: #d35400;">pinMode</span><span style="color: black;">(</span><span style="color: black;">servoin1</span><span style="color: #434f54;">,</span> <span style="color: #00979c;">INPUT</span><span style="color: black;">)</span><span style="color: black;">;</span> <span style="color: #434f54;">// sets the digital pin 1 as input</span>
<span style="color: #d35400;">pinMode</span><span style="color: black;">(</span><span style="color: black;">servoin2</span><span style="color: #434f54;">,</span> <span style="color: #00979c;">INPUT</span><span style="color: black;">)</span><span style="color: black;">;</span> <span style="color: #434f54;">// sets the digital pin 1 as input</span>
<span style="color: #d35400;">pinMode</span><span style="color: black;">(</span><span style="color: black;">servoout1</span><span style="color: #434f54;">,</span> <span style="color: #00979c;">OUTPUT</span><span style="color: black;">)</span><span style="color: black;">;</span> <span style="color: #434f54;">// sets the digital pin 9 as output</span>
<span style="color: #434f54;">// pinMode(servoout2, OUTPUT); // sets the digital pin 9 as output</span>
<span style="color: black;">leadingedge1</span> <span style="color: #434f54;">=</span> <span style="color: black;">0</span><span style="color: black;">;</span>
<span style="color: black;">leadingedge2</span> <span style="color: #434f54;">=</span> <span style="color: black;">0</span><span style="color: black;">;</span>
<span style="color: black;">pulsetime1</span> <span style="color: #434f54;">=</span> <span style="color: black;">1500</span><span style="color: black;">;</span>
<span style="color: black;">pulsetime2</span> <span style="color: #434f54;">=</span> <span style="color: black;">1500</span><span style="color: black;">;</span>
<span style="color: #d35400;">attachInterrupt</span><span style="color: black;">(</span><span style="color: black;">0</span><span style="color: #434f54;">,</span> <span style="color: black;">chan1</span><span style="color: #434f54;">,</span> <span style="color: #00979c;">CHANGE</span><span style="color: black;">)</span><span style="color: black;">;</span>
<span style="color: #d35400;">attachInterrupt</span><span style="color: black;">(</span><span style="color: black;">1</span><span style="color: #434f54;">,</span> <span style="color: black;">chan2</span><span style="color: #434f54;">,</span> <span style="color: #00979c;">CHANGE</span><span style="color: black;">)</span><span style="color: black;">;</span>
<span style="color: black;">rearservo</span><span style="color: #434f54;">.</span><span style="color: #d35400;">attach</span><span style="color: black;">(</span><span style="color: black;">servoout1</span><span style="color: black;">)</span><span style="color: black;">;</span>
<b><span style="color: #d35400;">Serial</span></b><span style="color: #434f54;">.</span><span style="color: #d35400;">begin</span><span style="color: black;">(</span><span style="color: black;">115200</span><span style="color: black;">)</span><span style="color: black;">;</span> <span style="color: #434f54;">// for debugging</span>
<span style="color: black;">}</span>
<span style="color: #00979c;">int</span> <span style="color: black;">amode</span><span style="color: black;">(</span><span style="color: #00979c;">int</span> <span style="color: black;">a</span><span style="color: black;">[</span><span style="color: black;">]</span><span style="color: black;">)</span><span style="color: black;">{</span> <span style="color: #434f54;">//mode or average of an array - use to smooth glitches</span>
<span style="color: #5e6d03;">if</span> <span style="color: black;">(</span><span style="color: black;">a</span><span style="color: black;">[</span><span style="color: black;">0</span><span style="color: black;">]</span><span style="color: #434f54;">==</span><span style="color: black;">a</span><span style="color: black;">[</span><span style="color: black;">1</span><span style="color: black;">]</span><span style="color: black;">)</span> <span style="color: black;">{</span> <span style="color: #5e6d03;">return</span> <span style="color: black;">a</span><span style="color: black;">[</span><span style="color: black;">0</span><span style="color: black;">]</span><span style="color: black;">;</span> <span style="color: black;">}</span>
<span style="color: #5e6d03;">if</span> <span style="color: black;">(</span><span style="color: black;">a</span><span style="color: black;">[</span><span style="color: black;">0</span><span style="color: black;">]</span><span style="color: #434f54;">==</span><span style="color: black;">a</span><span style="color: black;">[</span><span style="color: black;">2</span><span style="color: black;">]</span><span style="color: black;">)</span> <span style="color: black;">{</span> <span style="color: #5e6d03;">return</span> <span style="color: black;">a</span><span style="color: black;">[</span><span style="color: black;">0</span><span style="color: black;">]</span><span style="color: black;">;</span> <span style="color: black;">}</span>
<span style="color: #5e6d03;">if</span> <span style="color: black;">(</span><span style="color: black;">a</span><span style="color: black;">[</span><span style="color: black;">1</span><span style="color: black;">]</span><span style="color: #434f54;">==</span><span style="color: black;">a</span><span style="color: black;">[</span><span style="color: black;">2</span><span style="color: black;">]</span><span style="color: black;">)</span> <span style="color: black;">{</span> <span style="color: #5e6d03;">return</span> <span style="color: black;">a</span><span style="color: black;">[</span><span style="color: black;">1</span><span style="color: black;">]</span><span style="color: black;">;</span> <span style="color: black;">}</span>
<span style="color: #5e6d03;">return</span> <span style="color: black;">(</span><span style="color: black;">a</span><span style="color: black;">[</span><span style="color: black;">0</span><span style="color: black;">]</span><span style="color: #434f54;">+</span><span style="color: black;">a</span><span style="color: black;">[</span><span style="color: black;">1</span><span style="color: black;">]</span><span style="color: #434f54;">+</span><span style="color: black;">a</span><span style="color: black;">[</span><span style="color: black;">2</span><span style="color: black;">]</span><span style="color: black;">)</span><span style="color: #434f54;">/</span><span style="color: black;">3</span><span style="color: black;">;</span>
<span style="color: black;">}</span>
<span style="color: #00979c;">int</span> <span style="color: black;">pusharr</span><span style="color: black;">(</span><span style="color: #00979c;">int</span> <span style="color: black;">a</span><span style="color: black;">[</span><span style="color: black;">]</span><span style="color: #434f54;">,</span><span style="color: #00979c;">int</span> <span style="color: black;">pushval</span><span style="color: black;">)</span> <span style="color: black;">{</span>
<span style="color: black;">a</span><span style="color: black;">[</span><span style="color: black;">2</span><span style="color: black;">]</span><span style="color: #434f54;">=</span><span style="color: black;">a</span><span style="color: black;">[</span><span style="color: black;">1</span><span style="color: black;">]</span><span style="color: black;">;</span>
<span style="color: black;">a</span><span style="color: black;">[</span><span style="color: black;">1</span><span style="color: black;">]</span><span style="color: #434f54;">=</span><span style="color: black;">a</span><span style="color: black;">[</span><span style="color: black;">0</span><span style="color: black;">]</span><span style="color: black;">;</span>
<span style="color: black;">a</span><span style="color: black;">[</span><span style="color: black;">0</span><span style="color: black;">]</span><span style="color: #434f54;">=</span><span style="color: black;">pushval</span><span style="color: black;">;</span>
<span style="color: #5e6d03;">return</span> <span style="color: black;">0</span><span style="color: black;">;</span>
<span style="color: black;">}</span>
<span style="color: #00979c;">void</span> <span style="color: black;">dostuff</span><span style="color: black;">(</span><span style="color: black;">)</span><span style="color: black;">{</span>
<span style="color: black;">execute</span><span style="color: #434f54;">=</span><span style="color: black;">0</span><span style="color: black;">;</span>
<span style="color: black;">RServo</span> <span style="color: #434f54;">=</span> <span style="color: black;">1500</span><span style="color: #434f54;">+</span><span style="color: black;">(</span><span style="color: black;">(</span><span style="color: black;">(</span><span style="color: black;">(</span><span style="color: #00979c;">long</span><span style="color: black;">)</span><span style="color: black;">pulsetime1</span><span style="color: #434f54;">-</span><span style="color: black;">1500</span><span style="color: black;">)</span><span style="color: #434f54;">*</span><span style="color: black;">(</span><span style="color: black;">(</span><span style="color: #00979c;">long</span><span style="color: black;">)</span><span style="color: black;">pulsetime2</span><span style="color: #434f54;">-</span><span style="color: black;">1500</span><span style="color: black;">)</span><span style="color: black;">)</span><span style="color: #434f54;">/</span><span style="color: black;">500</span><span style="color: black;">)</span><span style="color: black;">;</span>
<span style="color: #5e6d03;">if</span> <span style="color: black;">(</span><span style="color: black;">RServo</span> <span style="color: #434f54;">></span> <span style="color: black;">2050</span><span style="color: black;">)</span> <span style="color: black;">{</span>
<span style="color: black;">RServo</span><span style="color: #434f54;">=</span><span style="color: black;">2050</span><span style="color: black;">;</span>
<span style="color: black;">}</span> <span style="color: #5e6d03;">else</span> <span style="color: black;">{</span>
<span style="color: #5e6d03;">if</span> <span style="color: black;">(</span><span style="color: black;">RServo</span> <span style="color: #434f54;"><</span> <span style="color: black;">950</span><span style="color: black;">)</span> <span style="color: black;">{</span>
<span style="color: black;">RServo</span><span style="color: #434f54;">=</span><span style="color: black;">950</span><span style="color: black;">;</span>
<span style="color: black;">}</span>
<span style="color: black;">}</span>
<b><span style="color: #d35400;">Serial</span></b><span style="color: #434f54;">.</span><span style="color: #d35400;">print</span><span style="color: black;">(</span><span style="color: #005c5f;">"P1."</span><span style="color: black;">)</span><span style="color: black;">;</span>
<b><span style="color: #d35400;">Serial</span></b><span style="color: #434f54;">.</span><span style="color: #d35400;">print</span><span style="color: black;">(</span><span style="color: black;">pulsetime1</span><span style="color: black;">)</span><span style="color: black;">;</span>
<b><span style="color: #d35400;">Serial</span></b><span style="color: #434f54;">.</span><span style="color: #d35400;">print</span><span style="color: black;">(</span><span style="color: #005c5f;">"--P2."</span><span style="color: black;">)</span><span style="color: black;">;</span>
<b><span style="color: #d35400;">Serial</span></b><span style="color: #434f54;">.</span><span style="color: #d35400;">print</span><span style="color: black;">(</span><span style="color: black;">pulsetime2</span><span style="color: black;">)</span><span style="color: black;">;</span>
<b><span style="color: #d35400;">Serial</span></b><span style="color: #434f54;">.</span><span style="color: #d35400;">print</span><span style="color: black;">(</span><span style="color: #005c5f;">"--SRear."</span><span style="color: black;">)</span><span style="color: black;">;</span>
<b><span style="color: #d35400;">Serial</span></b><span style="color: #434f54;">.</span><span style="color: #d35400;">print</span><span style="color: black;">(</span><span style="color: black;">RServo</span><span style="color: black;">)</span><span style="color: black;">;</span>
<b><span style="color: #d35400;">Serial</span></b><span style="color: #434f54;">.</span><span style="color: #d35400;">print</span><span style="color: black;">(</span><span style="color: #005c5f;">"\n"</span> <span style="color: black;">)</span><span style="color: black;">;</span>
<span style="color: black;">execute</span><span style="color: #434f54;">=</span><span style="color: black;">1</span><span style="color: black;">;</span>
<span style="color: black;">}</span>
<span style="color: #00979c;">void</span> <span style="color: black;">chan1</span><span style="color: black;">(</span><span style="color: black;">)</span>
<span style="color: black;">{</span>
<span style="color: #5e6d03;">if</span><span style="color: black;">(</span><span style="color: #d35400;">digitalRead</span><span style="color: black;">(</span><span style="color: black;">servoin1</span><span style="color: black;">)</span> <span style="color: #434f54;">==</span> <span style="color: #00979c;">HIGH</span><span style="color: black;">)</span>
<span style="color: black;">{</span>
<span style="color: black;">leadingedge1</span> <span style="color: #434f54;">=</span> <span style="color: #d35400;">micros</span><span style="color: black;">(</span><span style="color: black;">)</span><span style="color: black;">;</span>
<span style="color: black;">}</span> <span style="color: #5e6d03;">else</span> <span style="color: black;">{</span>
<span style="color: #5e6d03;">if</span> <span style="color: black;">(</span><span style="color: black;">leadingedge1</span> <span style="color: #434f54;">></span> <span style="color: black;">0</span><span style="color: black;">)</span>
<span style="color: black;">{</span>
<span style="color: black;">pulsetime1</span> <span style="color: #434f54;">=</span> <span style="color: black;">(</span><span style="color: black;">(</span><span style="color: #00979c;">volatile</span> <span style="color: #00979c;">long</span><span style="color: black;">)</span><span style="color: #d35400;">micros</span><span style="color: black;">(</span><span style="color: black;">)</span> <span style="color: #434f54;">-</span> <span style="color: black;">leadingedge1</span><span style="color: black;">)</span><span style="color: #434f54;">-</span><span style="color: black;">14</span><span style="color: black;">;</span></pre><pre><span style="color: #434f54;"> //14 us added from other operations? center needed normalizing to 1500</span>
<span style="color: #5e6d03;">if</span> <span style="color: black;">(</span><span style="color: black;">(</span><span style="color: black;">pulsetime1</span> <span style="color: #434f54;">></span> <span style="color: black;">800</span> <span style="color: #5e6d03;">and</span> <span style="color: black;">pulsetime1</span> <span style="color: #434f54;"><</span> <span style="color: black;">2200</span><span style="color: black;">)</span><span style="color: black;">)</span> <span style="color: black;">{</span><span style="color: black;">pusharr</span><span style="color: black;">(</span><span style="color: black;">ch1_hist</span><span style="color: #434f54;">,</span><span style="color: black;">pulsetime1</span><span style="color: black;">)</span><span style="color: black;">;</span><span style="color: black;">}</span>
<span style="color: black;">leadingedge1</span> <span style="color: #434f54;">=</span> <span style="color: black;">0</span><span style="color: black;">;</span>
<span style="color: black;">pulsetime1</span><span style="color: #434f54;">=</span> <span style="color: black;">amode</span><span style="color: black;">(</span><span style="color: black;">ch1_hist</span><span style="color: black;">)</span><span style="color: black;">;</span>
<span style="color: black;">}</span>
<span style="color: black;">}</span>
<span style="color: black;">}</span>
<span style="color: #00979c;">void</span> <span style="color: black;">chan2</span><span style="color: black;">(</span><span style="color: black;">)</span>
<span style="color: black;">{</span>
<span style="color: #5e6d03;">if</span><span style="color: black;">(</span><span style="color: #d35400;">digitalRead</span><span style="color: black;">(</span><span style="color: black;">servoin2</span><span style="color: black;">)</span> <span style="color: #434f54;">==</span> <span style="color: #00979c;">HIGH</span><span style="color: black;">)</span>
<span style="color: black;">{</span>
<span style="color: black;">leadingedge2</span> <span style="color: #434f54;">=</span> <span style="color: #d35400;">micros</span><span style="color: black;">(</span><span style="color: black;">)</span><span style="color: black;">;</span>
<span style="color: black;">}</span>
<span style="color: #5e6d03;">else</span>
<span style="color: black;">{</span>
<span style="color: #5e6d03;">if</span><span style="color: black;">(</span><span style="color: black;">leadingedge2</span> <span style="color: #434f54;">></span> <span style="color: black;">0</span><span style="color: black;">)</span>
<span style="color: black;">{</span>
<span style="color: black;">pulsetime2</span> <span style="color: #434f54;">=</span> <span style="color: black;">(</span><span style="color: black;">(</span><span style="color: #00979c;">volatile</span> <span style="color: #00979c;">long</span><span style="color: black;">)</span><span style="color: #d35400;">micros</span><span style="color: black;">(</span><span style="color: black;">)</span> <span style="color: #434f54;">-</span> <span style="color: black;">leadingedge2</span><span style="color: black;">)</span><span style="color: #434f54;">-</span><span style="color: black;">14</span><span style="color: black;">;</span>
<span style="color: #5e6d03;">if</span> <span style="color: black;">(</span><span style="color: black;">(</span><span style="color: black;">pulsetime2</span> <span style="color: #434f54;">></span> <span style="color: black;">800</span> <span style="color: #5e6d03;">and</span> <span style="color: black;">pulsetime2</span> <span style="color: #434f54;"><</span> <span style="color: black;">2200</span><span style="color: black;">)</span><span style="color: black;">)</span> <span style="color: black;">{</span><span style="color: black;">pusharr</span><span style="color: black;">(</span><span style="color: black;">ch2_hist</span><span style="color: #434f54;">,</span><span style="color: black;">pulsetime2</span><span style="color: black;">)</span><span style="color: black;">;</span><span style="color: black;">}</span>
<span style="color: black;">leadingedge2</span> <span style="color: #434f54;">=</span> <span style="color: black;">0</span><span style="color: black;">;</span>
<span style="color: black;">pulsetime2</span><span style="color: #434f54;">=</span> <span style="color: black;">amode</span><span style="color: black;">(</span><span style="color: black;">ch2_hist</span><span style="color: black;">)</span><span style="color: black;">;</span>
<span style="color: black;">}</span>
<span style="color: black;">}</span>
<span style="color: black;">}</span>
<span style="color: #00979c;">void</span> <span style="color: #5e6d03;">loop</span><span style="color: black;">(</span><span style="color: black;">)</span>
<span style="color: black;">{</span>
<span style="color: #d35400;">delay</span><span style="color: black;">(</span><span style="color: black;">2</span><span style="color: black;">)</span><span style="color: black;">;</span> <span style="color: #434f54;">//delay is non blocking</span>
<span style="color: black;">dostuff</span><span style="color: black;">(</span><span style="color: black;">)</span><span style="color: black;">;</span> <span style="color: #434f54;">//do stuff after the receiver has sent all pulses</span>
<span style="color: #5e6d03;">if</span> <span style="color: black;">(</span><span style="color: black;">execute</span><span style="color: #434f54;">==</span><span style="color: black;">1</span><span style="color: black;">)</span> <span style="color: black;">{</span> <span style="color: black;">rearservo</span><span style="color: #434f54;">.</span><span style="color: #d35400;">write</span><span style="color: black;">(</span><span style="color: black;">RServo</span><span style="color: black;">)</span><span style="color: black;">;</span><span style="color: black;">}</span>
<span style="color: black;">}</span>
</pre><div><span style="color: black;"><br /></span></div></pre></blockquote>Beomagihttp://www.blogger.com/profile/00469223835355067867noreply@blogger.com0