prolog 找路例子程序:
=== === === === === ===
Part 1-Adding connections
Part 2-Simple Path
example
| ?- path1(a,b,P,T).
will produce the response:
T = 15
P = [a,b] ?
Part 3 - Non-repeating path
As an example, the query:
?- path2(a,h,P,T).
will succeed and may produce the bindings:
P = [a,depot,b,d,e,f,h]
T = 155
Part 4 - Generating a path below a cost threshold
As an example, the query:
?- path_below_cost(a,[a,b,c,d,e,f,g,h],RS,300).
returns:
RS = [a,b,depot,c,d,e,g,f,h] ?
RS = [a,c,depot,b,d,e,g,f,h] ?
no
==================================
標簽:
Part
connections
example
prolog
上傳時間:
2015-04-24
上傳用戶:ljt101007
基于TLC2543AD轉換芯片的探測儀程序
描述:TLC2543AD芯片為串行12位AD轉換芯片,10us的轉換時間,11路
模擬輸入通道,全串行操作
程序功能:將TLC2543芯片轉換得到的數據有條件的發送到PC機
附加功能:將采樣結果送出到數碼管上顯示
操作說明:該程序根據N(需要采樣的通道數)的值來進行通道采樣
從0通道開始,最大為10,不能超過10,否則出錯,采集到的數據
保存到以DBUF定義的起始地址單元中,數據位數為12位.發送
按鍵每按一次,在向串口發送當前顯示通道數據的同時,顯示將
更新到下一通道數據,直到定義的通道數據全部發送完畢后,顯
示數據將回到0通道.
ETK6201 的程序是很值得參考的,ETK6201單芯片數碼管按鍵掃描芯片,比起MAX7219封裝更小,穩定度更高,接口簡單。希望大家喜歡
標簽:
2543
TLC
AD
串行
上傳時間:
2016-10-25
上傳用戶:fanboynet