Tuesday, December 18, 2012
GNU Radio Talk: A Glimpse into Developing Software-Defined Radio by Python
PyHUG 目前的聚會模式是每個月的第一與第三個星期一晚上, 通常都會有一個或一個以上的二十分鐘短講, 地點在交大計中一樓訓練教室, 所有訊息都是透過 meetup 這個網頁來公告, 你可以到這裡看相關訊息。
The slides were given to PyHUG in December 17, 2012 in PyHUG, which is Python Hsinchu User Group initiated by Dr. Yung-Yu Chen and I in 2011. In this talk, I introduced the concept of software-defined radio, the free & open source software-defined radio project - GNU Radio, RF front-end hardware that can be used with GNU Radio provided by Ettus Research and Realtek, and illustrated three ways to develop software-defined radio by GNU Radio. This is the first of GNU Radio series talk, the topics for the subsequent talks are to be done, and I'll probably start from using filters in GNU Radio as well as concepts of digital signal processing. And then I'll try to decide topics depending upon feedback of attendees. Any idea or suggestions are welcome!
Currently we have regular meetings on the first and the third Monday nights every month at the training classroom in the building of computer center in National Chaio-Tung University. Normally there will be one or two 20-minute talks. All messages related to PyHUG meetings or events are distributed via meetup website, and you can find information here.
Download/view slides of "A Glimpse into Developing Software-Defined Radio by Python"
Monday, October 15, 2012
How to use HHKB Pro 2 as an external keyboard to an iPad
Happy Hacking Keyboard Professional 2 (HHKB Pro 2), which is produced by PFU Limited of Japan, is a great keyboard with a small footprint, and it contains only 60 keys. As a new iPad owner, I wonder if I can combine these two gadgets and write notes on-the-go.
After some trial-and-error, finally I make it work! Here is how to make it. First you need to buy iPad Camera Connectivity Kit from Apple. This kit is designed for connecting to a digital camera, so if you ask any salesperson in Apple store, he or she will probably tell you it's not designed to connect to an external keyboard. Never mind what he or she says, just buy it. And then you'll need a USB hub with external power supplied, i.e. you actually need to plug the external power cord to a power source because HHKB Pro 2 draws larger current from USB port than an iPad can supply. Now connect your HHKB Pro 2 to the USB hub with external power supplied, and then connect the USB hub to your iPad via the camera connectivity kit. Open any text-oriented application, e.g. OmniOutliner, and then you can type by your HHKB Pro 2!
To use these gadgets on-the-go, I bought a mobile battery with me so that the USB hub can be supplied by the battery. Here are the photos of them:
What you need
How to connect HHKB Pro 2 to a new iPad
Requirements:
- a new iPad, or iPad 3
- a Happy Hacking Keyboard Professional 2
- a USB hub with external power source
- a mobile battery if you want to use them on-the-go
Note I'm not sure if older iPad works this way.
Thursday, January 26, 2012
SimPy slides in our company and PyHUG meeting
This is my presentation on discrete-event simulation given to engineers in our company and PyHUG, which is Python Hsinchu User Group. I think it might be useful for somebody on the Internet.
https://docs.google.com/open?id=0B0rtbYTzCZWN2Y5MmY4M2ItYzJkYy00ZTA2LWI5N2UtNmUxNjI5YzNjZTg0
http://dl.dropbox.com/u/31960195/Introduction-to-SimPy-20111017-PyHUG.pdf
--
My Emacs Files At GitHub
Friday, November 11, 2011
Improvement on matlab-emacs
Modification to matlab-cellbreak-face
Current cvs code for matlab.el does not handle cellbreak-face correctly. It cannot distinguish between %% and %%%%, but matlab-shell-run-cell can function well. But fontifying not well is still annoying, so we need to modify it. In matlab.el, find the following lines to modify from:
;; Cell mode breaks get special treatment
'("^\\s-*\\(%%[^\n]*\n\\)" (1 matlab-cellbreak-face append))
Change it to:
;; Cell mode breaks get special treatment
'("^\\s-*\\(%%[^%\n]*\n\\)" (1 matlab-cellbreak-face append))
Evaluate cell and advance (C-S-return)
In MATLAB editor, we can press C-S-return to perform "evaluate cell and advance" function. Minor modification to matlab.el can make it happen. You can just add the following code snippet to your .emacs file.
(require 'matlab-load)
(defun matlab-goto-next-cell ()
(interactive)
(re-search-forward "^%%[^%\n]"))
(require 'matlab)
(define-key matlab-mode-map [(meta control F)] 'matlab-goto-next-cell)
(defun matlab-run-cell-and-go ()
(interactive)
(progn
(save-excursion
(matlab-shell-run-cell))
(matlab-goto-next-cell)))
(define-key matlab-mode-map [(meta shift return)] 'matlab-run-cell-and-go)
The example for running matlab cell mode is like this:
a = [1,2,3];
c = [4,5,6];
%% This is first cell
d = a * c';
%%%% This is not a cell
b = [3,2,1];
%% Another cell
c = a + b;
kkk
After pressing three <C-S-return>, the matlab-shell screen will look like:
< M A T L A B (R) >
Copyright 1984-2010 The MathWorks, Inc.
Version 7.12.0.635 (R2011a) 64-bit (maci64)
March 18, 2011
To get started, type one of these: helpwin, helpdesk, or demo.
For product information, visit www.mathworks.com.
>> addpath('/Users/jjhuang/elisp/matlab-emacs/toolbox','-begin'); rehash; emacsinit('emacsclient -n');
>> , a = [1,2,3];, c = [4,5,6];,
>> , a = [1,2,3];, c = [4,5,6];, d = a * c';, b = [3,2,1];,
>> , d = a * c';, b = [3,2,1];, c = a + b;, kkk,
??? Undefined function or variable 'kkk'.
>>
Okay, now matlab-emacs for me is more convenient right now. Hope you enjoy it!
--
My Emacs Files At GitHub