<?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-19789023</id><updated>2024-11-15T01:32:18.191-05:00</updated><category term="Brains"/><category term="DeLorean"/><category term="GPS"/><category term="Google Maps"/><category term="KML"/><category term="Mario"/><category term="Party"/><category term="Polycom"/><category term="Zombies"/><category term="api"/><category term="dhcp"/><category term="electric bill"/><category term="energy"/><category term="gdb backtrace core"/><category term="iPhone"/><category term="myth"/><category term="perl"/><category term="power meter"/><category term="programming"/><category term="stats"/><category term="syslog"/><category term="ted5000"/><category term="twitter"/><title type='text'>My cape is stuck in the phone booth!</title><subtitle type='html'></subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://blog.jasongarland.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/19789023/posts/default?redirect=false'/><link rel='alternate' type='text/html' href='http://blog.jasongarland.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Unknown</name><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>14</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-19789023.post-2782548416289708196</id><published>2013-06-17T20:03:00.003-04:00</published><updated>2013-06-17T20:03:29.412-04:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="DeLorean"/><title type='text'>I got a DeLorean! That is all.</title><content type='html'>&lt;a href=&quot;http://www.flickr.com/photos/mr_rollboto/8742623464/&quot; title=&quot;946136_10100335143501854_265952717_n by Mr Rollboto, on Flickr&quot;&gt;&lt;img src=&quot;http://farm8.staticflickr.com/7291/8742623464_39ef1e649d.jpg&quot; width=&quot;500&quot; height=&quot;500&quot; alt=&quot;946136_10100335143501854_265952717_n&quot;&gt;&lt;/a&gt;
</content><link rel='replies' type='application/atom+xml' href='http://blog.jasongarland.com/feeds/2782548416289708196/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/19789023/2782548416289708196' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/19789023/posts/default/2782548416289708196'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/19789023/posts/default/2782548416289708196'/><link rel='alternate' type='text/html' href='http://blog.jasongarland.com/2013/06/i-got-delorean-that-is-all.html' title='I got a DeLorean! That is all.'/><author><name>Unknown</name><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>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-19789023.post-3946415677005320378</id><published>2013-05-10T10:46:00.001-04:00</published><updated>2013-05-12T01:35:52.562-04:00</updated><title type='text'>Automatically taking photos of the sunrise over Mt. Rainier</title><content type='html'>&lt;a href=&quot;http://www.flickr.com/photos/mr_rollboto/6505705551/&quot; title=&quot;The view from my bedroom window by Mr Rollboto, on Flickr&quot;&gt;&lt;img src=&quot;http://farm8.staticflickr.com/7030/6505705551_202c5a15ea.jpg&quot; width=&quot;500&quot; height=&quot;332&quot; alt=&quot;The view from my bedroom window&quot;&gt;&lt;/a&gt;

&lt;br/&gt;

I wish I had done this earlier and not when I have 2 more weeks left in the house before I move to a place that does not have a perfect view of Mt. Rainier from the master bedroom window.

I&#39;ve connected this &lt;A HREF=&quot;http://www.amazon.com/gp/product/B002CTNAX6&quot;&gt;shutter release cable for the 5D&lt;/A&gt; to an opto-isolator chip which is then connected to one of the GPIO pins on my &lt;A HREF=&quot;http://www.pcduino.com/&quot;&gt;pcDuino&lt;/A&gt;. Whenever I want to wakeup the camera I set the GPIO pin high for 500ms to wakeup the camera. Then I use gphoto2 to capture the image.

The following script will be run at sunrise every morning.
&lt;br/&gt;


&lt;pre class=&quot;brush: html&quot;&gt;
#!/bin/bash

function wakeup {
        echo waking up camera
        #half-press of the shutter button to wake the camera via optoisolator chip connected to shutter release port of camera
        /home/ubuntu/sample/core/gpio_set 7 1
        #hold the button for 500ms
        /bin/sleep .5s
        #release the button
        /home/ubuntu/sample/core/gpio_set 7 0
        #wait for the camera to wake up
        /bin/sleep 2s
}

function takephoto {
        echo taking photo
        /usr/bin/gphoto2 \
        --camera=&quot;Canon EOS 5D Mark III&quot; \
        --folder=/store_00010001/DCIM/100EOS5D \
        --capture-image
}


#write images to card
#/usr/bin/gphoto2 --camera=&quot;Canon EOS 5D Mark III&quot; --get-config /main/settings/capturetarget
/usr/bin/gphoto2 --camera=&quot;Canon EOS 5D Mark III&quot; --set-config /main/settings/capturetarget=1

#loop 90 times and sleep 120 seconds between each photo
x=1
while [ $x -le 90 ]
do
        echo Taking photo $x of 90
        wakeup
        takephoto
        echo Sleeping for 120 seconds
        /bin/sleep 120s
        x=$(( $x + 1 ))
done

#write images to ram
/usr/bin/gphoto2 --camera=&quot;Canon EOS 5D Mark III&quot; --set-config /main/settings/capturetarget=0
&lt;/pre&gt;

The output looks like this:

