tag:blogger.com,1999:blog-309069162024-03-05T13:26:06.440-08:00sweemeng's tech adventurethis is a place where i put my thought of technology and things that i do.Anonymoushttp://www.blogger.com/profile/14817270953353756568noreply@blogger.comBlogger37613tag:blogger.com,1999:blog-30906916.post-35319925022473438452012-01-29T22:26:00.000-08:002012-01-29T22:26:41.306-08:00FInally moved the blogAlrighty folks, I finally moved to a wordpress blog. Which itself made me learn alot.<br /><br />You can find it here<br />
<a href="http://www.nomadiccodemonkey.com/">www.nomadiccodemonkey.com</a><br />
<br />
While the content have been migrated to the new blog, I will just leave all the content here. Hopefully someone can find the information here useful<br />
<br />
On the other hand, just glad I finally have a place for me to post source code in a blog properly<br />Anonymoushttp://www.blogger.com/profile/14817270953353756568noreply@blogger.com0tag:blogger.com,1999:blog-30906916.post-76450886524105749302012-01-20T22:25:00.000-08:002012-01-20T22:25:55.657-08:00Long Lost Musical Instrument<div class="separator" style="clear: both; text-align: center;">
<a href="http://3.bp.blogspot.com/-ilOWtcHzIbM/TxpOuUpUlfI/AAAAAAAACEg/HKyZAxVcBqM/s1600/IMG_20120121_133325.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="240" src="http://3.bp.blogspot.com/-ilOWtcHzIbM/TxpOuUpUlfI/AAAAAAAACEg/HKyZAxVcBqM/s320/IMG_20120121_133325.jpg" width="320" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
Not quite tech related, but this is stone age technology, believed to be used in hunting and herding during that time. Which later evolved into a musical instrument.</div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
This is Xun, though this I bought from souvenir shop in China long time ago. Still I think it is pretty cool.</div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
<a href="http://en.wikipedia.org/wiki/Xun_(instrument)">http://en.wikipedia.org/wiki/Xun_(instrument)</a> </div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>Anonymoushttp://www.blogger.com/profile/14817270953353756568noreply@blogger.com0tag:blogger.com,1999:blog-30906916.post-12178420689311762462012-01-17T06:06:00.000-08:002012-01-17T06:06:48.776-08:00RFID On ArduinoSo I got myself an Arduino powered Android Accessory Development Kit, not long ago. The kit have quite a lot of sensor, one of them, an <a href="http://www.seeedstudio.com/wiki/index.php?title=Electronic_brick_-_125Khz_RFID_Card_Reader">125kHz RFID reader</a>. Which is cool except, the kit doesn't comes with the tag necessary. <div>
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="http://3.bp.blogspot.com/-xjE8Zd9Ssmw/TxVNK9q13OI/AAAAAAAACBA/clkD3Fn3OPo/s1600/IMG_20120117_182538.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="240" src="http://3.bp.blogspot.com/-xjE8Zd9Ssmw/TxVNK9q13OI/AAAAAAAACBA/clkD3Fn3OPo/s320/IMG_20120117_182538.jpg" width="320" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div>
So I finally got the tag(s) which is compatible. The <a href="http://www.seeedstudio.com/depot/electronic-brick-125khz-rfid-card-reader-p-702.html?cPath=52">reader</a> from seeestudio have 2 ways to interface with the arduino, one is via <a href="http://en.wikipedia.org/wiki/Wiegand_interface">Wiegand</a><span id="goog_661715863"></span><span id="goog_661715864"></span><a href="http://draft.blogger.com/"></a> <a href="http://www.seeedstudio.com/wiki/index.php?title=Electronic_brick_-_125Khz_RFID_Card_Reader#Wiegand_Mode_.28Jumper_Set_to_the_Right_two_Pins.29">Mode</a>, the other via UART, i.e Serial. </div>
<div>
<br /></div>
<div>
I just use UART, because one the board is actually a Arduino Mega, so I got enough hardware serial to use. And I am using the extension board, so It make it way easy to use the extra hardware serial. But if you are just using an arduino, the Reader is actually pretty easy to use via Software Serial using <a href="http://arduiniana.org/libraries/newsoftserial/">NewSoftSerial</a> library. Easier if you are using the <a href="http://www.seeedstudio.com/depot/125khz-rfid-module-uart-p-171.html?cPath=144_153">UART</a> version of this</div>
<div>
<br /></div>
<div>
Originally I thought of just forwarding the ID from the tag into a serial without any translation. From the <a href="http://www.seeedstudio.com/wiki/index.php?title=Electronic_brick_-_125Khz_RFID_Card_Reader#Uart_Mode_.28Jumper_set_to_the_left_two_pins.29">docs</a>, there is a checksum that we can use. It do make using an arduino as a middleman not so wasteful. It also define an header and ends, which can also be used to track error etc. </div>
<div>
<br /></div>
<div>
From the docs, I have create a reader, the code is in <a href="https://gist.github.com/1626692">https://gist.github.com/1626692</a></div>
<div>
<br /></div>
<div>
This is just a very early version, hacked within 15 minutes. So it don't check the checksum, etc. </div>
<div>
<br /></div>
<div>
You can check the result using the serial monitor, it just output the code as I swipe it on the reader itself, </div>
<div class="separator" style="clear: both; text-align: center;">
<a href="http://4.bp.blogspot.com/-Q4NZ8lAQwSo/TxV-wr5BG9I/AAAAAAAACCY/Mq8qfJyC4KQ/s1600/arduino_rfid_serial.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="168" src="http://4.bp.blogspot.com/-Q4NZ8lAQwSo/TxV-wr5BG9I/AAAAAAAACCY/Mq8qfJyC4KQ/s320/arduino_rfid_serial.png" width="320" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
This reader can read one tag at a time unlike the commercial one, where the tag have random delay to make reading multiple tag possible. This is a pretty cheap, like 13USD, cannot really compare with the really big commercial one. And the distance is short too, like 8 cm. </div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
Despite that, it can be a fun toy to play with, not quite sure what I am going to do with this though. More to come(?)</div>
<div>
<br /></div>Anonymoushttp://www.blogger.com/profile/14817270953353756568noreply@blogger.com0