จำนวนชิ้น | ส่วนลดต่อชิ้น | ราคาสุทธิต่อชิ้น |
{{(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)}} บาท |
คงเหลือ | 0 ชิ้น |
จำนวน (ชิ้น) |
- +
|
ซื้อเลย หยิบลงตะกร้า ซื้อเลย หยิบลงตะกร้า คุณมีสินค้าชิ้นนี้ในตะกร้า 0 ชิ้น
ช่องทางสั่งซื้ออื่น ๆ
|
|
|
|
คุยกับร้านค้า | |
{{ size_chart_name }} |
|
หมวดหมู่ | GY/MELEXIS |
สภาพ | สินค้าใหม่ |
เพิ่มเติม | |
สภาพ | สินค้ามือสอง |
เกรด | |
สถานะสินค้า | |
ระยะเวลาจัดเตรียมสินค้า | |
เข้าร่วมโปรโมชั่น | |
ข้อมูล |
น้ำหนัก
บาร์โค้ด
ลงสินค้า
อัพเดทล่าสุด
|
รายละเอียดสินค้า |
เซนเซอร์วัดความสว่างของแสง GY-49 MAX44009 digital illuminance light intensity sensor module i2c interface high precision
Features
Wide 0.045 Lux to 188,000 Lux Range /*
Arduino with Test GY-49 MAX44009 digital illuminance light
intensity sensor module i2c interface high precision 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" #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) {
// 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() { // tft.invertDisplay(false); // tft.fillScreen(ST7735_BLACK);
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;
Serial.print("Ambient Light luminance :"); Serial.print(lum); Serial.println(" lux"); tft.setTextColor(CYAN); tft.setTextSize(3); tft.setCursor(20,85); tft.print(lum);
delay(1000); tft.fillRect(10, 80, 80, 30, BLACK);
// tft.fillScreen(ST7735_BLACK); delay(500); //----------------------------
tft.invertDisplay(false); } void print_labels(){ // tft.invertDisplay(false); // tft.fillScreen(ST7735_BLACK); // tft.setTextSize(1);
//ON and OFF labels tft.setTextSize(2); tft.setTextColor(GREEN); tft.setCursor(22,8); tft.println("Ambient"); tft.setCursor(25,28); tft.println(" light"); tft.setCursor(10,48); tft.println("luminance"); tft.setTextColor(CYAN); tft.setTextSize(3); tft.setCursor(10,55); // tft.print(lum);
tft.setCursor(100,100); tft.setTextSize(1); tft.setTextColor(YELLOW); tft.println("Lux"); //display.clearDisplay();
} 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,70,120,70, YELLOW);
} ![]() ![]() ![]() ![]() ![]() ![]() ![]() |
เงื่อนไขอื่นๆ |
|
Tags |