Thursday, August 28, 2014

自製藍莓派攝影機的外殼

為了找一個可以保護藍莓派攝影機的外殼,居然會找不到,於是動起自己設計和用3D印表機自製藍莓派攝影机的外殼的念頭, 首先用3D Max 設計,並轉成STL。
Screen Shot 2014-08-27 at 8.10.02 PM

接著把STL 放入 3D印表機的軟體中。
Screen Shot 2014-08-28 at 11.16.53 AM


印刷中


 


Screen Shot 2014-08-28 at 11.17.23 AM


印出後的成品,但因為第一次設計,失敗了幾回,並且用了美術用的小刀裁切,才勉強把藍莓派攝影機的鏡頭,放進去。


 


Screen Shot 2014-08-28 at 11.17.58 AM


 


但因為第一次設計,失敗了幾回,並且用了美術用的小刀裁切,才勉強把藍莓派攝影機的鏡頭,放進去。


Screen Shot 2014-08-28 at 11.18.47 AM


成品~~~看起來還有模有樣的。 ^_^



自製藍莓派攝影機的外殼

「 柯博文老师」與51CTO 合作的 Raspberry Pi 蓝莓派GPIO物连网周边控制实战 線上網路课程

「 柯博文老师」與 北京 51CTO 合作的 Raspberry Pi 蓝莓派GPIO物连网周边控制实战線上網路课程,已經上線了,

可以此觀看教學 http://edu.51cto.com/course/course_id-1986.html
Screen Shot 2014-08-28 at 10.33.03 AM


 


並且成為51 CTO IT 精品課程。


Catch



「 柯博文老师」與51CTO 合作的 Raspberry Pi 蓝莓派GPIO物连网周边控制实战 線上網路课程

Wednesday, August 27, 2014

藍莓派自製GPIO 搖桿

藍莓派, 自製GPIO搖桿來玩超級瑪利歐


而程式和教學,請看柯博文老師 2014年底新書 Raspberry Pi 50個實驗


Screen Shot 2014-08-27 at 4.49.26 PM




藍莓派自製GPIO 搖桿

看美國季報

很多人對專業的英文用字不熟悉,這裡比一些常出現的字,稍稍解釋一下。


google-stock


 


 


  • P/E(Price to Earnings ratio 市盈率),也有會寫 P/E Ratio,我們可以明顯看到,它的市盈率53.61,非常高。很多人說,憑什麼說市盈率高?高低以什麼為標準? ‘以標普500的平均值,大概16倍的市盈率。市盈率是最常用來評估股價水平是否合理的指標之一,由股價除以年度每股盈餘(EPS)得出(以公司市值除以年度股東應佔溢利亦可得出相同結果)


看美國季報

Thursday, August 21, 2014

藍莓派電視機上盒 XBMC Openelec 中文化

 


 


設定中文


目的:


因為藍莓派本身需要用中文因為需要指定字庫的關係,才能顯示中文,不然字庫沒有支持中文字,會出現中文會顯示不出來,所以依照本章節的介紹和設定XMBC的中文。


 


設定步驟:


STEP1: 進入設定


請透過鍵盤或滑鼠,選取System\Settings


STEP2: 進入 Appearance 外觀設定


請透過鍵盤或滑鼠,選取進入 Appearance 外觀設定。


Screen Shot 2014-08-21 at 10.02.21 AM


6-15進入 Appearance 外觀設定


STEP3: 設定字型


請在Skin 外觀的部份Font 字型的地方,指定為”Arial based”


Screen Shot 2014-08-21 at 10.02.27 AM6-16設定字型


STEP4: 指定語言


然後再international 介面語言中的-> Language 語言,設定為中文繁體Chinese Traditional)或中文簡體 Chinese (Simple) ,看你的喜好,設定完畢後,等個5秒鐘,就會切換成成功。


Screen Shot 2014-08-21 at 10.04.34 AM


6-17設定語言


執行效果:


設定完畢之後整個操作介面都會變成中文的,以下圖片是中文的外觀。


Screen Shot 2014-08-21 at 10.03.29 AM


