Notice: Trying to access array offset on value of type bool in /home1/freesand/public_html/wp-content/plugins/wiki-embed/WikiEmbed.php on line 112

Notice: Trying to access array offset on value of type bool in /home1/freesand/public_html/wp-content/plugins/wiki-embed/WikiEmbed.php on line 112

Notice: Trying to access array offset on value of type bool in /home1/freesand/public_html/wp-content/plugins/wiki-embed/WikiEmbed.php on line 116
FreeSandal | 輕。鬆。學。部落客 | 第 237 頁

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

如今我們總算取得了『 GrovePi 』軟體架構

GROVEPI-SOFTWARE-ARCHITECTURE

 

的第一塊關鍵拼圖 ──

韌體

韌體firmware),是一種嵌入在硬體裝置中的軟體。通常它是位於特殊應用積體電路(ASIC)或可程式邏輯裝置(PLD)之中的快閃記憶體EEPROMPROM裡,有的可以讓使用者更新。可以應用在非常廣泛的電子產品中,從遙控器計算機電腦中的鍵盤硬碟,甚至工業機器人中都可見到它的身影。

顧名思義,韌體的所在是位於軟體和硬體之間的。像軟體一樣,他是一個被電腦所執行的程式。然而它是對於硬體內部而言更加貼近以及更加重要的部份,而對於外在的世界而言較無重要的意義。

……

History

Ascher Opler coined the term “firmware” in a 1967 Datamation article.[4] Originally, it meant the contents of a writable control store (a small specialized high speed memory), containing microcode that defined and implemented the computer’s instruction set, and that could be reloaded to specialize or modify the instructions that the central processing unit (CPU) could execute. As originally used, firmware contrasted with hardware (the CPU itself) and software (normal instructions executing on a CPU). It was not composed of CPU machine instructions, but of lower-level microcode involved in the implementation of machine instructions. It existed on the boundary between hardware and software; thus the name “firmware”. Over time, popular usage extended the word “firmware” to denote anything ROM-resident, including processor machine instructions for BIOS, bootstrap loaders, or specialized applications.

Until the mid-1990s, updating firmware typically involved replacing a storage medium containing firmware, usually a socketed ROM integrated circuit. Flash memory allows firmware to be updated without physically removing an integrated circuit from the system. An error during the update process may make the device non-functional, or “bricked“, which the system is vulnerable to when the parts of flash storage containing the core software or update program are erased and reprogrammed. If the update process is interrupted abruptly, this core software may not be operational to run the device and retry the update, which can be avoided by having a protected read-only section of the flash storage that holds the core software. The downside for the manufacturer is that this read-only software cannot be corrected in the field, so it must be tested to a very high degree before the release.

───

 

或許到了轉進『韌體』之核心『概念』

韌帶

韌帶拉丁語 Ligamenta,單數 Ligamentum)是可彎曲,纖維樣的彈性結締組織。

韌帶連接與骨,為明顯的纖維組織,或附於骨的表面或與關節囊的外層融合,以加強關節的穩固性,以免損傷,相對肌腱連接的是骨和肌肉;韌帶還是支持內臟,富有堅韌性的纖維帶,多為增厚的腹膜皺襞,使內臟固定於正常位置或限制其活動範圍;此外還有為某些胚胎器官的殘存遺蹟,如動脈導管韌帶。

韌帶來自於膠原。若韌帶超過其生理範圍地被彎曲(如扭傷),可以導致韌帶的延長或是斷裂。

生物學中,貝殼類動物連接兩片殼的組織也被稱為韌帶。

 

Knee_diagram.svg

Diagram of the right knee.

 

Joint.svg

Typical joint

───

 

的時候了。將如何展開生物『韌帶』之『活性』的探索?使之可以『更新』、『重塑』、『鍛鍊』、…… 的哩!未來的『聰明物件』之『建構』和『解構』原理,又有什麼『人造物』有可以效法之『藍圖』呢??或許師法『自然』,『仿生學』正在起步的吧!!

務須審慎省思

大樹底下好乘涼 ︰ 《歷史觀》

220px-TheHandmaidsTale(1stEd)
有名萬物之母

使女的故事》 The handmaid’s tale 是加拿大女性作家瑪格麗特‧愛特伍 Margaret Atwood 所寫的小說,受歐美文學界推崇不已的作品,已被列入重要經典作品中。

