จำนวนชิ้น | ส่วนลดต่อชิ้น | ราคาสุทธิต่อชิ้น |
{{(typeof focus_pdata.price_list[idx+1] == 'undefined')?('≥ '+price_row.min_quantity):((price_row.min_quantity < (focus_pdata.price_list[idx+1].min_quantity - 1))?(price_row.min_quantity+' - '+(focus_pdata.price_list[idx+1].min_quantity - 1)):price_row.min_quantity)}} | {{number_format(((focus_pdata.price_old === null)?focus_pdata.price:focus_pdata.price_old) - price_row.price,2)}} บาท | {{number_format(price_row.price,2)}} บาท |
คงเหลือ | 46 ชิ้น |
จำนวน (ชิ้น) |
- +
|
ซื้อเลย หยิบลงตะกร้า ซื้อเลย หยิบลงตะกร้า คุณมีสินค้าชิ้นนี้ในตะกร้า 0 ชิ้น
ช่องทางสั่งซื้ออื่น ๆ
|
|
|
|
คุยกับร้านค้า | |
{{ size_chart_name }} |
|
หมวดหมู่ | GY/MELEXIS |
สภาพ | สินค้าใหม่ |
เพิ่มเติม | |
สภาพ | สินค้ามือสอง |
เกรด | |
สถานะสินค้า | |
ระยะเวลาจัดเตรียมสินค้า | |
เข้าร่วมโปรโมชั่น | |
ข้อมูล |
น้ำหนัก
บาร์โค้ด
ลงสินค้า
อัพเดทล่าสุด
|
รายละเอียดสินค้า |
GY-BME280-5V Digital Temperature/Humidity/Barometric Pressure
Sensor Module อุณหภูมิ+ความชื้น+ความกดอากาศ Hardware connections:
BME280 -> Arduino
GND -> GND
VCC -> 5
SDA -> A4
SCL -> A5
ติดตั้ง Library ก่อนใช้งานหา I2C : Adafruit-GFX-Library :https://github.com/adafruit/Adafruit-GFX-LibraryAdafruit_ST7735-Library : https://github.com/adafruit/Adafruit-ST7735-LibrarySparkFunBME280.h : BME280 Code Basic: /*--------------------------------------------------------------
Arduino with Test BME280-5V module i2c temp+press+humidity
For complete project details, visit:Arduinoshop99
---------------------------------------------------------------
*/
#include "Wire.h"
#include "SparkFunBME280.h"
//BME280 mySensorA; //Uses default I2C address 0x77
BME280 mySensorB; //Uses I2C address 0x76 (jumper closed)
String temp,humi,pres;
int humi2,pres2;
void setup()
{
Serial.begin(115200);
Wire.begin();
mySensorB.setI2CAddress(0x76); //Connect to a second sensor
if(mySensorB.beginI2C() == false) Serial.println("Sensor B connect failed");
}
void loop()
{
humi2=mySensorB.readFloatHumidity();
pres2=mySensorB.readFloatPressure()/100;
temp=mySensorB.readTempC();
humi=humi2;
pres=pres2;
Serial.print(" TempB: ");
Serial.print(temp);
Serial.print(" 'C ");
Serial.print(" HumidityB: ");
Serial.print(humi);
Serial.print(" % ");
Serial.print(" PressureB: ");
Serial.print(pres);
Serial.print(" mbar ");
Serial.println();
delay(2000);
}
![]() Code Advance: /* --------------------------------------------------------------
Arduino with Test BME280-5V module i2c temp+press+humidity+tft1.44
For complete project details, visit:Arduinoshop99
---------------------------------------------------------------
*/
#include "Adafruit_GFX.h" // Core graphics library
#include "Adafruit_ST7735.h" // Hardware-specific library
#include "SPI.h"
#include "Wire.h"
#include "SparkFunBME280.h"
//BME280 mySensorA; //Uses default I2C address 0x77
BME280 mySensorB; //Uses I2C address 0x76 (jumper closed)
String temp,humi,pres;
int humi2,pres2;
#define Addr 0x4A
//#define TFT_CS D2 //esp8266
//#define TFT_RST D3
//#define TFT_DC D4
#define TFT_CS 10 //nano
#define TFT_RST 9
#define TFT_DC 8
#define BLACK 0x0000
#define RED 0x001F
#define BLUE 0xF800
#define GREEN 0x07E0
#define YELLOW 0x07FF
#define PURPLE 0xF81F
#define CYAN 0xFFE0
#define WHITE 0xFFFF
Adafruit_ST7735 tft = Adafruit_ST7735(TFT_CS, TFT_DC, TFT_RST);
#define TFT_SCLK 13 // set these to be whatever pins you like!
#define TFT_MOSI 11 // set these to be whatever pins you like!
float p = 22/7;
void setup(void) {
Wire.begin();
mySensorB.setI2CAddress(0x76); //Connect to a second sensor
if(mySensorB.beginI2C() == false) Serial.println("Sensor B connect failed");
// Use this initializer if you're using TFT
tft.initR(INITR_BLACKTAB); // initialize a ST7735S chip, black tab
tft.fillScreen(ST7735_BLACK);
print_labels();
draw_buttons();
delay(1000);
Wire.begin();
// Initialise serial communication
Serial.begin(115200);
Wire.beginTransmission(Addr);
Wire.write(0x02);
Wire.write(0x40);
Wire.endTransmission();
delay(300);
}
void loop() {
unsigned int data[2];
Wire.beginTransmission(Addr);
Wire.write(0x03);
Wire.endTransmission();
// Request 2 bytes of data
Wire.requestFrom(Addr, 2);
// Read 2 bytes of data luminance msb, luminance lsb
if (Wire.available() == 2)
{
data[0] = Wire.read();
data[1] = Wire.read();
// tft.print(lum);
}
// Convert the data to lux
int exponent = (data[0] & 0xF0) >> 4;
int mantissa = ((data[0] & 0x0F) << 4) | (data[1] & 0x0F);
int lum = pow(2, exponent) * mantissa * 0.045;
humi2=mySensorB.readFloatHumidity();
pres2=mySensorB.readFloatPressure()/100;
temp=mySensorB.readTempC();
humi=humi2;
pres=pres2;
Serial.print(" TempB: ");
Serial.print(temp);
Serial.print(" 'C ");
Serial.print(" HumidityB: ");
Serial.print(humi);
Serial.print(" % ");
Serial.print(" PressureB: ");
Serial.print(pres);
Serial.print(" mbar ");
Serial.println();
delay(2000);
tft.setTextColor(YELLOW);
tft.setTextSize(2);
tft.setCursor(33,40);// xx>>,yy
tft.print(temp);
tft.setCursor(33,65);
tft.println(humi);
tft.setCursor(33,90);
tft.println(pres);
delay(5000);
tft.fillRect(33, 30, 60, 80, BLACK);//black block clear
//----------------------------
tft.invertDisplay(false);
}
void print_labels(){
//ON and OFF labels
tft.setTextSize(2);
tft.setTextColor(GREEN);
tft.setCursor(22,8);
tft.println("BME280");
tft.setCursor(11,40);// xx>>,yy
tft.print("T:");
tft.setCursor(11,65);
tft.println("H:");
tft.setCursor(11,90);
tft.println("P:");
tft.setCursor(98,40);// xx>>,yy
tft.print("C");
tft.setCursor(98,65);
tft.println("%");
tft.setCursor(96,90);
tft.println("mb");
}
void draw_buttons(){
//Rectangle around counter
tft.drawLine(8,2,8,120, YELLOW);
tft.drawLine(120,2,120,120, YELLOW);
tft.drawLine(8,3,120,3, YELLOW);
tft.drawLine(8,120,120,120, YELLOW);
tft.drawLine(8,28,120,28, YELLOW); //line
} ![]() ![]() ![]() |
เงื่อนไขอื่นๆ |
|
Tags |