&lt;pre class=&quot;brush: html&quot;&gt;
/usr/local/bin/camera.sh
Taking photo 1 of 90
waking up camera
taking photo
New file is in location /store_00010001/DCIM/100EOS5D/3Q1A2080.CR2 on the camera
New file is in location /store_00020001/DCIM/100EOS5D/3Q1A2080.CR2 on the camera
Sleeping for 120 seconds
Taking photo 2 of 90
waking up camera
taking photo
New file is in location /store_00010001/DCIM/100EOS5D/3Q1A2081.CR2 on the camera
New file is in location /store_00020001/DCIM/100EOS5D/3Q1A2081.CR2 on the camera
Sleeping for 120 seconds
Taking photo 3 of 90
waking up camera
taking photo
New file is in location /store_00010001/DCIM/100EOS5D/3Q1A2082.CR2 on the camera
New file is in location /store_00020001/DCIM/100EOS5D/3Q1A2082.CR2 on the camera
Sleeping for 120 seconds
Taking photo 4 of 90
waking up camera
taking photo
New file is in location /store_00010001/DCIM/100EOS5D/3Q1A2083.CR2 on the camera
New file is in location /store_00020001/DCIM/100EOS5D/3Q1A2083.CR2 on the camera
Sleeping for 120 seconds
Taking photo 5 of 90
waking up camera
taking photo
New file is in location /store_00010001/DCIM/100EOS5D/3Q1A2084.CR2 on the camera
New file is in location /store_00020001/DCIM/100EOS5D/3Q1A2084.CR2 on the camera
Sleeping for 120 seconds
&lt;/pre&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.jasongarland.com/feeds/3946415677005320378/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/19789023/3946415677005320378' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/19789023/posts/default/3946415677005320378'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/19789023/posts/default/3946415677005320378'/><link rel='alternate' type='text/html' href='http://blog.jasongarland.com/2013/05/automatically-taking-photos-of-sunrise.html' title='Automatically taking photos of the sunrise over Mt. Rainier'/><author><name>Unknown</name><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>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-19789023.post-2985220544381938828</id><published>2013-03-25T15:00:00.004-04:00</published><updated>2013-03-26T10:09:19.181-04:00</updated><title type='text'>How to sync the contents of your old Linux server to your new one</title><content type='html'>Make sure that both systems are running the same version of the same Linux distribution. Shutdown any processes that are not necessary on both servers(everything but SSH). Then run this command as root on the new server:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
rsync root@oldserver.jasongarland.com:/ / -av --exclude &#39;/proc/&#39; --exclude &#39;/etc/hosts&#39; --exclude &#39;/etc/fstab&#39; --exclude &#39;/etc/mtab&#39; --exclude &#39;/etc/network/&#39; --exclude &#39;/dev/&#39; --exclude &#39;/sys/&#39; --exclude &#39;/var/run/utmp&#39; --delete&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Note: This will erase anything on the new server that doesn&#39;t exist on the old one. Also note that I have only tested this method with Debian and Ubuntu.</content><link rel='replies' type='application/atom+xml' href='http://blog.jasongarland.com/feeds/2985220544381938828/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/19789023/2985220544381938828' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/19789023/posts/default/2985220544381938828'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/19789023/posts/default/2985220544381938828'/><link rel='alternate' type='text/html' href='http://blog.jasongarland.com/2013/03/how-to-sync-contents-of-your-old-linux.html' title='How to sync the contents of your old Linux server to your new one'/><author><name>Unknown</name><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>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-19789023.post-7847035749747773172</id><published>2013-02-19T20:17:00.002-05:00</published><updated>2013-06-21T16:57:32.764-04:00</updated><title type='text'>Laser cut Nixie Tube clock powered by Arduino</title><content type='html'>&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/AVvXsEjpWivaTwjudoamLzJxvspjCrv_M02cA2W5EsVkhq1R6GqjjFumOSalVf3Hsiv-E8kFwYBNd6kHQWMTa0uGIIqaAp8pRMYoYD9Qicc5xJf2FidTlMCIAk45Y8LQa_6jHoZFqZxYFQ/s1600/IMG_20130219_163950.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;240&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjpWivaTwjudoamLzJxvspjCrv_M02cA2W5EsVkhq1R6GqjjFumOSalVf3Hsiv-E8kFwYBNd6kHQWMTa0uGIIqaAp8pRMYoYD9Qicc5xJf2FidTlMCIAk45Y8LQa_6jHoZFqZxYFQ/s320/IMG_20130219_163950.jpg&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;a href=&quot;http://www.thingiverse.com/thing:52252&quot;&gt;http://www.thingiverse.com/thing:52252&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
I bought all the goodies to make a nice Nixie clock from Taylor Electronics, but I didn&#39;t have a nice case for it. It took me about 6 hours to design, cut, and re-cut parts until I had something I was happy with. I disabled the I2C master on the first TES 1361 SmartNixie board and replaced it with an Arduino Nano board connected in the unused RTC connector on the bottom of the backplane board. I poll the GPS RTC board via I2C to get the time and then send command over the I2C bus to the SmartNixie boards to display the digits.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Laser cut parts from 1/8 acrylic (The stuff I bought from Home Depot ended up being 2.2mm thick and not 3.175mm(1/8&quot;) so this drawing was designed for 2.2mm, but that isn&#39;t hard to change.)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Order these parts from &lt;a href=&quot;http://www.tayloredge.com/storefront/index.html&quot;&gt;http://www.tayloredge.com/storefront/index.html&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
1 x 1392 - 6 Digit IN18 Clock Backplane&lt;br /&gt;
&lt;br /&gt;
6 x 1361 - SmartNixie IN18&lt;br /&gt;
&lt;br /&gt;
1 x 1375 - SmartNixie GPS RTC&lt;br /&gt;
&lt;br /&gt;
1 x 1364 - SmartNixie HVPS-H&lt;br /&gt;
&lt;br /&gt;
1 x Active GPS Antenna&lt;br /&gt;
&lt;br /&gt;
1 x Power Plug&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
I ordered my IN-18 tubes from super-gene on ebay: &lt;a href=&quot;http://myworld.ebay.com/super-gene/&quot;&gt;http://myworld.ebay.com/super-gene/&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
6 x IN-18 tubes&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
12V power supply and Arduino Nano can be ordered from Amazon here:&lt;br /&gt;
&lt;br /&gt;
&lt;a href=&quot;http://www.amazon.com/Wall-Adapter-Power-Supply-12VDC/dp/B006GEPUYA&quot;&gt;http://www.amazon.com/Wall-Adapter-Power-Supply-12VDC/dp/B006GEPUYA&lt;/a&gt;&lt;br /&gt;
&lt;a href=&quot;http://www.amazon.com/Arduino-ARD-NANO30-Nano-v3-0/dp/B003YVL34O&quot;&gt;http://www.amazon.com/Arduino-ARD-NANO30-Nano-v3-0/dp/B003YVL34O&lt;/a&gt;&lt;br /&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;color: #343638; font-family: Helvetica Neue, Helvetica, Arial, sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 15px; line-height: 20px;&quot;&gt;Arduino Sketch:&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div style=&quot;color: #343638; font-family: &#39;Helvetica Neue&#39;, Helvetica, Arial, sans-serif; font-size: 15px; line-height: 20px;&quot;&gt;
&lt;br /&gt;
&lt;a name=&#39;more&#39;&gt;&lt;/a&gt;&lt;br /&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;pre  style=&quot;font-family:arial;font-size:12px;border:1px dashed #CCCCCC;width:99%;height:auto;overflow:auto;background:#f0f0f0;;background-image:URL(https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjB_ZTdwFBlUlfjorzrlA_oAQ6xFq6mPptCtILefWfANrAPPV84KuvAU-Yr_kKuaaBo7GzN6ePiwjOfXpFq_ZtIEwcWrhy0rKyQdA7nk2V8jTBJWGzzyTXlEHj0kWsqlWzevSQZsA/s320/codebg.gif);padding:0px;color:#000000;text-align:left;line-height:20px;&quot;&gt;&lt;code style=&quot;color:#000000;word-wrap:normal;&quot;&gt; // Smart Nixie  
 // by Jason Garland &amp;lt;http://www.jasongarland.com&amp;gt;  
 #include &amp;lt;Wire.h&amp;gt;  
 #include &amp;lt;SeeedOLED.h&amp;gt;  
 #include &amp;lt;avr/pgmspace.h&amp;gt;  
 #include &quot;DHT.h&quot;  
 #define DHTPIN 2   // what pin Temperature sensor is connected to  
 #define DHTTYPE DHT22  // DHT 22 (AM2302)  
 DHT dht(DHTPIN, DHTTYPE);  
 byte tube[6]={0x0E, 0x0C, 0x0B, 0x0A, 0x09, 0x08};  
 char tubestate[7];  
 byte gps[14];  
 int tzoffset=-8;  
 char digit[7];  
 unsigned long counter=999999;  
 #define LEDPIN 13  
 int ledstate=0;  
 unsigned long lasttick = millis();  
 unsigned long lastdht = millis();  
 void setup()  
 {  
  Serial.begin(38400);  
  Serial.println(&quot;Starting up&quot;);  
  pinMode(A4, INPUT_PULLUP);  
  pinMode(A5, INPUT_PULLUP);  
  pinMode(LEDPIN, OUTPUT);  
  dht.begin();  
  Wire.begin(); // join i2c bus (address optional for master)  
  SeeedOled.init(); //initialze SEEED OLED display  
  DDRB|=0x21;      
  PORTB |= 0x21;  
  SeeedOled.setBrightness(255);  
  SeeedOled.clearDisplay();        // clear the screen and set start position to top left corner  
  SeeedOled.setNormalDisplay();   //Set display to normal mode (i.e non-inverse mode)  
  SeeedOled.setPageMode();      //Set addressing mode to Page Mode  
  SeeedOled.setTextXY(1,0);     //Set the cursor to Xth Page, Yth Column   
  SeeedOled.putString(&quot;Humidity:&quot;); //Print the String &quot;Hello World!&quot;  
  SeeedOled.setTextXY(3,0);     //Set the cursor to Xth Page, Yth Column   
  SeeedOled.putString(&quot;Temperature:&quot;); //Print the String &quot;Hello World!&quot;  
  SeeedOled.setTextXY(5,0);     //Set the cursor to Xth Page, Yth Column   
  SeeedOled.putString(&quot;Time: &quot;); //Print the String &quot;Hello World!&quot;  
  init_gps(); // Initialize the GPS  
  //Set brightness on all tubes to 100%  
  for (int i=5; i&amp;gt;=0; i-- ){ setbrightness(i, 100); }  
 }  
 void loop() {  
  // Update once per 10th second  
  if (millis() - lasttick &amp;gt;= 100) {  
   lasttick = millis();  
   if ( random(1000) == 42) { pinball(); }  
   read_gps_time(digit);  
   update_display(digit);  
   SeeedOled.setTextXY(6,2);  
   SeeedOled.putString(digit);  
  }  
  update_oled_dht();  
   //Serial.println(counter);  
   //delay(1000);  
   //update_display(counter--);  
 }  
 void read_gps_time(char* digit_buffer) {  
  //int bytes=128;  
  int bytes=6;  
  Wire.requestFrom(81, bytes);  // request 14 bytes from slave device #81  
  int i=0;  
  while(Wire.available())  // slave may send less than requested  
  {  
   gps[i]=Wire.read();  
   i++;  
  }  
  char buffer[((bytes * 3) + 1)];  
  for(int j=0;j&amp;lt;bytes;j++){  
   sprintf(buffer+(j*3), &quot;%02X &quot;, gps[j]);  
   }  
  //Serial.println(buffer);  
  char hourbuffer[3];  
  int hour;  
  sprintf(hourbuffer, &quot;%02X&quot;, gps[2]);  
  hour=atoi(hourbuffer);  
  //hour+=tzoffset;  
  if(hour &amp;lt; 0) {  
   hour+=24;  
  }  
  sprintf(digit_buffer,&quot;%02d%02X%02X&quot;, hour, gps[1], gps[0]);  
  //Serial.println(digit_buffer);  
 }  
 void setbrightness(int place, int brightness) {  
   Wire.beginTransmission(tube[place]); // seconds 1s  
   Wire.write(byte(0x0B));    //register address=dimmer  
   Wire.write(brightness);    //dimmer=50%  
   Wire.endTransmission(); // stop transmitting  
 }  
 void update_display(unsigned long number){  
  char digit_buffer[7];  
  sprintf(digit_buffer, &quot;%06lu&quot;,number%1000000);  
  update_display((char *)&amp;amp;digit_buffer);  
  }  
 void update_display(char* digit_buffer)  
 {  
  for (int i=5; i&amp;gt;=0; i-- ){  
   if ( tubestate[i]!=digit_buffer[i] ){  
    display_digit(i, digit_buffer[i]);  
    /*  
    Serial.print(tubestate[i]);  
    Serial.print(&quot; &quot;);  
    Serial.println(digit_buffer[i]);  
    //*/  
    //fade_digit(i, tubestate[i], digit_buffer[i]);  
    tubestate[i]=digit_buffer[i];  
   }  
  }  
  Serial.print(&quot;digit_buffer: &quot;);  
  Serial.println(digit_buffer);  
  Serial.print(&quot;tubestate: &quot;);  
  Serial.println(tubestate);  
  //*/  
 }  
 void fade_digit(int place, byte old_value, byte new_value){  
  for (int b=100; b&amp;gt;=30; b-=2 ){  
   Wire.beginTransmission(tube[place]); // seconds 1s  
   Wire.write(byte(0x0B));    //register address=dimmer  
   Wire.write(b);    //dimmer=50%  
   Wire.endTransmission(); // stop transmitting  
   delay(20);  
   }  
   Wire.beginTransmission(tube[place]); // tube  
   Wire.write(byte(0x00));    //set display  
   Wire.write(new_value-0x30);    //display digit  
   Wire.endTransmission(); // stop transmitting  
   for (int c=30; c&amp;lt;100; c+=2 ){  
   Wire.beginTransmission(tube[place]); // seconds 1s  
   Wire.write(byte(0x0B));    //register address=dimmer  
   Wire.write(c);    //dimmer=50%  
   Wire.endTransmission(); // stop transmitting  
   delay(20);  
   }  
  /*  
  for(int i=0; i&amp;lt;200; i++) {  
   display_digit(place, old_value);  
   for(int j=0; j&amp;lt;(200-i); j++) {  
    delayMicroseconds(1);  
   }  
   display_digit(place, new_value);  
   for(int j=0; j&amp;lt;i; j++) {  
    delayMicroseconds(4);  
   }  
  }  
  display_digit(place, new_value);  
  */  
 }  
 void display_digit(int place, byte value) {  
    if ( place == 5 ) { blink_led(); } // blink Arduino LED when the seconds digit increments  
    Wire.beginTransmission(tube[place]); // tube  
    Wire.write(byte(0x00));    //set display  
    Wire.write(value-0x30);    //display digit  
    Wire.endTransmission(); // stop transmitting  
 }  
 void init_gps() {  
    delay(500);  
    Wire.beginTransmission(byte(0x51)); // Write to GPS  
    Wire.write(byte(0x3C));    //set DL value  
    //Wire.write(byte(0x12));    //Set DL for Daylight Savings off  
    Wire.write(byte(0x22));    //Set DL for Daylight Savings on +1 hour  
    Wire.write(byte(0x08));    //set timezone hour offset to -8  
    Wire.endTransmission(); // stop transmitting  
    /*  
    Wire.beginTransmission(byte(0x51)); // Write to GPS  
    Wire.write(byte(0x3D));    //set timezone offset  
    Wire.write(byte(0x08));    //set timezone hour offset to -8  
    Wire.endTransmission(); // stop transmitting  
    */  
    Wire.beginTransmission(byte(0x51)); // Write to GPS  
    Wire.write(byte(0x02));    //start address 0x02  
    Wire.endTransmission(); // stop transmitting  
 }  
 void blink_led() {  
  ledstate = ~ledstate;  
  digitalWrite(LEDPIN, ledstate);  
 }  
 void pinball() {  
  char digit_buffer[6];  
  for (int i=0; i&amp;lt;100; i++ ){  
   sprintf(digit_buffer, &quot;%06lu&quot;, random(1000000));  
   delay(50);  
   update_display(digit_buffer);  
   if (millis() - lasttick &amp;gt;= 100) {  
    lasttick = millis();  
    read_gps_time(digit);  
    SeeedOled.setTextXY(6,2);  
    SeeedOled.putString(digit);  
   }  
  }  
 }  
 //Celsius to Fahrenheit conversion  
 double Fahrenheit(double celsius)  
 {  
     return 1.8 * celsius + 32;  
 }  
 void update_oled_time() {  
 }  
 void update_oled_dht() {  
  if (millis() - lastdht &amp;gt;= 10000) {  
   lastdht = millis();  
   float h = dht.readHumidity();  
   float t = dht.readTemperature();  
   //SeeedOled.setTextXY(1,0);     //Set the cursor to Xth Page, Yth Column   
   //SeeedOled.putString(&quot;Humidity:&quot;); //Print the String &quot;Hello World!&quot;  
   SeeedOled.setTextXY(2,2);     //Set the cursor to Xth Page, Yth Column   
   SeeedOled.putNumber(h); //Print the String  
   SeeedOled.putString(&quot;%&quot;);  
   //SeeedOled.setTextXY(3,0);     //Set the cursor to Xth Page, Yth Column   
   //SeeedOled.putString(&quot;Temperature:&quot;); //Print the String &quot;Hello World!&quot;  
   SeeedOled.setTextXY(4,2);     //Set the cursor to Xth Page, Yth Column   
   SeeedOled.putNumber(Fahrenheit(t)); //Print the number  
   SeeedOled.putString(&quot; F&quot;);  
  }  
 }  