□︰數位的發展導致了一種疑慮,未來未必能『解碼』過去,那麼今天的存在,或許就成了『未知』的世紀??

○︰假使不必為『古人』擔憂!那又何必為『來者』遺憾?

即使將有『計算歷史學家』,或許也會遇到『可計算性問題』,可能不免『量子不確定性原理』,所謂的『當下』只在『前後』之『』的吧!!

每一台 PC 主機板上都有一個『BIOS 』 Basic Input Output System 掌管開機動作。這個『第一啟動』韌體一直隱藏在『保密合約』 NDA  non-disclosure agreement 幕後。曾經 Linux Bios 計畫努力於打開黑箱,直到今天稱之為 coreboot 。在那個應許的年代,已走入歷史的『 SUN Microsystems 』之『 Open Bios 』計畫裡的『 open firmware 』架構,就是『設備樹』的原點︰

IEEE Std 1275-1994
IEEE Standard for Boot (Initialization Configuration) Firmware: Core Requirements and Practices
……
3.2 Device tree
The device tree is a hierarchical data structure that describes the system hardware, describes user configuration choices, contains firmware device drivers for hardware devices, and contains support routines for use by those drivers.

The device tree’s structure mimics the organization of the system hardware, viewed as a hierarchy of interconnected buses and their attached devices. The device tree consists of a set of device nodes that are interconnected to form a tree. An individual device node
represents either a hardware bus, a hardware device, or a set of interrelated software procedures. ……

二零零八年起 Power.org^{TM} Standard for Embedded Power Architecture^{TM} Platform Requirements (ePAPR) 開始推廣 open firmware 架構︰
……
1.2 Relationship to IEEETM 1275

The ePAPR is loosely related to the IEEE 1275 Open Firmware standard—IEEE Standard for Boot (Initialization Configuration) Firmware: Core Requirements and Practices [2].
The original IEEE 1275 specification and its derivatives such as CHRP [10] and PAPR [16] address problems of general purpose computers, such as how a single version of an operating system can work on several different computers within the same family and the problem of loading an operating system from user-installed I/O devices. ……

───

 

之『理念』,經常『得』『失』祇在『一念間』!!??

 

 

 

 

 

 

 

 

 

 

 

 

 

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

來知德‧《周易集註》

䷀ 乾下乾上

乾,元亨利貞。

乾,卦名。元亨利貞者,文王所繫之辭,以斷一卦之吉凶,所謂彖辭也。乾者健也,陽主於動,動而有常,其動不息,非至健不能。奇者陽之數,天者陽之體,健者陽之性,如火性熱水性寒也。六畫皆奇,則純陽而至健矣,故不言天而言乾也。元大,亨通,利宜,貞正而固也。元亨者,天道之本然,數也。利貞者,人事之當然,理也。易經理數不相離,因乾道陽明純粹,無纖毫陰柔之私,惟天與聖人足以當之,所以斷其必大亨也。故數當大亨而必以貞處之,方與乾道相合。若其不貞,少有人欲之私,則人事之當然者廢,又安能元亨乎。故文王言,筮得此卦者大亨而宜於正固,此則聖人作易,開物成務,冒天下之道,教人以反身修省之切要也。學者能於此四字潛心焉,傳心之要不外是矣。此文王占卜所繫之辭,不可即指為四德。至孔子文言,純以義理論,方指為四德也。蓋占卜,不論天子,不論庶人,皆宜於貞,若即以為四德,失文王立教之意矣 。

……

九四,或躍在淵,无咎。

或者欲進未定之辭,非猶豫狐疑也。或躍在淵者,欲躍猶在淵也。九為陽,陽動故言躍。四為陰,陰虛故象淵。此爻變巽為進退,為不果。又四多懼,故或躍在淵。

九四以陽居陰,陽則志于進,陰則不果于進,居上之下,當改革之際,欲進未定之時也,故有或躍在淵之象。占者能隨時進退,斯无咎矣。

───

 

雖然

KuoE0-s-Dots/2013-11-24-arduino-error-about-robot-control-when-use-ino-to-compile.md

文本的說法︰

發現當使用 Ino 進行編譯時都會出現以下的編譯錯誤訊息:

……