6-18設定中文繁體Chinese Traditional語言


Screen Shot 2014-08-21 at 10.03.35 AM


6-19設定中文簡體 Chinese (Simple) 語言



藍莓派電視機上盒 XBMC Openelec 中文化

Tuesday, August 19, 2014

樂高科學模型

如果想用3D 印表機印出樂高科學模型,可以在此取得STL 檔,有齒輪、軸等… 這裡


Screen Shot 2014-08-19 at 4.46.03 PM



樂高科學模型

3D 印表機測試實例

前兩天到亞馬遜,花了US 499 買的一台傳說中的3D 印表機,在買之前花了多多天比較好幾台,到最後選擇2014 CES Editors’ choice 最佳產品,da vinci 1.0 3D印表機 ,是台灣公司的三緯國際公司的產品,該公司網站可以參考這里


今天上午終於拿到手,外包裝比想像大很多,關於紙箱包裝還不錯.很結實,也保護的很好。


Screen Shot 2014-08-19 at 4.05.25 PM


裡面有不少的配線,里面的配件的說明書,只有英文的,說明圖文并茂寫得很詳細。


 


Screen Shot 2014-08-19 at 4.06.24 PM


花了3分鐘就把3D 印表機中打開放到桌上。


Screen Shot 2014-08-19 at 4.10.35 PM


裏面有些固定印表機的關鍵零組件保護,但是需要很小心的把他把移除,並且裡面有很多保麗龍和膠帶用來固定軸乘和平板。並且依照指示把塑料,接到印表機的頭。


 


迫不及待的馬上按下機器內定的Demo 列印功能,但是很不幸的事居然並不成功並且發生一大噪音,覺得很奇怪,為何3D 硬表頭都在角落移動,打了電話給客服中心,看來是印度的call center 的服務,留下我的電話後,就說會有技術人員會回call 給我。


但是,怎能這樣就放棄了。


 



3D 印表機測試實例

Monday, August 18, 2014

Raspberry Pi Compute Module藍莓派電腦模組

 


樹莓派已經成為一個新勢力,並有成千上萬的專業的產品都正在使用。但是還是有些地方並不是那麼符合工業產品可能專業產品市場。為了解決這些問題,樹莓派基金會在20144月,已經發布了一個新的模組Raspberry Pi Compute Module藍莓派電腦模組。 現在已經可以在市面上買得到了。


 


新的版本外觀看起來像是一個記憶體模組SODIMM形狀的大小,提供了完整的樹莓派的功能,並且它的大小只有原來的藍莓派的四分之一。很多都不說為何要重新設計?主要目的是SODIMM是一種廉價也可以抽換的設計,並且都透過模塊的設計,可以把IO的介面獨立出來,並且可以針對不同的情況,加以使用不同的模塊。


 


藍莓派Computer Module 電腦模組主版功能如下:


 


  • SODIMM 記憶體插槽的設計,長為 6.5cm 寬為 3cm的藍莓派板子,使用是 BCM2835 晶片內涵 512MB RAM

  • 在板子上還有 4GB eMMC Flash memory快閃式記憶體,用來儲存開機時的作業系統。

  • 並且提供的200個接腳,用來連接 BCM2835 的所有功能。

  • 使用的是家庭應用的FCCB類認證。

 


5


 


5 SODIMM 造型的藍莓派Computer Module 電腦模組。


 


藍莓派IO Board 輸入輸出板子功能如下:


 



  • 2 60 個接腳,一個有60個接腳,可以程式化控制的接腳由GPIO1GPIO45




  • 2 micro USB type B




  • 1 USB type A




  • 2 CSI 接口給攝影機




  • 2 DSI接口給顯示面板




  • 1 HDMI 接口




  • 1 Micro USB 的電源接頭



 


6


6 藍莓派IO Board 輸入輸出板子。


 


 


兩者連接起來後,它的照行如下圖所示。


 


 


 


7


 


7 Raspberry Pi Compute Module藍莓派電腦模組外觀。


 



Raspberry Pi Compute Module藍莓派電腦模組

