W!o+ 的《小伶鼬工坊演義》︰ 一窺全豹之系統設計‧探索‧甲

甲骨文甲

金文甲

甲骨文乙

《說文解字》:甲,東方之孟,陽气萌動,从木戴孚甲之象。一曰人頭宐【宜】為甲,甲象人頭。凡甲之屬皆从甲。金文甲,古文甲,始於十,見於千,成於木之象。

《說文解字》:乙,象春艸木冤曲而出,陰气尚彊,其出乙乙也。與丨同意。乙承甲,象人頸。凡乙之屬皆从乙。

─── 見於《《派生》 Python 作坊【乙】選址定基

莊子‧《天地》篇中︰

子貢南遊於楚,反於晉,過漢陰,見一丈人方將為圃畦,鑿隧而入井,抱甕而出灌,搰搰然用力甚多而見功寡。

子貢曰:「有械於此,一日浸百畦,用力甚寡而見功多,夫子不欲乎?」

為圃者卬而視之曰:「柰何?」曰:「鑿木為機,後重前輕,挈手若抽,數如泆湯,其名為槔。」

為圃者忿然作色而笑曰:「吾聞之吾師,機械者必有機事,有機事者必有機心。機心存於胸中,則純白不備;純白不備,則神生不定;神生不定者,道之所不載也。吾非不知,羞而不為也。

子貢瞞然慚,俯而不對。有閒,為圃者曰:「子奚為者邪?」

曰:「孔丘之徒也。」

為圃者曰:「子非夫博學以擬聖,於于以蓋眾,獨弦哀歌以賣名聲於天下者乎?汝方將忘汝神氣,墮汝形骸,而庶幾乎!而身之不能治,而何暇治天下乎!子往矣,無乏吾事!」

子貢卑陬失色,頊頊然不自得,行三十里而後愈。

……

,談及『機械』、『機事』、『機心』;終歸之於『神』,但求其『定』,為何也?但思『取捨』一事依賴『價值』,『價值』一事存於『信念』,與其『一改再改』?莫若『定』耶!!況且《大學 》裡有言︰『定』、『靜』、『安』、『慮』、『得』的也。因此假使『人』不法以『地』的『定』與『靜』,又怎麼能免於『安』和『慮』之『無常』呢?當真可『得』之『於天』的嘛??

如果『天』『失時』且『地』『失候』,所謂

龍抬頭

龍頭節,又稱「龍抬頭」或「春龍節」,節日日期為陰曆二月初二,是中國的傳統節日之一。根據民間傳說,此為主管雲雨的龍王抬頭之日,也意謂著在此之後水會漸多。也有人認為「龍抬頭」指的是百蟲開始於初春甦醒:如俗話說「二月二,龍抬頭,蠍子、蜈蚣都露頭。」

相關傳說

二月初二,龍抬頭,相傳二月初二是軒轅黃帝出生的日子。夏曆二月初二,傳說天上掌管降雨之神龍王抬頭。意味今後雨水就會多了起來,有利於耕種。一種說法是龍王因思念失去的女兒,因此總是在農曆二月初二這天從海底抬頭出來,望著失去女兒的方向,以寄思念。

,又該是『何月』與『何日』的哩!!

此所以列之於茲,實乃因□○『所好』

吉多·范羅蘇姆 Guido van Rossum 先生喜歡看『蒙提·派森的飛行馬戲團』── Monty Python’s Flying Circus,所以把他創始的程式語言叫做 『 Python 』 。Python 巨蟒,《爾雅·釋魚》蟒,王蛇。又《註》蟒,蛇最大者,故曰王蛇。正是『小王子』一書上所說的︰

吞了象,看起來像帽子的那個。

吉多的 Python 『非同』於其他程式語言,居然把『空白』符號寫進了它的『文法』裡,竟然用『對齊的空白』表示程式區塊。如是種種『見地』,匯聚成一條稱作『非同的』pythonic  Way 大道。吉多他的『中心思想』,集中的表現在由 Tim Peters 先生所寫的『 Python 的禪』,收錄在『 this模組 module 裡︰

import this

The Zen of Python, by Tim Peters

Beautiful is better than ugly.
美比醜好

Explicit is better than implicit.
明白比晦暗好

Simple is better than complex.
簡單比複雜好

Complex is better than complicated.
複雜比複雜化好

……

─── 見於《『騛罿』── 非同的禪!!

,無關『思辯』尚且不宜作『思辨』之故。於是祇談『實事求是』之『事』,卻也不能不說及『批判論』

Criticism

Criticism is the practice of judging the merits and faults of something.

Criticism as an evaluative or corrective exercise can occur in any area of human life. Criticism can therefore take many different forms (see below). How exactly people go about criticizing, can vary a great deal. In specific areas of human endeavour, the form of criticism can be highly specialized and technical; it often requires professional knowledge to understand the criticism. This article provides only general information about criticism. For subject-specific information, see the Varieties of criticism page.

To criticize does not necessarily imply “to find fault”, but the word is often taken to mean the simple expression of an objection against prejudice, or a disapproval of something. Often criticism involves active disagreement, but it may only mean “taking sides”. It could just be an exploration of the different sides of an issue. Fighting is not necessarily involved.

Criticism is often presented as something unpleasant, but it need not be. It could be friendly criticism, amicably discussed, and some people find great pleasure in criticism (“keeping people sharp”, “providing the critical edge”). The Pulitzer Prize for Criticism has been presented since 1970 to a newspaper writer who has demonstrated ‘distinguished criticism’.

Normally criticism involves a dialogue of some kind, direct or indirect, and in that sense criticism is an intrinsically social activity. Even if one is only criticizing a book or an idea in private, it is usually assumed there is someone who will be made aware of the criticism being expressed at some point, although who exactly will hear it, may also remain unknown. One is still engaging with the ideas of others, even if only indirectly. One can of course also keep a criticism to oneself, rather than express or communicate it, but in general the intention is, that someone else ought to be aware of it, however that may occur. Self-criticism, even if wholly private, still mentally takes the concerns of others into account.

Another meaning of criticism is the study, evaluation, and interpretation of literature, artwork, film, and social trends (see the article links below). The goal of this type of criticism is to understand the possible meanings of cultural phenomena, and the context in which they take shape. In so doing, the attempt is often made to evaluate how cultural productions relate to other cultural productions, and what their place is within a particular genre, or a particular cultural tradition.

……

之『★★』的『論難』也。所以這裡僅先列出『修改』、『測試』之事,再做『討論』耶??!!

pi@raspberrypi ~/example python Python 2.7.9 (default, Mar  8 2015, 00:52:26)  [GCC 4.9.2] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> import grovepi >>> addr = 0x05  # 不觸動韌體『 receiveData 』, Wire 傳回 0  >>> grovepi.read_i2c_byte(addr) 0 # 觸動韌體『 receiveData 』, SMBus 讀回 32 byte 。注意第二 Byte 亦為 0 。這或許是 GrovePi 的回傳緩衝器 buffer 始於一之故。 由於會改變 index ,恐有『越界』之虞。 >>> grovepi.read_i2c_block(addr) [11, 0, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255] # Grove - Rotary Angle Sensor 測試 >>> potentiometer = 0 >>> sensor_value = grovepi.analogRead(potentiometer) 0 [11, 2, 190, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255] >>> sensor_value 702 # 注意。注意。這造成 cmd[5] array 指標『越界』。 >>> grovepi.read_i2c_block(addr) [11, 0, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255] # 無須設定 Grove - Rotary Angle Sensor 為『輸入』? >>> grovepi.pinMode(potentiometer,"INPUT") 1 # Ultrasonic sensor 接於『二』測試。已將//attachInterrupt(0,readPulseDust,CHANGE); 『刪除』。 請注意多次讀取值。 >>> ultrasonic_ranger = 2 >>> grovepi.ultrasonicRead(ultrasonic_ranger) 0 [11, 1, 196, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255]  452 # Relay 接於『八』測試 >>> relay = 8 # 一定要宣告 pinMode 為『輸出』 >>> grovepi.pinMode(relay,"OUTPUT") 1 # relay 開 >>> grovepi.digitalWrite(relay,1) 1 # relay 關 >>> grovepi.digitalWrite(relay,0) 1 # 與 relay 沒有交互影響。注意讀取值與之前不同 >>> grovepi.ultrasonicRead(ultrasonic_ranger) 0 [11, 0, 199, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255] 199 # 注意指標『越界』 >>> grovepi.read_i2c_block(addr) [11, 0, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255] # 注意指標『變化』 >>> grovepi.digitalWrite(relay,1) 1 # 穩定性測試 >>> grovepi.analogRead(potentiometer) 0 [11, 2, 190, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255]  702 >>>  </pre>   <pre class="lang:default decode:true">pi@raspberrypi ~ stty -F /dev/ttyUSB0 115200
pi@raspberrypi ~ $ cat /dev/ttyUSB0
CMD = 1, index =  1

CMD = 3, index =  4

CMD = 3, index =  5

# 越界
CMD = 3, index =  6

CMD = 5, index =  4

CMD = 7, index =  4

CMD = 7, index =  5

CMD = 5, index =  4

CMD = 2, index =  4

CMD = 2, index =  4

CMD = 7, index =  4

CMD = 7, index =  5

# 越界
CMD = 7, index =  6

CMD = 2, index =  4

CMD = 3, index =  4

CMD = 3, index =  5

 

void setup()
{
# 設定最高速之 115200 buad
    Serial.begin(115200);         // start serial for output
    Wire.begin(SLAVE_ADDRESS);

    Wire.onReceive(receiveData);
    Wire.onRequest(sendData);

# 二、八問題的主因
        //attachInterrupt(0,readPulseDust,CHANGE);
}

void receiveData(int byteCount)
{
    while(Wire.available())
    {
      if(Wire.available()==4)
      {
        flag=0;
        index=0;
                run_once=1;
      }
        cmd[index++] = Wire.read();
    }
# 序列埠『監督』輸出
    Serial.print("CMD = ");
    Serial.print(cmd[0]);
    Serial.print(", ");
    Serial.print("index =  ");
    Serial.println(index);
}


void readPulseDust()
{
  t = millis();
# 用『二』當作『插斷』 INT0 輸入
  l_status = digitalRead(2);  // Represents if the line is low or high.
  if(l_status)
  {
# 不知為何固定用『八』?
         digitalWrite(8,0);
    // If the line is high (1), the pulse just ended
    pulse_end = t;
  }
  else
  {   // If the line is low (0), the pulse just started
    pulse_start = t;
# 二、八現象之來源
        digitalWrite(8,1);
  }

  if(pulse_end > pulse_start)
  {
    duration = pulse_end - pulse_start;
    lowpulseoccupancy = lowpulseoccupancy+duration;   // Add to the pulse length.
    pulse_end = 0;    // If you don't reset this, you'll keep adding the pulse length over and over.
  }
}