結盧在人境,面無車馬喧。
問君何能爾,心遠地自偏。
採菊東籬下,悠然見南山。
山氣日夕佳,飛鳥相與還。
此中有真意,欲辨以忘言。
紅火南︰ 鑽木取火,木雖燼,火可傳;思接千載,思愈深,越益物。
派︰《思創》事物因何起?『傳記』長史一線牽,有心哉花花不發,無心插柳柳成蔭;心有靈犀一點通,窮經皓首難為功?若說到底︰真積力,久則入。人不能通,神來通!真情真事喜相逢!
英國知名的心理學家托尼‧博贊 Tony Buzan 於一九七零年代提出『心智圖』mind map 工具,以一個『主題』為中心,勾畫出心中想到的種種『關聯』『觀點』,用以『分析』、『理解』和『解決』問題。此『圖』繪看起來像『心臟』與『血管』的網絡關係,真的是用『心血』灌溉創造的『想法 』結晶。
『曼陀羅』藝術起源於佛教密宗,原本的目的與意義,雖然被日本金泉浩晃博士所『誤解 』,強加之以系統化的利用,卻成為用於 5W1H 很好的計劃工具。有些人將之用於記『筆記』和寫『備忘錄』,期望『記憶』能左右逢源,『靈感 』會泉湧不斷。
那什麼是『創造』呢?『發明』可有一個『藍圖』?有人說人類有一種能力叫做『創造力』,又說這是一種唯獨人類才有的『綜合本領』,然後講這也是『一流』與『三流』人才區分的『分水嶺』。作者不知這種『創造力』是什麼樣的『力』?所以無法判斷那個敘述是否有說沒說什麼?只是心想假使人們如果知道很多『□□』的歷史,知道□□是如何的『從無到有』,那麼人們難道不會與『發明』不期而遇,不能驚鴻一瞥『創造』的源泉嗎??
生︰何謂『脈衝寬度調變』 PWM Pulse-width modulation ?《 》網說︰
Fig. 1: a pulse wave, showing the definitions of , and D.
Fig. 2: A simple method to generate the PWM pulse train corresponding to a given signal is the intersective PWM: the signal (here the red sinewave) is compared with a sawtooth waveform (blue). When the latter is less than the former, the PWM signal (magenta) is in high state (1). Otherwise it is in the low state (0).
Pulse-width modulation uses a rectangular pulse wave whose pulse width is modulated resulting in the variation of the average value of the waveform. If we consider a pulse waveform , with period , low value , a high value and a duty cycle D (see figure 1), the average value of the waveform is given by:
As is a pulse wave, its value is for and for . The above expression then becomes:
This latter expression can be fairly simplified in many cases where as . From this, it is obvious that the average value of the signal () is directly dependent on the duty cycle D.
The simplest way to generate a PWM signal is the intersective method, which requires only a sawtooth or a triangle waveform (easily generated using a simple oscillator) and a comparator. When the value of the reference signal (the red sine wave in figure 2) is more than the modulation waveform (blue), the PWM signal (magenta) is in the high state, otherwise it is in the low state.
《 Adafruit’s Raspberry Pi Lesson 9. Controlling a DC Motor 》之文章。
To create a PWM instance:
p = GPIO.PWM(channel, frequency)
To start PWM:
p.start(dc) # where dc is the duty cycle (0.0 <= dc <= 100.0)
To change the frequency:
p.ChangeFrequency(freq) # where freq is the new frequency in Hz
To change the duty cycle:
p.ChangeDutyCycle(dc) # where 0.0 <= dc <= 100.0
To stop PWM:
p.stop()
Note that PWM will also stop if the instance variable ‘p’ goes out of scope.
☿ 行︰雖無有瑞士軍刀,何妨效法馬蓋仙,兩根母母線,一個『一千』導阻,玩個過癮︰☿☺!
pi@raspberrypi ~ $ sudo -s root@raspberrypi:/home/pi# 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. >>> import RPi.GPIO as GPIO >>> from time import sleep >>> GPIO.setmode(GPIO.BCM) >>> GPIO.setup(47, GPIO.OUT) __main__:1: RuntimeWarning: This channel is already in use, continuing anyway. Use GPIO.setwarnings(False) to disable warnings. >>> GPIO.setup(8, GPIO.OUT) >>> p = GPIO.PWM(8, 2) >>> p.start(50) >>> GPIO.setup(11, GPIO.IN) >>> while True: ... if GPIO.input(11) == 1: ... GPIO.output(47, GPIO.HIGH) ... else: ... GPIO.output(47, GPIO.LOW) ... sleep(0.01)
峰迴路可轉,取值之法需細思量。