其實不太確定是什麼問題,目前也沒使用到該函式庫,我猜 Ino 可能會莫名跑去編譯沒用到的函式庫,然後 Arduino 官方提供的 Robot_Control 這個函式庫可能也有問題。

一個暫時的解決方法是,直接把該函式庫刪除即可!

───

 

令人憂虞。若考之於其後之

Arduino Software Release Notes

ARDUINO 1.0.6 – 2014.09.16

……

[libraries]
* Robot_Control: removed duplicated SPI and Wire (Xun Yang)
* Robot_Control: fixed issue on motors being opposite (Xun Yang)
* Robot_Control: updated turning algorithm (Xun Yang)
* Esplora: added reading form Tinkerkit inputs
* SoftwareSerial: Fix idle level when initializing with inverted logic (Jens-Christian Skibakk)
* fixed a bunch of examples

───

 

當可不必太過慮的耶!!因此敢在知道『 Arduino IDE 』與『 ino 』及『 GrovePi/Firmware/ 』上『編譯』之『結果』比較並不『全同 』時,竟作此『決斷』,一躍而進乎??

# GrovePi 韌體預設的 I2C Slave 地址是 0x04
pi@raspberrypi ~ cd GrovePi-Test/  # 將 I2C Slave 地址改為 0x05 pi@raspberrypi ~/GrovePi-Test cd src/
pi@raspberrypi ~/GrovePi-Test/src nano grove_pi_v1_2_5.ino  pi@raspberrypi ~/GrovePi-Test/src cd ..

# 已刪除 Robot_Control 程式庫。編譯成功。
pi@raspberrypi ~/GrovePi-Test ino build Searching for Board description file (boards.txt) ... /usr/share/arduino/hardware/arduino/boards.txt Searching for Arduino lib version file (version.txt) ... /usr/share/arduino/lib/version.txt Detecting Arduino software version ...  1.0.5 (2:1.0.5+dfsg2-4) Searching for Arduino core library ... /usr/share/arduino/hardware/arduino/cores/arduino Searching for Arduino standard libraries ... /usr/share/arduino/libraries Searching for Arduino variants directory ... /usr/share/arduino/hardware/arduino/variants Searching for make ... /usr/share/arduino/hardware/tools/avr/bin/make Searching for avr-gcc ... /usr/share/arduino/hardware/tools/avr/bin/avr-gcc Searching for avr-g++ ... /usr/share/arduino/hardware/tools/avr/bin/avr-g++ Searching for avr-ar ... /usr/share/arduino/hardware/tools/avr/bin/avr-ar Searching for avr-objcopy ... /usr/share/arduino/hardware/tools/avr/bin/avr-objcopy src/grove_pi_v1_2_5.ino Searching for Arduino lib version file (version.txt) ... /usr/share/arduino/lib/version.txt Detecting Arduino software version ...  1.0.5 (2:1.0.5+dfsg2-4) Scanning dependencies of src Scanning dependencies of arduino Scanning dependencies of Wire src/DHT.cpp src/DS1307.cpp src/Grove_LED_Bar.cpp src/TimerOne.cpp src/ChainableLED.cpp src/TM1637.cpp src/Encoder.cpp src/IRSendRev.cpp src/MMA7660.cpp src/grove_pi_v1_2_5.cpp Wire/utility/twi.c Wire/Wire.cpp Linking libWire.a arduino/avr-libc/malloc.c arduino/avr-libc/realloc.c arduino/WInterrupts.c arduino/wiring_pulse.c arduino/wiring.c arduino/wiring_analog.c arduino/wiring_shift.c arduino/wiring_digital.c arduino/HardwareSerial.cpp arduino/HID.cpp arduino/WMath.cpp arduino/WString.cpp arduino/new.cpp arduino/Stream.cpp arduino/USBCore.cpp arduino/main.cpp arduino/Print.cpp arduino/Tone.cpp arduino/CDC.cpp arduino/IPAddress.cpp Linking libarduino.a Linking firmware.elf Converting to firmware.hex  # 依韌體上傳文件,燒錄。 pi@raspberrypi ~/GrovePi-Test avrdude -c gpio -p m328p -U flash:w:.build/uno/firmware.hex

avrdude: AVR device initialized and ready to accept instructions

Reading | ################################################## | 100% 0.00s

avrdude: Device signature = 0x1e950f
avrdude: NOTE: FLASH memory has been specified, an erase cycle will be performed
         To disable this feature, specify the -D option.
avrdude: erasing chip
avrdude: reading input file ".build/uno/firmware.hex"
avrdude: input file .build/uno/firmware.hex auto detected as Intel Hex
avrdude: writing flash (16122 bytes):

Writing | ################################################## | 100% 8.84s

avrdude: 16122 bytes of flash written
avrdude: verifying flash memory against .build/uno/firmware.hex:
avrdude: load data flash data from input file .build/uno/firmware.hex:
avrdude: input file .build/uno/firmware.hex auto detected as Intel Hex
avrdude: input file .build/uno/firmware.hex contains 16122 bytes
avrdude: reading on-chip flash data:

Reading | ################################################## | 100% 8.16s

avrdude: verifying ...
avrdude: 16122 bytes of flash verified

avrdude: safemode: Fuses OK

avrdude done.  Thank you.

pi@raspberrypi ~/GrovePi-Test cd   # 驗證韌體。 pi@raspberrypi ~ i2cdetect -y 1
     0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f
00:          03 -- 05 -- -- -- -- -- -- -- -- -- -- 
10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- 3e -- 
40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
60: -- -- 62 -- -- -- -- -- -- -- -- -- -- -- -- -- 
70: -- -- -- -- -- -- -- --                         
pi@raspberrypi ~ $ 

 

但恐來者以為作者『暴虎馮河』,特假借

《列子》‧說符篇

……

楊子之鄰人亡羊,既率其黨,又請楊子之豎追之。楊子曰:「嘻!亡一羊,何追者之衆?」鄰人曰:「多歧路。」既反,問:「獲羊乎?」曰:「亡之矣。」曰:「奚亡之?」曰:「歧路之中又有歧焉,吾不知所之,所以反也。」楊子戚然變容,不言者移時,不笑者竟日。門人怪之,請曰:「羊,賤畜;又非夫子之有,而損言笑者,何哉?」楊子不答。門人不獲所命。弟子孟孫陽出,以告心都子。心都子他日與孟孫陽偕入,而問曰:「昔有昆弟三人,游齊魯之間,同師而學,進仁義之道而歸。其父曰:『仁義之道若何?』伯曰:『仁義使我愛身而後名。』仲曰:『仁義使我殺身以成名。』叔曰:『仁義使我身名並全。』彼三術相反,而同出於儒。孰是孰非邪?」楊子曰:「人有濱河而居者,習於水,勇於泅,操舟鬻渡,利供百口。裹糧就學者成徒,而溺死者幾半。本學泅,不學溺,而利害如此。若以為孰是孰非?」心都子嘿然而出。孟孫陽讓之曰:「何吾子問之迂,夫子答之僻?吾惑愈甚。」心都子曰:「大道以多歧亡羊,學者以多方喪生。學非本不同,非本不一,而末異若是。唯歸同反一,為亡得喪。子長先生之門,習先生之道,而不達先生之況也,哀哉!」

───

 

之『歧路亡羊』作為分辨。

終究『除錯』!!『試誤』??正是『學習者』必經的『道路』。

 

 

 

 

 

 

 

 

 

 

 

 

 

 

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

當此『順』『逆』之時,有無什麼文字︰

220px-Spinning_Dancer
旋轉女舞者

220px-Left_spinning_dancer
順時針左轉

220px-Right_spinning_dancer
逆時針右轉

旋轉女舞者』 The Spinning Dancer 是一個網路上流行的動畫,據聞該動畫的設計者是『茅原伸幸』。如果有人問,我們能夠『分辨』一位女舞者是『順時針』或是『逆時針』旋轉的嗎?這應該是很容易的事情吧!但是假使我們將『空間』中的『立體運動』投影到『平面』上作觀察,你會看到『旋轉女舞者』突然改變『旋轉方向』的嗎?要是這就是人類『視覺』之『所見』,我們身處『柏拉圖』《理想國》之『寓言洞穴』裡,那麼我們的『科學』能不能『發現』這其實是個『幻影』 illusion。得出『真實的』空間確實是『立體的』結論,由於『人類的感官』覺察不到『大自然』的某個『面向』,所以我們才以為『發生』了方向『突變』的啊!!

