樹莓派 0W 狂想曲︰ 木牛流馬《#》

無事不登三寶殿,無故 W!o+ 為何入夢來?依然愛打啞謎呦,留下一句『木牛流馬』而已!這

木牛流馬

木牛流馬,為三國時期蜀漢丞相諸葛亮與妻子黃月英蒲元等人發明的運輸工具,分為木牛流馬,史載建興九年至十二年(231年-234年)諸葛亮在北伐時所使用,其載重量為「一歲糧」,大約4百斤以上,每日行程為「特行者數十里,群行二十里」,為蜀國十萬大軍提供糧食。另外還有機關防止敵人奪取後使用。不過,確實的方式、樣貌現在亦不明,對其亦有不同的解釋?

山東淄博市博物館展出的木牛流馬模型

 

神奇也︰

三國志註》引《諸葛亮集》中有關木牛流馬的記載:

「木牛者,方腹曲頭,一腳四足,頭入領中,舌著於腹 。載多而行少,宜可大用,不可小使;特行者數十里,群行者二十里也。曲者為牛頭,雙者為牛腳,橫 者為牛領,轉者為牛足,覆者為牛背,方者為牛腹,垂者為牛舌,曲者為牛肋,刻者為牛齒,立者為牛角,細者為牛鞅,攝者為牛鞦軸。牛仰雙轅,人行六尺,牛行 四步。載一歲糧,日行二十里,而人不大勞。流馬尺寸之數,肋長三尺五寸,廣三寸,厚二寸二分,左右同。前軸孔分墨去頭四寸,徑中二寸。前腳孔分墨二寸,去 前軸孔四寸五分,廣一寸。前槓孔去前腳孔分墨二寸七分,孔長二寸,廣一寸。後軸孔去前槓分墨一尺五分,大小與前同。後腳孔分墨去後軸孔三寸五分,大小與前 同。後槓孔去後腳孔分墨二寸七分,後載剋去後槓孔分墨四寸五分。前槓長一尺八寸,廣二寸,厚一寸五分。後槓與等版方囊二枚,厚八分,長二尺七寸,高一尺六 寸五分 ,廣一尺六寸,每枚受米二斛三斗。從上槓孔去肋下七寸,前後同。上槓孔去下槓孔分墨一尺三寸,孔長一寸五分,廣七分,八孔同。前後四腳,廣二寸,厚 一寸五分。形制如象,靬長四寸,徑面四寸三分。孔徑中三腳槓,長二尺一寸,廣一寸五分,厚一寸四分,同槓耳。 」

 

,作者不會不知怎麼說呀!!莫非強人所難乎??轉念想起了之前翻譯《M♪o 之學習筆記本

Siberian White Crane

金山小白鶴

野望

清秋望不極,迢遞起層陰。
遠水兼天淨,孤城隱霧深。
葉稀風更落,山迥日初沈。
獨鶴歸何晚,昏鴉已滿林。

杜甫

時,曾用過這個詞︰

派生碼訊

丑 牛

湖山一夢事全非,
再見雲龍向北飛;
三百年來終一日,
長天碧水歎瀰瀰。

丑牛木牛流馬因何作?一日特行數十里。 控 控 制制機巧在內中。庖丁解牛何其神!得之於手,應乎心!!

派 ︰追趕跑跳皆控制,行走坐臥須練習,一旦到達忘我時,熟能生巧自然通。

莊子‧內 篇‧養生主第三

吾生也有涯,而知也無涯。以有涯隨無涯,殆已!已而為知者,殆而已矣!為善無近名,為惡無近刑,緣督以為經,可以保身,可以全生,可以養親,可以盡年。

庖丁為文惠君解牛,手之所觸,肩之所倚,足之所履,膝之所踦,砉然響然,奏刀騞然,莫不中音,合於桑林之舞,乃中經首之會。

文惠君曰:「嘻,善哉!技蓋至此乎?」

庖丁釋刀對曰:「臣之所好者道也,進乎技矣。始臣之解牛之時,所見無非全牛者﹔三年之后,未嘗見全牛也﹔方今之時,臣以神遇而不以目視,官知止而神欲行。依乎天理,批大卻,導大窾,因其固然。技經肯綮之未嘗微礙,而況大軱乎!良庖歲更刀,割也﹔族庖月更刀,折也﹔今臣之刀十九年矣,所解數千牛矣,而刀刃若新發於硎。彼節者有閒,而刀刃者無厚,以無厚入有閒,恢恢乎其於游刃必有餘地矣。是以十九年而刀刃若新發於硎。雖然 ,每至於族,吾見其難為,怵然為戒,視為止,行為遲,動刀甚微 ,謋然已解,牛不知其死也,如土委地。提刀而立,為之而四顧,為之躊躇滿志,善刀而藏之。」

文惠君曰:「善哉!吾聞庖丁之言,得養生焉。」

公文軒見右師而驚曰:「是何人也?惡乎介也?天與?其人與?」

曰:「天也,非人也。天之生是使獨也,人之貌有與也。以是知其天也,非人也。」

澤雉十步一啄,百步一飲,不蘄畜乎樊中。神雖王,不善也。

老聃死,秦失弔之,三號而出。

弟子曰:「非夫子之友邪?」

曰:「然。」

「然則弔焉若此,可乎?」

曰:「然。始也吾以為其人也,而今非也。向吾入而弔焉,有老者哭之,如哭其子﹔少者哭之,如哭其母。彼其所以會之,必有不蘄言而言,不蘄哭而哭者。是遁天倍情,忘其所受,古者謂之遁天之刑。適來,夫子時也﹔適去,夫子順也。安時而處順,哀樂不能入也,古者謂是帝之縣解。」

指窮於為薪,火傳也,不知其盡也 。

─── 摘自《M♪o 之學習筆記本《丑》控制

 

後頭因為《W!o+ 的《小伶鼬工坊》

小伶鼬

W!0+ 那個世代,每個小朋友都會寫程式,

祇是所用的語言工具,

不同於這個年代。

─── Mrphs

 

之內容駁雜,事涉未來︰

