เจ้าของร้านค้านี้ ไม่ได้เข้าสู่ระบบเป็นระยะเวลา 26 วัน แล้ว

Waterproof Temperature Probe (DS18B20)

Waterproof Temperature Probe (DS18B20)
รหัสสินค้า SKU-00036
หมวดหมู่ Sensor ( เซ็นเซอร์ )
ราคา 180.00 บาท
สถานะสินค้า พร้อมส่ง
ลงสินค้า 23 ก.พ. 2557
อัพเดทล่าสุด 23 ก.พ. 2557
คงเหลือ ไม่จำกัด
จำนวน
ชิ้น
หยิบลงตะกร้า
บัตรประชาชน
บุ๊คแบ๊งค์
คุ้มครองโดย LnwPay

The DS18B20 comes in both a cable, an SMD, and a transistor-style package. We're only covering the cable here, but for others see the Datasheet.

Connect it up - to 0v, 3.3v, and the data line to any free signal line of your Espruino device, with a 4.7k resistor between data and the 3.3v line. There seem to be two types of cabled sensor, and each has differently coloured wires. Both are covered below:

Sensor type 1Sensor type 2Espruino4.7k Resistor
Black Green GND  
Red Red 3.3v 1st wire
White Yellow Any GPIO 2nd wire

To use it (assuming you connected to pin A1), simply write the following on the right-hand side:

var ow =newOneWire(A1);var sensor =require("DS18B20").connect(ow);
setInterval(function(){
  console.log(sensor.getTemp());},1000);

And the current temperature will be displayed every second. Note that the first time getTemp is called, an incorrect temperature may be returned.

=27.625

MULTIPLE SENSORS

The DS18B20 communicates over a 1-Wire bus, which allows connecting multiple thermometers on the same data line.

To create an array containing three sensors, simply:

var ow =newOneWire(A1);var sensor1 =require("DS18B20").connect(ow,0);var sensor2 =require("DS18B20").connect(ow,1);var sensor3 =require("DS18B20").connect(ow,2);var sensors =[sensor1, sensor2, sensor3];

Alternatively, you can create the same array with a little help of the Array.map() function:

var sensors = ow.search().map(function(device){returnrequire("DS18B20").connect(ow, device);});

Now make a function that will be called repeatedly by Espruino:

setInterval(function(){
  sensors.forEach(function(sensor, index){
    console.log(index +": "+ sensor.getTemp());});},1000);

วิธีการชำระเงิน

ธนาคารกรุงเทพ จำกัด (มหาชน) สาขาศูนย์การค้าเซียร์ รังสิต ออมทรัพย์
  • ค่าธรรมเนียม 3.9% + 11 THB
  • การชำระผ่าน PayPal คุณไม่จำเป็นต้องแจ้งชำระเงิน เนื่องจากระบบจะจัดการให้คุณทันที ที่คุณชำระเงินเสร็จสมบูรณ์

MEMBER

STATISTICS

หน้าที่เข้าชม124,129 ครั้ง
ผู้ชมทั้งหมด51,783 ครั้ง
เปิดร้าน11 ธ.ค. 2556
ร้านค้าอัพเดท10 ส.ค. 2568

CONTACT US

0934502217
พูดคุย-สอบถาม