在『一個宇宙』中,人們從其中取得的『整體知識』,是否會是『一致』的呢?它又為什麼一定『非得』是『一致』的呢?難道一個『不一致』的『大自然』是『不可能』的或是『不可想像』的嗎??從古往今來的『史實』觀之,人類的『思辮能力』的確是『出類拔萃』的了!比方說,西方中世紀的『經院哲學』爭論著『針尖上的天使』這麼個『哲學問題』 ── 因為上帝是『無所不能』,祂為了『傾聽』人類的『心聲』,於是乎『上帝』的『使者』,『天使』也就『無處不在』的了

所以即使『一根針』落下時,都一定會『碰到天使』,……,進而再『申論』了『天使』的『大與小』,那『小者』在『針尖』上能『』『成千上萬』個『小天使── 此『玄論功夫』果真是『匪夷所思』的吧!!

這樣說來『思辯玄論』彷彿『洪水猛獸』,不是早就該將之『滅絕根除』的嗎?然而從天下『事理』上講,存在『思辯玄論』對於人類的經常『不設防』之『大腦』是種『有益』的『抗體』。於是因著人類『理性』的『質疑精神』,他不得不『追問』『權威性』的『世間解釋』之『整體一致性』的『大哉問』和作『大哉辯』的吧!所以才在這個『論難過程』裡,激發了『認識深化』,有時還可能會發生『理性飛躍』現象,引發了『理論學說』的『變遷』的啊!其實『針尖上的天使』之『爭論』就是當時在 《觀測之『測天文』》一文中所言之『剃刀原理』由來的『歷史背景』︰

十 四世紀邏輯學家奥卡姆的威廉 William of Occam 提出一個『剃刀原理』︰除非有必要,別多添假設。在西方,這一理念促進了經驗科學一步步擺脫神學的束縛,快速的發展進步,並為後來之邏輯經驗主義所特別重視。導致了今天科學的『美學』之理念,假使有多個理論能說明相同的事實,那就選個最簡潔的吧!!

─── 摘自《【Sonic π】電聲學之電路學《四》之《 !!!! 》上

 

能夠帶來光明驅逐黑暗??使人

 

破繭

破繭

而出!!

若說『同一』程式,『 Arduino IDE 』可以編譯,但是『 ino 』不行 。若依『剃刀原理』;若考『本』『末』;那個不請自來的

『 Robot_Control 』

終將會成為關注之焦點。假使果真如此,該事必將見於論壇耶??就此『谷歌』一下,發現了

Topic: Robot_Control\ArduinoRobot.cpp errors (Read 18588 times)
 

文章,尚且不知答案是否就在其中哩!!

 

 

 

 

 

 

 

 

 

 

 

 

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

若說韌體用『 Arduino IDE 』編譯成功帶來了信心!以及最新版的

GrovePi/Firmware/Source/v1.2/grove_pi_v1_2_5/grove_pi_v1_2_5.ino

 

#include <Wire.h>
#include MMA7660.h
#include DS1307.h
#include DHT.h
#include Grove_LED_Bar.h
#include TM1637.h
#include ChainableLED.h
#include IRSendRev.h
#include Encoder.h
#include TimerOne.h

───

 

內容看似無誤,像無言的訴說什麼?於是尾隨契機,重回『 ino 』的田野調查︰

pi@raspberrypi ~/project cd pi@raspberrypi ~ mkdir beep
pi@raspberrypi ~ cd beep pi@raspberrypi ~/beep ino init -t blink
pi@raspberrypi ~/beep ls lib  src </pre>    <span style="color: #808000;">,發現一道新曙光。暗示『<a style="color: #808000;" href="https://github.com/DexterInd/GrovePi/tree/master/Firmware">該文本</a>』作者或許早已忘卻他之系統與讀者的不同。他有『 grovepi 』這個『樣板』,讀者沒有。當然也有可能『該作者』疏忽沒講那個『樣板』的製造方法。當此之際何妨仔細研究『 眨眼睛 』 內涵,『 blink 』結構一番︰ </span> <pre class="lang:sh decode:true">pi@raspberrypi ~ 
pi@raspberrypi ~ cd /usr/local/lib/python2.7/dist-packages/ino/templates/blink pi@raspberrypi /usr/local/lib/python2.7/dist-packages/ino/templates/blink ls
lib  manifest.ini  src
pi@raspberrypi /usr/local/lib/python2.7/dist-packages/ino/templates/blink </pre>    <span style="color: #808000;">也許可以『依樣畫葫蘆』,如實的</span> <h1 id="firstHeading" class="firstHeading" lang="zh-TW"><span style="font-size: 14pt; color: #808000;"><a style="color: #808000;" href="https://zh.wikipedia.org/zh-tw/%E8%87%A8%E6%91%B9">臨摹</a></span></h1> <span style="color: #808080;"><b>臨摹</b>是指<a class="mw-redirect" style="color: #808080;" title="書法" href="https://zh.wikipedia.org/wiki/%E6%9B%B8%E6%B3%95">書法</a>和<a class="mw-redirect" style="color: #808080;" title="繪畫" href="https://zh.wikipedia.org/wiki/%E7%B9%AA%E7%95%AB">繪畫</a>的仿製。臨,是按照原作去寫或畫;摹,是用紙或絹蒙在原作之上寫或畫。臨摹可以是仿製原作,也可以是仿照碑帖。利用紙和墨汁直接從碑帖複製並非臨摹,稱為<a class="mw-redirect" style="color: #808080;" title="拓印" href="https://zh.wikipedia.org/wiki/%E6%8B%93%E5%8D%B0">拓印</a>。</span>  <span style="color: #808080;">臨摹是學習書畫的方法,也可以是為了讓原作得以保存,用作展覽 、教育和傳播。但若果臨摹而假冒原作,則可視為<a style="color: #808080;" title="藝術贗品" href="https://zh.wikipedia.org/wiki/%E8%97%9D%E8%A1%93%E8%B4%97%E5%93%81">贗品</a>。</span>     <span style="color: #808000;">一下。再回頭看看結果如何的耶??</span> <pre class="lang:sh decode:true "># 依樣畫葫蘆 cd /usr/local/lib/python2.7/dist-packages/ino/templates/  # 創建 grovepi 樣板 sudo mkdir grovepi cd grovepi/  # 建立必要資訊檔 sudo cp ../blink/manifest.ini . sudo nano manifest.ini   more manifest.ini  description = Simple GrovePi Project  # 樣板 src 與 lib sudo mkdir src sudo mkdir lib  # 使用 GrovePi 最新版韌體 cd src sudo cp /home/pi/Desktop/GrovePi/Firmware/Source/v1.2/grove_pi_v1_2_5/* .  # 測試樣板  pi@raspberrypi ~ mkdir GrovePi-Test
pi@raspberrypi ~ cd GrovePi-Test/  # 樣板 OK pi@raspberrypi ~/GrovePi-Test ino init -t grovepi

# 編譯 FAIL
pi@raspberrypi ~/GrovePi-Test ino build Searching for Board description file (boards.txt) ... /usr/share/arduino/hardware/arduino/boards.txt Searching for Arduino lib version file (version.txt) ... /usr/share/arduino/lib/version.txt Detecting Arduino software version ...  1.0.5 (2:1.0.5+dfsg2-4) Searching for Arduino core library ... /usr/share/arduino/hardware/arduino/cores/arduino Searching for Arduino standard libraries ... /usr/share/arduino/libraries Searching for Arduino variants directory ... /usr/share/arduino/hardware/arduino/variants Searching for make ... /usr/share/arduino/hardware/tools/avr/bin/make Searching for avr-gcc ... /usr/share/arduino/hardware/tools/avr/bin/avr-gcc Searching for avr-g++ ... /usr/share/arduino/hardware/tools/avr/bin/avr-g++ Searching for avr-ar ... /usr/share/arduino/hardware/tools/avr/bin/avr-ar Searching for avr-objcopy ... /usr/share/arduino/hardware/tools/avr/bin/avr-objcopy src/grove_pi_v1_2_5.ino Searching for Arduino lib version file (version.txt) ... /usr/share/arduino/lib/version.txt Detecting Arduino software version ...  1.0.5 (2:1.0.5+dfsg2-4) Scanning dependencies of src Scanning dependencies of arduino Scanning dependencies of Robot_Control Scanning dependencies of SD src/DHT.cpp src/DS1307.cpp src/Grove_LED_Bar.cpp src/TimerOne.cpp src/ChainableLED.cpp src/TM1637.cpp src/Encoder.cpp src/IRSendRev.cpp src/MMA7660.cpp src/grove_pi_v1_2_5.cpp Robot_Control/glcdfont.c Robot_Control/utility/twi.c Robot_Control/lcd.cpp Robot_Control/Motors.cpp Robot_Control/Sensors.cpp /usr/share/arduino/libraries/Robot_Control/Sensors.cpp: In member function 'void RobotControl::analogWrite(uint8_t, uint8_t)': /usr/share/arduino/libraries/Robot_Control/Sensors.cpp:47:11: error: 'TKD4' was not declared in this scope   if(port==TKD4)            ^ /usr/share/arduino/libraries/Robot_Control/Sensors.cpp: In member function 'uint8_t RobotControl::_getTypeCode(uint8_t)': /usr/share/arduino/libraries/Robot_Control/Sensors.cpp:64:8: error: 'TKD0' was not declared in this scope    case TKD0:         ^ /usr/share/arduino/libraries/Robot_Control/Sensors.cpp:65:8: error: 'TKD1' was not declared in this scope    case TKD1:         ^ /usr/share/arduino/libraries/Robot_Control/Sensors.cpp:66:8: error: 'TKD2' was not declared in this scope    case TKD2:         ^ /usr/share/arduino/libraries/Robot_Control/Sensors.cpp:67:8: error: 'TKD3' was not declared in this scope    case TKD3:         ^ /usr/share/arduino/libraries/Robot_Control/Sensors.cpp:68:8: error: 'TKD4' was not declared in this scope    case TKD4:         ^ /usr/share/arduino/libraries/Robot_Control/Sensors.cpp:69:8: error: 'TKD5' was not declared in this scope    case TKD5:         ^ /usr/share/arduino/libraries/Robot_Control/Sensors.cpp: In member function 'uint8_t RobotControl::_topDPortToAPort(uint8_t)': /usr/share/arduino/libraries/Robot_Control/Sensors.cpp:104:8: error: 'TKD0' was not declared in this scope    case TKD0:         ^ /usr/share/arduino/libraries/Robot_Control/Sensors.cpp:106:8: error: 'TKD1' was not declared in this scope    case TKD1:         ^ /usr/share/arduino/libraries/Robot_Control/Sensors.cpp:108:8: error: 'TKD2' was not declared in this scope    case TKD2:         ^ /usr/share/arduino/libraries/Robot_Control/Sensors.cpp:110:8: error: 'TKD3' was not declared in this scope    case TKD3:         ^ /usr/share/arduino/libraries/Robot_Control/Sensors.cpp:112:8: error: 'TKD4' was not declared in this scope    case TKD4:         ^ /usr/share/arduino/libraries/Robot_Control/Sensors.cpp:114:8: error: 'TKD5' was not declared in this scope    case TKD5:         ^ /usr/share/arduino/libraries/Robot_Control/Sensors.cpp:115:12: error: 'A11' was not declared in this scope      return A11;             ^ /usr/share/arduino/libraries/Robot_Control/Sensors.cpp: In member function 'int RobotControl::knobRead()': /usr/share/arduino/libraries/Robot_Control/Sensors.cpp:236:22: error: 'POT' was not declared in this scope   return ::analogRead(POT);                       ^ .build/uno/Makefile:50: recipe for target '.build/uno/Robot_Control/Sensors.o' failed make: *** [.build/uno/Robot_Control/Sensors.o] Error 1 Make failed with code 2 pi@raspberrypi ~/GrovePi-Test 

 

。果真俗話說的好,人生不如意事,十常八九的乎!!

 

 

 

 

 

 

 

 

 

 

 

 

 

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

1280px-Nighthawks_by_Edward_Hopper_1942

愛德華‧霍普  夜遊者

 

一時心裡想著 Mrphs 曾經講過的話︰

W!o+ 小時候,許多快樂時光都在『除錯』中度過。他認為即使說『科南‧道爾』當『偵探』,未必然能是個『好偵探』。雖然大家以為他既能創造『大偵探』福爾摩斯,又怎會自己不是的呢?因為一個作者早知道『結局』,掌握所有『線索』,過程常常不過是『故布疑陣』,迷惑讀者而已。這可與『真偵探』的遭遇大不相同 ,未能『先知』,就不能『神奇』!文章固然膾炙人口,要談深得三昧卻未必然的吧!!所以『寫程式』、『讀程式』、『測程式』 ……者 ,『錯誤』無論來自『何方』『何時』…… 都是良師益友,都要認真對待。此『不速之客』的『偶然』『錯誤』,往往恰恰是『利涉大川』者之『必然』『所需』。

【※作者註】

需:有孚,光亨,貞吉。 利涉大川。

彖曰:需,須也﹔險在前也。 剛健而不陷,其義不困窮矣。 需有孚,光亨,貞吉。 位乎天位,以正中也。 利涉大川,往有功也。

象曰:云上於天,需﹔君子以飲食宴樂。

初九:需于郊。 利用恆,無咎。
象曰:需于郊,不犯難行也。 利用恆,無咎﹔未失常也。

九二:需于沙。 小有言,終吉。
象曰:需于沙,衍在中也。 雖小有言,以終吉也。

九三:需于泥,致寇至。
象曰:需于泥,災在外也。 自我致寇,敬慎不敗也。

六四:需于血,出自穴。
象曰:需于血,順以聽也。

九五:需于酒食,貞吉。
象曰:酒食貞吉,以中正也。

上六:入于穴,有不速之客三人來,敬之終吉。
象曰:不速之客來,敬之終吉。 雖不當位,未大失也。

 

好一番議論,讓人無所遁逃也!否則叫人『觀水

論水

論語 ‧雍也第六

子曰:知者樂水仁者樂山;知者動,仁者靜;知者樂,仁者壽。

老子道德经第八章

上善若水,水善利萬物而不爭,處為人之所惡,故幾於道。居善地 ,心善淵,與善仁,言善信,正善治,事善能,動善時。夫唯不爭 ,故無尤。

荀子‧王制

君者,舟也;庶人者,水也;水則载舟水則覆舟

漢朝 韓嬰韓詩外傳‧卷三

問者曰:「夫智者何以樂於水也?:「夫水者,緣理而行,不遺小間,似有智者;動而下之,似有禮者;蹈深不疑,似有勇者;障防而清,似知命者;歷險致遠,卒成不毀,似有德者。天地以成,群物以生,國家以寧,萬事以平,品物以正。此智者所以樂於水也。」《》曰:「思樂泮水薄采其茆魯侯戾止在泮飲酒。」樂水之謂也。

問者曰:「夫仁者何以樂於山也?:「夫山者、萬民之所瞻仰也 。草木生焉,萬物植焉,飛鳥集焉,走獸休焉,四方益取與焉,出雲道風,嵷乎天地之間。天地以成,國家以寧。此仁者所以樂於山也。」《》曰:「太山巖巖魯邦所瞻。」樂山之謂也。

 

,怎好自己『縮水』的耶!!只不過一時

‧ 丈二金剛 ── 摸不著頭腦?

誰曉得它,『 GrovePi/Firmware/

‧ 葫蘆里賣藥 ── 不知底細??

欲語還休,暫且『歇後』想想,再說不遲!!

俗話說死馬且當活馬醫。何不先試試

Using the Arduino IDE with the Gertboard

If you are familiar with the Arduno IDE on any other platform, then there should not be any surprises using it on the Raspberry Pi with the Gertboard.

There is one notable thing you need to do to make it work though, and that is to select the correct programmer and device before you upload a sketch to the ATmega.

To do this, launch the Arduino IDE and select:

Tools -> Board

and select either the Gertboard with ATmega328, or the Gertboard with ATmega168 options.

Next select:

Tools -> Programmer

and select the Raspberry Pi GPIO option. You should be ready to go after that.

Load up the

Examples -> Basics -> Blink

sketch and upload it to the ATmega. To actually see it doing something, you’ll need to connect a jumper wire from pin 13 on the ATmega (That’s PB5 on the Gertboard) to one of the buffered drivers set to output mode.

───

 

,看它到底行是不行??

 

GrovePi_Firmware

 

結果竟然除去一點『拼寫錯誤』之處??

GrovePi/Firmware/Source/v1.2/grove_pi_v1_2_1/grove_pi_v1_2_1.ino

的 #include “Grove_LED_bar.h” 應改為

#include “Grove_LED_Bar.h” 之外,

全都正常而且能夠『編譯成功』!!

 

 

 

 

 

 

 

 

 

 

 

 

輕。鬆。學。部落客