Raspberry Pi model B+ (藍莓派 模組 B+) 介紹

在2012年 2份,藍莓派基金會發表一款新的改良版的藍莓派名稱為” Raspberry Pi model B+ (藍莓派 模組 B+)”目前在美國的定價是35塊美金。


Raspberry Pi model B+ 的外型


4


這個版本的功能有:


  • 更低功和省電

  • 改善的電源管理系統

  • 將輸入輸出的GPIO的接腳從原本的26提高到40個

  • USB Ports 接頭從原本的兩個USB Host ,提升到4個。

  • 並且把原本的RCA 螢幕接頭改成 4 針的連接頭

  • 而SD 卡升級到MicroSD


Raspberry Pi model B+ (藍莓派 模組 B+) 介紹

Saturday, August 16, 2014

28 藍莓派 任天堂遊戲機 Demo

使用iOS 控制 Raspberry Pi 藍莓派 任天堂遊戲機 Demo

而程式和教學,請看柯博文老師 2014年底新書 Raspberry Pi 50個實驗



Screen Shot 2014-08-16 at 9.10.45 PM



28 藍莓派 任天堂遊戲機 Demo

27 使用iOS 控制 藍莓派遙控汽車 Demo

使用iOS 控制  Raspberry Pi 藍莓派遙控汽車 Demo,
而程式和教學,請看柯博文老師 2014年底新書 Raspberry Pi 50個實驗



Screen Shot 2014-08-16 at 11.27.24 AM



27 使用iOS 控制 藍莓派遙控汽車 Demo

27 使用Android 控制 藍莓派遙控汽車 Demo

使用Android 控制 Raspberry Pi 藍莓派遙控汽車 Demo,
而程式和教學,請看柯博文老師 2014年底新書 Raspberry Pi 50個實驗



Screen Shot 2014-08-16 at 11.27.31 AM



27 使用Android 控制 藍莓派遙控汽車 Demo

Friday, August 15, 2014

27 藍莓派遙控汽車 Demo

Raspberry Pi 藍莓派遙控汽車 Demo,


程式和教學,請看2014年底新書 Raspberry Pi 50個實驗


 


Screen Shot 2014-08-15 at 5.09.16 PM



27 藍莓派遙控汽車 Demo

自製氣體監視器,避免氣爆事件和瓦斯爆炸。

看到高雄氣爆事件和最近的瓦斯爆炸事件,看得真的是讓人很難過,所以想說用科學的角度,是否有辦法改善這種事情再度發生。


首先柯博文老師先分享一下,美國是怎麼樣與預防瓦斯和火災,以加州和內華達州等州法,都用明文規定,房子需要安裝瓦斯與煙霧偵測器,這種設備一般都是安裝在天花板或者是牆上,並且每一個房間都需要安裝一個,通常在買賣房屋時、租售房屋、房屋貸款時,這些設備都需要做檢測是否安裝和運作正常。


它的準確程度非常靈敏,我有幾次在家裏煎牛排所產生的煙霧,都足夠造成檢測器的鳴叫,價格約在8塊錢美金到40塊錢美金之間,主要的差異實在偵測氣體的種類,你可以到amazon 上面找Smoke Alarm 煙霧警報器、Fire Alarm 火災警報器,當然也有跟進一步的功能如carbon Monoxide 一氧化碳警報器 、gas Alarm 瓦斯警報器等等…目前台北市的在2012/05/21 發佈的火災預防自治條例裏面有明文規定 這裡,其他縣市陸續也有類似的條例。但是目前都還是在公共場所和大樓的公設,還沒有強制規定到家裡面。


 


download


 


那麼科技人的角度來看的話,是不是有辦法自製一個?當然可以囉,而且現在的氣體感應設備,種類繁多將近有20多種的氣體都已經是可以被偵測到而且提供詳細的數據,


 


 


 



自製氣體監視器,避免氣爆事件和瓦斯爆炸。

Thursday, August 14, 2014

10 藍莓派可以用的硬體設備

