最好的电子音响科技diy制作网站

haoDIY_音响电子电脑科技DIY小制作发明

如何创造的真理:真理的立方体(2)

时间:2017-05-19 14:00来源:未知 作者:admin 点击:
thisreading numreadings;thisreading ++){ 读数[ thisreading ] = 0; } / * * / 如果初始化传感器! BMP。begin()) { /有个问题检测 请检查连接* / 串口打印(抱歉,没有BMP085检测 检查你的接线或I2C地址!)
thisreading < numreadings;thisreading ++){ 读数[ thisreading ] = 0; } / * * / 如果初始化传感器!BMP。begin()) { /有个问题检测…请检查连接* / 串口打印(“抱歉,没有BMP085检测…检查你的接线或I2C地址!”); while(1); }</p><p> //Displaying lcd.begin(16, 2); //initalising size of display (16 collumns, 2 rows) lcd.setCursor(0,0); //set cursor to first row and first collumn lcd.print("Temp:"); lcd.setCursor(0,1); lcd.print("Pres:");</p><p>}</p><p>/**************************************************************************/ /* Arduino loop function, called once 'setup' is complete (your own code should go here) */ /**************************************************************************/ void loop(void) { /* Get a new sensor event */ sensors_event_t event; bmp.getEvent(&event); /* Display the results (barometric pressure is measure in hPa) */ if (event.pressure) { /* Display atmospheric pressue in hPa */ Serial.print("Pressure: "); Serial.print(event.pressure); Serial.println(" hPa"); /* Calculating altitude with reasonable accuracy requires pressure * * sea level pressure for your position at the moment the data is * * conver泰德,以及环境温度在摄氏度 * *。如果你没有这些价值观,一个“通用”的价值 * * 1013.25 hPa可用(定义为sensors_pressure_sealevelhpa * *传感器。H),但这并不是理想的,从一天到另一天给 变* *结果。* * * * 通常可以通过看天气 *网站或从环境信息中心附近的任何大* 机场找到当前气压值。* * * * For example, for Paris, France you can check the current mean * * pressure and sea level at: <a href="http://bit.ly/16Au8ol" rel="nofollow"> http://bit.ly/16Au8ol </a> */ /* First we get the current temperature from the BMP085 */ float temperature; bmp.getTemperature(&temperature); Serial.print("Temperature: "); Serial.print(temperature); Serial.println(" C");</p><p> /* Then convert the atmospheric pressure, and SLP to altitude */ /* Update this next line with the current SLP for better results */ float seaLevelPressure = SENSORS_PRESSURE_SEALEVELHPA; Serial.print("Altitude: "); Serial.print(bmp.pressureToAltitude(seaLevelPressure, event.pressure)); Serial.println(" m"); Serial.println("");</p><p> lcd.setCursor(5,0); lcd.print(temperature); lcd.print((char)223); lcd.print("C "); </p><p> // subtract the last reading: total = total - readings[readIndex]; // read from the sensor: readings[readIndex] = event.pressure; // add the reading to the total: total = total + readings[readIndex]; // advance to the next position in the array: readIndex = readIndex + 1;</p><p> // if we're at the end of the array... if (readIndex >= numReadings) { // ...wrap around to the beginning: readIndex = 0; }</p><p> // calculate the average: average = total / numReadings;</p><p> delay(1); lcd.setCursor(5,1); lcd.print(average); // print average pressure lcd.print("hPa"); } else { Serial.println("Sensor error"); } delay(0); }</p>
 
  • 如何创造的真理:真理的立方体portabletruthsensor.ino
    下载

步骤11:制作立方体气密

粘在底面你的小立方体的传感器和加热元件的连接。除非你是了不起的你的盒子其实不会密闭。为了绕过这个我用电工胶带的外边缘。我还申请了更多的立方体在导线进入立方体,你可以通过爆破空气的立方体,感觉它是测试你的箱子的气密性。


注:重要的是看这个盒子里面你不想错过任何时刻,尽量不妨碍观看。

步骤12:真理的时刻

如何创造的真理:真理的立方体

现在是时候把它放在一起,

把立方体内外立方体和插入注射器内,胶注射器嘴唇外面的立方体,安全带和离开干燥24小时。当设置删除磁带和你做。恭喜你,你已经把你的创造真理的第一步!

 
(责任编辑:admin)
织梦二维码生成器
顶一下
(0)
0%
踩一下
(0)
0%
------分隔线----------------------------
发表评论
请自觉遵守互联网相关的政策法规,严禁发布色情、暴力、反动的言论。
评价:
表情:
用户名: 验证码:点击我更换图片