-
Fototrend
Arduino hardverrel és szoftverrel foglakozó téma. Minden mikrovezérlő ami arduinoval programozható, és minden arduino program, board, és hardverrel kapcsolatos kérdések helye.
Új hozzászólás Aktív témák
-
peter1998
tag
Sikerült tápot szereznem. DS18B20 szenzor adatait szeretném kiolvasni.
#include <OneWire.h>
#include <DallasTemperature.h>
// Data wire is plugged into pin 2 on the Arduino
#define ONE_WIRE_BUS 9 //tű száma !!!
// Setup a oneWire instance to communicate with any OneWire devices
// (not just Maxim/Dallas temperature ICs)
OneWire oneWire(ONE_WIRE_BUS);
// Pass our oneWire reference to Dallas Temperature.
DallasTemperature sensors(&oneWire);
void setup(void)
{
// start serial port
Serial.begin(9600);
Serial.println("Dallas Temperature IC Control Library Demo");
// Start up the library
sensors.begin();
}
void loop(void)
{
// call sensors.requestTemperatures() to issue a global temperature
// request to all devices on the bus
Serial.print(" Requesting temperatures...");
sensors.requestTemperatures(); // Send the command to get temperatures
Serial.println("DONE");
Serial.print("Temperature for Device 1 is: ");
Serial.print(sensors.getTempCByIndex(0)); // Why "byIndex"?
// You can have more than one IC on the same bus.
// 0 refers to the first IC on the wire
}Ez a kódom. És egy ilyen hibaüzenetet kapok " \libraries\OneWire\OneWire.cpp:85:24: fatal error: WConstants.h: No such file or directory
#include "WConstants.h" ". Olvastam más fórumokon hogy ez egy IDE probléma. Én a legfrissebbet használom 1.6.7 Ezt a leírást használtam [link] A mappákat helyesen másoltam be.
Új hozzászólás Aktív témák
- Kínai és egyéb olcsó órák topikja
- Samsung Galaxy A54 - türelemjáték
- Autós topik
- Parci: Milyen mosógépet vegyek?
- Futás, futópályák
- Luck Dragon: Asszociációs játék. :)
- iPhone topik
- Folyószámla, bankszámla, bankváltás, külföldi kártyahasználat
- OTP Bank topic
- Szeged és környéke adok-veszek-beszélgetek
- További aktív témák...
- Dell Latitude 7410 Strapabíró Ütésálló Profi Ultrabook Laptop 14" -80% i7-10610U 16/512 FHD IPS MATT
- Eladó Lian Li O11D MINI-X gépház
- Lenovo ThinkPad P17 Tervező Vágó Laptop -50% 17,3" i7-10750H 32/512 QUADRO T1000 4GB
- FSP DAGGER PRO ATX3.0(PCIe5.0) 850W Sfx tápegység
- Eladó PNY GeForce RTX 4070 Ti SUPER 16GB OC XLR8
- A Panasonic Toughbook CF-54 i5-5300u i5-6300u TN, IPS touch Budapest, MPL Foxpost
- Tablet felvásárlás!! Apple iPad, iPad Mini, iPad Air, iPad Pro
- AKCIÓ! MSI B450 R5 5500 16GB DDR4 512GB SSD RTX 2070 8GB GDDR6 Rampage Shiva Zalman 500W
- Apple iPhone 13 128GB / Kártyafüggetlen 1ÉV GARANCIÁVAL
- AKCIÓ! Apple Macbook Pro 16" 2019 i9 9980HK 64GB DDR4 1TB SSD Radeon Pro 5500M garanciával
Állásajánlatok
Cég: PCMENTOR SZERVIZ KFT.
Város: Budapest
Cég: Promenade Publishing House Kft.
Város: Budapest