&lt;/code&gt;&lt;/pre&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.jasongarland.com/feeds/7847035749747773172/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/19789023/7847035749747773172' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/19789023/posts/default/7847035749747773172'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/19789023/posts/default/7847035749747773172'/><link rel='alternate' type='text/html' href='http://blog.jasongarland.com/2013/02/laser-cut-nixie-tube-clock-powered-by.html' title='Laser cut Nixie Tube clock powered by Arduino'/><author><name>Unknown</name><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/AVvXsEjpWivaTwjudoamLzJxvspjCrv_M02cA2W5EsVkhq1R6GqjjFumOSalVf3Hsiv-E8kFwYBNd6kHQWMTa0uGIIqaAp8pRMYoYD9Qicc5xJf2FidTlMCIAk45Y8LQa_6jHoZFqZxYFQ/s72-c/IMG_20130219_163950.jpg" height="72" width="72"/><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-19789023.post-971231231283101547</id><published>2012-01-21T18:44:00.000-05:00</published><updated>2012-01-21T18:44:25.240-05:00</updated><title type='text'>Download all of your images from Smugmug</title><content type='html'>I cheated and used wget to grab the files. This could be done using a perl module if you wanted.&lt;br /&gt;
&lt;br /&gt;
You will need to have the &lt;a href=&quot;http://search.cpan.org/~floweryso/WWW-SmugMug-API-1.03/lib/WWW/SmugMug/API.pm&quot;&gt;WWW::SmugMug::API&lt;/a&gt; module installed for this script to work. All of the others should be standard stuff.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;pre class=&quot;brush: html&quot;&gt;
#!/opt/bin/perl

use warnings;
use strict;
use Data::Dumper;
use WWW::SmugMug::API;
use File::Path;

my $APIKey=&#39;your_key&#39;;
my $username=&#39;your_login_email&#39;;
my $password=&#39;your_password&#39;;

my $dest_folder=&#39;/share/jgarland/Photos/Smugmug&#39;;

my $sm_api = WWW::SmugMug::API-&gt;new(
 {
  sm_api_key =&gt; $APIKey,
  secure     =&gt; 0
 });

$sm_api-&gt;login_withPassword(
 {
  EmailAddress =&gt; $username,
  Password     =&gt; $password
 });

&amp;get_images;

$sm_api-&gt;logout;
exit;





sub get_images {

 my $albums=$sm_api-&gt;albums_get();
 foreach my $album (@{$albums-&gt;{&#39;Albums&#39;}}) {
  my $images=$sm_api-&gt;images_get(
   {
    AlbumID =&gt; $album-&gt;{&#39;id&#39;},
    AlbumKey =&gt; $album-&gt;{&#39;Key&#39;}
   });
  foreach my $image (@{$images-&gt;{&#39;Images&#39;}}) {
   my $image_info=$sm_api-&gt;images_getInfo(
    {
     ImageID =&gt; $image-&gt;{&#39;id&#39;},
     ImageKey =&gt; $image-&gt;{&#39;key&#39;}
    });
   download($album, $image_info);
  }
 }
}


sub download {
 my $album=shift;
 my $image_info=shift;
 my $album_folder=$dest_folder . &#39;/&#39; . $album-&gt;{&#39;Category&#39;}-&gt;{&#39;Name&#39;} . &#39;/&#39; . $album-&gt;{&#39;Title&#39;};
 my $image_file=$album_folder . &#39;/&#39; . $image_info-&gt;{&#39;Image&#39;}-&gt;{&#39;FileName&#39;};

 unless(-d $album_folder) { mkpath $album_folder or die; }

 if ( -e $image_file ) { return(); }
 
 my $command=&#39;/usr/bin/wget -c -q \&#39;&#39; . $image_info-&gt;{&#39;Image&#39;}-&gt;{&#39;OriginalURL&#39;} . &#39;\&#39; -O &quot;&#39; . $image_file . &#39;&quot;&#39;;
 print &quot;$command\n&quot;;
 my @results=`$command`;
 my $errlvl=$?;
 print Dumper(@results);
 if ( $errlvl == 0 ) {
  return();
 } else {
  unlink($image_file);
  die(&quot;errlvl=$errlvl\nDeleting $image_file\n&quot;);
 }

}

&lt;/pre&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.jasongarland.com/feeds/971231231283101547/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/19789023/971231231283101547' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/19789023/posts/default/971231231283101547'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/19789023/posts/default/971231231283101547'/><link rel='alternate' type='text/html' href='http://blog.jasongarland.com/2012/01/download-all-of-your-images-from.html' title='Download all of your images from Smugmug'/><author><name>Unknown</name><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>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-19789023.post-8045396230276174897</id><published>2011-10-13T13:53:00.001-04:00</published><updated>2013-05-07T21:09:56.163-04:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="gdb backtrace core"/><title type='text'>What do I do with this core file?</title><content type='html'>Use this script to generate a useful backtrace from the core file.&lt;br /&gt;
&lt;br /&gt;
&lt;pre class=&quot;brush: html&quot;&gt;#!/bin/bash

corefile=$1
outfile=$1.gdbtrace.log

function getprocess {

        commandstring=$(gdb -c $corefile \
                --eval-command=&#39;set pagination off&#39; \
                --eval-command=&#39;bt&#39; \
                --eval-command=&#39;quit&#39; \&lt;/pre&gt;
&lt;pre class=&quot;brush: html&quot;&gt;                |awk &#39;/Core was generated by/ { split($0, a, &quot;`&quot;); split(a[2], b, &quot;&#39;\&#39;&#39;&quot;); split(b[1], c, &quot; &quot;); print c[1] }&#39;)

        echo $commandstring|awk &#39;{print $1}&#39;
}


if [ -a $corefile ] ; then
        process=$(getprocess)
else
        echo You must provide a core file as an argument
        exit
fi

if [ -a $process ] ; then

echo Core was generated by $process

gdb $process \
                -c $corefile \
                --eval-command=&#39;set pagination off&#39; \
                --eval-command=&quot;set logging file $outfile&quot; \
                --eval-command=&#39;set logging on&#39; \
                --eval-command=&#39;bt&#39; \
                --eval-command=&#39;bt full&#39; \
                --eval-command=&#39;thread apply all bt&#39; \
                --eval-command=&#39;thread apply all bt full&#39; \
                --eval-command=&#39;quit&#39;

echo &quot;Trace written to $outfile&quot;

else
        echo &quot;Can not find $process. This script my be broken, or the file disappeared.&quot;
        exit
fi

&lt;/pre&gt;
</content><link rel='replies' type='application/atom+xml' href='http://blog.jasongarland.com/feeds/8045396230276174897/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/19789023/8045396230276174897' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/19789023/posts/default/8045396230276174897'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/19789023/posts/default/8045396230276174897'/><link rel='alternate' type='text/html' href='http://blog.jasongarland.com/2011/10/what-do-i-do-with-this-core-file.html' title='What do I do with this core file?'/><author><name>Unknown</name><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>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-19789023.post-2388312556328076346</id><published>2011-03-22T20:49:00.001-04:00</published><updated>2011-03-22T20:53:53.325-04:00</updated><title type='text'>German exit signs</title><content type='html'>I&#39;ve made my way to Frankfurt, Germany. Tomorrow I will be taking the train to Regensburg. I will post all of my photos on my photo sharing site later &lt;a href=&quot;http://jgarland.smugmug.com&quot;&gt;here&lt;/a&gt;.&lt;br /&gt;
&lt;br /&gt;
All throughout the airport I&#39;ve seen these exit signs and they reminded me of the signs you see inside the game &lt;a href=&quot;http://en.wikipedia.org/wiki/Portal_(video_game)&quot;&gt;Portal&lt;/a&gt;.&lt;br /&gt;
&lt;br /&gt;
Here is a picture of one of the signs. (I didn&#39;t take this picture. I can&#39;t get my memory card reader to work right now.)&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/AVvXsEjD5UWVhR_f5eDOOJJbKs0NPuls1Ukf8d4_C3MgWWOLk83C6aL0MonECm5b6eDQntAZ3vifdK4Sz7X0_lB758AM40SDZ_dv9qne15QTMw-7OBmNOPfx8gPbXbc2K9T-WWhb9uohxA/s1600/438743037QwPYxt_fs.jpeg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left:1em; margin-right:1em&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;240&quot; width=&quot;320&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjD5UWVhR_f5eDOOJJbKs0NPuls1Ukf8d4_C3MgWWOLk83C6aL0MonECm5b6eDQntAZ3vifdK4Sz7X0_lB758AM40SDZ_dv9qne15QTMw-7OBmNOPfx8gPbXbc2K9T-WWhb9uohxA/s320/438743037QwPYxt_fs.jpeg&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
And here is a logo for the game:&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/AVvXsEhG2yPKrPu7eIT8dgatG_aHzZdISkmknH8I6xsa-qhDiNO3D7Ot3LEl5EWAldtLLTTkJLNl4EMk6KQxZV4D5z4MiJeU5M_RxYwsHBWi3zSnA0GnKpaRpBuhIg3y5ahCYQCwgvvoDQ/s1600/XBL_Portal-Still-Aliveboxart_160w.jpeg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left:1em; margin-right:1em&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;220&quot; width=&quot;160&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhG2yPKrPu7eIT8dgatG_aHzZdISkmknH8I6xsa-qhDiNO3D7Ot3LEl5EWAldtLLTTkJLNl4EMk6KQxZV4D5z4MiJeU5M_RxYwsHBWi3zSnA0GnKpaRpBuhIg3y5ahCYQCwgvvoDQ/s320/XBL_Portal-Still-Aliveboxart_160w.jpeg&quot; /&gt;&lt;/a&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.jasongarland.com/feeds/2388312556328076346/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/19789023/2388312556328076346' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/19789023/posts/default/2388312556328076346'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/19789023/posts/default/2388312556328076346'/><link rel='alternate' type='text/html' href='http://blog.jasongarland.com/2011/03/german-exit-signs.html' title='German exit signs'/><author><name>Unknown</name><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/AVvXsEjD5UWVhR_f5eDOOJJbKs0NPuls1Ukf8d4_C3MgWWOLk83C6aL0MonECm5b6eDQntAZ3vifdK4Sz7X0_lB758AM40SDZ_dv9qne15QTMw-7OBmNOPfx8gPbXbc2K9T-WWhb9uohxA/s72-c/438743037QwPYxt_fs.jpeg" height="72" width="72"/><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-19789023.post-2664280095459691802</id><published>2010-06-08T08:38:00.004-04:00</published><updated>2010-06-08T08:48:16.582-04:00</updated><title type='text'>Yamaha V6 Outdrive stuck shifter repair</title><content type='html'>Here are some pictures and directions for repairing a stuck shifter on a Yamaha outdrive that I created about two years ago for my &lt;a HREF=&quot;http://groups.google.com/group/yamaha-sterndrives&quot;&gt;Yamaha Sterndrive owner&#39;s group&lt;/A&gt;. This is a common problem with this unit.&lt;br /&gt;
&lt;br /&gt;
&lt;a href=&quot;http://picasaweb.google.com/jgarland/YamahaV6OutdriveStuckShifterRepair?feat=blogger&quot; imageanchor=&quot;1&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;http://lh6.ggpht.com/_HMOdVnllr_U/SJ4GswQdasE/AAAAAAAABIg/BbEiFMhTaRs/s160-c/YamahaV6OutdriveStuckShifterRepair.jpg&quot;&gt;&lt;/a&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.jasongarland.com/feeds/2664280095459691802/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/19789023/2664280095459691802' title='4 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/19789023/posts/default/2664280095459691802'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/19789023/posts/default/2664280095459691802'/><link rel='alternate' type='text/html' href='http://blog.jasongarland.com/2010/06/yamaha-v6-outdrive-stuck-shifter-repair.html' title='Yamaha V6 Outdrive stuck shifter repair'/><author><name>Unknown</name><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="http://lh6.ggpht.com/_HMOdVnllr_U/SJ4GswQdasE/AAAAAAAABIg/BbEiFMhTaRs/s72-c/YamahaV6OutdriveStuckShifterRepair.jpg" height="72" width="72"/><thr:total>4</thr:total></entry><entry><id>tag:blogger.com,1999:blog-19789023.post-4257679819688879296</id><published>2010-05-19T15:25:00.002-04:00</published><updated>2010-05-19T21:27:57.400-04:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Brains"/><category scheme="http://www.blogger.com/atom/ns#" term="Mario"/><category scheme="http://www.blogger.com/atom/ns#" term="Party"/><category scheme="http://www.blogger.com/atom/ns#" term="Zombies"/><title type='text'>80&#39;s / Zombie party</title><content type='html'>So we had this 80&#39;s Zombie party at our place last weekend. I was going to be Zombie Mario, but I gave up on the Zombie makeup after screwing it up several times. So I was just Mario the Zombie slayer.&lt;br /&gt;
&lt;br /&gt;
Anyways... I had one of my friends film me playing Mario Brothers on the Wii. It cracks me up every time I watch it. Check it out:&lt;br /&gt;
&lt;br /&gt;
&lt;object height=&quot;505&quot; width=&quot;640&quot;&gt;&lt;param name=&quot;movie&quot; value=&quot;http://www.youtube.com/v/o5j_QG8ldjE&amp;hl=en_US&amp;fs=1&amp;&quot;&gt;&lt;/param&gt;&lt;param name=&quot;allowFullScreen&quot; value=&quot;true&quot;&gt;&lt;/param&gt;&lt;param name=&quot;allowscriptaccess&quot; value=&quot;always&quot;&gt;&lt;/param&gt;&lt;embed src=&quot;http://www.youtube.com/v/o5j_QG8ldjE&amp;hl=en_US&amp;fs=1&amp;&quot; type=&quot;application/x-shockwave-flash&quot; allowscriptaccess=&quot;always&quot; allowfullscreen=&quot;true&quot; width=&quot;640&quot; height=&quot;505&quot;&gt;&lt;/embed&gt;&lt;/object&gt;&lt;br /&gt;
&lt;br /&gt;
I should also mention that my wife made an awesome brain cake for all the zombies to munch on:&lt;br /&gt;
&lt;br /&gt;
&lt;img width=600 src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg7QfjN3GWB9kkhMPHSxQGEoLFf9vGNDcXjbuTXlqqzsVCHxpcsdtpMpuESPVxY-E510JBzuN4Lr2oYT_tBbDBNhoxHNF7wQByUoQEKi-XMjAxy7_ltugzbDpaQZQXd-XLEHyuQlg/s1280/DSC00630.JPG&quot;&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.jasongarland.com/feeds/4257679819688879296/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/19789023/4257679819688879296' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/19789023/posts/default/4257679819688879296'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/19789023/posts/default/4257679819688879296'/><link rel='alternate' type='text/html' href='http://blog.jasongarland.com/2010/05/80s-zombie-party.html' title='80&#39;s / Zombie party'/><author><name>Unknown</name><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/AVvXsEg7QfjN3GWB9kkhMPHSxQGEoLFf9vGNDcXjbuTXlqqzsVCHxpcsdtpMpuESPVxY-E510JBzuN4Lr2oYT_tBbDBNhoxHNF7wQByUoQEKi-XMjAxy7_ltugzbDpaQZQXd-XLEHyuQlg/s72-c/DSC00630.JPG" height="72" width="72"/><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-19789023.post-8996684987920611006</id><published>2010-05-19T13:04:00.007-04:00</published><updated>2010-05-19T15:13:34.807-04:00</updated><title type='text'>Twittering doorbell</title><content type='html'>All I wanted was a doorbell that would send me a text message when somebody rang it, and I wanted it NOW. There are a number of ways I could have done this. Ideally I would have used an opto isoloator, but Radioshack didn&#39;t have those. They did have a full wave bridge rectifier, and a 5V relay. I already had some random capacitors, and a 5V regulator, so that would have to do. I connected the AC inputs on the rectifier inline with the doorbell using the connections behind the doorbell transformer in my garage. The relay switch is connected to the digital input and ground connections on my &lt;a href=&quot;http://iobridge.com/products/&quot;&gt;IOBridge&lt;/a&gt;. I&#39;ve configured the iobridge to send an email to both my magic account at&amp;nbsp;&lt;a href=&quot;http://ping.fm/&quot;&gt;ping.fm&lt;/a&gt; that updates twitter, as well as an email&amp;nbsp;distribution&amp;nbsp;list that sends text messages to both my wife and myself, as well as to our email inboxes.&lt;br /&gt;
&lt;br /&gt;
You can find the twitter updates from my doorbell on my twitter account here: &lt;a href=&quot;http://twitter.com/jgarland79&quot;&gt;http://twitter.com/jgarland79&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
Here is the schematic and a photo:&lt;br /&gt;
&lt;br /&gt;
&lt;table border=&quot;1&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;     &lt;th bgcolor=&quot;#FFFFFF&quot;&gt;&lt;img src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEitTUX_geDYshKs7lgxSZbZ1prba1agelBnZ13ZE7CG00pJOdL0p05x5Ms225_jvEROcKDq0dzWcAWWBNdpD6GdQRY26FMbipseLGIsDDMSZbhvjc9Ek9AXo7EMkPlZ_qiZmyeq6w/&quot; width=&quot;600&quot; /&gt;&lt;/th&gt;   &lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;img src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjntVInibLL0J9_DFqnLkYpsbx9kt_eMmMK4MCY73F6vXvIj7C8ZsllQHtQJJ_ERo2Rg4in5rqEjzgl4F-TAZsfBZzuSOahx_Nb79_Bhj4km4Ni0KwKQ9Ngu1Kf9SPFdtex6ORZ_A/&quot; /&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.jasongarland.com/feeds/8996684987920611006/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/19789023/8996684987920611006' title='4 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/19789023/posts/default/8996684987920611006'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/19789023/posts/default/8996684987920611006'/><link rel='alternate' type='text/html' href='http://blog.jasongarland.com/2010/05/twittering-doorbell.html' title='Twittering doorbell'/><author><name>Unknown</name><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/AVvXsEitTUX_geDYshKs7lgxSZbZ1prba1agelBnZ13ZE7CG00pJOdL0p05x5Ms225_jvEROcKDq0dzWcAWWBNdpD6GdQRY26FMbipseLGIsDDMSZbhvjc9Ek9AXo7EMkPlZ_qiZmyeq6w/s72-c" height="72" width="72"/><thr:total>4</thr:total></entry><entry><id>tag:blogger.com,1999:blog-19789023.post-6740375205750620065</id><published>2010-05-09T13:14:00.002-04:00</published><updated>2010-05-10T01:30:52.611-04:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="electric bill"/><category scheme="http://www.blogger.com/atom/ns#" term="myth"/><category scheme="http://www.blogger.com/atom/ns#" term="power meter"/><title type='text'>Busting the myth: Unbalanced Breaker panel = Larger electric bill</title><content type='html'>There is a myth that if your breaker panel is &quot;unbalanced&quot; then you will be billed for the higher leg on the meter.&lt;br /&gt;
&lt;br /&gt;
Let&#39;s find out...&lt;br /&gt;
&lt;br /&gt;
&lt;object style=&quot;background-image:url(http://i3.ytimg.com/vi/rnRqo9gQWg4/hqdefault.jpg)&quot;  width=&quot;425&quot; height=&quot;344&quot;&gt;&lt;param name=&quot;movie&quot; value=&quot;http://www.youtube.com/v/rnRqo9gQWg4&amp;amp;hl=en_US&amp;amp;fs=1&quot;&gt;&lt;param name=&quot;allowFullScreen&quot; value=&quot;true&quot;&gt;&lt;param name=&quot;allowscriptaccess&quot; value=&quot;always&quot;&gt;&lt;embed src=&quot;http://www.youtube.com/v/rnRqo9gQWg4&amp;amp;hl=en_US&amp;amp;fs=1&quot; width=&quot;425&quot; height=&quot;344&quot; allowScriptAccess=&quot;never&quot; allowFullScreen=&quot;true&quot; wmode=&quot;transparent&quot; type=&quot;application/x-shockwave-flash&quot;&gt;&lt;/embed&gt;&lt;/object&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;object style=&quot;background-image:url(http://i3.ytimg.com/vi/B8RKJb1b0VA/hqdefault.jpg)&quot;  width=&quot;425&quot; height=&quot;344&quot;&gt;&lt;param name=&quot;movie&quot; value=&quot;http://www.youtube.com/v/B8RKJb1b0VA&amp;amp;hl=en_US&amp;amp;fs=1&quot;&gt;&lt;param name=&quot;allowFullScreen&quot; value=&quot;true&quot;&gt;&lt;param name=&quot;allowscriptaccess&quot; value=&quot;always&quot;&gt;&lt;embed src=&quot;http://www.youtube.com/v/B8RKJb1b0VA&amp;amp;hl=en_US&amp;amp;fs=1&quot; width=&quot;425&quot; height=&quot;344&quot; allowScriptAccess=&quot;never&quot; allowFullScreen=&quot;true&quot; wmode=&quot;transparent&quot; type=&quot;application/x-shockwave-flash&quot;&gt;&lt;/embed&gt;&lt;/object&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
I didn&#39;t film the third part because it was dark outside, but I went outdoors and monitored the meter before and after I shut off the breakers on one of the phases making the load unbalanced. The meter DID spin half as fast, so this proves that the meter IS accurate and this myth is BUSTED!</content><link rel='replies' type='application/atom+xml' href='http://blog.jasongarland.com/feeds/6740375205750620065/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/19789023/6740375205750620065' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/19789023/posts/default/6740375205750620065'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/19789023/posts/default/6740375205750620065'/><link rel='alternate' type='text/html' href='http://blog.jasongarland.com/2010/05/busting-myth-unbalanced-breaker-panel.html' title='Busting the myth: Unbalanced Breaker panel = Larger electric bill'/><author><name>Unknown</name><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>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-19789023.post-1689624253678194755</id><published>2010-05-09T10:00:00.002-04:00</published><updated>2013-05-10T03:10:25.386-04:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="dhcp"/><category scheme="http://www.blogger.com/atom/ns#" term="Polycom"/><category scheme="http://www.blogger.com/atom/ns#" term="syslog"/><title type='text'>DHCP Notify Parsing with Polycom phones</title><content type='html'>Syslog sample:&lt;br /&gt;
&lt;br /&gt;
&lt;pre class=&quot;brush: html&quot;&gt;Jul  8 18:25:12 babelfish dhcpd: {&quot;vendor-class-identifier&quot;: {&quot;substrings&quot;: [ {&quot;company&quot;: &quot;Polycom&quot;}, {&quot;part&quot;: &quot;SoundPointIP-SPIP_430&quot;}, {&quot;part_number&quot;: &quot;2345-11402-001,1&quot;}, {&quot;app_version&quot;: &quot;SIP/2.2.2.0084/20-Nov-07 10:17&quot;}, {&quot;bootrom_version&quot;: &quot;BR/4.1.0.0219/10-Dec-07 13:08&quot;} ] }}
&lt;/pre&gt;
&lt;br /&gt;
create polycom.conf and include it in your dhcpd.conf file.&lt;br /&gt;
&lt;br /&gt;
&lt;pre class=&quot;brush: html&quot;&gt;authoritative;
allow booting;
 
option option-150 code 150 = text;
option option-155 code 155 = text;
option option-160 code 160 = text;
option sip-server code 151 = text;
option voice-vlan code 128 = text;
 
 
class &quot;polycom&quot; {
            match if(
            (substring (option vendor-class-identifier, 0, 4) = 00:00:36:3d) and
            (substring (hardware, 1, 12) = 00:04:f2:11:f3:b9)
                        );
 
            set vendor_class_identifier = (substring (option vendor-class-identifier,5,(extract-int ((substring (option vendor-class-identifier, 4, 1)),8))));
            set vendor_class_identifier_1_len = (extract-int ((substring (vendor_class_identifier,1,1)),8));
            set vendor_class_identifier_1 = (substring (vendor_class_identifier,2,vendor_class_identifier_1_len));
 
            set vendor_class_identifier_2_len = (extract-int ((substring (vendor_class_identifier,(3 + vendor_class_identifier_1_len),1)),8));
            set vendor_class_identifier_2 = (substring (vendor_class_identifier,(4 + vendor_class_identifier_1_len),vendor_class_identifier_2_len));
 
            set vendor_class_identifier_3_len = (extract-int ((substring (vendor_class_identifier,(5 + vendor_class_identifier_1_len + vendor_class_identifier_2_len),1)),8));
            set vendor_class_identifier_3 = (substring (vendor_class_identifier,(6 + vendor_class_identifier_1_len +  vendor_class_identifier_2_len),vendor_class_identifier_3_len));
 
            set vendor_class_identifier_4_len = (extract-int ((substring (vendor_class_identifier,(7 + vendor_class_identifier_1_len + vendor_class_identifier_2_len + vendor_class_identifier_3_len),1)),8));
            set vendor_class_identifier_4 = (substring (vendor_class_identifier,(8 + vendor_class_identifier_1_len +  vendor_class_identifier_2_len + vendor_class_identifier_3_len),vendor_class_identifier_4_len));
 
            set vendor_class_identifier_5_len = (extract-int ((substring (vendor_class_identifier,(9 + vendor_class_identifier_1_len + vendor_class_identifier_2_len + vendor_class_identifier_3_len + vendor_class_identifier_4_len),1)),8));
            set vendor_class_identifier_5 = (substring (vendor_class_identifier,(10 + vendor_class_identifier_1_len +  vendor_class_identifier_2_len + vendor_class_identifier_3_len + vendor_class_identifier_4_len),vendor_class_identifier_5_len));
 
 
            log(info, (concat (&quot;{\&quot;vendor-class-identifier\&quot;: {\&quot;substrings\&quot;: [ {\&quot;company\&quot;: \&quot;&quot;, vendor_class_identifier_1,&quot;\&quot;}, {\&quot;part\&quot;: \&quot;&quot;, vendor_class_identifier_2,&quot;\&quot;}, {\&quot;part_number\&quot;: \&quot;&quot;, vendor_class_identifier_3,&quot;\&quot;}, {\&quot;app_version\&quot;: \&quot;&quot;, vendor_class_identifier_4,&quot;\&quot;}, {\&quot;bootrom_version\&quot;: \&quot;&quot;, vendor_class_identifier_5,&quot;\&quot;} ] }}&quot;)));
 
            if (option dhcp-message-type = 8)
            {
                        option dhcp-parameter-request-list 2,3,4,6,15,17,42,43,60,66,128,150,151,155,160;
                        option option-150 &quot;http://PlcmSpIp:PlcmSpIp@172.16.129.94/polycom/&quot;;
                        option option-155 &quot;http://PlcmSpIp:PlcmSpIp@172.16.129.94/polycom/&quot;;
                        option option-160 &quot;http://PlcmSpIp:PlcmSpIp@172.16.129.94/polycom/&quot;;
                        option tftp-server-name &quot;http://PlcmSpIpFOO:PlcmSpIp@172.16.129.94/polycom/&quot;;
                        option sip-server &quot;sip.voip.local&quot;;
                        option domain-name-servers 172.16.129.94, 172.16.129.94, 172.16.129.94, 172.16.129.94;
                        option domain-name &quot;voip.local&quot;;
                        option ntp-servers 172.16.129.94;
                        option time-servers 172.16.129.94;
                        option time-offset -18000;
                        #option voice-vlan &quot;VLAN-A=10;&quot;;
            }
}
 
subnet 172.16.0.0 netmask 255.255.0.0 {
}
&lt;/pre&gt;
</content><link rel='replies' type='application/atom+xml' href='http://blog.jasongarland.com/feeds/1689624253678194755/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/19789023/1689624253678194755' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/19789023/posts/default/1689624253678194755'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/19789023/posts/default/1689624253678194755'/><link rel='alternate' type='text/html' href='http://blog.jasongarland.com/2010/05/dhcp-notify-parsing-with-polycom-phones.html' title='DHCP Notify Parsing with Polycom phones'/><author><name>Unknown</name><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>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-19789023.post-131072726489343588</id><published>2010-01-14T15:01:00.009-05:00</published><updated>2010-05-09T10:27:39.641-04:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="api"/><category scheme="http://www.blogger.com/atom/ns#" term="energy"/><category scheme="http://www.blogger.com/atom/ns#" term="perl"/><category scheme="http://www.blogger.com/atom/ns#" term="programming"/><category scheme="http://www.blogger.com/atom/ns#" term="stats"/><category scheme="http://www.blogger.com/atom/ns#" term="ted5000"/><category scheme="http://www.blogger.com/atom/ns#" term="twitter"/><title type='text'>Twitter update your energy usage using a TED 5000</title><content type='html'>&lt;a HREF=&quot;http://www.theenergydetective.com/ted-5000-overview.html&quot;&gt;The Energy Detective 5000&lt;/A&gt; has an &lt;a HREF=&quot;http://www.theenergydetective.com/ted-5000-developer-and-api.html&quot;&gt;API&lt;/A&gt; that can be polled for data using this simple perl script that I wrote.&lt;br /&gt;
&lt;br /&gt;
You can find my Twitter feed here: &lt;a href=&quot;http://twitter.com/jgarland79power&quot;&gt;http://twitter.com/jgarland79power&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;a HREF=&quot;http://www.amazon.com/TED-5000-C-The-Energy-Detective/dp/B003C12U3E?tag=fb23-20&quot;&gt;Order your own TED 5000 here.&lt;/A&gt;&lt;br /&gt;
&lt;br /&gt;
If you are running Debian Linux you will need to install a few dependencies:&lt;br /&gt;
sudo apt-get install libxml-simple-perl libwww-curl-perl&lt;br /&gt;
&lt;br /&gt;
And you can automate the execution of this script with an hourly cron job:&lt;br /&gt;
Run: crontab -e&lt;br /&gt;
and then add this line (assuming you put my script in ~/bin/:&lt;br /&gt;
0 * * * * ~/bin/twitterpower.pl&lt;br /&gt;
&lt;br /&gt;
&lt;pre class=&quot;brush: html&quot;&gt;#!/usr/bin/perl

# Written by Jason Garland @ http://blog.jasongarland.com/

my $twitter_user=&quot;jgarland79power&quot;;
my $twitter_password=&quot;super_secret_password&quot;;

my $ted_ip=&quot;192.168.3.132&quot;;

# use module
use XML::Simple;
#use Data::Dumper;
use WWW::Curl::Easy;

sub write_callback {
 my ($chunk,$variable)=@_;
 # store each chunk/line separately
 # This should be faster than using $$varable .= $chunk;
 push @{$variable}, $chunk;
 return length($chunk);
}

my $curl = WWW::Curl::Easy-&gt;new();

my @body;
$curl-&gt;setopt(CURLOPT_WRITEFUNCTION, \&amp;amp;write_callback);
$curl-&gt;setopt(CURLOPT_FILE, \@body);
$curl-&gt;setopt(CURLOPT_URL, &quot;http://$ted_ip/api/LiveData.xml&quot;);
$curl-&gt;perform;
my $body=join(&quot;&quot;,@body);

# create object
$xml = new XML::Simple;

# parse XML
$data = $xml-&gt;XMLin($body);

my $PowerTDY=$data-&gt;{Power}-&gt;{Total}-&gt;{PowerTDY};

$status=&quot;used $PowerTDY watt hours of #electricity since midnight today. Find out more here: http://a1.ly/7&quot;;

print $status,&quot;\n&quot;;
$curl-&gt;setopt(CURLOPT_URL, &quot;http://twitter.com/statuses/update.json&quot; );
$curl-&gt;setopt(CURLOPT_POST, 1 );
$curl-&gt;setopt(CURLOPT_POSTFIELDS, &quot;status=$status&quot; );
$curl-&gt;setopt(CURLOPT_USERPWD, &quot;$twitter_user:$twitter_password&quot; );
$curl-&gt;perform;
&lt;/pre&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.jasongarland.com/feeds/131072726489343588/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/19789023/131072726489343588' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/19789023/posts/default/131072726489343588'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/19789023/posts/default/131072726489343588'/><link rel='alternate' type='text/html' href='http://blog.jasongarland.com/2010/01/twitter-update-you-energy-usage-using.html' title='Twitter update your energy usage using a TED 5000'/><author><name>Unknown</name><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>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-19789023.post-8073437180720659363</id><published>2007-07-20T15:15:00.002-04:00</published><updated>2010-05-08T00:03:58.214-04:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Google Maps"/><category scheme="http://www.blogger.com/atom/ns#" term="GPS"/><category scheme="http://www.blogger.com/atom/ns#" term="iPhone"/><category scheme="http://www.blogger.com/atom/ns#" term="KML"/><title type='text'>Use a GPS with your iPhone</title><content type='html'>Here is a little trick to allow you to use a GPS feed with Google Maps on your iPhone.&lt;br /&gt;
&lt;br /&gt;
The Google Maps app on the iPhone is similar to the Google Maps for Mobile. A while back I discovered that you would input a URL for a KML feed into Google Maps mobile so when I got my iPhone I gave it a try on there too AND IT WORKED!&lt;br /&gt;
&lt;br /&gt;
Simply type in the URL for a KML feed into the search box on the Google Maps app on your iPhone.&lt;br /&gt;
&lt;br /&gt;
So how do we get our current GPS cords into the iPhone? You use a separate device like the Motorola i415 that you can pick up at Walmart for ~ $30 and load up the &lt;a href=&quot;http://mologogo.com&quot;&gt;mologogo.com&lt;/a&gt; application on it. The phone can then transmit your coordinates to a web server where you can generate a KML feed for your iPhone.&lt;br /&gt;
&lt;br /&gt;
You can find sample scripts on how to build the KML feed here: &lt;a href=&quot;http://mologogo.wikispaces.com/&quot;&gt;http://mologogo.wikispaces.com/&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
Here is the feed for mine: &lt;a href=&quot;http://gps.jasongarland.com/earth1.kml&quot;&gt;http://gps.jasongarland.com/earth1.kml&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
Type it into the search box on your iPhone and you will see my current location. (Assuming I have the Mologogo app running)&lt;br /&gt;
&lt;br /&gt;
NO STALKERS PLEASE! This means don&#39;t attempt to go to any of the locations on this map to try and find me. If you want to talk to me you can send me a message on this blog.&lt;br /&gt;
&lt;a HREF=&quot;mailto:3175312913@tmomail.net&quot;&gt;&lt;/A&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.jasongarland.com/feeds/8073437180720659363/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/19789023/8073437180720659363' title='11 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/19789023/posts/default/8073437180720659363'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/19789023/posts/default/8073437180720659363'/><link rel='alternate' type='text/html' href='http://blog.jasongarland.com/2007/07/use-gps-with-your-iphone.html' title='Use a GPS with your iPhone'/><author><name>Unknown</name><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>11</thr:total></entry></feed>