說起這部演義的由來,純屬虛構。雖說來自 Mrphs 的一席話,講述 W!o+ 【W!o 小時候愛用的名字】幼年時閒暇喜作之事。畢竟事情發生於未來,誰又說的準呢?就算說準了,誰知會不會變呢!只因其中內容貼近大勢所趨。想來既是因緣際會, 或許今日的種子有益確定那未定之天。所以敢假借此時之物,姑妄言之彼地之事。尚祈讀者先知,莫以荒誕不經為怪。

嘗聞

天地問於太極說︰心想事成不好嗎?

太極說︰請問無極去!

故天地求之於無極,

無極講︰空得結果?無有過程!真心以為好乎??

天地困惑︰到底是『有待』的好!還是『無待』的好耶!!

,於是有人寫

曾經滄海難為水,除卻巫山不是雲;
取次花叢懶回顧,半緣修道半緣君。

─── 唐‧元稹《離思》

─── 摘自《W!o+ 的《小伶鼬工坊演義》︰ 《序》

 

不好落筆,故有所取捨,沒寫他喜歡的『小汽車』哩!!??方才托夢微詞耶??!!

 

Looking for GoPiGo instructions and projects? Click here.

gopigoheader1

 

 

 

 

 

 

 

 

 

樹莓派 0W 狂想曲︰ 不大聲以色《𝄡》

當學習者開始『反思學習』時,或明白大樹之所以『盤根錯節』,是適應『時空變化』的結果。這對『知識』與『經驗』來說,也是一樣的 ──『新事實』之發現、『老辦法』的褪色︰

要是我們對『declarative 』的了解僅止於『陳述的』、『說明的』或『宣告的』,一般來說並無助於理解

Thus, executing a program means searching for a proof. In traditional (imperative) programming languages, the program is a procedural specification of how a problem needs to be solved. In contrast, a logic program concentrates on a declarative specification of what the problem is.

這一段話的內容。這是因為我們還不知道『declarative 』語詞在『邏輯編程』語境中的『意指』,將之對比於『procedural』程序的,也只能帶來模糊的印象而已。如果用昨兒的互動程式為例,

pi@raspberrypi ~ 
*** QuickLaTeX cannot compile formula:
python3
Python 3.2.3 (default, Mar  1 2013, 11:53:50) 
[GCC 4.6.3] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> from pyDatalog import pyDatalog
>>> pyDatalog.create_terms('X單位, Y單位, Z單位, V數值, 單位轉換, 重量轉換')
>>> 單位轉換['公斤', '公克'] = 1000
>>> 單位轉換['台斤', '公克'] = 600
>>> 單位轉換['市斤', '公克'] = 500
>>> 單位轉換['英磅', '公克'] = 453.59237
>>> 單位轉換[X單位, Y單位] = 單位轉換[X單位, Z單位] * 單位轉換[Z單位, Y單位]
>>> 單位轉換[X單位, Y單位] = 1 / 單位轉換[Y單位, X單位]
>>> print(單位轉換['公斤', '台斤'] == V數值)
V數值               
------------------
1.6666666666666667
>>> print(單位轉換['英磅', '台斤'] == V數值)
V數值               
------------------
0.7559872833333334
>>> 單位轉換['台斤', '台兩'] = 16
>>> 重量轉換[V數值, X單位, Y單位] = V數值 * 單位轉換[X單位, Y單位]
>>> print(重量轉換[1, '公斤', '台兩'] == V數值)
V數值               
------------------
26.666666666666668
>>> 
</pre>
 

,是否會令人懷疑,讀了那篇文章所說的種種,真的足以『寫作』且『詮釋』那個『程式』的嗎?假使有一人宣稱他已 經仔細閱讀過那些種種,他將發現自己處於『術語叢林』,面對『理解 A 』得先『理解 B 』…… ,需要『理解 X 』,它卻又依賴於『理解 A 』。舉例講嬰兒學會母語,是那麼的天經地義,然而這個『能力』是因為『天生的』── 本能 ──?『環境的』── 學習 ── ?總在爭論中!彼此誰也不能完全說服了誰!!

雖話說如此,那些『術語』還是有『親疏遠近』,或許不該一開始就『捨近求遠』,如是我們會認為『知識表示』與『推理』
<h1 id="firstHeading" class="firstHeading" lang="en"><a href="https://en.wikipedia.org/wiki/Knowledge_representation_and_reasoning">Knowledge representation and reasoning</a></h1>
The starting point for knowledge representation is the <i>knowledge representation hypothesis</i> first formalized by <a title="Brian Cantwell Smith" href="https://en.wikipedia.org/wiki/Brian_Cantwell_Smith">Brian C. Smith</a> in 1985:<sup id="cite_ref-7" class="reference"><a href="https://en.wikipedia.org/wiki/Knowledge_representation_and_reasoning#cite_note-7">[7]</a></sup>
<blockquote><i>Any mechanically embodied intelligent process will be comprised of structural ingredients that a) we as external observers naturally take to represent a propositional account of the knowledge that the overall process exhibits, and b) independent of such external semantic attribution, play a formal but causal and essential role in engendering the behavior that manifests that knowledge.</i></blockquote>
和『邏輯編程』的關係較為緊密。而且能夠設想『 □□ 知識』就是『 ○○ 理論』裡,關於『 ☆☆ 世界』中的『事實』或是『定律』 。這樣我們可以揣測

<span style="color: #808080;">單位轉換[□, ○]= ??
</span>

說的就是某個世界中的約定『事實』。更由

<span style="color: #808080;">單位轉換<span class="crayon-sy">[</span><span class="crayon-i">□</span><span class="crayon-sy">, ○</span><span class="crayon-sy">]</span><span class="crayon-o">=</span>單位轉換<span class="crayon-sy">[</span><span class="crayon-i">□</span><span class="crayon-sy">,☆</span><span class="crayon-sy">]   乘</span><span class="crayon-o">   </span>單位轉換<span class="crayon-sy">[☆</span><span class="crayon-sy">,○</span><span class="crayon-sy">]</span></span>

