大廈游覽圖,通過(guò)命令行來(lái)實(shí)現(xiàn) System.out.PRINTln("where 顯示當(dāng)前在什么地方") System.out.PRINTln("list 列出當(dāng)前位置的物品") System.out.PRINTln("list allspots 列出大廈內(nèi)所有地點(diǎn)") System.out.PRINTln("list spots 列出當(dāng)前位置附近的地點(diǎn)") System.out.PRINTln("list goods 列出當(dāng)前位置的物品") System.out.PRINTln("goto someplace 到另一個(gè)地點(diǎn)") System.out.PRINTln("look somegoods 查詢某個(gè)物品是否在當(dāng)前地點(diǎn)") System.out.PRINTln("help 命令行幫助") System.out.PRINTln("exit 退出命令行")
標(biāo)簽: PRINTln System out where
上傳時(shí)間: 2015-12-08
上傳用戶:Miyuki
輸出System.out.PRINTln(10) System.out.PRINTln(0 x10) System.out.PRINTln(5.123 f) ystem.out.PRINTln(5.123d) System.out.PRINTln(2E3)
標(biāo)簽: PRINTln System out 5.123
上傳時(shí)間: 2016-07-01
上傳用戶:大三三
System.out.print(s) System.out.PRINTln(t) System.out.print(u) System.out.PRINTln(v) System.out.print(a) System.out.print(b) System.out.print(c) System.out.PRINTln(d) x=0x5f20 y=0x5f35 z=0xffff System.out.print(x) System.out.print(y) System.out.PRINTln(z)
標(biāo)簽: System out PRINTln print
上傳時(shí)間: 2016-07-01
上傳用戶:日光微瀾
md5加解密 System.out.PRINTln("解密后的二進(jìn)串:" + byte2hex(clearByte)+"\n") System.out.PRINTln("解密后的字符串:" + (new String(clearByte))+"\n")
標(biāo)簽: PRINTln System clearByte out
上傳時(shí)間: 2016-07-13
上傳用戶:jkhjkh1982
System.out.PRINTln("The content of the variable is "+((Float)fvar).getClass().getName())
標(biāo)簽: getClass variable content getName
上傳時(shí)間: 2013-12-03
上傳用戶:jqy_china
System.out.PRINTln("The content of the variable is "+((Float)fvar).getClass().getName())
標(biāo)簽: getClass variable content getName
上傳時(shí)間: 2017-04-02
上傳用戶:ANRAN
System.out.PRINTln("The content of the variable is "+((Float)fvar).getClass().getName())
標(biāo)簽: getClass variable content getName
上傳時(shí)間: 2013-12-26
上傳用戶:稀世之寶039
System.out.PRINTln("The content of the variable is "+((Float)fvar).getClass().getName())
標(biāo)簽: getClass variable content getName
上傳時(shí)間: 2017-04-02
上傳用戶:haohaoxuexi
System.out.PRINTln("We are students")
標(biāo)簽: students PRINTln System out
上傳時(shí)間: 2014-11-26
上傳用戶:dbs012280
用途:測(cè)量地磁方向,測(cè)量物體靜止時(shí)候的方向,測(cè)量傳感器周圍磁力線的方向。注意,測(cè)量地磁時(shí)候容易受到周圍磁場(chǎng)影響,主芯片HMC5883 三軸磁阻傳感器特點(diǎn)(抄自網(wǎng)上): 1,數(shù)字量輸出:I2C 數(shù)字量輸出接口,設(shè)計(jì)使用非常方便。 2,尺寸小: 3x3x0.9mm LCC 封裝,適合大規(guī)模量產(chǎn)使用。 3,精度高:1-2 度,內(nèi)置12 位A/D,OFFSET, SET/RESET 電路,不會(huì)出現(xiàn)磁飽和現(xiàn)象,不會(huì)有累加誤差。 4,支持自動(dòng)校準(zhǔn)程序,簡(jiǎn)化使用步驟,終端產(chǎn)品使用非常方便。 5,內(nèi)置自測(cè)試電路,方便量產(chǎn)測(cè)試,無(wú)需增加額外昂貴的測(cè)試設(shè)備。 6,功耗低:供電電壓1.8V, 功耗睡眠模式-2.5uA 測(cè)量模式-0.6mA 連接方法: 只要連接VCC,GND,SDA,SDL 四條線。 Arduino GND -> HMC5883L GND Arduino 3.3V -> HMC5883L VCC Arduino A4 (SDA) -> HMC5883L SDA Arduino A5 (SCL) -> HMC5883L SCL (注意,接線是A4,A5,不是D4,D5) 源程序: #include <Wire.h> #include <HMC5883L.h> HMC5883Lcompass; voidsetup() { Serial.begin(9600); Wire.begin(); compass = HMC5883L(); compass.SetScale(1.3); compass.SetMeasurementMode(Measurement_Continuous); } voidloop() { MagnetometerRaw raw = compass.ReadRawAxis(); MagnetometerScaled scaled = compass.ReadScaledAxis(); float xHeading = atan2(scaled.YAxis, scaled.XAxis); float yHeading = atan2(scaled.ZAxis, scaled.XAxis); float zHeading = atan2(scaled.ZAxis, scaled.YAxis); if(xHeading < 0) xHeading += 2*PI; if(xHeading > 2*PI) xHeading -= 2*PI; if(yHeading < 0) yHeading += 2*PI; if(yHeading > 2*PI) yHeading -= 2*PI; if(zHeading < 0) zHeading += 2*PI; if(zHeading > 2*PI) zHeading -= 2*PI; float xDegrees = xHeading * 180/M_PI; float yDegrees = yHeading * 180/M_PI; float zDegrees = zHeading * 180/M_PI; Serial.print(xDegrees); Serial.print(","); Serial.print(yDegrees); Serial.print(","); Serial.print(zDegrees); Serial.PRINTln(";"); delay(100); }
標(biāo)簽: Arduino 5883L 5883 HMC
上傳時(shí)間: 2013-12-16
上傳用戶:stella2015
蟲(chóng)蟲(chóng)下載站版權(quán)所有 京ICP備2021023401號(hào)-1