很多人會問,如果要買藍莓派的周邊設備的話,有哪些是相容,各位可以參考以下的表格。


資料來源: http://elinux.org/RPi_VerifiedPeripherals


USB Remotes 的搖桿


  • The FLIRC USB dongle allows the use of any remote control with your Raspberry Pi. Configure the device on your desktop PC, then simply plug into your Pi for a perfect media center companion. Available from Pi Supply and The Pi Hut

  • ASUS TV FM Remote IR – ID 3353:3713 – works. Receiver connected to an USB Hub. Tested with archlinux in X. It works also as pointer (pressing “Toggle” button)

  • ATI Remote Wonder (X10 Wireless Technology, Inc. X10 Receiver) — ID 0bc7:0004 — appears as a joystick-like 2 button mouse and a 0-9 keypad without drivers on console and X.

  • iPazzport mini 2.4 GHz wireless keyboard and touchpad.

  • Pan.Code D1000 – 2.4GHz Wireless keyboard and touchpad.

  • PKB 1800 Wireless Smart Pad ad Mini Keyboard. The pad works as a mouse, but not multi touch features. The keyboard works.

USB Wi-Fi Adapters 無線網路設備


看這裡 RPi USB Wi-Fi Adapters


USB Bluetooth adapters 藍牙設備


This section has been moved to a separate page. See RPi USB Bluetooth adapters


USB Ethernet adapters 網路RJ45


This section has been moved to a separate page. See RPi USB Ethernet adapters


USB 3G Dongles 3G 網路


Huawei


  • E1750

  • E173

  • E1820 Works on Raspbian with Sakis3G

  • E220 installation instructions

  • E353 HiLink Works on Raspbian

  • E160 (AT commands only)

  • E169, E620, E800, (12d1:1001) – works on Raspbian Wheezy, details here

Sierra Wireless


  • AirCard 250u works with wvdial/network manager

  • AirCard 320u (0f3d:68aa) works in WWAN mode, driver provided by the kernel. Tested on Arch.
    • Kernel version 3.10 has a bug that causes the WWAN interface to never be in RUNNING state (no carrier). Use 3.6 kernel instead.

    • AT command guide can be found here

    • for GPS to work you have to enable it. First, setup the modem (guide here) and after that enable NMEA output by passing nmea=1 parameter to the sierra kernel module. Warning! Enabling NMEA output may cause the modem to drop connections / restart itself. This is probably related to higher power drain. This may not be the issue when a powered hub is used.


  • 307 Works fine with Sakis3G script. The connection LED does not change its state after establishing a connection but the same behaviour on a normal linux system.

  • AirCard 340u (Netgear/ATT Beam) works with latest GobiNet/GobiSerial code on Raspbian and 3.10.25+ kernel. Requires firmware update from Netgear to disable Windows 8 support and make it autoconnect. guide here.

ZTE


USB Sound Cards 音效卡


You will usually want the alsa package for sound. In the Debian image for Raspberry Pi (and possibly other distributions) USB sound cards are prevented from loading as the first sound card, which can be an annoyance if it’s the only device you have. To disable this behaviour edit /etc/modprobe.d/alsa-base.conf and comment out the last line; options snd-usb-audio index=-2 . If you are not user pi you may need to add your username to the audiogroup thus: sudo adduser yourusername audio (user pi usually belongs to this group anyway).