<span style="color: #808080;">單位轉換<span class="crayon-sy">[□</span><span class="crayon-sy">,○</span><span class="crayon-sy">]</span><span class="crayon-o">=</span><span class="crayon-cn">1   除以  </span>單位轉換<span class="crayon-sy">[○</span><span class="crayon-sy">,□</span><span class="crayon-sy">]</span></span>

知道符合一般單位轉換運算『性質』。

當 這些『具足』時,『pyDatalog』就能『自動推導』作單位轉換,而且可以『添加』新事實以及新規則。於是從『作中學』Learning by doing ,我們可以了解,這跟用一般的程式語言寫作方式不同,這時『宣告的』一詞或許就有了『操作』 Operational 上的『意義』 ,它與『程序的』一詞的『對比』,也將更為『鮮明』。至於那個程式『中文化』的目的,大概只能始於『臆想』?用著『試誤法』作初步『嘗試』,閱讀 『pyDatalog』原始碼意圖『確認』。藉著對『派生三』 Python3 萬國碼的了解,做出的『待證明』假設吧!?看過《<a href="http://www.freesandal.org/?m=20150517">M♪o 之學習筆記本</a>》系列文本 TPG <a href="http://www.freesandal.org/?m=20150616">Toy Parser Generator</a> 的讀者,大概對此『中文表現』並不陌生,主要不過是希望程式能夠『易讀』,寫來比較精簡清楚罷了。

所以學會

《<a href="http://www.freesandal.org/?p=15025">如何閱讀□○??</a>》

<div class="wc-shortcodes-row wc-shortcodes-item wc-shortcodes-clearfix"><div class="wc-shortcodes-column wc-shortcodes-content wc-shortcodes-one-half wc-shortcodes-column-first ">

<a href="http://www.freesandal.org/wp-content/uploads/金文大篆智.png"><img class="alignnone size-full wp-image-15941" src="http://www.freesandal.org/wp-content/uploads/金文大篆智.png" alt="金文大篆智" width="62" height="72" /></a>
<a href="http://www.freesandal.org/wp-content/uploads/蛛網.jpg"><img class="alignnone size-full wp-image-15933" src="http://www.freesandal.org/wp-content/uploads/蛛網.jpg" alt="蛛網" width="2048" height="1267" /></a>

</div><div class="wc-shortcodes-column wc-shortcodes-content wc-shortcodes-one-half wc-shortcodes-column-last ">

<span style="color: #ff99cc;">其實『<strong>知識</strong>』如同『<strong>蛛網</strong>』,經由各種『<strong>學習渠道</strong>』與『<strong>自身經驗</strong>』,逐步建立起來。果真能像『<strong>蜘蛛</strong>』一樣,牽一髮而動全身的去『<strong>捕捉</strong>』,又何止是談『<strong>閱讀</strong>』一本書?智慧不只可以『<strong>閱讀</strong>』一個『<strong>時代</strong>』! 更能夠『<strong>閱讀</strong>』整個『<strong>自然</strong>』與『<strong>社會</strong>』的啊!!</span>

</div></div>

,往往是學習者在『反思學習』時,所應作的第一件事。

─── 摘自《<a href="http://www.freesandal.org/?p=36922">勇闖新世界︰ 《 pyDatalog 》 導引《二》</a>》

 

<span style="color: #666699;">因此『縱貫橫通』者之『閱讀』是『主動』的,也是『思辨』的,於是能夠將『舊工具』</span>
<h1 class="gh-header-title instapaper_title"><span style="color: #808080;"><a style="color: #808080;" href="https://github.com/notro/fbtft/wiki/Framebuffer-use">Framebuffer use</a></span></h1>
<h1><span style="color: #ff9900;">Framebuffer mirroring</span></h1>
<span style="color: #ff9900;">By mirroring <code>/dev/fb0</code> onto <code>/dev/fb1</code>, we can take advantage of the GPU for hardware accelrated video playback.</span>
<span style="color: #808080;">fbcp takes a snapshot of /dev/fb0, copies it to /dev/fb1 and waits 25ms before repeating.</span>
<span style="color: #808080;"> Snapshotting takes ~10ms and with a 25ms delay it gives roughly 1000/(10+25) = 28fps</span>
<span style="color: #808080;"> CPU usage: ~2%</span>
<span style="color: #808080;"> Note: Snapshot and /dev/fb1 driver refresh is not syncronized.</span>

<span style="color: #808080;">Install fbcp</span>
<pre lang="text"><code>sudo apt-get install cmake
git clone https://github.com/tasanakorn/rpi-fbcp
cd rpi-fbcp/
mkdir build
cd build/
cmake ..
make
sudo install fbcp /usr/local/bin/fbcp
</code></pre>
<span style="color: #808080;">Load drivers and fbcp</span>
<pre lang="text"><code>sudo modprobe fbtft dma
sudo modprobe fbtft_device name=tinylcd35 rotate=90 speed=48000000 fps=50

# Start fb copying process in the background
fbcp &
</code></pre>
<span style="color: #808080;">Play video on /dev/fb0, which will also show up on /dev/fb1</span>
<pre lang="text"><code>omxplayer test_480_320.mpg
</code></pre>
<span style="color: #808080;">Stop framebuffer copy</span>
<pre lang="text"><code>killall fbcp
</code></pre>
<span style="color: #808080;">syslog output</span>
<pre lang="text"><code>

