?? convert.java
字號:
// Written by Kin Sun Ho. October 2005// This program is used to convert raw temperature samples into the unit of// degrees public class convert{ public static void main(String args[]) { int input = (new Integer(args[0])).intValue(); System.out.println(todegree(input)); return; } public static double todegree(int raw) { double a = 0.00130705; double b = 0.000214381; double c = 0.000000093; double k = 273.15; double adc_fs = 1023; double r1 = 10*1000; double r = r1*(adc_fs-raw)/raw; double rkelvin = a + b*Math.log(r) + c*(Math.log(r))*(Math.log(r))*(Math.log(r)); double kelvin = 1/rkelvin; return kelvin-k; }}
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -