<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:blogger='http://schemas.google.com/blogger/2008' xmlns:georss='http://www.georss.org/georss' xmlns:gd="http://schemas.google.com/g/2005" xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-7455490061003058486</id><updated>2026-10-03T02:03:13.978-04:00</updated><category term="wireless"/><category term="opus"/><category term="Concordia"/><category term="stm"/><category term="opus cards"/><category term="rfid"/><category term="montreal transit"/><category term="hack"/><category term="linux"/><category term="metro"/><category term="bus"/><category term="free"/><category term="train"/><category term="windows xp"/><category term="amt"/><category term="contactless smart card"/><category term="encs"/><category term="magnetic cards"/><category term="rtl"/><category term="security"/><category term="windows vista"/><category term="OS X"/><category term="internet"/><category term="802.1x"/><category term="HP TX1000"/><category term="adware"/><category term="audio"/><category term="bell sympatico"/><category term="engineering"/><category term="google maps"/><category term="internet explorer"/><category term="laptop"/><category term="microsoft"/><category term="networking"/><category term="phish"/><category term="phishing"/><category term="software"/><category term="spyware"/><category term="ubuntu"/><category term="university"/><category term="vwindows vista"/><category term="wifi"/><category term="windows 7"/><category term=".com"/><category term="10.4"/><category term="3gp"/><category term="7z"/><category term="818 pro"/><category term="OC TRANSPO"/><category term="Ottawa"/><category term="Panther"/><category term="Pebble"/><category term="WRT54G"/><category term="Windows Phone 7"/><category term="activesync"/><category term="amr"/><category term="applications"/><category term="arduino"/><category term="avast"/><category term="bell tv"/><category term="bixi"/><category term="blog"/><category term="broken"/><category term="cable"/><category term="capstone"/><category term="cd-rom"/><category term="cell phones"/><category term="challenge your world"/><category term="compression"/><category term="conference"/><category term="converter"/><category term="cookies"/><category term="cutiemish"/><category term="daemon tools"/><category term="data recovery"/><category term="dd-wrt"/><category term="desktop customization"/><category term="diy"/><category term="dns"/><category term="domain"/><category term="dopod"/><category term="dual boot"/><category term="dvd-rom"/><category term="electronics"/><category term="email"/><category term="facebook"/><category term="failure"/><category term="ffmpeg"/><category term="fiber"/><category term="fiber optic"/><category term="firefox"/><category term="firewall"/><category term="fix"/><category term="folding money"/><category term="forums"/><category term="fraud"/><category term="funny music."/><category term="game access"/><category term="game rental"/><category term="google"/><category term="google earth"/><category term="green party"/><category term="guy kawasaki"/><category term="happy faces"/><category term="hard drive"/><category term="htc"/><category term="iso"/><category term="isp"/><category term="itunes card generator.rar"/><category term="lock up"/><category term="m"/><category term="macbook"/><category term="malicious"/><category term="master reset"/><category term="mcaffee"/><category term="metro pass"/><category term="mouse pointers"/><category term="mp3"/><category term="mpeg"/><category term="network manager"/><category term="network neutrality"/><category term="norton"/><category term="opendns"/><category term="opensource"/><category term="opus card"/><category term="outlook"/><category term="paint"/><category term="peerguardian"/><category term="phone"/><category term="politics"/><category term="privacy"/><category term="prophet"/><category term="putty"/><category term="pvr"/><category term="radar gun"/><category term="rar"/><category term="rental"/><category term="repair"/><category term="review"/><category term="rights"/><category term="robotshop"/><category term="sad faces"/><category term="safe surfing"/><category term="sansa express"/><category term="scam"/><category term="securew2"/><category term="service"/><category term="shell script"/><category term="sound"/><category term="spam"/><category term="spybot"/><category term="ssh"/><category term="startup sound"/><category term="stores"/><category term="superuser"/><category term="surfing habits"/><category term="telnet"/><category term="terminal"/><category term="thunderbird"/><category term="tutorial"/><category term="tv"/><category term="university of cambridge"/><category term="unrar"/><category term="video"/><category term="videotron"/><category term="vista"/><category term="windows mobile"/><category term="winff"/><category term="winrar"/><category term="wireless bridge"/><category term="word"/><category term="wpa"/><category term="wpa_supplicant"/><category term="xbox"/><category term="yahoo"/><title type='text'>Ask a Geek!</title><subtitle type='html'>A place for you to query Jaime Yu&#39;s  mind. </subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://ask.jaimeyu.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7455490061003058486/posts/default?redirect=false'/><link rel='alternate' type='text/html' href='http://ask.jaimeyu.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><link rel='next' type='application/atom+xml' href='http://www.blogger.com/feeds/7455490061003058486/posts/default?start-index=26&amp;max-results=25&amp;redirect=false'/><author><name>Jaime Yu</name><uri>http://www.blogger.com/profile/08493978720803625586</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>287</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-7455490061003058486.post-2266123177178866304</id><published>2015-12-20T09:27:00.002-05:00</published><updated>2015-12-20T09:27:18.159-05:00</updated><title type='text'>Blurry text in Ubuntu w/ Nvidia video cards</title><content type='html'>Finally figured out this issue that&#39;s been plaguing my Ubuntu 14.04 workstation. Turns out I have to disable FXAA in the Nvidia settings app according &lt;a href=&quot;https://bugs.launchpad.net/ubuntu/+source/nvidia-settings/+bug/1307236/comments/24&quot;&gt;to this bug report.&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg7GEVoZGR9pzAYhnYv3V7vxcrNLFhVsGcgSbh6xFAZYUgnW1BkEHfYy3nAUvc9PbLLsYWs0CNVSERsbY4CiTnzgPMsr5hKeUo5e8WdAMA3H4h0vnFMPXXgCTrKoK0n1MnYPXYJN6zAWYHK/s1600/nvidia-settings.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;223&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg7GEVoZGR9pzAYhnYv3V7vxcrNLFhVsGcgSbh6xFAZYUgnW1BkEHfYy3nAUvc9PbLLsYWs0CNVSERsbY4CiTnzgPMsr5hKeUo5e8WdAMA3H4h0vnFMPXXgCTrKoK0n1MnYPXYJN6zAWYHK/s320/nvidia-settings.png&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;</content><link rel='replies' type='application/atom+xml' href='http://ask.jaimeyu.com/feeds/2266123177178866304/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://ask.jaimeyu.com/2015/12/blurry-text-in-ubuntu-w-nvidia-video.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7455490061003058486/posts/default/2266123177178866304'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7455490061003058486/posts/default/2266123177178866304'/><link rel='alternate' type='text/html' href='http://ask.jaimeyu.com/2015/12/blurry-text-in-ubuntu-w-nvidia-video.html' title='Blurry text in Ubuntu w/ Nvidia video cards'/><author><name>Jaime Yu</name><uri>http://www.blogger.com/profile/08493978720803625586</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg7GEVoZGR9pzAYhnYv3V7vxcrNLFhVsGcgSbh6xFAZYUgnW1BkEHfYy3nAUvc9PbLLsYWs0CNVSERsbY4CiTnzgPMsr5hKeUo5e8WdAMA3H4h0vnFMPXXgCTrKoK0n1MnYPXYJN6zAWYHK/s72-c/nvidia-settings.png" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7455490061003058486.post-5283687007056922045</id><published>2015-11-23T01:22:00.002-05:00</published><updated>2015-11-23T01:22:49.398-05:00</updated><title type='text'>FRC GRIP is pretty nice</title><content type='html'>&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
Took longer to figure out how to run &lt;a href=&quot;https://github.com/WPIRoboticsProjects/GRIP&quot;&gt;GRIP&lt;/a&gt; (it doesn&#39;t like openJDK) than it was to find 2 points in an image. Really cool piece of software and can&#39;t wait to figure out how to interface with it in Java.&amp;nbsp;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiBVmh8tNLs-YNLIToqG4lJ8h1eO1BOMniXt4Tn4Har7_KYWdM4J8bZpq3H3HAAoDyvIynsGHwHQFADOMDvqPRU1JibzHP95Fb0nfEh122CakyucyK32LcacVBUuqKh0fVEOZ15i9_80gHI/s1600/Grip_find_two_pts.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;205&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiBVmh8tNLs-YNLIToqG4lJ8h1eO1BOMniXt4Tn4Har7_KYWdM4J8bZpq3H3HAAoDyvIynsGHwHQFADOMDvqPRU1JibzHP95Fb0nfEh122CakyucyK32LcacVBUuqKh0fVEOZ15i9_80gHI/s400/Grip_find_two_pts.png&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;</content><link rel='replies' type='application/atom+xml' href='http://ask.jaimeyu.com/feeds/5283687007056922045/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://ask.jaimeyu.com/2015/11/frc-grip-is-pretty-nice.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7455490061003058486/posts/default/5283687007056922045'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7455490061003058486/posts/default/5283687007056922045'/><link rel='alternate' type='text/html' href='http://ask.jaimeyu.com/2015/11/frc-grip-is-pretty-nice.html' title='FRC GRIP is pretty nice'/><author><name>Jaime Yu</name><uri>http://www.blogger.com/profile/08493978720803625586</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiBVmh8tNLs-YNLIToqG4lJ8h1eO1BOMniXt4Tn4Har7_KYWdM4J8bZpq3H3HAAoDyvIynsGHwHQFADOMDvqPRU1JibzHP95Fb0nfEh122CakyucyK32LcacVBUuqKh0fVEOZ15i9_80gHI/s72-c/Grip_find_two_pts.png" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7455490061003058486.post-3813085391384094758</id><published>2015-11-23T00:51:00.002-05:00</published><updated>2015-11-23T01:25:30.443-05:00</updated><title type='text'>FRC Setting Strongback for development</title><content type='html'>Strongback looks to be a pretty interesting testing library and framework (liking their async and command APIs right now).&lt;br /&gt;
&lt;br /&gt;
I assume you have already gone through the steps to get the &lt;a href=&quot;https://wpilib.screenstepslive.com/s/3120/m/7885&quot;&gt;FRC WPI library working in Eclipse.&lt;/a&gt;&amp;nbsp;The only deviation is that for Strongback, we are going to be using&lt;br /&gt;
&lt;ol&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhyX-miRXVav5n2ar0U9qRUZSmx-crZ-xzAJB8HyXLJq1qGAanHPnKv00R_REBQkFYx7movhFFwl-SLPqwXF4rYyzAkxmqC5sBhyphenhyphennBNYcs6OynRG4PM5CWZr3zf7LSZTliKNbvUTTnuGwRh/s1600/select_jdk.png&quot; imageanchor=&quot;1&quot; style=&quot;clear: left; float: left; margin-bottom: 1em; margin-right: 1em;&quot;&gt;&lt;br /&gt;&lt;/a&gt;
&lt;li&gt;&lt;a href=&quot;http://ubuntuhandbook.org/index.php/2015/01/install-openjdk-8-ubuntu-14-04-12-04-lts/&quot;&gt;Install OpenJDK 8&lt;/a&gt;:&lt;br /&gt;&lt;table class=&quot;highlight tab-size js-file-line-container&quot; data-tab-size=&quot;8&quot; style=&quot;background-color: white; border-collapse: collapse; border-spacing: 0px; box-sizing: border-box; color: #333333; font-family: Helvetica, arial, nimbussansl, liberationsans, freesans, clean, sans-serif, &#39;Apple Color Emoji&#39;, &#39;Segoe UI Emoji&#39;, &#39;Segoe UI Symbol&#39;; font-size: 13px; line-height: 18.2px; tab-size: 8;&quot;&gt;&lt;tbody style=&quot;box-sizing: border-box;&quot;&gt;
&lt;tr style=&quot;box-sizing: border-box;&quot;&gt;&lt;td class=&quot;blob-code blob-code-inner js-file-line&quot; id=&quot;file-install_openjdk8-sh-LC1&quot; style=&quot;box-sizing: border-box; font-family: Consolas, &#39;Liberation Mono&#39;, Menlo, Courier, monospace; font-size: 12px; overflow: visible; padding: 0px 10px; position: relative; vertical-align: top; white-space: pre; word-wrap: normal;&quot;&gt;&lt;br /&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr style=&quot;box-sizing: border-box;&quot;&gt;&lt;td class=&quot;blob-num js-line-number&quot; data-line-number=&quot;2&quot; id=&quot;file-install_openjdk8-sh-L2&quot; style=&quot;-webkit-user-select: none; border-color: rgb(238, 238, 238); border-style: solid; border-width: 0px 1px 0px 0px; box-sizing: border-box; color: rgba(0, 0, 0, 0.298039); cursor: pointer; font-family: Consolas, &#39;Liberation Mono&#39;, Menlo, Courier, monospace; font-size: 12px; line-height: 18px; min-width: 50px; padding: 0px 10px; text-align: right; vertical-align: top; white-space: nowrap; width: 50px;&quot;&gt;&lt;/td&gt;&lt;td class=&quot;blob-code blob-code-inner js-file-line&quot; id=&quot;file-install_openjdk8-sh-LC2&quot; style=&quot;box-sizing: border-box; font-family: Consolas, &#39;Liberation Mono&#39;, Menlo, Courier, monospace; font-size: 12px; overflow: visible; padding: 0px 10px; position: relative; vertical-align: top; white-space: pre; word-wrap: normal;&quot;&gt;sudo add-apt-repository ppa:openjdk-r/ppa&lt;/td&gt;&lt;/tr&gt;
&lt;tr style=&quot;box-sizing: border-box;&quot;&gt;&lt;td class=&quot;blob-num js-line-number&quot; data-line-number=&quot;3&quot; id=&quot;file-install_openjdk8-sh-L3&quot; style=&quot;-webkit-user-select: none; border-color: rgb(238, 238, 238); border-style: solid; border-width: 0px 1px 0px 0px; box-sizing: border-box; color: rgba(0, 0, 0, 0.298039); cursor: pointer; font-family: Consolas, &#39;Liberation Mono&#39;, Menlo, Courier, monospace; font-size: 12px; line-height: 18px; min-width: 50px; padding: 0px 10px; text-align: right; vertical-align: top; white-space: nowrap; width: 50px;&quot;&gt;&lt;/td&gt;&lt;td class=&quot;blob-code blob-code-inner js-file-line&quot; id=&quot;file-install_openjdk8-sh-LC3&quot; style=&quot;box-sizing: border-box; font-family: Consolas, &#39;Liberation Mono&#39;, Menlo, Courier, monospace; font-size: 12px; overflow: visible; padding: 0px 10px; position: relative; vertical-align: top; white-space: pre; word-wrap: normal;&quot;&gt;sudo apt-get update &lt;/td&gt;&lt;/tr&gt;
&lt;tr style=&quot;box-sizing: border-box;&quot;&gt;&lt;td class=&quot;blob-num js-line-number&quot; data-line-number=&quot;4&quot; id=&quot;file-install_openjdk8-sh-L4&quot; style=&quot;-webkit-user-select: none; border-color: rgb(238, 238, 238); border-style: solid; border-width: 0px 1px 0px 0px; box-sizing: border-box; color: rgba(0, 0, 0, 0.298039); cursor: pointer; font-family: Consolas, &#39;Liberation Mono&#39;, Menlo, Courier, monospace; font-size: 12px; line-height: 18px; min-width: 50px; padding: 0px 10px; text-align: right; vertical-align: top; white-space: nowrap; width: 50px;&quot;&gt;&lt;/td&gt;&lt;td class=&quot;blob-code blob-code-inner js-file-line&quot; id=&quot;file-install_openjdk8-sh-LC4&quot; style=&quot;box-sizing: border-box; font-family: Consolas, &#39;Liberation Mono&#39;, Menlo, Courier, monospace; font-size: 12px; overflow: visible; padding: 0px 10px; position: relative; vertical-align: top; white-space: pre; word-wrap: normal;&quot;&gt;sudo apt-get install openjdk-8-jdk&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;table class=&quot;highlight tab-size js-file-line-container&quot; data-tab-size=&quot;8&quot; style=&quot;background-color: white; border-collapse: collapse; border-spacing: 0px; box-sizing: border-box; color: #333333; font-family: Helvetica, arial, nimbussansl, liberationsans, freesans, clean, sans-serif, &#39;Apple Color Emoji&#39;, &#39;Segoe UI Emoji&#39;, &#39;Segoe UI Symbol&#39;; font-size: 13px; line-height: 18.2px; tab-size: 8;&quot;&gt;&lt;tbody style=&quot;box-sizing: border-box;&quot;&gt;&lt;/tbody&gt;&lt;/table&gt;
&lt;/li&gt;
&lt;li&gt;Now set your default JDK. &lt;br /&gt;&lt;table class=&quot;highlight tab-size js-file-line-container&quot; data-tab-size=&quot;8&quot; style=&quot;background-color: white; border-collapse: collapse; border-spacing: 0px; box-sizing: border-box; color: #333333; font-family: Helvetica, arial, nimbussansl, liberationsans, freesans, clean, sans-serif, &#39;Apple Color Emoji&#39;, &#39;Segoe UI Emoji&#39;, &#39;Segoe UI Symbol&#39;; font-size: 13px; line-height: 18.2px; tab-size: 8;&quot;&gt;&lt;tbody style=&quot;box-sizing: border-box;&quot;&gt;
&lt;tr style=&quot;box-sizing: border-box;&quot;&gt;&lt;/tr&gt;
&lt;tr style=&quot;box-sizing: border-box;&quot;&gt;&lt;td class=&quot;blob-code blob-code-inner js-file-line&quot; id=&quot;file-install_openjdk8-sh-LC5&quot; style=&quot;box-sizing: border-box; font-family: Consolas, &#39;Liberation Mono&#39;, Menlo, Courier, monospace; font-size: 12px; overflow: visible; padding: 0px 10px; position: relative; vertical-align: top; white-space: pre; word-wrap: normal;&quot;&gt;sudo update-alternatives --config java&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
In my case, it is open 2.&lt;br /&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhyX-miRXVav5n2ar0U9qRUZSmx-crZ-xzAJB8HyXLJq1qGAanHPnKv00R_REBQkFYx7movhFFwl-SLPqwXF4rYyzAkxmqC5sBhyphenhyphennBNYcs6OynRG4PM5CWZr3zf7LSZTliKNbvUTTnuGwRh/s1600/select_jdk.png&quot; imageanchor=&quot;1&quot; style=&quot;clear: left; margin-bottom: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;226&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhyX-miRXVav5n2ar0U9qRUZSmx-crZ-xzAJB8HyXLJq1qGAanHPnKv00R_REBQkFYx7movhFFwl-SLPqwXF4rYyzAkxmqC5sBhyphenhyphennBNYcs6OynRG4PM5CWZr3zf7LSZTliKNbvUTTnuGwRh/s320/select_jdk.png&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;Now select your Java compiler.&lt;br /&gt;&lt;table class=&quot;highlight tab-size js-file-line-container&quot; data-tab-size=&quot;8&quot; style=&quot;background-color: white; border-collapse: collapse; border-spacing: 0px; box-sizing: border-box; color: #333333; font-family: Helvetica, arial, nimbussansl, liberationsans, freesans, clean, sans-serif, &#39;Apple Color Emoji&#39;, &#39;Segoe UI Emoji&#39;, &#39;Segoe UI Symbol&#39;; font-size: 13px; line-height: 18.2px; tab-size: 8;&quot;&gt;&lt;tbody style=&quot;box-sizing: border-box;&quot;&gt;
&lt;tr style=&quot;box-sizing: border-box;&quot;&gt;&lt;/tr&gt;
&lt;tr style=&quot;box-sizing: border-box;&quot;&gt;&lt;td class=&quot;blob-code blob-code-inner js-file-line&quot; id=&quot;file-install_openjdk8-sh-LC6&quot; style=&quot;box-sizing: border-box; font-family: Consolas, &#39;Liberation Mono&#39;, Menlo, Courier, monospace; font-size: 12px; overflow: visible; padding: 0px 10px; position: relative; vertical-align: top; white-space: pre; word-wrap: normal;&quot;&gt;sudo update-alternatives --config javac&lt;/td&gt;&lt;/tr&gt;
&lt;tr style=&quot;box-sizing: border-box;&quot;&gt;&lt;td class=&quot;blob-num js-line-number&quot; data-line-number=&quot;7&quot; id=&quot;file-install_openjdk8-sh-L7&quot; style=&quot;-webkit-user-select: none; border-color: rgb(238, 238, 238); border-style: solid; border-width: 0px 1px 0px 0px; box-sizing: border-box; color: rgba(0, 0, 0, 0.298039); cursor: pointer; font-family: Consolas, &#39;Liberation Mono&#39;, Menlo, Courier, monospace; font-size: 12px; line-height: 18px; min-width: 50px; padding: 0px 10px; text-align: right; vertical-align: top; white-space: nowrap; width: 50px;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;br /&gt;Mine is option 2.&lt;br /&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgJyTJGU9lAmCBt130iIzcKCNfAqXQmMFOhUkySTE4BMuVQ3pvl_C3yOYqRdgQWf_gG1s5wl-EzcCzlKRujSkhYf9gEsTV0RfKgcIBoAWyK34uzakjzJwnZEPaVT2dU3YKyw0iLA9WX19OT/s1600/select_javac.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em; text-align: center;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;223&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgJyTJGU9lAmCBt130iIzcKCNfAqXQmMFOhUkySTE4BMuVQ3pvl_C3yOYqRdgQWf_gG1s5wl-EzcCzlKRujSkhYf9gEsTV0RfKgcIBoAWyK34uzakjzJwnZEPaVT2dU3YKyw0iLA9WX19OT/s320/select_javac.png&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;Ok, Let&#39;s install Strongback (reference: &lt;a href=&quot;https://strongback.gitbooks.io/using-strongback/content/getting_started.html&quot;&gt;Strongback book&lt;/a&gt;)&lt;table class=&quot;highlight tab-size js-file-line-container&quot; data-tab-size=&quot;8&quot; style=&quot;background-color: white; border-collapse: collapse; border-spacing: 0px; box-sizing: border-box; color: #333333; font-family: Helvetica, arial, nimbussansl, liberationsans, freesans, clean, sans-serif, &#39;Apple Color Emoji&#39;, &#39;Segoe UI Emoji&#39;, &#39;Segoe UI Symbol&#39;; font-size: 13px; line-height: 18.2px; tab-size: 8;&quot;&gt;&lt;tbody style=&quot;box-sizing: border-box;&quot;&gt;
&lt;tr style=&quot;box-sizing: border-box;&quot;&gt;&lt;td class=&quot;blob-num js-line-number&quot; data-line-number=&quot;2&quot; id=&quot;file-install_strongback-sh-L2&quot; style=&quot;-webkit-user-select: none; border-color: rgb(238, 238, 238); border-style: solid; border-width: 0px 1px 0px 0px; box-sizing: border-box; color: rgba(0, 0, 0, 0.298039); cursor: pointer; font-family: Consolas, &#39;Liberation Mono&#39;, Menlo, Courier, monospace; font-size: 12px; line-height: 18px; min-width: 50px; padding: 0px 10px; text-align: right; vertical-align: top; white-space: nowrap; width: 50px;&quot;&gt;&lt;/td&gt;&lt;td class=&quot;blob-code blob-code-inner js-file-line&quot; id=&quot;file-install_strongback-sh-LC2&quot; style=&quot;box-sizing: border-box; font-family: Consolas, &#39;Liberation Mono&#39;, Menlo, Courier, monospace; font-size: 12px; overflow: visible; padding: 0px 10px; position: relative; vertical-align: top; white-space: pre; word-wrap: normal;&quot;&gt;curl -OL https://github.com/strongback/strongback-java/releases/download/v1.0.2/strongback-1.0.2.zip&lt;/td&gt;&lt;/tr&gt;
&lt;tr style=&quot;box-sizing: border-box;&quot;&gt;&lt;td class=&quot;blob-num js-line-number&quot; data-line-number=&quot;3&quot; id=&quot;file-install_strongback-sh-L3&quot; style=&quot;-webkit-user-select: none; border-color: rgb(238, 238, 238); border-style: solid; border-width: 0px 1px 0px 0px; box-sizing: border-box; color: rgba(0, 0, 0, 0.298039); cursor: pointer; font-family: Consolas, &#39;Liberation Mono&#39;, Menlo, Courier, monospace; font-size: 12px; line-height: 18px; min-width: 50px; padding: 0px 10px; text-align: right; vertical-align: top; white-space: nowrap; width: 50px;&quot;&gt;&lt;/td&gt;&lt;td class=&quot;blob-code blob-code-inner js-file-line&quot; id=&quot;file-install_strongback-sh-LC3&quot; style=&quot;box-sizing: border-box; font-family: Consolas, &#39;Liberation Mono&#39;, Menlo, Courier, monospace; font-size: 12px; overflow: visible; padding: 0px 10px; position: relative; vertical-align: top; white-space: pre; word-wrap: normal;&quot;&gt;unzip strongback-1.0.2.zip -d &lt;span class=&quot;pl-k&quot; style=&quot;box-sizing: border-box; color: #a71d5d;&quot;&gt;~&lt;/span&gt;/&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;/li&gt;
&lt;li&gt;Now add it to your $PATH. Add the following to the bottom of your ~/.bashrc (or which ever shell&#39;s profile you use). This will allow future Strongback projects to find Strongback. Here is a one liner you can use.&lt;br /&gt;&lt;span class=&quot;pl-c1&quot; style=&quot;background-color: white; box-sizing: border-box; color: #0086b3; font-family: &amp;quot;consolas&amp;quot; , &amp;quot;liberation mono&amp;quot; , &amp;quot;menlo&amp;quot; , &amp;quot;courier&amp;quot; , monospace; font-size: 12px; line-height: 16.8px; white-space: pre;&quot;&gt;echo&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #333333; font-family: &amp;quot;consolas&amp;quot; , &amp;quot;liberation mono&amp;quot; , &amp;quot;menlo&amp;quot; , &amp;quot;courier&amp;quot; , monospace; font-size: 12px; line-height: 16.8px; white-space: pre;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pl-s&quot; style=&quot;background-color: white; box-sizing: border-box; color: #183691; font-family: &amp;quot;consolas&amp;quot; , &amp;quot;liberation mono&amp;quot; , &amp;quot;menlo&amp;quot; , &amp;quot;courier&amp;quot; , monospace; font-size: 12px; line-height: 16.8px; white-space: pre;&quot;&gt;&lt;span class=&quot;pl-pds&quot; style=&quot;box-sizing: border-box;&quot;&gt;&#39;&lt;/span&gt;export PATH=~/strongback/java/bin:$PATH&lt;span class=&quot;pl-pds&quot; style=&quot;box-sizing: border-box;&quot;&gt;&#39;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #333333; font-family: &amp;quot;consolas&amp;quot; , &amp;quot;liberation mono&amp;quot; , &amp;quot;menlo&amp;quot; , &amp;quot;courier&amp;quot; , monospace; font-size: 12px; line-height: 16.8px; white-space: pre;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pl-k&quot; style=&quot;background-color: white; box-sizing: border-box; color: #a71d5d; font-family: &amp;quot;consolas&amp;quot; , &amp;quot;liberation mono&amp;quot; , &amp;quot;menlo&amp;quot; , &amp;quot;courier&amp;quot; , monospace; font-size: 12px; line-height: 16.8px; white-space: pre;&quot;&gt;&amp;gt;&amp;gt;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #333333; font-family: &amp;quot;consolas&amp;quot; , &amp;quot;liberation mono&amp;quot; , &amp;quot;menlo&amp;quot; , &amp;quot;courier&amp;quot; , monospace; font-size: 12px; line-height: 16.8px; white-space: pre;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pl-k&quot; style=&quot;background-color: white; box-sizing: border-box; color: #a71d5d; font-family: &amp;quot;consolas&amp;quot; , &amp;quot;liberation mono&amp;quot; , &amp;quot;menlo&amp;quot; , &amp;quot;courier&amp;quot; , monospace; font-size: 12px; line-height: 16.8px; white-space: pre;&quot;&gt;~&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #333333; font-family: &amp;quot;consolas&amp;quot; , &amp;quot;liberation mono&amp;quot; , &amp;quot;menlo&amp;quot; , &amp;quot;courier&amp;quot; , monospace; font-size: 12px; line-height: 16.8px; white-space: pre;&quot;&gt;/.bashrc&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;Restart your terminal or shell session.&lt;/li&gt;
&lt;li&gt;Now start Eclipse and let&#39;s make sure it found Strongback and is using Java 1.8 (also called Java 8).&lt;br /&gt;If it isn&#39;t using Java 1.8, then Strongback will fail because it uses Java 1.8 semantics.&lt;/li&gt;
&lt;li&gt;Here is a picture of what step 9-13 should look like&lt;br /&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjVB0lUF-buVifqFVD25BiTzYrjhujVF0AsgyhjHoqQWAso1OfD_rNh_TiPk2N8f1jrGYfFX0bZs01I1cVX17iK0Q1D5me6jFJ5_Jsaa_QXzRwaGF86xMklI32Xv67OwYbGy_1rrV6xpZru/s1600/Add_openjdk8_to_eclipse.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em; text-align: center;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;164&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjVB0lUF-buVifqFVD25BiTzYrjhujVF0AsgyhjHoqQWAso1OfD_rNh_TiPk2N8f1jrGYfFX0bZs01I1cVX17iK0Q1D5me6jFJ5_Jsaa_QXzRwaGF86xMklI32Xv67OwYbGy_1rrV6xpZru/s320/Add_openjdk8_to_eclipse.png&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;In Eclipse, click on the tool bar&lt;br /&gt;WINDOW &amp;gt; PREFERENCES&lt;/li&gt;
&lt;li&gt;Navigate to &quot;Installed JREs&quot;&lt;/li&gt;
&lt;li&gt;If you don&#39;t see &quot;Java-8...&quot;, then select &quot;Add&quot;&lt;/li&gt;
&lt;li&gt;Select &quot;Standard V&amp;lt;&quot; and hit next.&lt;/li&gt;
&lt;li&gt;Put &quot;/usr/lib/jvm/java-8-openjdk-amd64/jre&quot; into the &quot;JRE home&quot; and click Finish.&lt;/li&gt;
&lt;li&gt;Now back in the &quot;Preference&quot; window, click &quot;Compiler and make sure &quot;1.8&quot; is selected (This is Java 8).&lt;br /&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEic7xI_jMLRDFThuqupuQXEG7bUB4IAP4Sb769VUsS9qeGTDzrWMtpJ5cnRegAWy50QhZsVp1_Ol3BIdwsIFB_lYNi4mdU4YS4SWxGj8xeaHfZWpMrUQvQ8yU9EzvvTDyESSJxxTqSQzjoH/s1600/Add_openjdk8_to_eclipse_compliance.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em; text-align: center;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;164&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEic7xI_jMLRDFThuqupuQXEG7bUB4IAP4Sb769VUsS9qeGTDzrWMtpJ5cnRegAWy50QhZsVp1_Ol3BIdwsIFB_lYNi4mdU4YS4SWxGj8xeaHfZWpMrUQvQ8yU9EzvvTDyESSJxxTqSQzjoH/s320/Add_openjdk8_to_eclipse_compliance.png&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;Restart Eclipse and we should be good to go.&lt;/li&gt;
&lt;li&gt;That&#39;s it to get it installed.&amp;nbsp;&lt;/li&gt;
&lt;/ol&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
Now lets start a project&lt;/div&gt;
&lt;div&gt;
&lt;ol&gt;
&lt;li&gt;Create a project&lt;/li&gt;
&lt;li&gt;Go to ~/workspace and then enter the following (Note 2706 is the team I am currently associated with. Change it accordingly).&lt;br /&gt;&lt;span style=&quot;background-color: white; color: #333333; font-family: &amp;quot;consolas&amp;quot; , &amp;quot;liberation mono&amp;quot; , &amp;quot;menlo&amp;quot; , &amp;quot;courier&amp;quot; , monospace; font-size: 12px; line-height: 16.8px; white-space: pre;&quot;&gt;strongback.sh new-project -e -p com.2706.robot -r MyRobotProject&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;Now start eclipse and import the project.&lt;br /&gt;Select FILE &amp;gt; IMPORT&lt;br /&gt;Then select &#39;Existing Projects into Workspace&#39;&lt;br /&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhprQNPfuqRnrQcLJGchRMbmzorQtPKIl_8-mkoPvstQLRa_cNIHFdJnlsZOGfioCjGg-KsP6tAF2_e8TfilEim3CMDx8VjVQ2pZ3g7yi5bDhtckaE92__ZwdQI9riX__mMXGTHIizHPpl5/s1600/eclipse_import.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em; text-align: center;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;164&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhprQNPfuqRnrQcLJGchRMbmzorQtPKIl_8-mkoPvstQLRa_cNIHFdJnlsZOGfioCjGg-KsP6tAF2_e8TfilEim3CMDx8VjVQ2pZ3g7yi5bDhtckaE92__ZwdQI9riX__mMXGTHIizHPpl5/s320/eclipse_import.png&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;In the next window, make sure &#39;Select root directory&#39; is selected and then press &#39;Browse&#39;.&lt;/li&gt;
&lt;li&gt;Then navigate to the &amp;nbsp;project we just created. Mine is in ~/workspace/MyRobotProject&lt;br /&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjv0VjJCTVj2_M6mKx-Ik9S1AJo37VW1KsFIfM9mDh5XzJJUJMCN81k8R5XB0u4Oow1cnQloijpxF_6r66o7ph6113fHRZCgiT4PFKbqNBT_OOcFB7QvabtvhFQWHc7NVyFXUfoLU-1HGMx/s1600/eclipse_import_directory.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em; text-align: center;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;164&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjv0VjJCTVj2_M6mKx-Ik9S1AJo37VW1KsFIfM9mDh5XzJJUJMCN81k8R5XB0u4Oow1cnQloijpxF_6r66o7ph6113fHRZCgiT4PFKbqNBT_OOcFB7QvabtvhFQWHc7NVyFXUfoLU-1HGMx/s320/eclipse_import_directory.png&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;Now make sure it found the project and hit Finish.&lt;br /&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjIPq1Mo75anFTwxnKeRlj3wvZ0QPKJ-WYycs5fRaUCjIa4X9t0Y6KD3gbtg2UcyHzFNtgDXl6m156RAVO_xb1TjnqAVrVbr9TglYO1uPSBmWkSvdpr-gT4OXjSg_A_Zaf5Cz1xdWNbwJgb/s1600/eclipse_import_ready.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em; text-align: center;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;164&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjIPq1Mo75anFTwxnKeRlj3wvZ0QPKJ-WYycs5fRaUCjIa4X9t0Y6KD3gbtg2UcyHzFNtgDXl6m156RAVO_xb1TjnqAVrVbr9TglYO1uPSBmWkSvdpr-gT4OXjSg_A_Zaf5Cz1xdWNbwJgb/s320/eclipse_import_ready.png&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;That&#39;s it, now you can build and send the project to your Roborio (or FRCsim)&lt;/li&gt;
&lt;/ol&gt;
&lt;div&gt;
Now we have a project, let&#39;s write some code for it.&lt;/div&gt;
&lt;div&gt;
But first, we&#39;re not going to write just any code, we&#39;re going to write test code! Why? Because testing should be second nature. Remember this adage next time you write code; &quot;If it hasn&#39;t been tested, then it will probably fail in the field.&quot;&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhUID7-BiV6rVsQTAS60oN1oVXKUpZLIFviy5fOMQU7IJwRg2g32FskUgohTAoRRQoatRKsTHLN1-WlSCNixi1DD8lnd4kJp7Y6ksJnwIA8Aaq6WSmIb0ipQsjDhfF5MkL-tsgBnbcGYIvS/s1600/testmeme.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;320&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhUID7-BiV6rVsQTAS60oN1oVXKUpZLIFviy5fOMQU7IJwRg2g32FskUgohTAoRRQoatRKsTHLN1-WlSCNixi1DD8lnd4kJp7Y6ksJnwIA8Aaq6WSmIb0ipQsjDhfF5MkL-tsgBnbcGYIvS/s320/testmeme.jpg&quot; width=&quot;255&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
I&#39;m not saying you&#39;re a bad coder, I&#39;m just saying, &quot;the path to failure is paved with good intentions&quot;. &amp;nbsp;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
The easiest way is to just grab their examples&lt;/div&gt;
&lt;div&gt;
&lt;ol&gt;
&lt;li&gt;Go to your terminal&lt;/li&gt;
&lt;li&gt;Go to ~/workspace and clone Strongback examples&lt;br /&gt;&lt;table class=&quot;highlight tab-size js-file-line-container&quot; data-tab-size=&quot;8&quot; style=&quot;background-color: white; border-collapse: collapse; border-spacing: 0px; box-sizing: border-box; color: #333333; font-family: Helvetica, arial, nimbussansl, liberationsans, freesans, clean, sans-serif, &#39;Apple Color Emoji&#39;, &#39;Segoe UI Emoji&#39;, &#39;Segoe UI Symbol&#39;; font-size: 13px; line-height: 18.2px; tab-size: 8;&quot;&gt;&lt;tbody style=&quot;box-sizing: border-box;&quot;&gt;
&lt;tr style=&quot;box-sizing: border-box;&quot;&gt;&lt;/tr&gt;
&lt;tr style=&quot;box-sizing: border-box;&quot;&gt;&lt;td class=&quot;blob-code blob-code-inner js-file-line&quot; id=&quot;file-strongback_test-LC3&quot; style=&quot;box-sizing: border-box; font-family: Consolas, &#39;Liberation Mono&#39;, Menlo, Courier, monospace; font-size: 12px; overflow: visible; padding: 0px 10px; position: relative; vertical-align: top; white-space: pre; word-wrap: normal;&quot;&gt;git clone https://github.com/strongback/strongback-java-examples.git&lt;/td&gt;&lt;/tr&gt;
&lt;tr style=&quot;box-sizing: border-box;&quot;&gt;&lt;td class=&quot;blob-num js-line-number&quot; data-line-number=&quot;4&quot; id=&quot;file-strongback_test-L4&quot; style=&quot;-webkit-user-select: none; border-color: rgb(238, 238, 238); border-style: solid; border-width: 0px 1px 0px 0px; box-sizing: border-box; color: rgba(0, 0, 0, 0.298039); cursor: pointer; font-family: Consolas, &#39;Liberation Mono&#39;, Menlo, Courier, monospace; font-size: 12px; line-height: 18px; min-width: 50px; padding: 0px 10px; text-align: right; vertical-align: top; white-space: nowrap; width: 50px;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;/li&gt;
&lt;li&gt;Now open Eclipse and import the project &quot;simple-arcade-drive&quot;.&lt;br /&gt;It will be located in:&amp;nbsp;~/workspace/strongback-java-examples/simple-arcade-drive&lt;br /&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjsjiWuxZQZISuw3KRX3Kx5YXSIfHp4qhHiPxJSDxHwReAtn0Hqbrc6C1mtdWjPchnMILYWtxrDQDPUWSTtjxHGJEWZjNcZcevE0oVYAJ7VhOS-9elmDsz1giN3Hhm-z0HTXpjlOILC-JGu/s1600/import_simple_arcade_drive.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em; text-align: center;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;164&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjsjiWuxZQZISuw3KRX3Kx5YXSIfHp4qhHiPxJSDxHwReAtn0Hqbrc6C1mtdWjPchnMILYWtxrDQDPUWSTtjxHGJEWZjNcZcevE0oVYAJ7VhOS-9elmDsz1giN3Hhm-z0HTXpjlOILC-JGu/s320/import_simple_arcade_drive.png&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;Go ahead, check out the code.&lt;br /&gt;There will be two folders, &quot;src&quot; and &quot;testsec&quot;.&lt;br /&gt;&quot;src&quot; is the code that will be deployed to the Roborio.&lt;br /&gt;&quot;testsrc&quot; is the test code. This code will exercise the logic in &quot;src&quot; by tricking the code to think it is running on a Roborio. This is called &quot;&lt;a href=&quot;https://stackoverflow.com/questions/2128148/what-are-mock-objects-in-java&quot;&gt;Mocking&lt;/a&gt;&quot;. This is great since we currently don&#39;t have any Roborios on hand. (Note, there are limits to how much you can test, nothing beats actual hardware).&lt;/li&gt;
&lt;li&gt;Now, let&#39;s run a test. Right click on &quot;testsrc/TimedDriveCommandTest.java&quot; and select &quot;Run as &amp;gt; JUnit test&quot;&lt;br /&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEihCPmJbHWpYHND9UySUTJFy304BtR9Ocje-PqFGM5V1tI5RnKhDqHM7xssFbpHxQ-bL2WL9uuBhh7DiUINt90k1XmjFp2mmDtAeIqCLyRp4UyDAAJhciq57eIAc1dG1B9ySZ7vLGBVAq8q/s1600/simple_drive_junit.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em; text-align: center;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;164&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEihCPmJbHWpYHND9UySUTJFy304BtR9Ocje-PqFGM5V1tI5RnKhDqHM7xssFbpHxQ-bL2WL9uuBhh7DiUINt90k1XmjFp2mmDtAeIqCLyRp4UyDAAJhciq57eIAc1dG1B9ySZ7vLGBVAq8q/s320/simple_drive_junit.png&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;This will now run the test and you will see some passing results.&amp;nbsp;&lt;/li&gt;
&lt;li&gt;That&#39;s it, we&#39;re done. If you want to see failures, let&#39;s add a fail case in the code.&lt;/li&gt;
&lt;li&gt;Add &quot;assertTrue(false);&quot; to the&amp;nbsp;shouldDriveForwardAndStopAfterDuration() function and then re-run the test. You will see that this added a failure!&lt;/li&gt;
&lt;/ol&gt;
&lt;/div&gt;
&lt;div&gt;
That&#39;s it for now. I have to go to bed.&amp;nbsp;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://ask.jaimeyu.com/feeds/3813085391384094758/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://ask.jaimeyu.com/2015/11/frc-setting-up-strongback.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7455490061003058486/posts/default/3813085391384094758'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7455490061003058486/posts/default/3813085391384094758'/><link rel='alternate' type='text/html' href='http://ask.jaimeyu.com/2015/11/frc-setting-up-strongback.html' title='FRC Setting Strongback for development'/><author><name>Jaime Yu</name><uri>http://www.blogger.com/profile/08493978720803625586</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhyX-miRXVav5n2ar0U9qRUZSmx-crZ-xzAJB8HyXLJq1qGAanHPnKv00R_REBQkFYx7movhFFwl-SLPqwXF4rYyzAkxmqC5sBhyphenhyphennBNYcs6OynRG4PM5CWZr3zf7LSZTliKNbvUTTnuGwRh/s72-c/select_jdk.png" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7455490061003058486.post-6378607545494184944</id><published>2015-11-22T22:23:00.002-05:00</published><updated>2015-11-22T22:28:31.392-05:00</updated><title type='text'>FRC cross platform drive station: qdriverstation</title><content type='html'>For the FRC robotics, &lt;a href=&quot;http://qdriverstation.sf.net/&quot;&gt;Alex&lt;/a&gt; has created a cross platform replacement for the &lt;a href=&quot;http://www.chiefdelphi.com/forums/showthread.php?p=1503883&quot;&gt;FRC driver station.&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
In Ubuntu 14.04, I got it working with the following one liner&lt;br /&gt;
&lt;div class=&quot;js-gist-file-update-container js-task-list-container file-box&quot; style=&quot;box-sizing: border-box;&quot;&gt;
&lt;form accept-charset=&quot;UTF-8&quot; action=&quot;https://gist.github.com/jaimeyu/5b9fd377fa76b0758329/file/24f10f2bc554a2102531e1c74cbb735e6e0a588e&quot; class=&quot;js-comment-update&quot; data-form-nonce=&quot;532dd0a4322d161c235c533eb58d393d868402a7&quot; data-remote=&quot;true&quot; method=&quot;post&quot; style=&quot;box-sizing: border-box;&quot;&gt;
&lt;div class=&quot;file&quot; id=&quot;file-one_liner_install_qdriverstation&quot; style=&quot;border-radius: 3px; border: 1px solid rgb(221, 221, 221); box-sizing: border-box; margin-bottom: 15px; margin-top: 20px; position: relative;&quot;&gt;
&lt;div class=&quot;blob-wrapper data type-text&quot; style=&quot;border-bottom-left-radius: 3px; border-bottom-right-radius: 3px; box-sizing: border-box; overflow-x: auto; overflow-y: hidden;&quot;&gt;
&lt;table class=&quot;highlight tab-size js-file-line-container&quot; data-tab-size=&quot;8&quot; style=&quot;border-collapse: collapse; border-spacing: 0px; box-sizing: border-box; tab-size: 8;&quot;&gt;&lt;tbody style=&quot;box-sizing: border-box;&quot;&gt;
&lt;tr style=&quot;box-sizing: border-box;&quot;&gt;&lt;td class=&quot;blob-code blob-code-inner js-file-line&quot; id=&quot;file-one_liner_install_qdriverstation-LC1&quot; style=&quot;box-sizing: border-box; color: #333333; font-family: Consolas, &#39;Liberation Mono&#39;, Menlo, Courier, monospace; font-size: 12px; overflow: visible; padding: 0px 10px; position: relative; vertical-align: top; white-space: pre; word-wrap: normal;&quot;&gt;sudo apt-get install libsdl2-dev qtcreator &amp;amp;&amp;amp; git clone https://github.com/WinT-3794/QDriverStation.git &amp;amp;&amp;amp; cd QDriverStation &amp;amp;&amp;amp; qmake &amp;amp;&amp;amp; make &amp;amp;&amp;amp; sudo make install&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/form&gt;
&lt;/div&gt;
&lt;span style=&quot;-webkit-text-stroke-width: 0px; background-color: #f1f1f1; color: black; display: inline !important; float: none; font-family: &amp;quot;verdana&amp;quot; , &amp;quot;geneva&amp;quot; , &amp;quot;lucida&amp;quot; , &amp;quot;lucida grande&amp;quot; , &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif; font-size: 13.3333px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: left; text-indent: 0px; text-transform: none; white-space: normal; widows: 1; word-spacing: 0px;&quot;&gt;&lt;/span&gt;&lt;a href=&quot;https://www.blogger.com/null&quot; name=&quot;comments&quot; style=&quot;box-sizing: border-box; color: #4078c0;&quot;&gt;&lt;/a&gt;&lt;br /&gt;
The creator was nice enough to add it to my $PATH so all you have to do launch it is: &#39;qdriverstation&#39; from the command promt:)&lt;br /&gt;
&lt;br /&gt;
All the credit goes to&amp;nbsp;@&lt;a class=&quot;bigusername&quot; href=&quot;http://www.chiefdelphi.com/forums/member.php?u=7765&quot; style=&quot;background-color: #dfdfdf; color: #0000aa; font-family: verdana, geneva, lucida, &#39;lucida grande&#39;, arial, helvetica, sans-serif; font-size: 14pt; white-space: nowrap;&quot;&gt;SoftwareBug2.0&lt;/a&gt;&amp;nbsp;in the &lt;a href=&quot;http://www.chiefdelphi.com/forums/showpost.php?p=1503883&amp;amp;postcount=5&quot;&gt;Chief Delphi post.&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
And a big THANK YOU to Alex for being awesome.</content><link rel='replies' type='application/atom+xml' href='http://ask.jaimeyu.com/feeds/6378607545494184944/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://ask.jaimeyu.com/2015/11/frc-cross-driver-platform-qdriverstation.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7455490061003058486/posts/default/6378607545494184944'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7455490061003058486/posts/default/6378607545494184944'/><link rel='alternate' type='text/html' href='http://ask.jaimeyu.com/2015/11/frc-cross-driver-platform-qdriverstation.html' title='FRC cross platform drive station: qdriverstation'/><author><name>Jaime Yu</name><uri>http://www.blogger.com/profile/08493978720803625586</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7455490061003058486.post-6192756380014821105</id><published>2014-07-24T01:21:00.000-04:00</published><updated>2014-07-24T01:32:25.498-04:00</updated><title type='text'>Is there a market for refurbished vintage headphones?</title><content type='html'>&lt;table align=&quot;center&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;tr-caption-container&quot; style=&quot;margin-left: auto; margin-right: auto; text-align: center;&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td style=&quot;text-align: center;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi7ti5DDnPMXHuT_D3CV140vNunjdat4xLpU_0zomJdHvSm2Ws4g6F6_xGMdWxflday_8Iqzf4WRR69FG0WhyphenhyphenbFqVEVISz_10FZ4EwsMb9Ep_x1UvZlGVBUP1gjlsMtPZsO4gbTNDahR6Rs/s1600/IMG_20140718_220536461.jpg&quot; height=&quot;224&quot; style=&quot;margin-left: auto; margin-right: auto;&quot; width=&quot;400&quot; /&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;Finished product on the left. Right: Modern Razor headphones with LEDs and built in AMP.&amp;nbsp;&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi7ti5DDnPMXHuT_D3CV140vNunjdat4xLpU_0zomJdHvSm2Ws4g6F6_xGMdWxflday_8Iqzf4WRR69FG0WhyphenhyphenbFqVEVISz_10FZ4EwsMb9Ep_x1UvZlGVBUP1gjlsMtPZsO4gbTNDahR6Rs/s1600/IMG_20140718_220536461.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;/span&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;I found these old Pioneer SE-405 at my parent&#39;s a while ago. They&#39;re nearly 36-40 years old at this point. I remember when I really young, playing with the knobs and listening to them on our Hi-Fi. I plugged them into my computer a while ago and tried them out. It was terrible. The audio was crackling and the knobs introduced more static than music. When I tried them on last year, they were even worst, the audio on the left bank was missing.&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;I tore them apart and tested all the connections with the multimeter and there were continuity breaks &amp;nbsp;in many of the wires. Primarily, the wire from jack to headphones was no longer transmitting the left bank. Oh well. I thought I could rewire it but it was too disappointing and was not up for it (fun tip, don&#39;t live in the suburb with a 3-4 hour commute and work more than 8 hours).&amp;nbsp;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgCKxwevE26T4jkY12UKLU0d7MNqtg8VCt7jL6gLXqpPInKBUbuPzD2hElYB3xHjjt10RwpjqzqyIlBFKK-Lnx1vHcb83KqGrL5-GOfk4OOx3sZymxnv4hpDrIW1qqplhDBDx8D3T_bwLrN/s1600/IMG_20140716_211159345.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgCKxwevE26T4jkY12UKLU0d7MNqtg8VCt7jL6gLXqpPInKBUbuPzD2hElYB3xHjjt10RwpjqzqyIlBFKK-Lnx1vHcb83KqGrL5-GOfk4OOx3sZymxnv4hpDrIW1qqplhDBDx8D3T_bwLrN/s1600/IMG_20140716_211159345.jpg&quot; height=&quot;179&quot; width=&quot;320&quot; /&gt;&lt;/span&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;My Grado SR-60 were in terrible condition with exposed wires everywhere. The problem I found with the SR-60 is that they were open ended and the wires were much too heavy for the joints. So I couldn&#39;t enjoy them on the bus and metro because external noise would make it in. The cables are amazingly thick and took a lot of abuse. But that was also its downfall, they were quite heavy. So all the joints fell apart. You can see above, just about everything broke. I had to solder up the wires and attempted to move some of the weight to one side of the headphones. That was a stupid idea. It made it worst and completely unbalanced on my head. So I stashed them in the bin until I could figure out how to fix them.&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;That was last week. I was digging through the bins for equipment and happened on the two cans. So why not make a Frankenstein monster and combined new age technology with old school build quality?&amp;nbsp;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;The end result is pretty awesome. I put the SR-60 drivers into the Pioneer SE-405 and I solved all my problems in one shot. The Pioneers are closed so there is no noise leakage and it has foam inside to absorb unwanted vibrations. The Grado drivers were awesome and they continue to be awesome. They might not have the bass punch as my Razor&#39;s but they make it up in a cleaner sound. And no significant ground noise leaking into the music. One of my biggest pet peeves and what I look for in a good pair of cans and speakers. I re-used the original Grado jack and cable and that worked surprisingly well. I wasn&#39;t sure I would be able to fit it into the original cable slot. It doesn&#39;t actually fit but it was good enough. The original driver enclosure has wire channels which is actually brilliant. The channels direct the cable around and out to the hole. Which then gets clamped when you screw everything in so there are several places where the cable is protected from being ripped out. Not as nice as the Seinheiser&#39;s solution; the cable is completely replaceable and the cable holder is pretty sturdy but way better than Grado&#39;s non-existing solution. And I got the vintage look without having to pay for it (I found a few replacements for about 30$ on ebay).&amp;nbsp;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;I&#39;m wondering if its worth buying another set and modifying them with new drivers. The Pioneer SE-205 are lower end cans with the vintage look and I&#39;m sure they&#39;re no where near the quality of a Grado SR-80 so that might be an interesting merge. It was a pretty simple job and all it did was make me want to do it again but with a higher end driver...&amp;nbsp;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;table align=&quot;center&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;tr-caption-container&quot; style=&quot;margin-left: auto; margin-right: auto; text-align: center;&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td style=&quot;text-align: center;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgv1a1JPd7zMYhFjANwzy-8ARor-Diu4wgHGuKBs-agTnGD3YaYfLfX-kVCQPeUi4jppjWwc08c_NtR7D9_OrM_Ts51nLqlJ_7OYhLDx9npv40gqb0if0hDHO31bjK9TCYWymqK7S1zEG1-/s1600/IMG_20140717_235702018.jpg&quot; height=&quot;224&quot; style=&quot;margin-left: auto; margin-right: auto;&quot; width=&quot;400&quot; /&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;Original driver and its holder out for testing.&amp;nbsp;&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgv1a1JPd7zMYhFjANwzy-8ARor-Diu4wgHGuKBs-agTnGD3YaYfLfX-kVCQPeUi4jppjWwc08c_NtR7D9_OrM_Ts51nLqlJ_7OYhLDx9npv40gqb0if0hDHO31bjK9TCYWymqK7S1zEG1-/s1600/IMG_20140717_235702018.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;/span&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;table align=&quot;center&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;tr-caption-container&quot; style=&quot;margin-left: auto; margin-right: auto; text-align: center;&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td style=&quot;text-align: center;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhQpssVzlONh_7gQf7Pzsg8Qr3lpKyGk9KwieSay9fPZlUUNY54vZpiktc3wxka4dTu1wKI2LfsPXUNGzAPAQBunvaJ-wjFMzI3VcqWuKV2qYjOXQaiNDHsLmpXRlqSk61L4FbRCZN1FL4V/s1600/IMG_20140717_204614291.jpg&quot; height=&quot;179&quot; style=&quot;margin-left: auto; margin-right: auto;&quot; width=&quot;320&quot; /&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;The glue Grado uses is epic. I only managed to dent the plastic too... Grado&#39;s build quality is definitely one of the better hardware I&#39;ve torn apart..&amp;nbsp;&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhQpssVzlONh_7gQf7Pzsg8Qr3lpKyGk9KwieSay9fPZlUUNY54vZpiktc3wxka4dTu1wKI2LfsPXUNGzAPAQBunvaJ-wjFMzI3VcqWuKV2qYjOXQaiNDHsLmpXRlqSk61L4FbRCZN1FL4V/s1600/IMG_20140717_204614291.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;/span&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;table align=&quot;center&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;tr-caption-container&quot; style=&quot;margin-left: auto; margin-right: auto; text-align: center;&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td style=&quot;text-align: center;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgtXsR8a5eomYPUggggm3lk5RNs_A-oxQKOsgiay11FsbccAasf75t7NeyK6f_ycv1tB-rqu3dHz0KrQxNYHiVZ3wN6kVTi_LxgrSW-lqdKiArqf_nWQJmL4rmd9rUJT1bZyD7MuOjcp86k/s1600/IMG_20140717_011916518.jpg&quot; height=&quot;179&quot; style=&quot;margin-left: auto; margin-right: auto;&quot; width=&quot;320&quot; /&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;Original drivers. I don&#39;t think they&#39;re supposed to be green...&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgtXsR8a5eomYPUggggm3lk5RNs_A-oxQKOsgiay11FsbccAasf75t7NeyK6f_ycv1tB-rqu3dHz0KrQxNYHiVZ3wN6kVTi_LxgrSW-lqdKiArqf_nWQJmL4rmd9rUJT1bZyD7MuOjcp86k/s1600/IMG_20140717_011916518.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;/span&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;table align=&quot;center&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;tr-caption-container&quot; style=&quot;margin-left: auto; margin-right: auto; text-align: center;&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td style=&quot;text-align: center;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg4VGnSDqeeGcbIE6WrUi7u6fqW1oXntD49zfgrnkECzi4bghaKFfmM1OUncCNh1weDXy-n6BOPXjcgJ6DFizrDduXvtCAeL4aJ_RHIcQIPe0O8gBwzai8kBOnOTw9WUC7VtU79u-zfU2NT/s1600/IMG_20140717_011908748.jpg&quot; height=&quot;179&quot; style=&quot;margin-left: auto; margin-right: auto;&quot; width=&quot;320&quot; /&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;Grado&#39;s on the left, Pioneer&#39;s on the right.&amp;nbsp;&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg4VGnSDqeeGcbIE6WrUi7u6fqW1oXntD49zfgrnkECzi4bghaKFfmM1OUncCNh1weDXy-n6BOPXjcgJ6DFizrDduXvtCAeL4aJ_RHIcQIPe0O8gBwzai8kBOnOTw9WUC7VtU79u-zfU2NT/s1600/IMG_20140717_011908748.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;/span&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;table align=&quot;center&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;tr-caption-container&quot; style=&quot;margin-left: auto; margin-right: auto; text-align: center;&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td style=&quot;text-align: center;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjxke4F7vcRMd7l56XpHvuhFvOxYd31R5Tawqnd8WTPbDbt8QToAXjWtYvy6PHBgrc1YXbLB06QG2DskbsakFUP5wP_N0FyIxS_KCOiKzO6lUp204X-QGP7pmi3IyzbybRFaGPiPEdh3oSL/s1600/IMG_20140716_211153355.jpg&quot; height=&quot;320&quot; style=&quot;margin-left: auto; margin-right: auto;&quot; width=&quot;179&quot; /&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;Before cutting the drivers out.&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjxke4F7vcRMd7l56XpHvuhFvOxYd31R5Tawqnd8WTPbDbt8QToAXjWtYvy6PHBgrc1YXbLB06QG2DskbsakFUP5wP_N0FyIxS_KCOiKzO6lUp204X-QGP7pmi3IyzbybRFaGPiPEdh3oSL/s1600/IMG_20140716_211153355.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;/span&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;table align=&quot;center&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;tr-caption-container&quot; style=&quot;margin-left: auto; margin-right: auto; text-align: center;&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td style=&quot;text-align: center;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhEty-P77PEFCqnhyphenhyphen9FOrq59n-k0iPBCeaOSHDbLa7XGu3WgYmXdG8YUSZqNpsuKQetu-8kBPnjVcztSTia4EHMiH1UzJE0UlbsBHJePeDU0Taw8sJqAMEB7xSg7UCjrtLJVcQdUdmvmekb/s1600/IMG_20140718_212943131.jpg&quot; height=&quot;179&quot; style=&quot;margin-left: auto; margin-right: auto;&quot; width=&quot;320&quot; /&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;I used Krazy glue to get the driver in the enclosure. I thought about re-using the original driver seat but it didn&#39;t seem to fit and I was annoyed how long it took just to get the driver &#39;s rear shell off. So I left most of it intact. Solder it all up and did continuity tests to ensure I properly soldered it. &lt;a href=&quot;http://makezine.com/2012/02/28/how-to-splice-wire-to-nasa-standards/&quot;&gt;I think this is one of my better jobs when it comes to loose wires&lt;/a&gt;.&amp;nbsp;&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhEty-P77PEFCqnhyphenhyphen9FOrq59n-k0iPBCeaOSHDbLa7XGu3WgYmXdG8YUSZqNpsuKQetu-8kBPnjVcztSTia4EHMiH1UzJE0UlbsBHJePeDU0Taw8sJqAMEB7xSg7UCjrtLJVcQdUdmvmekb/s1600/IMG_20140718_212943131.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;/span&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;table align=&quot;center&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;tr-caption-container&quot; style=&quot;margin-left: auto; margin-right: auto; text-align: center;&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td style=&quot;text-align: center;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg3BCyJTEqhw_E48k8qUaC_twQgg498OG-cvs_YCcAXFozGFJfp6gAIp0-cvueWkX_UccVxbDAW9cE9Rumm45mCYXL-2b35knw71ZOU7Mib0OaZElWhoWluHXbSswyV35V5t2m4iRbz_848/s1600/IMG_20140718_220231287.jpg&quot; height=&quot;179&quot; style=&quot;margin-left: auto; margin-right: auto;&quot; width=&quot;320&quot; /&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;You can see the 40 years of wear and tear on the muffs.&amp;nbsp;&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg3BCyJTEqhw_E48k8qUaC_twQgg498OG-cvs_YCcAXFozGFJfp6gAIp0-cvueWkX_UccVxbDAW9cE9Rumm45mCYXL-2b35knw71ZOU7Mib0OaZElWhoWluHXbSswyV35V5t2m4iRbz_848/s1600/IMG_20140718_220231287.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;/span&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;table align=&quot;center&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;tr-caption-container&quot; style=&quot;margin-left: auto; margin-right: auto; text-align: center;&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td style=&quot;text-align: center;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj30AFG7EEMvDhV5yV4iBDh3fQbTlvwDYFERsdCePtLFB0wvXuuMyTdUv5tQwYdyZYw0S799I-iErN7HbAc1rs4ylZ6z-eLyKsxxRTDo3azeUypp_jw6hFff8OWsONNGbGxvPKVDfE1A8bX/s1600/IMG_20140718_220323574.jpg&quot; height=&quot;179&quot; style=&quot;margin-left: auto; margin-right: auto;&quot; width=&quot;320&quot; /&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;Close up of the driver inside the cup. I need to find something to cover up the hack job I did trying to make the hole larger.&amp;nbsp;&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj30AFG7EEMvDhV5yV4iBDh3fQbTlvwDYFERsdCePtLFB0wvXuuMyTdUv5tQwYdyZYw0S799I-iErN7HbAc1rs4ylZ6z-eLyKsxxRTDo3azeUypp_jw6hFff8OWsONNGbGxvPKVDfE1A8bX/s1600/IMG_20140718_220323574.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;/span&gt;&lt;/a&gt;&lt;/div&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;PS. Hopefully I will take better pictures in the near future. Lost the SD card to my SLR so I&#39;m stuck with my phone cam...&amp;nbsp;&lt;/span&gt;</content><link rel='replies' type='application/atom+xml' href='http://ask.jaimeyu.com/feeds/6192756380014821105/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://ask.jaimeyu.com/2014/07/is-there-market-for-refurbished-vintage.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7455490061003058486/posts/default/6192756380014821105'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7455490061003058486/posts/default/6192756380014821105'/><link rel='alternate' type='text/html' href='http://ask.jaimeyu.com/2014/07/is-there-market-for-refurbished-vintage.html' title='Is there a market for refurbished vintage headphones?'/><author><name>Jaime Yu</name><uri>http://www.blogger.com/profile/08493978720803625586</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi7ti5DDnPMXHuT_D3CV140vNunjdat4xLpU_0zomJdHvSm2Ws4g6F6_xGMdWxflday_8Iqzf4WRR69FG0WhyphenhyphenbFqVEVISz_10FZ4EwsMb9Ep_x1UvZlGVBUP1gjlsMtPZsO4gbTNDahR6Rs/s72-c/IMG_20140718_220536461.jpg" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7455490061003058486.post-5069723062257736330</id><published>2014-07-11T22:47:00.001-04:00</published><updated>2014-07-11T22:47:37.239-04:00</updated><title type='text'>My new embedded development board</title><content type='html'>&lt;p dir=&quot;ltr&quot;&gt;One dual core arm... Check.&lt;br&gt;
One built in FPGA... Check.&lt;br&gt;
One 16 parallel cores processor for OpenCL... Check.&lt;/p&gt;
&lt;p dir=&quot;ltr&quot;&gt;My new boars to play with. I have big dreams with this board. &lt;/p&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt; &lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi1UZyfT73dAWLzyl4RKuIttFnk6nbWlkMScT12-s_cM3YNq1WFhhweEP5yhRy0xpzzcT8cV-NJ3qss513qtj9UzZTQJZIUcC5KJfKaur2w7uZVja5K_fachI9tfwnK6nmDCSopzTG8G6lG/s1600/IMG_20140711_224342276.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt; &lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi1UZyfT73dAWLzyl4RKuIttFnk6nbWlkMScT12-s_cM3YNq1WFhhweEP5yhRy0xpzzcT8cV-NJ3qss513qtj9UzZTQJZIUcC5KJfKaur2w7uZVja5K_fachI9tfwnK6nmDCSopzTG8G6lG/s640/IMG_20140711_224342276.jpg&quot;&gt; &lt;/a&gt; &lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ask.jaimeyu.com/feeds/5069723062257736330/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://ask.jaimeyu.com/2014/07/my-new-embedded-development-board.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7455490061003058486/posts/default/5069723062257736330'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7455490061003058486/posts/default/5069723062257736330'/><link rel='alternate' type='text/html' href='http://ask.jaimeyu.com/2014/07/my-new-embedded-development-board.html' title='My new embedded development board'/><author><name>Jaime Yu</name><uri>http://www.blogger.com/profile/08493978720803625586</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi1UZyfT73dAWLzyl4RKuIttFnk6nbWlkMScT12-s_cM3YNq1WFhhweEP5yhRy0xpzzcT8cV-NJ3qss513qtj9UzZTQJZIUcC5KJfKaur2w7uZVja5K_fachI9tfwnK6nmDCSopzTG8G6lG/s72-c/IMG_20140711_224342276.jpg" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7455490061003058486.post-8533128388637542790</id><published>2014-06-25T11:39:00.001-04:00</published><updated>2014-06-26T16:15:30.852-04:00</updated><title type='text'>Bad screen</title><content type='html'>&lt;div dir=&quot;ltr&quot;&gt;
I was wiring up the epaper screen and trying out the available demos to test it.&lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiVgBimZTKYQGVF5RmxQeOcUYNaAqkL-XmoV8PtpIzt1s6YhfyHb0BUINsbiJ8nNeMoUdW20Tdc_ltzssqisPsHP5In0cuo_HE16rVbxgJCI0_Oq_FQdNIE8ERB4LJIHZCmsyM2n1fHpeD5/s1600/IMG_20140625_084139421.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiVgBimZTKYQGVF5RmxQeOcUYNaAqkL-XmoV8PtpIzt1s6YhfyHb0BUINsbiJ8nNeMoUdW20Tdc_ltzssqisPsHP5In0cuo_HE16rVbxgJCI0_Oq_FQdNIE8ERB4LJIHZCmsyM2n1fHpeD5/s1600/IMG_20140625_084139421.jpg&quot; height=&quot;179&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
All that came out on the screen so far is black. So far, so not good. &lt;br /&gt;
&lt;br /&gt;
&lt;div dir=&quot;ltr&quot;&gt;
I have another LCD... I may try that out instead... And try to figure out what went wrong...&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjiKaje1Z29yxJp_nvXTVK7evTqH8CnWaDDGhDPPeyMXu_K9gLMC_fv7SxZUuNuLdOc6vbe8mct8psEpMjWrKYupfQiW_3MX492jkCvSy9lcm9AVtJdfQxXOelK5COHKT33EaOSxqBa0VLI/s1600/IMG_20140625_084230438.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjiKaje1Z29yxJp_nvXTVK7evTqH8CnWaDDGhDPPeyMXu_K9gLMC_fv7SxZUuNuLdOc6vbe8mct8psEpMjWrKYupfQiW_3MX492jkCvSy9lcm9AVtJdfQxXOelK5COHKT33EaOSxqBa0VLI/s1600/IMG_20140625_084230438.jpg&quot; height=&quot;179&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div dir=&quot;ltr&quot;&gt;
This screen has a digitizer and rgb... I think it has a video processor to simplify the coding process. Was part of the kit during a Ti LM4F training course.&amp;nbsp;&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://ask.jaimeyu.com/feeds/8533128388637542790/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://ask.jaimeyu.com/2014/06/bad-screen.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7455490061003058486/posts/default/8533128388637542790'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7455490061003058486/posts/default/8533128388637542790'/><link rel='alternate' type='text/html' href='http://ask.jaimeyu.com/2014/06/bad-screen.html' title='Bad screen'/><author><name>Jaime Yu</name><uri>http://www.blogger.com/profile/08493978720803625586</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiVgBimZTKYQGVF5RmxQeOcUYNaAqkL-XmoV8PtpIzt1s6YhfyHb0BUINsbiJ8nNeMoUdW20Tdc_ltzssqisPsHP5In0cuo_HE16rVbxgJCI0_Oq_FQdNIE8ERB4LJIHZCmsyM2n1fHpeD5/s72-c/IMG_20140625_084139421.jpg" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7455490061003058486.post-7996055843072287497</id><published>2014-06-20T09:58:00.001-04:00</published><updated>2014-06-20T09:58:56.436-04:00</updated><title type='text'>So i joined a friendly Arduino competition</title><content type='html'>&lt;p dir=&quot;ltr&quot;&gt;So I joined a friendly &lt;a href=&quot;http://inventorartist.com/oac/&quot;&gt;Arduino&lt;/a&gt;&lt;a href=&quot;http://inventorartist.com/oac/&quot;&gt; &lt;/a&gt;&lt;a href=&quot;http://inventorartist.com/oac/&quot;&gt;contest&lt;/a&gt;&lt;a href=&quot;http://inventorartist.com/oac/&quot;&gt; &lt;/a&gt;&lt;a href=&quot;http://inventorartist.com/oac/&quot;&gt;in&lt;/a&gt;&lt;a href=&quot;http://inventorartist.com/oac/&quot;&gt; &lt;/a&gt;&lt;a href=&quot;http://inventorartist.com/oac/&quot;&gt;Ottawa&lt;/a&gt;&lt;a href=&quot;http://inventorartist.com/oac/&quot;&gt;.&lt;/a&gt; I had some projects in my head for a while so I figured this was a good way to get it going.&lt;/p&gt;
&lt;p dir=&quot;ltr&quot;&gt;The project I&#39;m going to be working on is a wireless sensor node that shows the currently estimated time of arrival for buses at a stop. It ties in with the online app I wrote to display the times and convert the asinine OC Transpo XML into useful data structures. In this case, I should be able to reduce the size to a few tens of bytes, if not less. &lt;/p&gt;
&lt;p dir=&quot;ltr&quot;&gt;The hardware I&#39;m using is composed of a 2.4 inch e-paper display, Arduino mega (I hope to move down to an Uno or a 2009 but I have a Raspberry&#39;s Pi that I can use if I lack horse power), a CC3000 Wifi adapter, Li-Poly batteries, charging circuit, and a solar panel (I will try to update this post with the link to reach product, most are from Adafruit). &lt;/p&gt;
&lt;p dir=&quot;ltr&quot;&gt;So the physical goal is to have some useful and hopefully weather proof enough to drop into a shelter, the end goal is actually more benign. I&#39;m looking to practice my art (I guess profession, depending if you count software as an art) so the difficulties will be in the software. I fully intend to write a micro kernel with cooperative threads.&lt;/p&gt;
&lt;p dir=&quot;ltr&quot;&gt;But the first phase will be to get it all up and running and baselining the performance and where the current time locks are located. I bought these products because they all have drivers so I think the first phase should be completely doable. &lt;/p&gt;
&lt;p dir=&quot;ltr&quot;&gt;The second is to rewrite the display driver as from first glance, it looks like the code has too many sleep methods and doesn&#39;t yield to more important tasks. Its pretty convoluted and poorly documented imo. &lt;/p&gt;
&lt;p dir=&quot;ltr&quot;&gt;I will keep this blog updated with its progress. As for the name of the project, I haven&#39;t really thought about it. I will think about during the day...&lt;/p&gt;
</content><link rel='replies' type='application/atom+xml' href='http://ask.jaimeyu.com/feeds/7996055843072287497/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://ask.jaimeyu.com/2014/06/so-i-joined-friendly-arduino-competition.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7455490061003058486/posts/default/7996055843072287497'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7455490061003058486/posts/default/7996055843072287497'/><link rel='alternate' type='text/html' href='http://ask.jaimeyu.com/2014/06/so-i-joined-friendly-arduino-competition.html' title='So i joined a friendly Arduino competition'/><author><name>Jaime Yu</name><uri>http://www.blogger.com/profile/08493978720803625586</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7455490061003058486.post-4633787705445247142</id><published>2014-02-07T01:47:00.002-05:00</published><updated>2014-02-07T01:47:59.548-05:00</updated><title type='text'>Strangest battery reading ever</title><content type='html'>&lt;blockquote&gt;
&lt;div class=&quot;p1&quot;&gt;
&amp;nbsp; Charge Information:&lt;/div&gt;
&lt;div class=&quot;p2&quot;&gt;
&amp;nbsp; Charge remaining (mAh):&lt;span class=&quot;Apple-tab-span&quot;&gt; &lt;/span&gt;4606&lt;/div&gt;
&lt;div class=&quot;p2&quot;&gt;
&amp;nbsp; Fully charged:&lt;span class=&quot;Apple-tab-span&quot;&gt; &lt;/span&gt;Yes&lt;/div&gt;
&lt;div class=&quot;p2&quot;&gt;
&amp;nbsp; Charging:&lt;span class=&quot;Apple-tab-span&quot;&gt; &lt;/span&gt;No&lt;/div&gt;
&lt;div class=&quot;p2&quot;&gt;
&amp;nbsp; Full charge capacity (mAh):&lt;span class=&quot;Apple-tab-span&quot;&gt; &lt;/span&gt;4772&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&amp;nbsp; Health Information:&lt;/div&gt;
&lt;div class=&quot;p3&quot;&gt;
&amp;nbsp; Cycle count:&lt;span class=&quot;Apple-tab-span&quot;&gt; &lt;/span&gt;6&lt;/div&gt;
&lt;div class=&quot;p3&quot;&gt;
&amp;nbsp; Condition:&lt;span class=&quot;Apple-tab-span&quot;&gt; &lt;/span&gt;Replace Now&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&amp;nbsp; Battery Installed:&lt;span class=&quot;Apple-tab-span&quot;&gt; &lt;/span&gt;Yes&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&lt;span style=&quot;background-color: yellow;&quot;&gt;&amp;nbsp; Amperage (mA):&lt;span class=&quot;Apple-tab-span&quot;&gt; &lt;/span&gt;-2999&lt;/span&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;p1&quot;&gt;
&amp;nbsp;&amp;nbsp;Voltage (mV):&lt;span class=&quot;Apple-tab-span&quot;&gt; &lt;/span&gt;11613&lt;/div&gt;
&lt;/blockquote&gt;
Apparently, my MacBook is putting more energy back than taking from the battery...&lt;br /&gt;
&lt;br /&gt;
After a month, I finally got my new MacBook parts; brand new battery and charger. So far so good except for the strange Amperage reading. I have a feeling it will go away when I reboot the machine. Impressively, I&#39;m still using the same session from a few months ago.</content><link rel='replies' type='application/atom+xml' href='http://ask.jaimeyu.com/feeds/4633787705445247142/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://ask.jaimeyu.com/2014/02/strangest-battery-reading-ever.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7455490061003058486/posts/default/4633787705445247142'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7455490061003058486/posts/default/4633787705445247142'/><link rel='alternate' type='text/html' href='http://ask.jaimeyu.com/2014/02/strangest-battery-reading-ever.html' title='Strangest battery reading ever'/><author><name>Jaime Yu</name><uri>http://www.blogger.com/profile/08493978720803625586</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7455490061003058486.post-8061016100209133174</id><published>2014-01-04T10:57:00.001-05:00</published><updated>2014-01-09T22:56:39.934-05:00</updated><title type='text'>Setting up DLNA/uPnP server on a Raspberry Pi (and little bit of Samba)</title><content type='html'>Lately, the first thing I do in the morning is some sort of hack on my network (I guess its like taking anti depressants in the morning). So this morning, I finally went back and fixed a stupid issue with my Raspberry Pi and Samba. I was able to get the anonymous access working but I couldn&#39;t for the love of god get permission to write to the disk or get users to authenticate. Found out this morning, I forgot to install &lt;a href=&quot;https://help.ubuntu.com/10.04/serverguide/samba-fileprint-security.html&quot;&gt;libpam-smbpass&lt;/a&gt;. Now the share drives are access controlled and read-writeable.&lt;br /&gt;
&lt;br /&gt;
But then I remembered about my uPnP server I set up on my Raspberry Pi. I&#39;m using RaspBian on my Pi because I&#39;m used to Debian. I set it up to mount my external USB disk and I share it across the network using the aforementioned Samba, NFS, and SSH. Locked the host.allow to just my local IP range to prevent an outsider from being able to access the device. I have yet to do a security analysis of my network but right now, I&#39;m just happy the nmap scans right now from the internet show nothing. Actually on a tangent, I had someone try to compromise another site of mine but it wasn&#39;t successful (as far as I know). So I did a quick nmap on them and noticed a bunch of ports were opened... so it was kind of ironic.&lt;br /&gt;
&lt;br /&gt;
Anyways, it&#39;s pretty dirt simple to set up a uPnP server on a Raspberry Pi. I&#39;ve been abusing it with my devices. I&#39;m tempted to setup a &lt;a href=&quot;http://wiki.xbmc.org/index.php?title=Raspberry_Pi/FAQ#Installing_XBMC_on_the_Raspberry_Pi&quot;&gt;Raspberry Pi with XBMC&lt;/a&gt; just to see how it works with the TV and remote desktop. The only feature I crave with my &lt;a href=&quot;http://www.google.ca/intl/en/chrome/devices/chromecast/&quot;&gt;Google Chromecast&lt;/a&gt; is the ability to stream my local content. I&#39;m sure its coming and would have been pretty cool so my parents can easily show their vacation pictures.&lt;br /&gt;
&lt;br /&gt;
So lets get started; the first step is to ensure that you have a mount point configured. Since I doubt majority of users will have massive terabyte SD cards, I&#39;m going to assume you are using external USB disks.&lt;br /&gt;
&lt;br /&gt;
Modify your /etc/fstab so it will automatically mount your external disk when the Pi is booted. My addition follows:&lt;br /&gt;
&lt;blockquote class=&quot;tr_bq&quot;&gt;
/dev/sda &amp;nbsp;/media/ext-usb &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;auto &amp;nbsp; &amp;nbsp;rw,exec,auto,user,noatime,uid=1000,gid=1000 &amp;nbsp;0 &amp;nbsp; &amp;nbsp; &amp;nbsp; 0&lt;/blockquote&gt;
&lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;I&#39;m a bit lazy on this one, I just use /dev/sda because the Raspbian SD card is mounted at /dev/mmc. I really should be using the disk&#39;s UID. So if you know your UID, replace /dev/sda with &quot;UUID=xxx-xxxxx-xxx-xxx-xxxx&quot;. So if you attach 2 external disks, you don&#39;t have a potential race condition at boot and the kernel mounts the wrong device to /dev/sda.&amp;nbsp;&lt;/li&gt;
&lt;li&gt;The next item is the location where I want the disk to be mount to. If the directory is not created, it will need to be created.&amp;nbsp;&lt;/li&gt;
&lt;li&gt;The next item is auto, and again this is out of laziness but future proofing the disk. I can plug nearly any external disk onto my Pi and it will automatically be shared on the network. It will attempt to make a guess (usually correct guess too) on which filesystem to use when it mounts the disk. Right now the disk is NTFS but I hope to get another drive and move to EXT4.&amp;nbsp;&lt;/li&gt;
&lt;li&gt;Then there are the options. For my configuration, I added noatime so files don&#39;t get updated when you open them. Completely unnecessary for rotational media but it is out of habit for me. Another fix for my configuration are the &#39;uid&#39; and &#39;gid&#39; is because NTFS doesn&#39;t have compatible access controls. So I force it so it looks like all the files are created by user 1000. I believe it was because the directories looked like it was owned by root and prevented my account from accessing the files.&amp;nbsp;&lt;/li&gt;
&lt;li&gt;I could never remember what the last 2 digits are used for. I usually leave them to 0 0.&amp;nbsp;&lt;/li&gt;
&lt;/ul&gt;
I settled on mini-dlna after trying out different server applications. The biggest reasons was code size was reasonable (my Pi sits on a 2GB SD card) and the configuration turned out to be easy.&lt;br /&gt;
&lt;blockquote class=&quot;tr_bq&quot;&gt;
sudo apt-get install minidlna&lt;/blockquote&gt;
God do I love dpkg. I assure you, you don&#39;t know how useful dpkg is until it is ripped out of your hands, shot in the back, and then you are forced to compile OpenSSL for an obscure embedded fork of the Linux kernel that has zero documentation nor engineering support. It was easier to port Debian to new targets and point to Embeddian than it was to completely engineer a new complicated solution.&lt;br /&gt;
&lt;br /&gt;
So it will create a template configuration file in /etc/minidlna.conf. The file is pretty self explanatory at this point. Well documented and like I previously mentioned, easy to use.&lt;br /&gt;
&lt;br /&gt;
For my configuration, I wanted to share the Music and Video directory on my external disk. So I added the following.&lt;br /&gt;
&lt;blockquote class=&quot;tr_bq&quot;&gt;
media_dir=A,/media/ext-usb/Music&lt;br /&gt;
media_dir=V,/media/ext-usb/Videos&lt;/blockquote&gt;
Notice that I prepend the directories I want to share with a letter. As documented in the configuration file:&lt;br /&gt;
&lt;blockquote class=&quot;tr_bq&quot;&gt;
# &amp;nbsp; * &quot;A&quot; for audio &amp;nbsp; &amp;nbsp;(eg. media_dir=A,/var/lib/minidlna/music)&lt;br /&gt;
# &amp;nbsp; * &quot;P&quot; for pictures (eg. media_dir=P,/var/lib/minidlna/pictures)&lt;br /&gt;
# &amp;nbsp; * &quot;V&quot; for video &amp;nbsp; &amp;nbsp;(eg. media_dir=V,/var/lib/minidlna/videos)&lt;/blockquote&gt;
&lt;div&gt;
It isn&#39;t necessary but it does help in organizing the files when you browse it on your clients. If your directory structure is a little all over the place, it will show in client browsers so there is opportunity to experiment here.&amp;nbsp;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
You can experiment and change other settings such as the friendly_name. Remember to back up your configuration file so you can revert your experiments.&amp;nbsp;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
Optional configuration (not fully tested)&lt;/div&gt;
&lt;div&gt;
Now we want to the device to automatically scan the directories for new files. This will make our life a bit easier so we don&#39;t always have to manually ask it to rescan it (ie: &quot;sudo minidlan -R&quot;).&lt;/div&gt;
&lt;blockquote class=&quot;tr_bq&quot;&gt;
inotify=yes&lt;br /&gt;
notify_interval=895&lt;/blockquote&gt;
Now, apparently /dev/inotify no longer exists so we will have to create it by going to the terminal and entering:&lt;br /&gt;
&lt;blockquote class=&quot;tr_bq&quot;&gt;
&lt;span style=&quot;background-color: white; font-family: Arial; font-size: 14px;&quot;&gt;sudo mknod /dev/inotify c 10 63&lt;/span&gt;&lt;/blockquote&gt;
I haven&#39;t completely tested the auto scan feature yet. But I think it should work now.&lt;br /&gt;
&lt;br /&gt;
Go to your Pi&#39;s shell and type in&lt;br /&gt;
&lt;blockquote class=&quot;tr_bq&quot;&gt;
&quot;sudo minidlna -R&quot; to rescan your directories.&amp;nbsp;&lt;/blockquote&gt;
and&lt;br /&gt;
&lt;blockquote class=&quot;tr_bq&quot;&gt;
&quot;sudo service minidlna restart&quot; to restart the service.&amp;nbsp;&lt;/blockquote&gt;
At this point you need to be a bit patient as the application probably hasn&#39;t fully populated the database yet. So when you go on your client device (ie: VLC for iPad), you won&#39;t see all your files yet. Give it some time and then all the files will show up.&lt;br /&gt;
&lt;br /&gt;
I am impressed by the &lt;a href=&quot;http://sourceforge.net/projects/minidlna/&quot;&gt;minidlna team &lt;/a&gt;for making the setup so easy.&lt;br /&gt;
&lt;br /&gt;
UPDATE. Someone asked whether the external disk was fast enough to stream HD video. Here is my long winded answer. I&#39;m not sure why their comment is not displayed below so I will keep them anonymous for now.&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;background-color: white; font-family: Roboto, arial, sans-serif; font-size: 13px; line-height: 18px;&quot;&gt;USB 2.0 has a maximum throughput of 280mbits/s. According to this chart, http://en.wikipedia.org/wiki/High-definition_video#HD_on_the_World_Wide_Web.2FHD_streaming, it is more than enough.&amp;nbsp;&lt;/span&gt;&lt;br style=&quot;background-color: white; font-family: Roboto, arial, sans-serif; font-size: 13px; line-height: 18px;&quot; /&gt;&lt;br style=&quot;background-color: white; font-family: Roboto, arial, sans-serif; font-size: 13px; line-height: 18px;&quot; /&gt;&lt;span style=&quot;background-color: white; font-family: Roboto, arial, sans-serif; font-size: 13px; line-height: 18px;&quot;&gt;According to the Blu-ray wiki, &quot;Hitachi stated that such a disc could be used to store 7 hours of 32 Mbit/s video (HDTV) or 3 hours and 30 minutes of 64 Mbit/s video (Cinema 4K).&quot; So again, USB 2.0 still has enough bandwidth, even for 4K apparently.&lt;/span&gt;&lt;br style=&quot;background-color: white; font-family: Roboto, arial, sans-serif; font-size: 13px; line-height: 18px;&quot; /&gt;&lt;br style=&quot;background-color: white; font-family: Roboto, arial, sans-serif; font-size: 13px; line-height: 18px;&quot; /&gt;&lt;span style=&quot;background-color: white; font-family: Roboto, arial, sans-serif; font-size: 13px; line-height: 18px;&quot;&gt;Then on Tom&#39;s HDD chart,&amp;nbsp;http://www.tomshardware.com/charts/hdd-charts-2013/-01-Read-Throughput-Average-h2benchw-3.16,2901.html, it looks like a good selection of hard disks that can handle magnitudes of the bitrate required for 64mbits/s (note that it seems they use MB/s which usually means megabyte, which is 8x larger than a megabit).&amp;nbsp;&lt;/span&gt;&lt;br style=&quot;background-color: white; font-family: Roboto, arial, sans-serif; font-size: 13px; line-height: 18px;&quot; /&gt;&lt;br style=&quot;background-color: white; font-family: Roboto, arial, sans-serif; font-size: 13px; line-height: 18px;&quot; /&gt;&lt;span style=&quot;background-color: white; font-family: Roboto, arial, sans-serif; font-size: 13px; line-height: 18px;&quot;&gt;I&#39;m running my Raspberry behind either a G or N router so the speeds range between 50mpbs to 100mbps. Note that I&#39;ve only seen 36mbps registered by the router&#39;s statistics, most likely cause is interference from neighbouring WiFi APs.&lt;/span&gt;&lt;br style=&quot;background-color: white; font-family: Roboto, arial, sans-serif; font-size: 13px; line-height: 18px;&quot; /&gt;&lt;span style=&quot;background-color: white; font-family: Roboto, arial, sans-serif; font-size: 13px; line-height: 18px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;br style=&quot;background-color: white; font-family: Roboto, arial, sans-serif; font-size: 13px; line-height: 18px;&quot; /&gt;&lt;span style=&quot;background-color: white; font-family: Roboto, arial, sans-serif; font-size: 13px; line-height: 18px;&quot;&gt;So I ran a quick test on my RPI using DD by reading the Ubuntu ISO into memory. The bottleneck here would be the USB and HDD as the memory interface should be magnitudes quicker. Result:&amp;nbsp;&lt;/span&gt;&lt;br style=&quot;background-color: white; font-family: Roboto, arial, sans-serif; font-size: 13px; line-height: 18px;&quot; /&gt;&lt;span style=&quot;background-color: white; font-family: Roboto, arial, sans-serif; font-size: 13px; line-height: 18px;&quot;&gt;&quot;dd if=/media/ext-usb/ISO/ubuntu-12.04.3-server-amd64.iso of=/dev/null &amp;nbsp;&amp;amp;&amp;amp; dd if=/media/ext-usb/ISO/ubuntu-12.04.3-server-amd64.iso of=/dev/null &amp;amp;&amp;amp; dd if=/media/ext-usb/ISO/ubuntu-12.04.3-server-amd64.iso of=/dev/null&lt;/span&gt;&lt;br /&gt;
&lt;div style=&quot;background-color: white; font-family: Roboto, arial, sans-serif; font-size: 13px; line-height: 18px;&quot;&gt;
1361920+0 records in&lt;/div&gt;
&lt;div style=&quot;background-color: white; font-family: Roboto, arial, sans-serif; font-size: 13px; line-height: 18px;&quot;&gt;
1361920+0 records out&lt;/div&gt;
&lt;div style=&quot;background-color: white; font-family: Roboto, arial, sans-serif; font-size: 13px; line-height: 18px;&quot;&gt;
697303040 bytes (697 MB) copied, 26.4785 s, 26.3 MB/s&lt;/div&gt;
&lt;div style=&quot;background-color: white; font-family: Roboto, arial, sans-serif; font-size: 13px; line-height: 18px;&quot;&gt;
1361920+0 records in&lt;/div&gt;
&lt;div style=&quot;background-color: white; font-family: Roboto, arial, sans-serif; font-size: 13px; line-height: 18px;&quot;&gt;
1361920+0 records out&lt;/div&gt;
&lt;div style=&quot;background-color: white; font-family: Roboto, arial, sans-serif; font-size: 13px; line-height: 18px;&quot;&gt;
697303040 bytes (697 MB) copied, 26.6488 s, 26.2 MB/s&lt;/div&gt;
&lt;div style=&quot;background-color: white; font-family: Roboto, arial, sans-serif; font-size: 13px; line-height: 18px;&quot;&gt;
1361920+0 records in&lt;/div&gt;
&lt;div style=&quot;background-color: white; font-family: Roboto, arial, sans-serif; font-size: 13px; line-height: 18px;&quot;&gt;
1361920+0 records out&lt;/div&gt;
&lt;div style=&quot;background-color: white; font-family: Roboto, arial, sans-serif; font-size: 13px; line-height: 18px;&quot;&gt;
697303040 bytes (697 MB) copied, 26.6194 s, 26.2 MB/s&quot;. You can see my external disk is not quite up to the task for Blu-rays.&lt;br /&gt;&lt;br /&gt;As well, I ran hdparm; &quot;sudo hdparm -tT /dev/sda&amp;nbsp;&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
/dev/sda:&lt;/div&gt;
&lt;div&gt;
&amp;nbsp;Timing cached reads: &amp;nbsp; 322 MB in &amp;nbsp;2.00 seconds = 160.67 MB/sec&lt;/div&gt;
&lt;div&gt;
&amp;nbsp;Timing buffered disk reads: &amp;nbsp;66 MB in &amp;nbsp;3.01 seconds = &amp;nbsp;21.92 MB/sec&quot; and it is nearly the same result as the dd operation.&lt;/div&gt;
&lt;br /&gt;After all this information, interface speed is only one aspect of the problem. The clients will almost always buffer the video stream to reduce stuttering. So if the network drops out for a second or two, the video stream will still continue without the user noticing.&lt;br /&gt;&lt;br /&gt;Then there is the problem of the RPI is not the optimal target for transcoding (right now). Some DLNA software will live transcode video that the client doesn&#39;t have support for and I had a terrible experience with it. So even if the interfaces was a gigabit ethernet, the RPI couldn&#39;t transcode the video fast enough to fill the buffers or network interfaces in any meaningful way.&amp;nbsp;&lt;/div&gt;
&lt;br style=&quot;background-color: white; font-family: Roboto, arial, sans-serif; font-size: 13px; line-height: 18px;&quot; /&gt;&lt;span style=&quot;background-color: white; font-family: Roboto, arial, sans-serif; font-size: 13px; line-height: 18px;&quot;&gt;So subjectively, on the wired network, I have no issue with HD video streaming over NFS/SMB on a 100bit lan to my PC. I registered a spike of 3mbits/s of network traffic for a 1.5mbit/s bitrate 1080p h.264 video. My SO&#39;s iPad over WiFi also have no issues streaming it using VLC. My Galaxy Tab can&#39;t stream it but it is an older WiFi 802.11g and has no ability to render 720p video so 1080p is out of the question. &amp;nbsp;I am still able to stream SD videos.&amp;nbsp;&lt;/span&gt;</content><link rel='replies' type='application/atom+xml' href='http://ask.jaimeyu.com/feeds/8061016100209133174/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://ask.jaimeyu.com/2014/01/setting-up-dlnaupnp-server-on-raspberry.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7455490061003058486/posts/default/8061016100209133174'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7455490061003058486/posts/default/8061016100209133174'/><link rel='alternate' type='text/html' href='http://ask.jaimeyu.com/2014/01/setting-up-dlnaupnp-server-on-raspberry.html' title='Setting up DLNA/uPnP server on a Raspberry Pi (and little bit of Samba)'/><author><name>Jaime Yu</name><uri>http://www.blogger.com/profile/08493978720803625586</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7455490061003058486.post-1630419767076332169</id><published>2014-01-02T22:45:00.000-05:00</published><updated>2014-01-03T22:06:26.174-05:00</updated><title type='text'>How to scrape a mobile application&#39;s RESTful API</title><content type='html'>Right before Christmas, there was a post about an app developer that said it was too difficult to port a simple application to Android. It was pretty simple since they had a web version and an iPhone version. The interface wasn&#39;t spectacular and it looked like it pulled up to date data from the web. I&#39;m not going to say what application it was but it was just strange to hear a developer say its too difficult.&lt;br /&gt;
&lt;br /&gt;
So I decided to see what their API was and if it was even possible to write an Android version of their application based on their API. Their API is not publicly available so I was thinking of a way to figure out their API. I first thought about running tcpdump on my router and logging all the data it was doing. It would have been overkill but it would have worked. Plus, I&#39;m lazy, I only have 4% of the day to do anything interesting so I&#39;m not going to spend it reading tcpdump logs.&lt;br /&gt;
&lt;br /&gt;
Then while I was sleeping, I thought of an easier way with a proxy between the iPhone and the web. So first thing I did in the morning (groggy, before work, and waiting for the caffeine delivery), I set up a quick Ubuntu VM, installed Squid proxy, and intercepted the URIs the iPhone was trying to access.&lt;br /&gt;
&lt;br /&gt;
Found out that I assumed correctly it was a RESTful API and didn&#39;t use encryption at all. The data came back in &quot;easy to use&quot; XML so honestly, there was no technical reason they couldn&#39;t port the application to Android. I can totally understand if the application required complicated real time bi-directional data streams or some crazy graphical interface that only the iPhone could do. If anything, their API just tells me that they could have developed a single web based application instead and target multiple devices instead of a single one.&lt;br /&gt;
&lt;br /&gt;
Any ways, let me show you how easy it is to do it yourself. I will be targeting my own Android applications in this instance so I don&#39;t make anyone mad.&lt;br /&gt;
&lt;br /&gt;
Step 1 is to install &lt;a href=&quot;http://en.wikipedia.org/wiki/Squid_(software)&quot;&gt;Squid proxy&lt;/a&gt;&amp;nbsp;on an Ubuntu machine. I&#39;m targeting Ubuntu because honestly, it is just easier to deal with because their packages are much more up to date than just straight Debian 7. None the less, this should generally work for all Debian based distributions.&lt;br /&gt;
&lt;br /&gt;
&lt;h3&gt;
Installing Squid in Ubuntu: &lt;/h3&gt;
&lt;blockquote class=&quot;tr_bq&quot;&gt;
sudo apt-get install squid&lt;/blockquote&gt;
Just like everything that is Debian based, installation should be quite simple. It even comes with a predefined configuration which makes our lives so much easier. Below is the diff between my changes and that of the original file.&lt;br /&gt;
&lt;br /&gt;
&lt;h4&gt;
Modify the squid.conf file in /etc/squid3&lt;/h4&gt;
&lt;blockquote class=&quot;tr_bq&quot;&gt;
diff -u /etc/squid3/squid.conf.original /etc/squid3/squid.conf&lt;br /&gt;
--- /etc/squid3/squid.conf.original&amp;nbsp;&amp;nbsp; &amp;nbsp;2013-12-20 06:36:15.994141659 -0500&lt;br /&gt;
+++ /etc/squid3/squid.conf&amp;nbsp;&amp;nbsp; &amp;nbsp;2013-12-20 06:49:28.522142771 -0500&lt;br /&gt;
@@ -698,7 +698,8 @@&lt;br /&gt;
&amp;nbsp;# Example rule allowing access from your local networks.&lt;br /&gt;
&amp;nbsp;# Adapt to list your (internal) IP networks from where browsing&lt;br /&gt;
&amp;nbsp;# should be allowed&lt;br /&gt;
-#acl localnet src 10.0.0.0/8&amp;nbsp;&amp;nbsp; &amp;nbsp;# RFC1918 possible internal network&lt;br /&gt;
+acl localnet src 10.0.0.0/24&amp;nbsp;&amp;nbsp; &amp;nbsp;# RFC1918 possible internal network&lt;br /&gt;
+acl localnet src 10.0.1.0/24&amp;nbsp;&amp;nbsp; &amp;nbsp;# RFC1918 possible internal network&lt;br /&gt;
&amp;nbsp;#acl localnet src 172.16.0.0/12&amp;nbsp;&amp;nbsp; &amp;nbsp;# RFC1918 possible internal network&lt;br /&gt;
&amp;nbsp;#acl localnet src 192.168.0.0/16&amp;nbsp;&amp;nbsp; &amp;nbsp;# RFC1918 possible internal network&lt;br /&gt;
&amp;nbsp;#acl localnet src fc00::/7&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; # RFC 4193 local private network range&lt;br /&gt;
@@ -840,9 +841,14 @@&lt;br /&gt;
&amp;nbsp;# from where browsing should be allowed&lt;br /&gt;
&amp;nbsp;#http_access allow localnet&lt;br /&gt;
&amp;nbsp;http_access allow localhost&lt;br /&gt;
+acl home src 10.0.0.0/24&lt;br /&gt;
+acl mitm src 10.0.1.0/24&lt;br /&gt;
+http_access allow home&lt;br /&gt;
+http_access allow mitm&lt;br /&gt;
+&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;# And finally deny all other access to this proxy&lt;br /&gt;
-http_access deny all&lt;br /&gt;
+#http_access deny all&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;#&amp;nbsp; TAG: adapted_http_access&lt;br /&gt;
&amp;nbsp;#&amp;nbsp;&amp;nbsp; &amp;nbsp;Allowing or Denying access based on defined access lists&lt;br /&gt;
@@ -1134,7 +1140,7 @@&lt;br /&gt;
&amp;nbsp;#&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;# Squid normally listens to port 3128&lt;br /&gt;
-http_port 3128&lt;br /&gt;
+http_port 8888&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;#&amp;nbsp; TAG: https_port&lt;br /&gt;
&amp;nbsp;# Note: This option is only available if Squid is rebuilt with the&lt;br /&gt;
@@ -2717,7 +2723,7 @@&lt;br /&gt;
&amp;nbsp;#&amp;nbsp;&amp;nbsp; &amp;nbsp;By default, Squid strips query terms from requested URLs before&lt;br /&gt;
&amp;nbsp;#&amp;nbsp;&amp;nbsp; &amp;nbsp;logging.&amp;nbsp; This protects your user&#39;s privacy.&lt;br /&gt;
&amp;nbsp;#Default:&lt;br /&gt;
-# strip_query_terms on&lt;br /&gt;
+ strip_query_terms off&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;#&amp;nbsp; TAG: buffered_logs&amp;nbsp;&amp;nbsp; &amp;nbsp;on|off&lt;br /&gt;
&amp;nbsp;#&amp;nbsp;&amp;nbsp; &amp;nbsp;cache.log log file is written with stdio functions, and as such&lt;br /&gt;
@@ -3758,7 +3764,7 @@&lt;br /&gt;
&amp;nbsp;#&amp;nbsp;&amp;nbsp; &amp;nbsp;get errors about IP-forwarding you must set them to have individual&lt;br /&gt;
&amp;nbsp;#&amp;nbsp;&amp;nbsp; &amp;nbsp;names with this setting.&lt;br /&gt;
&amp;nbsp;#Default:&lt;br /&gt;
-# visible_hostname localhost&lt;br /&gt;
+ visible_hostname MITM&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;#&amp;nbsp; TAG: unique_hostname&lt;br /&gt;
&amp;nbsp;#&amp;nbsp;&amp;nbsp; &amp;nbsp;If you want to have multiple machines with the same&lt;/blockquote&gt;
The important lines are&lt;br /&gt;
&lt;blockquote class=&quot;tr_bq&quot;&gt;
+acl home src 10.0.0.0/24&lt;br /&gt;
+http_access allow home&lt;br /&gt;
+ strip_query_terms off&lt;/blockquote&gt;
This tells Squid to listen for an address range and not to strip the query terms off. The latter is important to show the full URI the application is trying to access. Naturally, there was &lt;a href=&quot;https://help.ubuntu.com/lts/serverguide/squid.html&quot;&gt;documentation about this at Ubuntu&lt;/a&gt;.&lt;br /&gt;
&lt;br /&gt;
Now we can check out what is going on in the application. &lt;br /&gt;
&lt;blockquote class=&quot;tr_bq&quot;&gt;
sudo tail -f /var/log/squid3/access.log&lt;/blockquote&gt;
The sudo is because normal users don&#39;t have access to /var. tail -f will hold the shell and continue to print to screen anything new that is stored in the log file. Now that we have configured the proxy, we can setup our devices.&lt;br /&gt;
&lt;h4&gt;
Point your device to the proxy.&lt;/h4&gt;
&lt;div&gt;
The original experiment was done on an iPad but the applications I wrote target the Android platform. #1 reason: I don&#39;t own a working Mac so development for Apple targets is basically implausible. I use custom ROMs so your settings window may be different.&lt;/div&gt;
&lt;div&gt;
&lt;ol&gt;
&lt;li&gt;Go to the Android settings application.&amp;nbsp;&lt;/li&gt;
&lt;li&gt;Click WiFi and then click-hold your SSID.&lt;/li&gt;
&lt;li&gt;Check advance options.&lt;/li&gt;
&lt;li&gt;Select Manual for the proxy drop down.&lt;/li&gt;
&lt;li&gt;Put in your Squid&#39;s IP (mine was 10.0.0.105).&amp;nbsp;&lt;/li&gt;
&lt;li&gt;Its port number.&amp;nbsp;&lt;/li&gt;
&lt;li&gt;And optionally, the bypass proxy. You can put an address like ads.google.com so Squid doesn&#39;t get all the calls to advertisements. I just put in localhost because it makes sense.&amp;nbsp;&lt;/li&gt;
&lt;li&gt;Click save.&lt;/li&gt;
&lt;/ol&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhf5eYeHbvwzik4zEYpmE3KL_brpR1jg6gQNACmqOVGUb7_N7-BOURKojWbgdrbFd5a-v9DAiON0_NCwAw_-yY2OJN7D8POyRPeb8kgCVY_miopsF6u_q7NSbzMXGP4tD_KlMrxVldY5Q8u/s1600/Screenshot_2014-01-02-21-33-47.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;400&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhf5eYeHbvwzik4zEYpmE3KL_brpR1jg6gQNACmqOVGUb7_N7-BOURKojWbgdrbFd5a-v9DAiON0_NCwAw_-yY2OJN7D8POyRPeb8kgCVY_miopsF6u_q7NSbzMXGP4tD_KlMrxVldY5Q8u/s400/Screenshot_2014-01-02-21-33-47.png&quot; width=&quot;335&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
And then watch your Ubuntu terminal print out data as the device sends data through the proxy. Test it out by going to a web page. You should see all the network traffic that your device is requesting.&lt;br /&gt;
&lt;h4&gt;
Sample data.&lt;/h4&gt;
I ran my applications through the proxy so I can show you how to read the Squid logs. Here is sample hit from my &lt;a href=&quot;https://github.com/jaimeyu/travvik-android-mvp&quot;&gt;Android application&lt;/a&gt;.&lt;br /&gt;
&lt;blockquote class=&quot;tr_bq&quot;&gt;
1388716566.121&amp;nbsp;&amp;nbsp; 1164 10.0.0.102 TCP_MISS/200 2017 GET http://ottawa.travvik.com/wip/scratch/json.php?routeno=95&amp;amp;stopno=3017 - DIRECT/0.0.0.0 application/javascript&lt;/blockquote&gt;
I also wrote a &lt;a href=&quot;https://github.com/jaimeyu/travvik-pebble-mvp&quot;&gt;Pebble smart watch app&lt;/a&gt; as well so lets check its calls too.&lt;br /&gt;
&lt;blockquote class=&quot;tr_bq&quot;&gt;
1388716806.327&amp;nbsp;&amp;nbsp;&amp;nbsp; 805 10.0.0.102 TCP_MISS/200 648 GET http://ottawa.travvik.com/json.php?routeno=95&amp;amp;stopno=3017&amp;amp;src=pebble - DIRECT/0.0.0.0 application/javascript&lt;/blockquote&gt;
Some of the data is pretty obvious such as your IP address and the TCP information. Note that it doesn&#39;t display the actual content received. This is the reason why I didn&#39;t want to run tcpdump because I didn&#39;t want to be overloaded with data. I just wanted to know what the API was so I could make similar calls and pull up to date information.&lt;br /&gt;
&lt;br /&gt;
Notice the URI that points to my web server (you can even see that one is still pointing to an experimental folder). &lt;a href=&quot;https://github.com/jaimeyu/travvik-www&quot;&gt;You can see my API&lt;/a&gt; takes in a &#39;routeno&#39;, a &#39;stopno&#39;, and optionally, a &#39;src&#39; field. From that, we can now hack around and see what the API returns (please be nice to my server). In this case, we know it returns a JSON object for the latest location and upcoming times for a bus. I would have preferred to have tunnelled the data through SSL but I haven&#39;t bought a certificate yet (hey!, I&#39;m not made of money).&lt;br /&gt;
&lt;br /&gt;
So that is the bare bones tutorial on scrapping a RESTful API using a proxy. There is much more you can do but I will leave it up to you to play around.</content><link rel='replies' type='application/atom+xml' href='http://ask.jaimeyu.com/feeds/1630419767076332169/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://ask.jaimeyu.com/2014/01/how-to-scrape-mobile-applications.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7455490061003058486/posts/default/1630419767076332169'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7455490061003058486/posts/default/1630419767076332169'/><link rel='alternate' type='text/html' href='http://ask.jaimeyu.com/2014/01/how-to-scrape-mobile-applications.html' title='How to scrape a mobile application&#39;s RESTful API'/><author><name>Jaime Yu</name><uri>http://www.blogger.com/profile/08493978720803625586</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhf5eYeHbvwzik4zEYpmE3KL_brpR1jg6gQNACmqOVGUb7_N7-BOURKojWbgdrbFd5a-v9DAiON0_NCwAw_-yY2OJN7D8POyRPeb8kgCVY_miopsF6u_q7NSbzMXGP4tD_KlMrxVldY5Q8u/s72-c/Screenshot_2014-01-02-21-33-47.png" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7455490061003058486.post-5186622472343677936</id><published>2013-12-23T00:47:00.000-05:00</published><updated>2013-12-23T00:47:00.717-05:00</updated><title type='text'>Blanketing a city with wireless transit updates</title><content type='html'>I read a week ago about Oona&#39;s effort in &lt;a href=&quot;http://www.windytan.com/2013/11/decoding-radio-controlled-bus-stop.html&quot;&gt;reverse engineering the wireless transit updates in Helsinki&lt;/a&gt;. The engineering effort was admirable but the concept of the transmission was much more interesting for me. I&#39;ve been dabbling in my head about how to deliver information efficiently throughout a city lately. I&#39;ve been having thought experiments about energy use and whether solar power would be enough to hold a sustain 1mW RF transceiver over a certain amount of time.&lt;br /&gt;
&lt;br /&gt;
Anyways, the concept was interesting and I will have to &lt;a href=&quot;http://www.lvm.fi/docs/en/2497123_DLFE-19240.pdf%E2%80%8E&quot;&gt;finish reading through the city&#39;s vision of the system&lt;/a&gt;&amp;nbsp;but its an interesting experiment by the multiple governments corporations.&lt;br /&gt;
&lt;br /&gt;
But the idea is sound and I like it. It shouldn&#39;t be too difficult to build a similar system using amateur radio equipment. Alas, I dropped the question about it in the Ottawa and Montreal subreddits and was told it was a stupid idea for various reasons. Regardless, I would still like to find someone who is an amateur radio operator and pick their brain. I really don&#39;t see any downsides since we already have radio time servers, traffic reports, and emergency services.&lt;br /&gt;
&lt;br /&gt;
That and managing to find time and support so I can invest more time into building a swarm network platform. I dream of a future where entire cities are covered in these disposable sensors. We can track a storm as it goes through a city using pressure sensors, or tracking traffic patterns, emergency communication, etc. Hydro is already attempting to do some of this, I read Washington is covered in radiation sensors now, and I remember there was a city who put up gun shot sensors. But it would be nice to have a solution that is completely open sourced so people can peer review it and have some trust in the system. I truly do not believe any closed system is good for privacy. It has to be done like cryptography, where the methods are known but the math is so difficult, knowing how its done won&#39;t make it easier to crack it.</content><link rel='replies' type='application/atom+xml' href='http://ask.jaimeyu.com/feeds/5186622472343677936/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://ask.jaimeyu.com/2013/12/blanketing-city-with-wireless-transit.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7455490061003058486/posts/default/5186622472343677936'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7455490061003058486/posts/default/5186622472343677936'/><link rel='alternate' type='text/html' href='http://ask.jaimeyu.com/2013/12/blanketing-city-with-wireless-transit.html' title='Blanketing a city with wireless transit updates'/><author><name>Jaime Yu</name><uri>http://www.blogger.com/profile/08493978720803625586</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7455490061003058486.post-5506352757379113420</id><published>2013-12-21T16:38:00.000-05:00</published><updated>2013-12-24T07:54:24.118-05:00</updated><title type='text'>Backing up Linux</title><content type='html'>Yesterday, I wanted to remove Debian and replace it with Ubuntu. I was having weird graphical issues so I wanted to go upstream as that might solve all my problems. It was either that or go downstream and stick with a 2 colour console.&lt;br /&gt;
&lt;br /&gt;
What I had originally did when I installed Debian was setup LVM and a separate /home partition. So when the day came and I needed to swap distribution, I wouldn&#39;t have to do anything special to my files. Boy, WAS I WRONG.&lt;br /&gt;
&lt;br /&gt;
Now don&#39;t get me wrong, keeping my files intact was trivial compared to Windows. The big reason things failed was because I was using LVM and a weird mixture of UEFI and legacy BIOS.&lt;br /&gt;
&lt;br /&gt;
I&#39;m stuck using legacy mode on my new motherboard because if I want to dual boot into Windows to play games, there is no other way to load it. Worst, I had to configure two of my SATA ports to downgrade to legacy modes as well so I could boot Windows as well. And the other various configurations in the BIOS to keep things compatible for Windows 7. I cannot wait until more publishers move to the Steam OS platform. I don&#39;t really need yet another device but rather an ecosystem to allows me to use Linux, OS X, or even Windows. We&#39;re not there yet but we&#39;re close with Google services.&lt;br /&gt;
&lt;br /&gt;
Anyways, I installed Ubuntu 13.10 onto my SSD reusing the LVM partition layout and keeping /home directory intact. Yay. Took a few minutes and I had more trouble with getting the USB stick created than installation. But there was a wrinkle, and I should have known nothing is that easy. It said it couldn&#39;t install Grub onto the SSD. Weird, I already have Grub installed so its not like its impossible and it just has to overwrite the files...&lt;br /&gt;
&lt;br /&gt;
Ok, I was still able to select /dev/sda and it said the install was complete... But when it rebooted, it was the old Debian Grub configuration, not the Ubuntu one. Ok, So that didn&#39;t work... but I was still able to boot into Ubuntu. But I couldn&#39;t use the mouse or keyboard! WTF??&lt;br /&gt;
&lt;br /&gt;
Apparently, &lt;a href=&quot;https://bugs.launchpad.net/ubuntu/+source/initramfs-tools/+bug/1238194&quot;&gt;there is a potential issue with how 13.10 deals with USB drivers&lt;/a&gt;. I upgraded to the proposed initramfs but noticed that still didn&#39;t work. I upgraded by using the recovery console but after a couple hours, I realized something, the recovery console wasn&#39;t using the latest Ubuntu kernel. It was a 3.2 Debian kernel, not the 3.11 Ubuntu one I wanted to use. WAIT A SEC? I formatted the drive and removed the Debian root partition, there shouldn&#39;t be an old kernel there. So I checked / and all the symlinks were to the 3.11 kernel.&lt;br /&gt;
&lt;br /&gt;
Turns out, Grub and the recovery console was in yet another partition because of the way Debian installed things. I think Debian installed a chain loader to get it work with my funky UEFI setup. Great... Now here&#39;s the thing, everything I&#39;ve read says LVM is easier to use. I have yet to ever reconfigure a LVM partition table properly and last time I booted with a gparted, I still couldn&#39;t get the damn thing to resize.&lt;br /&gt;
&lt;br /&gt;
So I backed everything up to my NAS and my local disk drive using a loopback disk image. Took forever but I really wanted to make sure I kept all the file permissions and owners.&lt;br /&gt;
&lt;br /&gt;
Once that was done, I told Ubuntu to just use the entire SSD however it felt like it. AND NO LVM this time (I also don&#39;t recommend using the default encrypting configuration if you have files with long names like I do).&lt;br /&gt;
&lt;br /&gt;
And my backup? I just did a cp -rp and pulled everything out of my backup back in /home. Rebooted and everything is back to my previous Debian configuration. All my applications are still there, my project files, etc. Even the background changed to what I was using in Debian Gnome3.&lt;br /&gt;
&lt;br /&gt;
That&#39;s the kicker, all my development apps, Eclipse, Netbeans, Android Studio, etc, &amp;nbsp;transferred over without needing to reconfigure them. This is also the reason why I don&#39;t use encryption on my /home because I&#39;ve had problems with long complicated filenames. I may look into OpenPGP&#39;s full disk encryption but it isn&#39;t a pressing issue until I also have my backups under encryptions as well. But this is way simpler and looks like all my SSH certificates made the migration as well. Which is nice so I don&#39;t have to regenerate them and setup all my certs again.&lt;br /&gt;
&lt;br /&gt;
Now if I get another SSD, I could play around and see if I can properly configure a LVM disk. I really want to figure out how to get it to be as flexible as I had hoped.&amp;nbsp;&lt;!--10--&gt;</content><link rel='replies' type='application/atom+xml' href='http://ask.jaimeyu.com/feeds/5506352757379113420/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://ask.jaimeyu.com/2013/12/backing-up-linux.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7455490061003058486/posts/default/5506352757379113420'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7455490061003058486/posts/default/5506352757379113420'/><link rel='alternate' type='text/html' href='http://ask.jaimeyu.com/2013/12/backing-up-linux.html' title='Backing up Linux'/><author><name>Jaime Yu</name><uri>http://www.blogger.com/profile/08493978720803625586</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7455490061003058486.post-8049746998912061769</id><published>2013-12-16T22:05:00.000-05:00</published><updated>2013-12-16T22:05:27.884-05:00</updated><title type='text'>What&#39;s in my bag?</title><content type='html'>&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiqaWQC1BZ2od3tnF9kuTGi0K4gAwD214b875lQkEodOTdInugN3WJio2QcCIZfw8rS_KlmIpRNEhVVRUrRfA7oFHdgeMXmJ5mlzZbvJyGQ7K2ChPuwdip0dt2e6F8ed4_sO1VDNOhJsfie/s1600/whats-in-my-bag.JPG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;400&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiqaWQC1BZ2od3tnF9kuTGi0K4gAwD214b875lQkEodOTdInugN3WJio2QcCIZfw8rS_KlmIpRNEhVVRUrRfA7oFHdgeMXmJ5mlzZbvJyGQ7K2ChPuwdip0dt2e6F8ed4_sO1VDNOhJsfie/s400/whats-in-my-bag.JPG&quot; width=&quot;376&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
The office admin at work said she wanted to see my apartment because it would be like a Willy Wonka factory of electronics. I recently bought another Raspberry Pi for a project I&#39;m working on and of course she received it for me. She has noticed a pattern where weird electronics would show up for me. So I can see where this idea comes from, but it is far from the truth.&lt;br /&gt;
&lt;br /&gt;
Above is a photo of what is in my bag everyday I go to work and basically represents my apartment as well. I have my ~1st gen Android Samsung tablet, which is my makeshift laptop, which is also my phone, which is also my MP3 player. Just because I use it doesn&#39;t mean I like. Don&#39;t spend good money on this, its not like I did either. To accompany the tablet are the Grado&#39;s ear buds so I can have some sort of musical purity on my commute. I&#39;m still contemplating about getting a new phone but I rarely use it to actually phone people.&lt;br /&gt;
&lt;br /&gt;
Then there is the newest addition to my mobile arsenal, the Pebble smart watch. It tells me the time, when the next bus is arriving, and helps me select music. It can also tell me the weather but I found that once I&#39;m outside, I don&#39;t need any electronics to tell me its freaking -20 degrees out. Skin is apparently a very good indicator of temperature.&lt;br /&gt;
&lt;br /&gt;
And that&#39;s it for my electronics. For whatever reason, I find it comforting to keep a copy of Dwell in my bag. Not sure why, I haven&#39;t pulled it out for a while but i think its just there as a reminder that not everything can be digitized.&lt;br /&gt;
&lt;br /&gt;
Right now, I&#39;m reading some novellas from Rick Moody. Not much to say but he has an interesting style. It is also quite different from the last book I read, The Lean Startup, and before that, Player One. I know I can read these books on the tablet, and in fact, I owned a first generation e-reader. But I found having a physical medium is comforting. My hard copy of the Learn Startup is filled with sticky note tabs since I found it hard to use a tablet to annotate documents.&lt;br /&gt;
&lt;br /&gt;
And finally, there is my notebook. I jot down ideas, algorithms, web layouts, CAD drawings for an idea for a 3D printer, etc. I realize again, I could just have easily consolidated everything to a single tablet devices but its not the same. I can easily carry my notebook around and hide it on me. It doesn&#39;t look weird when I pull it out to jot something down in comparison to pulling a 10 inch tablet or even a phone when I&#39;m around people. There is also something about sketching that I have yet to ever replicate digitally.&lt;br /&gt;
&lt;br /&gt;
I&#39;m not ready to even show you my apartment and I have yet to actually invite anyone here. To me, its just a place to live and attempt to do experiments. My parents have noticed that my TV is a small 23 inch LCD that replaces the archaic CRT that finally died after 10+ years of work. I even got it little PC speakers to compensate for the crap sound from the LCD&#39;s speakers. I want a new TV but can&#39;t find a reason to do so. I nerded out and put into a pie chart of where I spend my &lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhoJj8Vgg-3zTiCXHSLuwwke_KqEsa7mJqeZxLDw-NhVTkS0hmdiwPQHsYvotcH5Rf9dNXaBQtvw3JrXSsQ_Fdf1M_rGPt33rn8Q28QjbZV5n5xkyBItX5wSKlZI1Kaub4rxlv9k4VK8bjl/s1600/chart_1.png&quot; imageanchor=&quot;1&quot; style=&quot;clear: right; float: right; margin-bottom: 1em; margin-left: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;123&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhoJj8Vgg-3zTiCXHSLuwwke_KqEsa7mJqeZxLDw-NhVTkS0hmdiwPQHsYvotcH5Rf9dNXaBQtvw3JrXSsQ_Fdf1M_rGPt33rn8Q28QjbZV5n5xkyBItX5wSKlZI1Kaub4rxlv9k4VK8bjl/s200/chart_1.png&quot; width=&quot;200&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
time. What isn&#39;t work or sleep is spent on the bus so that is where my money goes accordingly. My workstation now uses this old 17 inch LCD that my brother no longer wanted.&lt;br /&gt;
&lt;br /&gt;
I don&#39;t know if there is anything else worth mentioning about the apartment other than the fact I can&#39;t for the love of God take care of a plant. I have no idea how my dog is alive yet every single plant I&#39;ve ever owned has died. But yea, although I&#39;m in the high tech industry and pretty much work with embedded micro controllers on my free time, I really don&#39;t have that many consumer electronics compared to the amount of development kits that I use to learn with.</content><link rel='replies' type='application/atom+xml' href='http://ask.jaimeyu.com/feeds/8049746998912061769/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://ask.jaimeyu.com/2013/12/whats-in-my-bag.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7455490061003058486/posts/default/8049746998912061769'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7455490061003058486/posts/default/8049746998912061769'/><link rel='alternate' type='text/html' href='http://ask.jaimeyu.com/2013/12/whats-in-my-bag.html' title='What&#39;s in my bag?'/><author><name>Jaime Yu</name><uri>http://www.blogger.com/profile/08493978720803625586</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiqaWQC1BZ2od3tnF9kuTGi0K4gAwD214b875lQkEodOTdInugN3WJio2QcCIZfw8rS_KlmIpRNEhVVRUrRfA7oFHdgeMXmJ5mlzZbvJyGQ7K2ChPuwdip0dt2e6F8ed4_sO1VDNOhJsfie/s72-c/whats-in-my-bag.JPG" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7455490061003058486.post-8846632982647622568</id><published>2013-12-07T22:14:00.000-05:00</published><updated>2013-12-07T22:14:22.616-05:00</updated><title type='text'>Half a second is all it takes</title><content type='html'>Just implemented something I&#39;ve been thinking about for the last two weeks. I wanted to speed up &lt;a href=&quot;http://ottawa.travvik.com/&quot;&gt;ottawa.travvik.com&lt;/a&gt;&#39;s page load time because it was just taking too long. How long? I put in some code to figure out how long PHP took to build the page. Turns out it took 0.47552919387817 seconds to build a page. That doesn&#39;t sound like much but it is an eternity for some people in terms of responsiveness. Everyone in the mobile is aiming to become faster and faster with &lt;a href=&quot;http://www.dailytech.com/Android+Flagships+Are+Twice+as+Slow+at+Touch+as+iPhone+5/article33428.htm&quot;&gt;Apple in the clear lead&lt;/a&gt;. Subjectively, I&#39;ve always found the site slow so I worked on it recently to improve its performance.&lt;br /&gt;
&lt;br /&gt;
The culprit?OC Transpo&#39;s servers... They just take too damn long to serve data to me. God forbid, I have my applications all pinging their server as I worry that each request would only slow down the already slow service. Hey, its a free service, I get what I paid for. But I knew I could do better.&lt;br /&gt;
&lt;br /&gt;
So I did. After the optimization, I could get the PHP routine to serve the page in under 0.010 seconds. Naturally, it comes at a price. The data has to be in the cache or it has to go and fetch it from OC Transpo&#39;s website.&lt;br /&gt;
&lt;br /&gt;
I originally designed an architecture that took advantage of Redis, a NoSQL engine, to do the caching for me. I looked up the tutorials and wrote some pseudo code, wasn&#39;t hard at all. Then I found out that i didn&#39;t have access to a server where I could install Redis. Fine, I already wrote the pseudo code, I will just implement it with what I have, a common theme in my life. So I implemented the cache in MySQL. It was pretty simple, here&#39;s the SQL query that I use.&lt;br /&gt;
&lt;br /&gt;
The insertion:&lt;br /&gt;
&lt;blockquote class=&quot;tr_bq&quot;&gt;
&lt;i&gt;INSERT INTO time_cache (routestop, data) VALUES (&#39;00050005&#39;,&#39;This is some test data. Normally would be JSON.&#39;) on duplicate key update data=&#39;This is some test data. Normally would be JSON.&#39; &amp;nbsp;&lt;/i&gt;&lt;/blockquote&gt;
The selection:&lt;br /&gt;
&lt;blockquote class=&quot;tr_bq&quot;&gt;
&lt;i&gt;SELECT * FROM `cache` WHERE routestop=00993038 AND `timestamp` &amp;gt; date_sub(now(), interval 3 minute)&amp;nbsp;&lt;/i&gt;&lt;/blockquote&gt;
Bam! Simple. MySQL does all the heavy lifting and the PHP code only needs to check if rows exist or not. And all the applications can adjust their times to compensate for the latency since the original data contains a timestamp from OC Transpo.&lt;br /&gt;
&lt;br /&gt;
The insertion inserts the data blob into the table and I let MySQL figure out if an there is an existing key. Otherwise, it can create a new row. The time stamp is again handled by MySQL and updated on each insertions or update to a row.&lt;br /&gt;
&lt;br /&gt;
The selection is even easier. The query will only come back with rows (should always be at most 1 row since I&#39;m using a unique hash) if the time stamp is less than 3 minutes old. I choose 3 minutes out of the blue as I think 5 minutes might be too long and the data will certainly be stale. I have no idea how I can test this hypothesis right now but I certainly would like to find the magic number.&lt;br /&gt;
&lt;br /&gt;
To quicken the run time, the data is also stored as a blob so it&#39;s ready to be used without too much massaging. The key is the stop and bus number combined into a unique hash and the only other columns are the data and time stamp. It&#39;s already paid off in terms of making the &lt;a href=&quot;http://www.mypebblefaces.com/apps/12838/8038/&quot;&gt;application on my Pebble respond faster&lt;/a&gt;.&lt;br /&gt;
&lt;br /&gt;
If the data exists in the cache, we spend a lot less time waiting for data to arrive and more time in constructing the page from the template. Now if its that simple, why doesn&#39;t OC Transpo do it too? Its not like the data they have is that fresh either. It only took a couple hours to build and test on a live server.</content><link rel='replies' type='application/atom+xml' href='http://ask.jaimeyu.com/feeds/8846632982647622568/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://ask.jaimeyu.com/2013/12/half-second-is-all-it-takes.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7455490061003058486/posts/default/8846632982647622568'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7455490061003058486/posts/default/8846632982647622568'/><link rel='alternate' type='text/html' href='http://ask.jaimeyu.com/2013/12/half-second-is-all-it-takes.html' title='Half a second is all it takes'/><author><name>Jaime Yu</name><uri>http://www.blogger.com/profile/08493978720803625586</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7455490061003058486.post-7007072365458090426</id><published>2013-11-26T23:28:00.001-05:00</published><updated>2013-11-27T00:08:28.988-05:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="OC TRANSPO"/><category scheme="http://www.blogger.com/atom/ns#" term="Ottawa"/><category scheme="http://www.blogger.com/atom/ns#" term="Pebble"/><category scheme="http://www.blogger.com/atom/ns#" term="software"/><title type='text'>Ottawa&#39;s OC Transpo Bus upcoming bus times in the palm of your hand... well your wrist actually. </title><content type='html'>&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;iframe allowfullscreen=&#39;allowfullscreen&#39; webkitallowfullscreen=&#39;webkitallowfullscreen&#39; mozallowfullscreen=&#39;mozallowfullscreen&#39; width=&#39;320&#39; height=&#39;266&#39; src=&#39;https://www.youtube.com/embed/Ru3dal0E10U?feature=player_embedded&#39; frameborder=&#39;0&#39;&gt;&lt;/iframe&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
Last week, I bought a &lt;a href=&quot;https://getpebble.com/&quot;&gt;Pebble watch&lt;/a&gt; because it was in stock. I didn&#39;t want to miss my chance to get it (since I completely missed the Kickstarter). Oh, they weren&#39;t kidding about first class delivery. I got it within 72 hours with &quot;free shipping&quot; (nothing is ever free shipping in Canada, I got hit with duty when it crossed the border).&lt;br /&gt;
&lt;br /&gt;
I take the public transit regularly in Ottawa and they open live transit data to the public. Obviously, there are some caveats but hey, its FREE. So I wrote an Android application and a web application to tell me when the next bus is coming. It works, it tells me the GPS speed and location of the bus. But I use a 3G tablet instead of a phone. Which makes it a pain to pull out of my bag to quickly check the time, temperature, change songs, and check the latest transit data. May be a first problem but it won&#39;t stop me from actually doing something.&lt;br /&gt;
&lt;br /&gt;
So that is where the Pebble comes in. I wrote the application so I can have the bus schedule on my wrist. The only caveat is that I must manually enter the route and stop number into the watch. This is mostly because I never got a chance to write the GIS code in the back end to find the nearest bus stops. The database is actually full right now with GIS data, took an entire weekend and a warning from my host since I transferred the data using REST non-stop for 72 hours and they thought the site was under a (very lame) DDoS attack... but its there now.&lt;br /&gt;
&lt;br /&gt;
Its pretty easy to use the application anyways. Up and down button increments and decrements respectively the route or stop number. The select button selects the which value you wish to modify. A long press of the select button tells the application to create a new query. When you launch the application, it makes an attempt to get updated data of the last query to the Pebble. The only annoyance is that OC Transpo have no idea how to deal with data. So each stop number represents two directions. This is incredibly stupid unless you know which direction you want to head&amp;nbsp;&amp;nbsp;(was this done to save on memory and number of stops to keep track of?). Recently, I got bit by this, luckily, I ran across the street when I notice the bus had the right destination was coming around the bend. Anyways, to cycle through the directions, you just long press the select button to force a query. The JS app on the host will do the cycle for you. I originally put the functionality on the watch but it was tedious and really didn&#39;t add value. One long click is better than 3 extra navigation clicks when the behaviour is obvious.&lt;br /&gt;
&lt;br /&gt;
I also suspect the query is occasionally refreshed due to framework but I&#39;m not sure. Right now, the use-case is that I load the app, check the amount of time until the next bus, and then go back to regular watch mode or music control mode. We&#39;ll see how this goes.&lt;br /&gt;
&lt;br /&gt;
Since the Pebble SDK (beta) uses Javascript to communicate from my tablet/device to the Pebble, I just re-use the same code I&#39;ve used in my web app. This just re-iterates a belief that I think Javascript is going to become a mainstream scripting language, not just a web language.&lt;br /&gt;
&lt;br /&gt;
Right now, the software is beta since the new Pebble SDK isn&#39;t released yet. I wouldn&#39;t be surprised something in the API changes before it gets released. If you would like to try it out and don&#39;t mind being on the bleeding edge (ie: potential stability issues), contact me at &lt;a href=&quot;http://jaime+pebble@jaimeyu.com/&quot;&gt;jaime+pebble@jaimeyu.com&lt;/a&gt;. I&#39;m especially curious on how many Pebble owners exist in Ottawa right now.</content><link rel='replies' type='application/atom+xml' href='http://ask.jaimeyu.com/feeds/7007072365458090426/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://ask.jaimeyu.com/2013/11/ottawas-oc-transpo-bus-upcoming-bus.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7455490061003058486/posts/default/7007072365458090426'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7455490061003058486/posts/default/7007072365458090426'/><link rel='alternate' type='text/html' href='http://ask.jaimeyu.com/2013/11/ottawas-oc-transpo-bus-upcoming-bus.html' title='Ottawa&#39;s OC Transpo Bus upcoming bus times in the palm of your hand... well your wrist actually. '/><author><name>Jaime Yu</name><uri>http://www.blogger.com/profile/08493978720803625586</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total><georss:featurename>Ottawa, ON, Canada</georss:featurename><georss:point>45.4215296 -75.697193099999993</georss:point><georss:box>44.7060866 -76.988086599999988 46.1369726 -74.4062996</georss:box></entry><entry><id>tag:blogger.com,1999:blog-7455490061003058486.post-9142313884943747125</id><published>2013-11-17T13:59:00.001-05:00</published><updated>2013-11-17T13:59:51.316-05:00</updated><title type='text'>Latest version of my OC Transpo web app</title><content type='html'>&lt;table align=&quot;center&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;tr-caption-container&quot; style=&quot;margin-left: auto; margin-right: auto; text-align: center;&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td style=&quot;text-align: center;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;200&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgSUxtl_dovatceaSvR416xjePn9ql9pJkTl0ax12Uj5Vj04zx_nAkvbhs6yBKj3T4jX7gum0T4Ylf-7XxVyGGvCxJzvE_xHlXCGJKc0LO-NqsLauNab1KXEzz4S_ml9WcOtZWjkufdZJ7X/s200/travvik_large.png&quot; style=&quot;margin-left: auto; margin-right: auto;&quot; width=&quot;200&quot; /&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;Check it out at&amp;nbsp;&lt;a href=&quot;http://ottawa.travvik.com/index.php?routeno=95&amp;amp;stopno=3017&quot; style=&quot;font-size: medium; text-align: start;&quot;&gt;ottawa.travvik.com&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
I just made some massive code changes to my &lt;a href=&quot;http://ottawa.travvik.com/&quot;&gt;web application &lt;/a&gt;that predicts the next bus coming to a station. I factored out a lot of the legacy binding and separated all the entities to make my life easier. Eventually, I want to port the back end to node.js or Python but the front end was relying too much on the back end to generate HTML.&lt;br /&gt;
&lt;br /&gt;
Now its simpler and the design works better for different platforms. Now I can get back and focus on adding newer features like geo-location and a better way of entering your stop data.&lt;br /&gt;
&lt;br /&gt;
I still believe the future is in the web rather than native apps which why I did the big changes. My &lt;a href=&quot;https://play.google.com/store/apps/details?id=com.travvik.octranspo&quot;&gt;Android version&lt;/a&gt;&amp;nbsp;will see changes to match the web app but I only see it marginally better than the web application. The only two things it has in advantage is the ability to sell it at a higher price (frankly, at any price) and better GPS location. But I&#39;m expecting the latter to become a non issue sooner than later.</content><link rel='replies' type='application/atom+xml' href='http://ask.jaimeyu.com/feeds/9142313884943747125/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://ask.jaimeyu.com/2013/11/latest-version-of-my-oc-transpo-web-app.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7455490061003058486/posts/default/9142313884943747125'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7455490061003058486/posts/default/9142313884943747125'/><link rel='alternate' type='text/html' href='http://ask.jaimeyu.com/2013/11/latest-version-of-my-oc-transpo-web-app.html' title='Latest version of my OC Transpo web app'/><author><name>Jaime Yu</name><uri>http://www.blogger.com/profile/08493978720803625586</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgSUxtl_dovatceaSvR416xjePn9ql9pJkTl0ax12Uj5Vj04zx_nAkvbhs6yBKj3T4jX7gum0T4Ylf-7XxVyGGvCxJzvE_xHlXCGJKc0LO-NqsLauNab1KXEzz4S_ml9WcOtZWjkufdZJ7X/s72-c/travvik_large.png" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7455490061003058486.post-1334817205219178969</id><published>2013-11-13T07:39:00.002-05:00</published><updated>2013-11-13T07:39:28.034-05:00</updated><title type='text'>Debian as Pokemon</title><content type='html'>I know very little about Pokemon other than playing it for a few hours on a Gameboy.&lt;br /&gt;
&lt;br /&gt;
But a while ago, a co-worker brought up Gentoo and Debian&#39;s evolution (He is originally a Gentoo guy and I&#39;ve been a Debian guy). In my geeky mind, I was picturing how they could be treated like Pokemon.&lt;br /&gt;
&lt;br /&gt;
Suddenly, Gentoo appears.&lt;br /&gt;
I call Debian to protect me.&lt;br /&gt;
Gentoo uses Ports to compile an attack.&lt;br /&gt;
Debian uses Apt to install an attack and deals a critical hit as Gentoo is still busy compiling the attack.&lt;br /&gt;
Debian evolves into Ubuntu.&lt;br /&gt;
Ubuntu attempts to use Unity against Gentoo and misses.&lt;br /&gt;
Gentoo finished compiling attack, deals good damage on Ubuntu.&lt;br /&gt;
&lt;br /&gt;
Debian is such a fun beast to play with because it almost takes all the work out. It is really annoying having to deal with out of date packages (thanks to a ridiculous policy about stable builds) but my Debian machines generally have been excellent. Up until I&#39;ve install Gnome3 which does crashes (only once did I was unable use the alternative shell.&lt;br /&gt;
&lt;br /&gt;
I&#39;m looking into playing with Arch Linux for embedded devices. It looks like they have a very good community going and their packages are all bleeding edge. Plus, it may give me a reason to try Yocto again.&lt;br /&gt;
&lt;br /&gt;
I was not impressed with Yocto when 6 hours into a build, it crashes because of some error that I have no idea what it means (I thought it was supposed to solve all my dependencies). I can create a new custom Debian distribution for an ARM based board in under 10 minutes in comparison with my scripts now. But, having that speed advantage would be nice for the projects that use crypto and eat up the CPU.</content><link rel='replies' type='application/atom+xml' href='http://ask.jaimeyu.com/feeds/1334817205219178969/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://ask.jaimeyu.com/2013/11/debian-as-pokemon.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7455490061003058486/posts/default/1334817205219178969'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7455490061003058486/posts/default/1334817205219178969'/><link rel='alternate' type='text/html' href='http://ask.jaimeyu.com/2013/11/debian-as-pokemon.html' title='Debian as Pokemon'/><author><name>Jaime Yu</name><uri>http://www.blogger.com/profile/08493978720803625586</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7455490061003058486.post-7004425614573372453</id><published>2013-11-02T00:23:00.001-04:00</published><updated>2013-11-02T00:23:45.357-04:00</updated><title type='text'>Ever wanted to know how to use Git? Rough draft tutorial</title><content type='html'>i started writing a tutorial on how to use Git while I was in transit to work. The bus ride is pretty long and boring. One morning, I thought I should write down a tutorial on Git. It&#39;s a good way to practice what I know and it beats staring into space on the bus.&lt;br /&gt;
&lt;br /&gt;
&lt;a href=&quot;https://docs.google.com/document/d/1-gDFqb_sLnehxyS_J2NjX7n0w9AK5IX4kYdQwMBmVTw/pub&quot;&gt;Here is the rough draft of the document.&lt;/a&gt; I&#39;m hoping I get around to putting it all together with graphics and a presentation. At the very least, feedback on the document is appreciated. It is currently 6 pages and not really factually checked yet. I wrote it based on the command line interface in my mind since I didn&#39;t have access to a PC on the bus.</content><link rel='replies' type='application/atom+xml' href='http://ask.jaimeyu.com/feeds/7004425614573372453/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://ask.jaimeyu.com/2013/11/ever-wanted-to-know-how-to-use-git.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7455490061003058486/posts/default/7004425614573372453'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7455490061003058486/posts/default/7004425614573372453'/><link rel='alternate' type='text/html' href='http://ask.jaimeyu.com/2013/11/ever-wanted-to-know-how-to-use-git.html' title='Ever wanted to know how to use Git? Rough draft tutorial'/><author><name>Jaime Yu</name><uri>http://www.blogger.com/profile/08493978720803625586</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7455490061003058486.post-3015539235622047406</id><published>2013-11-01T08:38:00.002-04:00</published><updated>2013-11-01T08:38:33.264-04:00</updated><title type='text'>Travvik Android App</title><content type='html'>&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhjU_q8XV2zt4Q-I_c5MVm8W58r8B2Jf_NykNIXd-83RsPbftvm-nj5K83RH5meVM9D-yTzVLpGn0bBklZf8_w3RovaG0fvgY-LwiRjm8yXewppEUuI8KBO5QtTE-VpVWGjyLAdJCCtNwpl/s1600/map-phone.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;320&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhjU_q8XV2zt4Q-I_c5MVm8W58r8B2Jf_NykNIXd-83RsPbftvm-nj5K83RH5meVM9D-yTzVLpGn0bBklZf8_w3RovaG0fvgY-LwiRjm8yXewppEUuI8KBO5QtTE-VpVWGjyLAdJCCtNwpl/s320/map-phone.png&quot; width=&quot;180&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;a href=&quot;https://play.google.com/store/apps/details?id=com.travvik.octranspo&quot;&gt;Posted my OC Transpo app to the Play store last night&lt;/a&gt;. Its something I&#39;ve been working here and there when I find some time.&lt;br /&gt;
&lt;br /&gt;
It gets data from OC Transpo&#39;s live data feeds and tells you when the next bus is coming. It can also tell you the speed and location of the bus on a map.&lt;br /&gt;
&lt;br /&gt;
Right now, its just a bare bones implementation to get used to developing for Android. But feedback is welcomed at app@travvik.com.</content><link rel='replies' type='application/atom+xml' href='http://ask.jaimeyu.com/feeds/3015539235622047406/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://ask.jaimeyu.com/2013/11/travvik-android-app.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7455490061003058486/posts/default/3015539235622047406'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7455490061003058486/posts/default/3015539235622047406'/><link rel='alternate' type='text/html' href='http://ask.jaimeyu.com/2013/11/travvik-android-app.html' title='Travvik Android App'/><author><name>Jaime Yu</name><uri>http://www.blogger.com/profile/08493978720803625586</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhjU_q8XV2zt4Q-I_c5MVm8W58r8B2Jf_NykNIXd-83RsPbftvm-nj5K83RH5meVM9D-yTzVLpGn0bBklZf8_w3RovaG0fvgY-LwiRjm8yXewppEUuI8KBO5QtTE-VpVWGjyLAdJCCtNwpl/s72-c/map-phone.png" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7455490061003058486.post-6371438588054673792</id><published>2013-09-08T19:40:00.003-04:00</published><updated>2013-09-08T19:40:56.096-04:00</updated><title type='text'>Interesting thought about the infinite &quot;for(;;;)&quot; loop</title><content type='html'>The correct way to do an infinite loop in C (and I&#39;m guessing C++) is to write:&lt;br /&gt;
&lt;br /&gt;
&lt;blockquote&gt;
for(;;;)&lt;br /&gt;
{&lt;br /&gt;
&amp;nbsp; &amp;nbsp;...&lt;br /&gt;
}&lt;/blockquote&gt;
&lt;br /&gt;
but I never really questioned why.&lt;br /&gt;
&lt;br /&gt;
In a typical for loop statement such as &quot;for(x; y; z)&quot;, X is where you would initialize a variable, y is the test of said variable, and z is the operation on said variable.&lt;br /&gt;
&lt;br /&gt;
So out of randomness, I realized that it makes sense in assembly.&lt;br /&gt;
&lt;br /&gt;
I would have written &quot;for (x = 0, x &lt;2 8051=&quot;&quot; as=&quot;&quot; assembly...=&quot;&quot; in=&quot;&quot; p=&quot;&quot; such=&quot;&quot; x=&quot;&quot;&gt;&lt;br /&gt;
CLR &amp;nbsp; &amp;nbsp;PSW ; mcu FLAG byte&lt;br /&gt;
mov &amp;nbsp; &amp;nbsp; R0,0 ; R0 = x&lt;br /&gt;
LOOP_START:&lt;br /&gt;
INC &amp;nbsp; &amp;nbsp; r0&lt;br /&gt;
NOP &amp;nbsp; ;this is where the operations would be placed&lt;br /&gt;
CJNE &amp;nbsp;R0,#02h,LOOP_START&lt;br /&gt;
JNC &amp;nbsp; &amp;nbsp;LOOP_START&amp;nbsp; &lt;br /&gt;
&lt;br /&gt;
So if we put nothing in the for statement, I would have written this&lt;br /&gt;
CLR &amp;nbsp; &amp;nbsp;PSW ; mcu FLAG byte&lt;br /&gt;
&lt;br /&gt;
NOP &amp;nbsp; ;mov &amp;nbsp;R0,0 ; R0 = x&lt;br /&gt;
LOOP_START:&lt;br /&gt;
NOP &amp;nbsp; ;INC &amp;nbsp; &amp;nbsp; r0&lt;br /&gt;
NOP &amp;nbsp; ;this is where the operations would be placed&lt;br /&gt;
JNC &amp;nbsp; &amp;nbsp;LOOP_START&lt;br /&gt;
&lt;br /&gt;
So it makes sense now&lt;!--2--&gt;&lt;/2&gt;</content><link rel='replies' type='application/atom+xml' href='http://ask.jaimeyu.com/feeds/6371438588054673792/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://ask.jaimeyu.com/2013/09/interesting-thought-about-infinite-for.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7455490061003058486/posts/default/6371438588054673792'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7455490061003058486/posts/default/6371438588054673792'/><link rel='alternate' type='text/html' href='http://ask.jaimeyu.com/2013/09/interesting-thought-about-infinite-for.html' title='Interesting thought about the infinite &quot;for(;;;)&quot; loop'/><author><name>Jaime Yu</name><uri>http://www.blogger.com/profile/08493978720803625586</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7455490061003058486.post-8787890085875006790</id><published>2013-09-08T19:38:00.001-04:00</published><updated>2013-09-08T19:38:18.194-04:00</updated><title type='text'>Arduino 16 bit Timer 1 Interrupt Tutorial</title><content type='html'>&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiXf9Q6coVDK45EeMN56UVnJ91eNXZiIbtScjr-RT5QpJgZVOszw0cdGqRoAU-nFLQpq3j5W-pvuVIKBmSHSr7d_wDxSdBH1K1yN_vdsFtj_WnLzmjrV7Mkv-FxqFSKxuJ_vBf0MqVRhsaB/s1600/WP_001096-1.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;252&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiXf9Q6coVDK45EeMN56UVnJ91eNXZiIbtScjr-RT5QpJgZVOszw0cdGqRoAU-nFLQpq3j5W-pvuVIKBmSHSr7d_wDxSdBH1K1yN_vdsFtj_WnLzmjrV7Mkv-FxqFSKxuJ_vBf0MqVRhsaB/s400/WP_001096-1.jpg&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
I found this post in my draft folder... but it looks like its mostly written up. So here you guys go.&lt;br /&gt;
&lt;br /&gt;
Today, we&#39;re going to look at implementing Timer Interrupts on an Arduino. Luckily for everyone, Jesse Tane wrote a &lt;a href=&quot;http://code.google.com/p/arduino-timerone/&quot;&gt;Timer 1 library back in the day&lt;/a&gt; to make it easy to implement. You can find some more information about &lt;a href=&quot;http://www.arduino.cc/playground/Code/Timer1&quot;&gt;its functions at Arduino.cc too&lt;/a&gt;.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;What are Interrupts?&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
Interrupts can be viewed as triggers that allow you to literally interrupt the current process in you code to do another function. There are two types of interrupts; internal and external. Internal interrupts are usually based on built in timers and external interrupts are events that happen on outside the micro controller. To visualize this, imagine that you have a button attached to an Arduino and when you press the button, you want an LED to turn on.&lt;br /&gt;
&lt;br /&gt;
So one could just write an application that did nothing but poll the button&#39;s state and then turn on the LED.&lt;br /&gt;
&lt;blockquote class=&quot;tr_bq&quot;&gt;
while(1)&lt;br /&gt;
{&lt;br /&gt;
&amp;nbsp; &amp;nbsp;if (button == pressed) turnLedOn();&lt;br /&gt;
&amp;nbsp; &amp;nbsp;else turnLedOff();&lt;br /&gt;
}&lt;/blockquote&gt;
But then, what would you do if you also want to other functions in your code? When the Arduino is busy working in that function, it could miss seeing the button press because it didn&#39;t get a chance to poll the button&#39;s status.&lt;br /&gt;
&lt;blockquote class=&quot;tr_bq&quot;&gt;
&amp;nbsp; &amp;nbsp;if (button == pressed) turnLedOn();&lt;br /&gt;
&amp;nbsp; &amp;nbsp;else turnLedOff();&lt;br /&gt;
&amp;nbsp; &amp;nbsp;do_another_fn(); //while in here, i can&#39;t check the button&#39;s state!&lt;/blockquote&gt;
&lt;br /&gt;
We can use an external interrupt to check the status of the button&#39;s state and then update the LED even while the Arduino is busy in the do_another_fn() function. The interrupt function is called the Interrupt Service Routine (ISR).&lt;br /&gt;
&lt;br /&gt;
&lt;a href=&quot;http://www.arduino.cc/en/Reference/AttachInterrupt&quot;&gt;Arduino.cc has an example of how to implement this LED blink code here.&lt;/a&gt;&amp;nbsp;I will write up a tutorial on external interrupts later. Lets back to timer interrupts which I think are more important.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;What are Timer Interrupts?&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
Timer interrupts are internal interrupts that are extremely useful when you are designing applications. If you wanted a function to happen on a certain period, you can implement it using a timer interrupt. A timer works like an alarm clock. Every morning it wakes you up at 07:00 and that is the period of alarm. In the Arduino, we can specify something similar, as in getting a function to trigger every 5 minutes.&lt;br /&gt;
&lt;br /&gt;
There is a&lt;a href=&quot;http://attachinterrupt%28function%2C%20period%29/&quot;&gt; library that makes creating a timer interrupt ridiculously simple&lt;/a&gt;. The library allows you to use the 16 bit Timer 1 of the Atmega 328 to call a function on a set interval. The nicest feature is that it gives you a resolution of 1 microsecond. This means that the clock could technically interrupt every 1 microsecond. &lt;a href=&quot;http://en.wikipedia.org/wiki/Blink#Nervous_coordination&quot;&gt;During the time you spent blinking&lt;/a&gt;, you could have triggered 400,000 times.&lt;br /&gt;
&lt;br /&gt;
The most important function from that library is this one:&lt;br /&gt;
&lt;blockquote class=&quot;tr_bq&quot;&gt;
&lt;br /&gt;
&lt;a href=&quot;http://www.arduino.cc/playground/Code/Timer1&quot;&gt;attachInterrupt(function, period)&lt;/a&gt;:&amp;nbsp;This lets you attach a function to the timer interrupt and set the amount of time between each call. &lt;a href=&quot;http://www.arduino.cc/playground/Code/Timer1&quot;&gt;[Source]&lt;/a&gt;&lt;/blockquote&gt;
&lt;br /&gt;
&lt;b&gt;Disadvantages to timer interrupts and interrupts in general&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
Up to this point, I explained why we would like to use interrupts but like all things, it has its disadvantages. These are a few points that you need to keep in mind when you use interrupts in your code. I won&#39;t go into too much details as I want to keep this tutorial relatively simple.&lt;br /&gt;
&lt;br /&gt;
Interruptions can happen at any time and you need to be aware of this. This means that if a function in your interrupt uses a variable that is also used by other parts of the code, then you have to think about what would happen if you interrupted during an update to that variable! This can cause a race condition that will cause your application to lock up or create a lot of data corruption. To get around this, you can use &lt;a href=&quot;http://en.wikipedia.org/wiki/Semaphore_(programming)&quot;&gt;semaphores&lt;/a&gt;&amp;nbsp;to protect your shared variables.&lt;br /&gt;
&lt;br /&gt;
The other problems is actually putting code into your interrupt function. In the blink of an eye example, we could call a function 400,000 times during the time it takes for you to blink. But what happens if the function takes 200 micro seconds to run? This means whenever an interrupt is called, another interrupt will happen before finishing up the last interrupt routine. When this happens, the Arduino will never exit the interrupt and get back to doing other things. So you must always be aware that functions that are called by an interrupt must be written so that their run time isn&#39;t longer than the interrupt&#39;s interval.&lt;br /&gt;
&lt;br /&gt;
A general rule of thumb for both these disadvantages is to write as little code as possible in our interrupt service routine. By writing the least amount of code in your ISR, it means you reduce the chance of accidentally corrupting shared variables. Generally, the smaller your code, the faster it will run so that prevents the function to run longer than the interruption period. Of course, this is not always true since you a while loop can be 1 line long and run forever. So what code is in the ISR should be the bear minimum to accomplish what you need.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;What you need&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
For this tutorial, you only need an Arduino with a USB connection as the Arduino will send messages to your PC.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;The objective&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
This application will have a timer that will interrupt every 500 micro seconds. We will use the interrupt to increment a 1 second clock. You could set the interrupt interval to 1 second instead but often, you will want to run different functions at different intervals. So using a base interval will simplify your life by only having to increment one clock and then basing your other clocks on it.&lt;br /&gt;
&lt;br /&gt;
We will flash an LED every 1 second, send out the Arduino&#39;s uptime every 3 seconds, and display an incremented variable every 6 seconds. The incremented variable is incremented as a background process that can be interrupted.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Variables&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
First, I&#39;m going to set some constants so they&#39;re easy to remember.&lt;br /&gt;
&lt;br /&gt;
I want to make the interval between each interrupt to be 500 micro seconds and I want to set the clock to reset every 2000 interrupts. This means the clock increments every 1 second.&lt;br /&gt;
&lt;br /&gt;
&lt;blockquote class=&quot;tr_bq&quot;&gt;
const unsigned int CLK_INTERVAL = 500; // 500 usec&amp;nbsp;&lt;/blockquote&gt;
&lt;blockquote class=&quot;tr_bq&quot;&gt;
const unsigned int CLK_RESET = 2000; // 500 usec * 2000 = 1 second&lt;/blockquote&gt;
&lt;div&gt;
I will be using the built in Arduino LED on pin 13.&amp;nbsp;&lt;/div&gt;
&lt;blockquote class=&quot;tr_bq&quot;&gt;
const unsigned int LED_PIN_13 = 13; // pin 13 already has an LED&lt;/blockquote&gt;
&lt;div&gt;
I&#39;m setting the serial baud rate to 57600 for no real good reason. Set it to whatever you want.&amp;nbsp;&lt;/div&gt;
&lt;blockquote class=&quot;tr_bq&quot;&gt;
const unsigned int BAUDRATE = 57600;&lt;/blockquote&gt;
&lt;div&gt;
I also set the rate I want the serial messages to be sent at.&amp;nbsp;&lt;/div&gt;
&lt;div&gt;
&lt;blockquote class=&quot;tr_bq&quot;&gt;
const unsigned int DEBUG_MSG_RATE = 3; // 3 * 1sec = 3 sec&lt;br /&gt;
const unsigned int BKGD_MSG_RATE = 6; // 6 * 1sec = 6 sec&lt;/blockquote&gt;
&lt;/div&gt;
Now that the constants are defined, we can go and setup the variable we will use for the application.&lt;br /&gt;
&lt;blockquote class=&quot;tr_bq&quot;&gt;
/* variables */&lt;br /&gt;
volatile unsigned long lIntrpCountDown; &amp;nbsp; &amp;nbsp; //interrupt countdown&lt;br /&gt;
volatile unsigned char intrpFlag; &amp;nbsp;//interrupt flag&lt;br /&gt;
unsigned char LED_PIN_13state; //LED state&lt;br /&gt;
unsigned long lTimeNow; //holds our current time in seconds&lt;br /&gt;
unsigned int number; //incremented in the main loop&lt;/blockquote&gt;
&lt;br /&gt;
You will notice two variables have the volatile keyword applied to them. The volatile keyword is used in C to tell the compiler that the variable should taken from memory each time it is read. It doesn&#39;t solve the race condition but it at least tells the compiler to watch out. &lt;a href=&quot;http://en.wikipedia.org/wiki/Volatile_variable&quot;&gt;A better explanation and example can be found at the wiki&lt;/a&gt;.&lt;br /&gt;
&lt;br /&gt;
lIntrpCountDown is a count down from 2000 to 0 and is decremented on every interrupt.&lt;br /&gt;
intrpFlag is a boolean flag that can either be 0 or not 0. When its value is not 0, it signifies that a second has elapsed and we need to update the LEDs or send a serial message.&lt;br /&gt;
LED_PIN_13state just keeps track of the LED&#39;s state, on and off.&lt;br /&gt;
lTimeNow contains the current amount of seconds has elapsed since the last reset.&lt;br /&gt;
number is just a variable that increments for the sake of increasing.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Functions&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
As usual, we need to have the setup() function. A good habit is to initialize your variables here. There are two new function calls inside to initialize the timer interrupt.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; Timer1.initialize(CLK_INTERVAL); &amp;lt;-- this is used to initialize the timer and set the interval value.&lt;br /&gt;
&amp;nbsp; Timer1.attachInterrupt(ISR_Clock); &amp;nbsp;&amp;lt;-- this is used to attach a function to the interrupt.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
To use&amp;nbsp;attachInterrupt, you need to create a function that contains the logic you want to do when an interrupt is triggered.&lt;br /&gt;
&lt;br /&gt;
I created a function called ISR_Clock to service that requirement. Inside ISR_Clock,&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
void ISR_Clock()&lt;br /&gt;
{&lt;br /&gt;
&amp;nbsp; --lIntrpCountDown; //decrement the clock until 0&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; if (lIntrpCountDown == 0)&lt;br /&gt;
&amp;nbsp; {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; lIntrpCountDown = CLK_RESET;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; intrpFlag++; //or intrpFlag = 1&lt;br /&gt;
&amp;nbsp; }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Summary&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
I hope that helps you guys out.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;</content><link rel='replies' type='application/atom+xml' href='http://ask.jaimeyu.com/feeds/8787890085875006790/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://ask.jaimeyu.com/2013/09/arduino-16-bit-timer-1-interrupt.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7455490061003058486/posts/default/8787890085875006790'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7455490061003058486/posts/default/8787890085875006790'/><link rel='alternate' type='text/html' href='http://ask.jaimeyu.com/2013/09/arduino-16-bit-timer-1-interrupt.html' title='Arduino 16 bit Timer 1 Interrupt Tutorial'/><author><name>Jaime Yu</name><uri>http://www.blogger.com/profile/08493978720803625586</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiXf9Q6coVDK45EeMN56UVnJ91eNXZiIbtScjr-RT5QpJgZVOszw0cdGqRoAU-nFLQpq3j5W-pvuVIKBmSHSr7d_wDxSdBH1K1yN_vdsFtj_WnLzmjrV7Mkv-FxqFSKxuJ_vBf0MqVRhsaB/s72-c/WP_001096-1.jpg" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7455490061003058486.post-5128880812408424511</id><published>2013-09-05T16:35:00.002-04:00</published><updated>2013-09-05T19:28:46.593-04:00</updated><title type='text'>Raspberry Pi + Repurposed LCD</title><content type='html'>&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiQ00uoqIoQwRp-m2DIfIXomodj2v6gFOpwVZSYd4bv5DU0sjwI_ItPz5aBPiQzIkkRqwvH95G4YFPTzWoJhb3iV-SqtjJTKLHeG7VSkiCZ2a0RJ2QcNiFvsjmYuBd6NZQBZPPOM3HlyN5N/s1600/IMG_7137.JPG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;265&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiQ00uoqIoQwRp-m2DIfIXomodj2v6gFOpwVZSYd4bv5DU0sjwI_ItPz5aBPiQzIkkRqwvH95G4YFPTzWoJhb3iV-SqtjJTKLHeG7VSkiCZ2a0RJ2QcNiFvsjmYuBd6NZQBZPPOM3HlyN5N/s400/IMG_7137.JPG&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&amp;nbsp;&lt;/div&gt;
&lt;br /&gt;
Last night I decided to hook up my Raspberry Pi to my modified LCD. You can see from the photo above that the screen is displaying the shell prompt.&lt;br /&gt;
&lt;br /&gt;
I installed Rasberrian onto an SD card and let it loose on the LCD. I&#39;m using a HDMI to VGA converter I bought from eBay which didn&#39;t work at first. Turns out that I needed to enable hdmi_safe=1 in /boot/config.txt. Not a big problem since I have an HDMI capable LCD around. Once that was done, I quickly configured it to use SSH so I can have a headless setup. There is a GUI desktop but it is &amp;nbsp;useless for me at the moment. Recently I was helping a colleague debug an embedded Linux box running Ubuntu 12.04 with a desktop... I got so fed up with the latency that I swapped out to one (actually several since I was multitasking) of the shell consoles instead. I think there should be an achievement award for finding a valid reason to use the straight console.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiZZbKrIQHge9CHUSoSV9iPykkqFkN1K_C0lxy9EPDh5nCbXs9LuVyx9fvfQALMxNDUoc-ZYX81ZCjpcMxjhprSv5dy0IvcXoBvykv2hS0ugePTTHP1qWmaJaXkZI5-NF5Xjj8gNM0DluS9/s1600/IMG_7129.JPG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;213&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiZZbKrIQHge9CHUSoSV9iPykkqFkN1K_C0lxy9EPDh5nCbXs9LuVyx9fvfQALMxNDUoc-ZYX81ZCjpcMxjhprSv5dy0IvcXoBvykv2hS0ugePTTHP1qWmaJaXkZI5-NF5Xjj8gNM0DluS9/s1600/IMG_7129.JPG&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
Once I was done taking pictures of the LCD, I actually put it away. I&#39;m not planning to use the LCD in the short term since the bigger problem is figuring out how to package the LCD so it can fit in a car. Then there are the small detail like writing a touch screen driver and ensuring I can power it reliably. I haven&#39;t done any stress test but I&#39;m curious to see if the current power supply I have for it can keep it powered on...&lt;br /&gt;
&lt;br /&gt;
Barely seen in the photos is the USB Wifi dongle I used to play around with it in the living room. Worked out of the box too surprisingly. Well, ok not really when I realized the kernel is at 3.6. I&#39;m used to dealing with 2.6 kernels for barely supported chipsets.&lt;br /&gt;
&lt;br /&gt;
So I basically setup the RPI as a headless network attached storage (NAS) server. It has SAMBA, NFS, SSH, and minidlna so I can stream multimedia to my various devices. Nothing too special. Only problem is dealing with Samba is a headache and OS X for whatever reason refuses to connect to NFS. Instead, it decides to create infinite folders in /nfs... My Debian box on the other hand is playing very nicely with the RPi.&lt;br /&gt;
&lt;br /&gt;
I was going to attach my printer to it but it turns out it didn&#39;t come with CUPS installed. Apparently its a whopping 70 megs install and I only have 80 megs left (I have use a 2gb stick). So for now, I will leave it as is. Eventually, I will either roll my own Debian based distribution or in the shorter term, get a reliable chroot going to the external hard disk.&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh7Ua1l_t7FMEArmpr7e-nUh0XXJKlbvbn7rES_WktB2uDE7n5vTYHq5MDEvPzGbdptTcgyvcSvnnDi2C-KapwbqKPBAEcgab3UGUzeDnszXRDRAeMLgxCi-OfkMEyalPRk3711KUnqfEX8/s1600/IMG_7130.JPG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;213&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh7Ua1l_t7FMEArmpr7e-nUh0XXJKlbvbn7rES_WktB2uDE7n5vTYHq5MDEvPzGbdptTcgyvcSvnnDi2C-KapwbqKPBAEcgab3UGUzeDnszXRDRAeMLgxCi-OfkMEyalPRk3711KUnqfEX8/s1600/IMG_7130.JPG&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
My SheevaPlug was actually doing all this prior but it had a filesystem corruption which left it crippled. Hopefully I will get around to setting up the SheevaPlug again but the Raspberry Pi is by far the easier to use.</content><link rel='replies' type='application/atom+xml' href='http://ask.jaimeyu.com/feeds/5128880812408424511/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://ask.jaimeyu.com/2013/09/raspberry-pi-repurposed-lcd.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7455490061003058486/posts/default/5128880812408424511'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7455490061003058486/posts/default/5128880812408424511'/><link rel='alternate' type='text/html' href='http://ask.jaimeyu.com/2013/09/raspberry-pi-repurposed-lcd.html' title='Raspberry Pi + Repurposed LCD'/><author><name>Jaime Yu</name><uri>http://www.blogger.com/profile/08493978720803625586</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiQ00uoqIoQwRp-m2DIfIXomodj2v6gFOpwVZSYd4bv5DU0sjwI_ItPz5aBPiQzIkkRqwvH95G4YFPTzWoJhb3iV-SqtjJTKLHeG7VSkiCZ2a0RJ2QcNiFvsjmYuBd6NZQBZPPOM3HlyN5N/s72-c/IMG_7137.JPG" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7455490061003058486.post-606150501602303555</id><published>2013-08-05T00:15:00.000-04:00</published><updated>2013-08-05T00:15:33.889-04:00</updated><title type='text'>Formatting a SD card that is over the 32 gig limit of FAT32</title><content type='html'>Some time ago, I had to format SD cards that were 64 gigabytes in size. Which wasn&#39;t a problem, I just formatted them into exfat and let them be. Since Microsoft has switched to this since Windows XP, I didn&#39;t think it would be a concern. Then I find out that we can&#39;t use it because the product only supported FAT32...&lt;br /&gt;
&lt;br /&gt;
At this point, I wanted to just format it as EXT2 and then be done with it. At least its supported by many operating systems now. But as with all other legacy systems, I had to support FAT32 for a disk size that isn&#39;t supported by Microsoft themselves.&lt;br /&gt;
&lt;br /&gt;
The solution I found was to use the software from &lt;a href=&quot;http://www.ridgecrop.demon.co.uk/index.htm?fat32format.htm&quot;&gt;Ridgecrop: fat32formater&lt;/a&gt;. It allowed me to format the 64 gig SD cards into FAT32. It did the job as advertised and created a FAT32 SD card. I used the command line version and it worked great. It takes a few tries sometimes as I think Windows 7 tries to scan into the files which locks them. Otherwise, its pretty simple to use. Only caveat, it is ridiculously simple to accidentally format the wrong disk. So be forewarned before you go and write a script to automate the process.&lt;br /&gt;
&lt;br /&gt;
In retrospect I&#39;m not sure if I find any solace in this solution but it kept me employed.</content><link rel='replies' type='application/atom+xml' href='http://ask.jaimeyu.com/feeds/606150501602303555/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://ask.jaimeyu.com/2013/08/formatting-sd-card-that-is-over-4-gig.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7455490061003058486/posts/default/606150501602303555'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7455490061003058486/posts/default/606150501602303555'/><link rel='alternate' type='text/html' href='http://ask.jaimeyu.com/2013/08/formatting-sd-card-that-is-over-4-gig.html' title='Formatting a SD card that is over the 32 gig limit of FAT32'/><author><name>Jaime Yu</name><uri>http://www.blogger.com/profile/08493978720803625586</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7455490061003058486.post-4497079031440738702</id><published>2013-04-04T22:20:00.001-04:00</published><updated>2013-04-04T22:20:24.479-04:00</updated><title type='text'>Curious, anyone else with UBIFS corruption for SheevaPlug?</title><content type='html'>Last week, I had a power outtage/surge and it seems that fried the UBIFS partition of my SheevaPlug. Now, that is weird since UBIFS is a journalled filesystem that was designed for spurious resets. I have a lot of experience with JFFS2 and I&#39;ve put that filesystem under ridiculous conditions and actually have yet to see a single failure. And I purposely corrupted the NAND by writing incorrect ECC values into the OOB and still saw it correctly recover... Now UBIFS is newer (the version of JFFS2 I use is closer to 1.0) and from what I read, has better recovery from spurious resets.&lt;br /&gt;
&lt;br /&gt;
The partition right now is fried and from what I&#39;ve read so far, I will need to run Linux in order to fix the partition and perhaps save it. Annoying and shouldn&#39;t be necessary at all... I was using it as a NAS for my home network... luckily, I kept all the data on an external drive. It would only mount the drive when someone requested data from it so I&#39;m fairly certain the drive is all right.&lt;br /&gt;
&lt;br /&gt;
Now here is the question to you, has this happen to you too? I&#39;m curious to know who else has problems with UBIFS and whether this is more common. Next time I have to work with NAND filesystems, I want to be prepared and select the best filesystem for reliability. Failures like this is unacceptable in a commercial product and I want to avoid this in projects I&#39;m associated with.</content><link rel='replies' type='application/atom+xml' href='http://ask.jaimeyu.com/feeds/4497079031440738702/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://ask.jaimeyu.com/2013/04/curious-anyone-else-with-ubifs.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7455490061003058486/posts/default/4497079031440738702'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7455490061003058486/posts/default/4497079031440738702'/><link rel='alternate' type='text/html' href='http://ask.jaimeyu.com/2013/04/curious-anyone-else-with-ubifs.html' title='Curious, anyone else with UBIFS corruption for SheevaPlug?'/><author><name>Jaime Yu</name><uri>http://www.blogger.com/profile/08493978720803625586</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry></feed>