*** Error message:
Unicode character 單 (U+55AE)
leading text: >>> pyDatalog.create_terms('X單
Unicode character 位 (U+4F4D)
leading text: >>> pyDatalog.create_terms('X單位
Unicode character 單 (U+55AE)
leading text: >>> pyDatalog.create_terms('X單位, Y單
Unicode character 位 (U+4F4D)
leading text: >>> pyDatalog.create_terms('X單位, Y單位
Unicode character 單 (U+55AE)
leading text: ...talog.create_terms('X單位, Y單位, Z單
Unicode character 位 (U+4F4D)
leading text: ...og.create_terms('X單位, Y單位, Z單位
Unicode character 數 (U+6578)
leading text: ...ate_terms('X單位, Y單位, Z單位, V數
Unicode character 值 (U+503C)
leading text: ..._terms('X單位, Y單位, Z單位, V數值
Unicode character 單 (U+55AE)
leading text: ...s('X單位, Y單位, Z單位, V數值, 單

tail /var/log/messages
Dec 15 17:38:07 raspberrypi fbcp[4836]: Primary display is 720 x 480
Dec 15 17:38:07 raspberrypi fbcp[4836]: Second display is 480 x 320 16bps

Links:
http://www.stuffaboutcode.com/2012/06/raspberry-pi-run-program-at-start-up.html

 

,轉化到『新系統』。不但知道『kodi』可以依樣畫葫蘆,想知道如何『自動化』哩︰

Add-on:Kodi Callbacks

Provides user definable actions for specific events within Kodi. Credit to Yesudeep Mangalapilly (gorakhargosh on github) and contributors for watchdog and pathtools modules.

 

如斯者,聽到有人說︰用 Python 寫個小程式,將觸控螢幕手勢事件模擬成鍵盤符碼

勇闖新世界︰ 《 Kernel 4.X 》之整裝蓄勢‧事件驅動‧一

勇闖新世界︰ 《 Kernel 4.X 》之整裝蓄勢‧設備管理及應用‧一

勇闖新世界︰ 《 Kernel 4.X 》之整裝蓄勢‧開場白

 

,不知是否會『即知即行』乎☆

 

 

 

 

 

 

 

 

 

樹莓派 0W 狂想曲︰ 不大聲以色《♪♪♪》

時有所變,境隨之遷,自然徑改路移。

回首來時路

Adafruit PiTFT 3.5″ Touch Screen for Raspberry Pi

Easy Install

The PiTFT requires kernel support and a couple other things to make it a nice stand-alone display. We have a detailed step-by-step setup for hackers who want to tweak, customize or understand the PiTFT setup. If you just want to get going, check out the following for easy-install instructions!

Ready to go image

f you want to start with a fresh image, we have two for Raspbian.  There’s the larger ‘classic Jessie’ image that will boot into X by default, and requires a 8G image, it has a lot more software installed. There’s also the smaller ‘Jessie Lite’ that will boot into the command line, and can be burned onto a 2G card! Click below to download and install into a new SD card. Unzip and follow the classic SD card burning tutorials

已經足夠新的呀!

pi@raspberrypi:~ cat /proc/version  Linux version 4.4.27-v7+ (root@vagrant-ubuntu-trusty-32) (gcc version 4.8.3 20140106 (prerelease) (crosstool-NG linaro-1.13.1-4.8-2014.01 - Linaro GCC 2013.11) ) #2 SMP Wed Oct 26 19:09:12 UTC 2016  pi@raspberrypi:~ cd /usr/share/X11/xorg.conf.d/
pi@raspberrypi:/usr/share/X11/xorg.conf.d ls 10-evdev.conf  10-quirks.conf  50-synaptics.conf pi@raspberrypi:/usr/share/X11/xorg.conf.d

 

奈何一升級 upgrade ,觸控螢幕無法用耶★

考之再三,長話短說,原來樹莓派 PIXEL 桌面環境,開始使用『libinput』

 

libinput

libinput is a library to handle input devices in Wayland compositors and to provide a generic X.Org input driver. It provides device detection, device handling, input device event processing and abstraction so minimize the amount of custom input code compositors need to provide the common set of functionality that users expect.

This wiki page provides only basic information, more documentation about libinput is available in the API documentation.

 

管理『輸入裝置』哩!

略為詳細介紹或可參考

libinput

From the libinput wiki page:

libinput is a library to handle input devices in Wayland compositors and to provide a generic X.Org input driver. It provides device detection, device handling, input device event processing and abstraction so minimize the amount of custom input code compositors need to provide the common set of functionality that users expect.

The X.Org input driver supports most regular Xorg#Input devices. Particularly notable is the project’s goal to provide advanced support for touch (multitouch and gesture) features of touchpads and touchscreens. See the project documentation for more information.

 

它的『優先權』 40-libinput.conf 壓過舊有『evdev』 10-evdev.conf ,將之移往 80-evdev.conf ,重奪主導權也︰

pi@raspberrypi:~ cat /proc/version  Linux version 4.4.27-v7+ (root@vagrant-ubuntu-trusty-32) (gcc version 4.8.3 20140106 (prerelease) (crosstool-NG linaro-1.13.1-4.8-2014.01 - Linaro GCC 2013.11) ) #2 SMP Wed Oct 26 19:09:12 UTC 2016  pi@raspberrypi:~ cd /usr/share/X11/xorg.conf.d/
pi@raspberrypi:/usr/share/X11/xorg.conf.d ls 10-quirks.conf  40-libinput.conf  70-synaptics.conf  80-evdev.conf pi@raspberrypi:/usr/share/X11/xorg.conf.d cd

pi@raspberrypi:~ libinput-list-devices  Device:           stmpe-ts Kernel:           /dev/input/event2 Group:            1 Seat:             seat0, default Capabilities:     touch  Tap-to-click:     n/a Tap-and-drag:     n/a Tap drag lock:    n/a Left-handed:      n/a Nat.scrolling:    n/a Middle emulation: n/a Calibration:      identity matrix Scroll methods:   none Click methods:    none Disable-w-typing: n/a Accel profiles:   n/a Rotation:         n/a   pi@raspberrypi:~ evtest 
No device specified, trying to scan all of /dev/input/event*
Not running as root, no devices may be available.
Available devices:
/dev/input/event0:	Logitech USB Receiver
/dev/input/event1:	Logitech USB Receiver
/dev/input/event2:	stmpe-ts
Select the device event number [0-2]: 2
Input driver version is 1.0.1
Input device ID: bus 0x18 vendor 0x0 product 0x0 version 0x0
Input device name: "stmpe-ts"
Supported events:
  Event type 0 (EV_SYN)
  Event type 1 (EV_KEY)
    Event code 330 (BTN_TOUCH)
  Event type 3 (EV_ABS)
    Event code 0 (ABS_X)
      Value   1098
      Min        0
      Max     4095
    Event code 1 (ABS_Y)
      Value   1295
      Min        0
      Max     4095
    Event code 24 (ABS_PRESSURE)
      Value      0
      Min        0
      Max      255
Properties:
Testing ... (interrupt to exit)
Event: time 1494840049.174094, type 3 (EV_ABS), code 0 (ABS_X), value 1523
Event: time 1494840049.174094, type 3 (EV_ABS), code 1 (ABS_Y), value 2971
Event: time 1494840049.174094, type 3 (EV_ABS), code 24 (ABS_PRESSURE), value 88
Event: time 1494840049.174094, type 1 (EV_KEY), code 330 (BTN_TOUCH), value 1
Event: time 1494840049.174094, -------------- EV_SYN ------------
Event: time 1494840049.180995, type 3 (EV_ABS), code 0 (ABS_X), value 1479
Event: time 1494840049.180995, type 3 (EV_ABS), code 1 (ABS_Y), value 2918
Event: time 1494840049.180995, type 3 (EV_ABS), code 24 (ABS_PRESSURE), value 75
Event: time 1494840049.180995, -------------- EV_SYN ------------
Event: time 1494840049.188005, type 3 (EV_ABS), code 0 (ABS_X), value 1548
Event: time 1494840049.188005, type 3 (EV_ABS), code 1 (ABS_Y), value 2849
Event: time 1494840049.188005, type 3 (EV_ABS), code 24 (ABS_PRESSURE), value 124
Event: time 1494840049.188005, -------------- EV_SYN ------------
Event: time 1494840049.194911, type 3 (EV_ABS), code 0 (ABS_X), value 1562
Event: time 1494840049.194911, type 3 (EV_ABS), code 1 (ABS_Y), value 2856
Event: time 1494840049.194911, type 3 (EV_ABS), code 24 (ABS_PRESSURE), value 114
Event: time 1494840049.194911, -------------- EV_SYN ------------
Event: time 1494840049.201876, type 3 (EV_ABS), code 0 (ABS_X), value 1568
Event: time 1494840049.201876, type 3 (EV_ABS), code 1 (ABS_Y), value 2846
Event: time 1494840049.201876, type 3 (EV_ABS), code 24 (ABS_PRESSURE), value 113
Event: time 1494840049.201876, -------------- EV_SYN ------------
Event: time 1494840049.208820, type 3 (EV_ABS), code 0 (ABS_X), value 1547
Event: time 1494840049.208820, type 3 (EV_ABS), code 1 (ABS_Y), value 2851
Event: time 1494840049.208820, type 3 (EV_ABS), code 24 (ABS_PRESSURE), value 99
Event: time 1494840049.208820, -------------- EV_SYN ------------
Event: time 1494840049.225197, type 3 (EV_ABS), code 0 (ABS_X), value 1470
Event: time 1494840049.225197, type 3 (EV_ABS), code 1 (ABS_Y), value 2904
Event: time 1494840049.225197, type 3 (EV_ABS), code 24 (ABS_PRESSURE), value 79
Event: time 1494840049.225197, -------------- EV_SYN ------------
Event: time 1494840049.307917, type 3 (EV_ABS), code 24 (ABS_PRESSURE), value 0
Event: time 1494840049.307917, type 1 (EV_KEY), code 330 (BTN_TOUCH), value 0
Event: time 1494840049.307917, -------------- EV_SYN ------------

 

 

若問為何不直接用『libinput』設定乎??蓋因它以『仿射矩陣』

只是通常各自有『原點』的『座標系』並不方便以『矩陣』來表達『時空』之『等距同構

Isometry

In mathematics, an isometry (or congruence, or congruent transformation) is a distance-preserving injective map between metric spaces.[1]

Introduction

Given a metric space (loosely, a set and a scheme for assigning distances between elements of the set), an isometry is a transformation which maps elements to the same or another metric space such that the distance between the image elements in the new metric space is equal to the distance between the elements in the original metric space. In a two-dimensional or three-dimensional Euclidean space, two geometric figures are congruent if they are related by an isometry;[3] the isometry that relates them is either a rigid motion (translation or rotation), or a composition of a rigid motion and a reflection.

Isometries are often used in constructions where one space is embedded in another space. For instance, the completion of a metric space M involves an isometry from M into M’, a quotient set of the space of Cauchy sequences on M. The original space M is thus isometrically isomorphic to a subspace of a complete metric space, and it is usually identified with this subspace. Other embedding constructions show that every metric space is isometrically isomorphic to a closed subset of some normed vector space and that every complete metric space is isometrically isomorphic to a closed subset of some Banach space.

An isometric surjective linear operator on a Hilbert space is called a unitary operator.

Academ_Reflections_with_parallel_axis_on_wallpaper.svg

A composition of two opposite isometries is a direct isometry. A reflection in a line is an opposite isometry, like R 1 or R 2 on the image. Translation T is a direct isometry: a rigid motion.[2]

的變換性質,因此借著

齊次坐標

數學裡,齊次坐標(homogeneous coordinates),或投影坐標(projective coordinates)是指一個用於投影幾何裡的坐標系統,如同用於歐氏幾何裡的笛卡兒坐標一般。該詞由奧古斯特·費迪南德·莫比烏斯於1827年在其著作《Der barycentrische Calcul》一書內引入[1][2]。齊次坐標可讓包括無窮遠點的點坐標以有限坐標表示。使用齊次坐標的公式通常會比用笛卡兒坐標表示更為簡單,且更為對稱 。齊次坐標有著廣泛的應用,包括電腦圖形及3D電腦視覺。使用齊次坐標可讓電腦進行仿射變換,並通常,其投影變換能簡單地使用矩陣來表示。

如一個點的齊次坐標乘上一個非零純量,則所得之坐標會表示同一個點。因為齊次坐標也用來表示無窮遠點,為此一擴展而需用來標示坐標之數值比投影空間之維度多一。例如,在齊次坐標裡,需要兩個值來表示在投影線上的一點,需要三個值來表示投影平面上的一點。

600px-RationalBezier2D.svg

有理貝茲曲線-定義於齊次坐標內的多項式曲線(藍色),以及於平面上的投影-有理曲線(紅色)

來統整論述也就自然而然的了??!!更別說由於雙眼之視覺現象還得走入『仿射變換』的哩!!??

2D_affine_transformation_matrix.svg

 

─── 摘自《光的世界︰派生科學計算六‧中

 

作變換也,正在查找閱讀啊☆

ubuntu wiki

Input Coordinate Transformation

Introduction

 

Recent X.org servers have incorporated a property for setting how input device events are translated to screen coordinates. This property can be used to ensure a touchscreen is not stretched across a multi-monitor setup or to rotate the touch screen input when you rotate the physical device.

 

 

 

 

 

 

 

 

樹莓派 0W 狂想曲︰ 不大聲以色《♪♪》

想當初玩《音樂播放器之 CD 轉成 mp3《三》下‧上》時,只剩下『穿衣服』的事?此說雖然有點荒唐!不過是軟硬體就算已 OK ,總是少了個『外殼』哩??故此不願提『焊接』矣!!不考慮

Make your very own open-source, Raspberry Pi linux-powered digital snappy camera with built in rechargeable battery! The SnapPiCam Raspberry Pi Digital Camera is a cool project showing what you can be done with a Raspberry Pi, PiTFT and acrylic enclosure. This is a fairly advanced project, for people who are very comfortable with soldering, assembly, Raspberry Pi hacking, etc!

The Laser-Cut sets can be bought from The LittleBox Company and the other major components are available from Adafruit.

Inside is the 5 megapixel Raspberry Pi camera, this can be either the standard version or the Noir Infrared-sensitive edition. Power comes from a rechargeable 1200mAh LiPo battery. The battery is recharged via a Mini-B USB cable plugged into the built-in LiPo charger. A 2.8″ TFT + Touchscreen at the back allows access to the camera’s GUI.

On the outside can be attached a variety of lenses including Fish-Eyes, Telephoto Lenses, Zoom lenses, and Macro Lenses. On the underside of the SnapPiCam is a standard 1/4-20 Nut for attachment to a Tripod.

Pre-Checks

This is a pretty intense project with many components required! Not all parts are available as a kit so be ready to source parts from many locations!

You’ll need the following before you can begin.

Parts

Raspberry Pi, camera, and power!

Storage and a way to get the data off:

SnapPiCam Laser-Cut Set containing the following:

  • 26 x Laser-Cut Parts
  • 4 x M3 Microbarb Brass Inserts
  • 2 x M2.5 Microbarb Brass Inserts
  • 15 x M2 Microbarb Brass Inserts

You’ll also need some hardware, available from mcmaster.com and others:

  • 4 x M3 45mm Screws
  • 2 x M2.5 8mm Nylon Screw
  • 4 x M2 12mm Screws
  • 4 x M2 8mm Screws
  • 7 x M2 4mm Screws
  • 1 x 1/4-20 Square Nut
  • 2 x M3 4mm Nylon Spacers
  • 1 x 3mm x 12mm x 15mm Stick Foam Pad

Some headers:

  • 2 x 0.1″ Right-Angle Pin Header
  • 2 x 0.1″ Female Connector
  • 2 x 0.1″ Single Pin Covers

Switches:

Optional (but strongly suggested!)

Extras

The SnapPiCam has been designed to use Mobile Phone Magnetic Lenses. The standard size for the magnetic ring which the lenses attach to has a ~13.5mm Outer Diameter (OD) and a ~9.5mm Inner Diameter (ID). There are hundreds of different lenses available, I favour the Fish-Eye Lenses myself.

Tools

Soldering Iron | Screw Drivers | Needle Files | Small Hammer | Hobby Knife | Mini Clamps | Acrylic Glue | Suitable Wire | Heat-Shrink

……

 

『八腳章魚』的作法,打算直接用『行動電源』

USB Battery Pack for Raspberry Pi – 10000mAh – 2 x 5V outputs

Description

A large-sized rechargeable battery pack for your Raspberry Pi (or Arduino, or Propeller, or anything else that uses 5V!). This pack is intended for providing a lot of power to an GPS, cell phone, tablet, etc but we found it does a really good job of powering other miniature computers and micro-controllers. If you want something a little smaller, we have a 4400mAh power pack with one USB port that can provide up to 1A We tested it with an iPad mini, iPad 1 & 3 and iPhone 5 & 5s so we know it will charge those models.

Inside is a massive 10,000mAh lithium ion battery, a charging circuit (you charge it via the USB cable attached), and two boost converters that provide 5VDC, 1A and 2A each via a USB A port. (The markings indicate one is good for 1A and one is good for 2A) The 2A output is best for charging tablets or other really power-hungry devices. But either can be used for when you want to power a Beagle Bone or Raspberry Pi, wifi adapters, maybe even small displays. We hooked it up to a 2.5″ NTSC display (powered from the Pi’s 5V breakout lines), wireless keyboard/mouse and a small WiFi dongle and it hummed along just fine as a mini computing setup!

The charging circuit will draw 1A from a 5V supply (plug a microUSB connector into the pack and then to a computer or wall adapter). You can charge and power something at the same time but the output switches to the USB input when charging so the output voltage may fluctuate. Its not good as a ‘UPS’ power supply for an embedded linux board, although microcontrollers like Arduino may not care about the voltage drop as much. Also, there’s ~80% efficiency loss on both ends so if you charge it at 1A and draw 1A at the same time, the battery pack will eventually go empty. However, if you’re powering something thats 500mA or less, you can keep it topped up no problem. Also, when you start and stop charging the pack, it will flicker the output, this can cause a ‘power sensitive’ device like the Pi or an iPhone to reset on the power supply. If using it with a low current load, say under 100mA, the pack may ‘fall asleep’ – you can use this circuit to keep the pack awake

How long it will last depends a bit on what you have connected. We ran a ‘headless’ pi (no keyboard, mouse, display attached) with a mini WiFi adapter plugged into the USB port and pinged it once a second to keep the network connection from going to sleep and it lasted 15 hours. There is a 4-step LED charge status display which you can turn on/off with the button. However, the button is not a general on/off for the entire pack! There’s no way to turn off the pack, as long as something is plugged in, it will power it. If you need a USB power switch, check out this item

Comes with the battery pack and a micro-B cable that you can use for charging the pack or powering a device with a micro B port.

 

以為簡便呦。何況 3.5″ adafruit PiTFT 早熟門熟路呀︰

勇闖新世界︰ 《 Kernel 4.X 》之整裝蓄勢 ‧PiTFT‧一

。怎知一試『竟然卻是不行』,考之於論壇只見

raspbery pi 3 PITFT PLUS

by rompelstilchen » Sat Mar 05, 2016 11:30 am
hello,
can anyone tell me if RPi 3 is compatible with this screen ?
https://www.adafruit.com/products/2441
thanks
by DirkS » Sat Mar 05, 2016 2:05 pm
Yes, it is. Nothing relevant for this screen has changed on the Pi3B

 

,該如何講『縱貫橫通』遇『時流變遷』耶?☆

 

 

 

 

 

 

 

 

樹莓派 0W 狂想曲︰ 不大聲以色《♪》

一個簡單的『媒體中心』,只需 Raspbian + kodi

Kodi wants to entertain you

Kodi spawned from the love of media. It is an entertainment hub that brings all your digital media together into a beautiful and user friendly package. It is 100% free and open source, very customisable and runs on a wide variety of devices. It is supported by a dedicated team of volunteers and a huge community.

Kodi Devices

Kodi (formerly known as XBMC) is an award-winning free and open source (GPL) software media player and entertainment hub that can be installed on Linux, OSX, Windows, iOS and Android, featuring a 10-foot user interface for use with televisions and remote controls.

It allows users to play and view most videos, music, podcasts, and other digital media files from local and network storage media and the internet. Our forums and Wiki are bursting with knowledge and help for the new user right up to the application developer.

We also have helpful Facebook, Google+, Twitter and Youtube pages so like, plus or tweet us: we’d love to hear from you.

 

就可以完成!還能用滑鼠、鍵盤、甚至手機來控制哩!如果想使用『IR 遙控器』,那麼得知道 LIRC 以及 編寫 kodi 設定檔 ── ※ 參考《M♪o 之學習筆記本《巳》文章︰【䷊】包荒馮河》── ,說不定還得 DIY 『IR 接收器』呢?假使嫌樹莓派的聲音不夠好,除了加裝『I2S 聲卡』之外,務須明白《樹莓派聲音︰ dtoverlay》??若是追求音響等級聲光效果,就得了解《樹莓派聲音︰ PWM》,曉得減少 jitter 的辦法,也許會發現『擴大機』與『好音箱』不可或缺也 !!……

這些還只是講著那個『播放器』,尚不及於『媒體』勒︰

作者認為

人類應當誠實面對歷史事實,要能真心認識自己,或許才知道人、事、物的『道路』,也許可避免 進□?退□? 』的『困境』。如果人生真的一個『終極』的『目的』或者說『意義』,那麼過程中的 一切一種『手段』與『追求』。為什麼這麼說呢?畢竟人生自古誰無死?一個航向死亡或是致力期間總是自己方可回答的問題,就像自己想要成為『什麼樣的人』一樣??

過去有人說︰假使『讀歷史』像『看電影』這該有多好?也許時至今日,已然不是不可能的了。然而這還是不能取代如何『解讀』歷史的問題?英國 Robin George Collingwood 過世之後,1946 年他的友人  T.  M.  Knox  將他的『歷史的哲學』之思想編輯成《歷史的理念》一書,這本書說︰

基於自然的『人性』,人的『同理心』和『同感心』是否能夠用著『想像力』的翅膀重回『歷史的現場』,再次在心中『重演』那些『歷史事件』,『體驗』事件中人物的『思想』以及『情感』,因此『解讀』歷史事件中的『人性抉擇』之理性必然性』。

作者從這點切入,是因為不論建立哪種媒體中心』,不管收集哪些媒體』,即使只是以休閒觀賞為目的,都離不開『人、事、物』的『閱讀』,如果以之』,將更能知彼知此 』和『知此知彼』,故特寫此一段『前言』。

大火焚毀亞歷山大圖書館 ── 那個藏書量達七十萬卷,只說『書目』就有一百二十卷的圖書館 ── ,如今竟然是到底長的『什麼模樣』都無人知曉?因為它連『一塊殘石』也沒法能留下來!這裡的書目就是書的索引,方便找書可以以少御多,但是本身畢竟不是書。東西方古代圖書管理的辦法大同小異 ── 分類的目錄依分類放置書籍兩個要素 ──,即使用之於媒體中心的管理也該是一樣的。據舊約聖經上講:

上帝說,要有光,就有了光,上帝說,從第一日到安息日日日說好,如是井然有序規劃宏偉,才能創生宇宙

正因如此,每一個作禮拜的祂都認識一覽靡遺。即使你總『找不到』祂,祂也『找得到』你。人們常常以為『分類學』是個簡單的事情,不就是『命個名』嗎?假使想一想『上帝所造的葉子 片片不同』,你將如何在一棵『成長中的大樹』找到『想要的那一片』呢?因為即使今天數量不大一目了然,天天積累有朝一日就什麼都很難再『找的着』了!於是人們『事先』規劃著︰

分類分類的分類分類的索引索引的分類、和
索引的索引,…

目的是方便『日後』的『查詢』與『搜尋』。即使有了分類和索引,這都還沒說到『一本書籍』卻不知該放到『哪個分類』的好?因為就其『內容』來看,可以放『』『』『』…的目錄裡!這在過去可頭大了,就算能有需要的如是多本書,只怕還需要更大的屋子了吧!當然在『電子檔案』的今天,又有『鏈接檔』可用,更別說還有 SQL 查詢語言用以搜尋,果真是『沒在怕』的阿!!誰知日久天長卻是記不清檔名』了,那就關鍵字』吧,哇塞!成千上萬筆耶!!所以古人說不要做事後諸葛亮』,所謂『明智』者以『事後之明』用於『臨事』。難道不是『事前知』才諸葛亮』的嗎?

才是多少年前,可以有一個『自己的圖書館』簡直無法想像,更不要說還是『多媒體』的!天下的總『日新月異』;人間的須『見怪不怪』,怎可沒見過駱駝』,就那『』『腫了背』的呢?何謂『』?又什麼是『』?或許只要『分辨』而不需要『論辯』,有用』的物其『目的』而言達成『所用』了。比方說『創新』一事也是如此,如果『朕知道了』的『復古風』是一種『文創』,那麼誰又知『文房四寶』是否一定『活不過來』的乎?假使知道『』字的本義是『毀壞貝殼』,使阿堵貝沒有了價值』,這樣『』的名言是否因此『退色 』,難不成就不是『罵人』的話了?那要是更知道根本『沒有這個她』,於是『嬛傳』就真的看不下去的嗎?

─── 摘自《媒體中心

 

說來『目的』和『手段』互相依存自然而然。時流裡『縱貫』科目之學習,此刻應用中需求『橫通』連接,焉能不『經緯縱橫』矣︰

派生碼訊

卯 兔

夬:揚于王庭,孚號,有厲,告自邑,不利即戎,利有攸往。

彖曰:夬,決也,剛決柔也。健而說,決而和,揚于王庭,柔乘五剛也。孚號有厲,其危乃光也。 告自邑,不利即戎,所尚乃窮也 。 利有攸往,剛長乃終也。

象曰:澤上于天,夬﹔君子以施祿及下,居德則忌。

甄選停課。一早學堂先生來了,說道︰今天『環中基地』來甄選,同學們不要患得患失,或留或離,都是理想,都要胸懷熱情去達成。就像 M♪o 雖然是環中基地所必選者,她日前告知想進大學堂 ,繼續研習,這讓我十分高興。當然前往環中基地,可以學習專精的技術,也是很好的選擇。希望同學們日後記得彼此共修的友誼,人生路上能夠多砥礪相扶持。

 

派︰現在時間尚早,就給大家說個《象  》象法,祝福同學們鵬程萬里︰

《白虎通德論》‧ 卷三‧《五行

五 行者,何謂也?謂金、木、水、火、土也。言行者,欲言為天行氣之義也。地之承天,猶妻之事夫,臣之事君也,謂其位卑。卑者親視事,故自周於一行,尊於天 也。《尚書》:「一曰水,二曰火 ,三曰木,四曰金,五曰土。」水位在北方,北方者,陰氣在黃泉之下,任養萬物;水之為言淮也,陰化沾濡任生木。木在東方。 東方者,陰陽氣始動,萬物始生。木之為言觸也,陽氣動躍,火在南方,南方者,陽在上,萬物垂枝。火之為言委隨也,言萬物布施;火之為言化也,陽氣用事,萬 物變化也。金在西方,西方者,陰始起,萬物禁止。金之為言禁也。土在中央者,主吐含萬物。土之為言吐也。何知東方生?《樂記》曰:「春生,夏長,秋收,冬 藏。 」土所以不名時,地,土別名也,比於五行最尊,故不自居部職也 。《元命苞》曰:「土之為位而道在,故大不預化,人主不任部職 。」

五 行之性或上或下何?火者,陽也,尊,故上;水者,陰也,卑,故下;木者,少陽;金者,少陰,有中和之性,故可曲可直,從革 ;土者最大,苞含物,將生者出者,將歸者,不嫌清濁為萬物。《尚書》曰:「水曰潤下,火曰炎上,木曰曲直,金曰從革,土爰稼穡。」五行所以二陽三陰何?土 尊,尊者配天,金木水火,陰陽自偶。

水 味所以鹹何?是其性也。所以北方鹹者,萬物鹹與,所以堅之也 ,猶五味得鹹乃堅也。木味所以酸何?東方,萬物之生也,酸者以達生也,猶五味得酸乃達也。火味所以苦何?南方主長養,苦者所以長養也,猶五味須苦可以養 也。金味所以辛何?西方煞傷成物,辛所以煞傷之也,猶五味得辛乃委煞也。土味所以甘何?中央者, 中和也,故甘,猶五味以甘為主也。《尚書》曰:「潤下作鹹,炎上作苦,曲直作酸,從革作辛,稼穡作甘。」北方其臭朽者何?,北方水,萬物所幽藏也,又水者 受垢濁,故臭腐朽也。東方者木也 ,萬物新出地中,故其臭膻。南方者火也,盛陽承動,故其臭焦。西方者金也,萬物成熟,始復諾,故其臭腥。中央土也,主養, 故其臭香也。《月令》曰:「東方其臭膻,南方其臭焦,中央其臭香 ,西方其臭腥,北方其臭朽。」所以名之為東方者,動方也,萬物始動生也。南方者,任養之方,萬物懷任也。西方者,遷方也,萬物遷落也。北方者,伏方也,萬 物伏藏也。

行 行的說法太古,傳聞可以追之於神 農 農氏之紀。雖然用著『木』、『火』、『土』、『金』、『水』的名目,只不過假借『可見』之『象』 象,來講那『不可睹』之天行『氣』 氣 。假使用著瞎子摸象的辦法,就會失了『體用』之 經緯 緯。若問『五行』從哪而來的?來自於『陰陽』。『陰陽』又從哪而來的?來自於『太極』。如此問下去,終將歸之於來自『大自然』的了。古人為求『厚生』天 下,『稼穡』的收成十分重要,這可是『靠天吃飯』,所以能由『四時』得出『生、長、收、藏』的道理。而後又用『陰陽五行』解說這個道理的原故,逐漸形成了 『抽象』系統 ,可以『經緯縱橫』的比擬『萬事萬物』的『體』『用』關係。要是理解『精當』,將之用於寫 碼 碼,有何不可的耶!

生 ︰決揚于王庭,夬牽羊悔亡,不該聞言不信,聰不明也。或猶豫

别蕭諮議》‧南北朝‧宗夬

别酒正参差,乖情將陸離。悵焉臨桂苑,憫默瞻華池。
輕雲流惠采,時雨亂清漪。眇眇追蘭逕,悠悠结芳枝。
眷言終何托,心寄方在斯。

,也終將定。

─── 摘自《M♪o 之學習筆記本《卯》基件︰【䷪】莧陸夬夬

 

知『體』『用』關係,或為『縱貫橫通』之門徑耶☆