USB TV Tuners and DVB devices 電視卡


  • August
    • DVB-T205, based on rtl2832u chipset, worked with this driver on older 3.2 kernel. Couldn’t get same device working reliably on current kernel. (On the older 3.2 kernel it worked with Saorview (Irish DTT service), both HD & SD.)


  • DVBSky
    • Mystique SaTiX-S2 Sky USB: Scanning/watching SD and HD works via vdr and streamdev plugin, watching on the Raspberry Pi directly is laggy as hell. DVB-USB and I2C support must be enabled in the kernel. Needs drivers/firmware from here.


  • Sundtek
    • Sundtek MediaTV Digital Home

    • Sundtek MediaTV Pro

    • Sundtek SkyTV Ultimate

    • DVB-C, DVB-T, DVB-S/S2: digital TV works, streaming to Windows / Linux is no problem. Easy installationEnglish


  • Hauppauge
    • Hauppauge NOVA-T Stick (Revision 70xxx) DiBcom DiB0700 chipset, requires powered hub.

    • Hauppauge NOVA-TD Stick (Revision 52xxx) DiBcom DiB0700 chipset, requires powered hub.

    • Hauppauge WinTV-HVR-1950 (tested analog tuner with omxplayer, tested Digital OTA with MythTV)

    • Hauppauge WinTV-HVR-950Q (tested Digital OTA with TVHeadend in Raspbian)


  • K-World
    • K-World UB499-2T Dual DVB-T USB Tuner. IT9137 chipset. With no other USB devices connected Raspberry Pi can just about power this stick. IR and supplied remote work with XBMC.


  • Technisat

  • Terratec

  • Generic
    • DVB-T USB Dongle (Silver casing), based on AF9015 chipset.

    • DVB-T USB Dongle, based on RTL2832 FC12 (HD/SD), IR was detected, but it is not tested.

    • HDTV USB DVB-T dongle, based on IT9135. This tuner comes in two revisions. Revision is printed on PCB.
      • rev. 1.0; should work with 3.2+ kernel, need confirmation.

      • rev. 2.0; works with kernel 3.6.11, without a powered hub. This tuner also requires a firmware (dvb-usb-it9135-02.fw) which can be downloaded from this page. It’s in Hungarian, so google translate or equivalent is recommended. The remote also works.

        According to this post, there may be issues on some software configurations when using omxplayer.



USB Video / Frame grabbers 影像捕捉器


  • EasyCAP DC60 (STK1160 chip) – works out of the box for older versions of Raspbian. If you’re getting grey stripes see this tutorial

  • EasyCAP (UTV007 Fushicai chip) – works after driver compilation – see instructions at this link. remember to use older Raspbian version.

  • Hauppage HVR 1900

USB Webcams  網路攝影機


請看這裡 RPi USB Webcams


USB GPS devices 定位設備


  • Columbus
    • Columbus V-800 (MediaTek (MTKII) 3329 GPS chipset) – does not require powered USB hub. Works on Wheezy (using gpsd & gpsd-clients)


  • Royaltek
    • Royaltek RGM 2000 SiRF2 using the included serial (TTL) to USB – converter (Prolific pl2303-chip)


  • Garmin

  • GlobalSat
    • GlobalSat BU-353 Does not require a powered hub, works fine when directly plugged into the Raspberry Pi. On Raspian, requires the gpsd and gpsd-client packages. For some reason, the gpsd daemon does not always start correctly on boot. You may need to do something like the following to manually restart it:
      sudo killall gpsd; sudo gpsd /dev/ttyUSB0 -F /var/run/gpsd.sock


    • GlobalSat BU-353-S4 supports two protocols: NMEA, and SiRF v4. NMEA works fine, but SiRF v4 isn’t compatible with “gpsd”‘s SiRF v3 interpreter, resulting in a greatly reduced data rate (as low as four location fixes per hour). To keep “gpsd”‘s autoconfiguration from putting the receiver in SiRF mode, you’ll need to pass the “-b” flag when starting “gpsd”.


  • Wintec
    • WBT-200: No problem on Debian


  • Holux
    • Holux M-215: Works fine on Arch, uses Silicon Labs CP210x RS232 serial adaptor driver


  • Bluenext
    • Bluenext BN903S: No problem on Debian image (19-04-2012).


  • U blox NEO 6 – works well, connects via GPIO (serial console). Info here and here.


10 藍莓派可以用的硬體設備

Monday, August 11, 2014

2.3 我的第一個swift程式

2.3 我的第一個swift程式


STEP1:建立一個全新playground運動場程式專案


Application 中,選取Xcode,在進入”Xcode 的歡迎視窗”後,請選取”Get started with a playground”,來建立一個全新playground運動場程式專案。


12


 


 


 


 


 


12 樣板專案執行的效果。


STEP2:決定儲存的位置


接下來決定儲存檔案位置。13


13 儲存的位置


STEP3:進入playground運動場程式模式


進入Xcode 程式環境下的playground運動場程式模式。14


14 進入playground運動場程式模式


STEP4:進入playground運動場程式模式


請輸入以下的程式。


範例 2-1 MyPlayground.playground


  1. import Cocoa // 加入函式庫定義Cocoa


  2. var str = “Hello, playground” // 變數str 設定資料為“Hello, playground”

  3. println(” How are you?”) // 顯示文字

  4. println(str)

  5. var a1=10 // 設定變數a1

  6. a1=a1+1 //a1加上1

  7. STEP5:程式執行


    會發現當撰寫swuft 時,右邊的畫面便會把的相關的變數結果顯示在畫面上,


    而如果要執行的程式,請點選右圖的任何資料中的圓圈。15


    15 修改後的程式畫面


    STEP5:Console Output 視窗


    整個程式執行的結果,就會在右邊出現Console Output 視窗,如果要關閉的話,請點選右上角的”x”按鍵,就可以關閉掉。


    16


    16 出現Console Output視窗


    執行結果:


    這個程式的執行結果,會出現二筆文字分別是


    How are you


    Hello, playground


     


    17


    17 執行結果。



    2.3 我的第一個swift程式

2.2 我的第一個XCode APP程式

 


STEP1:開啟 Xcode 6


Application 中,選取Xcode 6 ,來打開程式編輯環境工具。


5


5 選取Xcode 6


 


STEP2: 版權宣告的視窗


第一次執行時會出現版權宣告的視窗,只要選取”Agree同意”按鍵。


66 選取”Agree同意”按鍵


 


 


STEP3:建立一個全新的程式專案


在進入”Xcode 的歡迎視窗”後,請選取”Create a new Xcode project”,來建立一個全新的程式專案。


 


7


7 建立一個全新的程式專案。


 


 


 


STEP4:建立一個全新的程式專案


在進入”選取程式樣板視窗”中,請選取


  • iOS Application

  • Single View Application 單一畫面的應用程式。

  • 結束後,點選”Next 按鈕”到下一個視窗。

 


 


8


8 選取單一畫面的應用程式樣板


 


STEP5:設定專案


在進入”設定專案選項視窗”中,設定


  • Product Name 專欄名稱。

  • 程式語言請設定為Swift

  • 結束後,點選”Next 按鈕”到下一個視窗。

 


 


9


9 設定專案


 


STEP6:執行程式專案


Xcode 的編輯環境中,可以直接點選左上角的執行按鈕(看起來像三角形),來執行此樣板專案。


在專案執行之前,請先確認現在的模擬器是用iPhone


 


10


10 Xcode 的程式編輯環境,點選執行。


 


STEP7:樣板專案執行的效果


在稍微等待之後,就看到這個樣板專案在模擬器上面之前的效果。


11


11 樣板專案執行的效果。


 




2.2 我的第一個XCode APP程式

Tuesday, August 5, 2014

33 在藍莓派掃描條碼,並且把條碼資料儲存的檔案中

【柯博文老師】使用python 程式語言,在藍莓派RaspberryPi上,透過接在上面的usb webcam,來掃描條碼,並且把條碼資料儲存的檔案中。 www.powenko.com




33 在藍莓派掃描條碼,並且把條碼資料儲存的檔案中

藍莓派使用 NPN 控制DC馬達 Demo

Raspberry Pi 使用 NPN 控制DC馬達 Demo,程式和教學,請等新書Raspberry Pi 50個實驗




藍莓派使用 NPN 控制DC馬達 Demo

Monday, August 4, 2014

條碼產生器

發現市面上幾乎找不到條碼產生器的網頁,所以可是我就寫了一個可以支持市面上常見的一般條碼產生器的網頁,如果你有需要的話,輸入條碼種類和號碼,就可以轉換出實際的條碼列印的圖片。


條碼產生器網頁web service


Screen Shot 2014-08-04 at 5.28.23 PM



條碼產生器