Hi all, I'm doing a project with a sensor connected to an Arduino DS18B20 one, and this in turn connected to an Xbee. I have problems in programming I hope someone can help me because I'm very need ..
this is the code I made for the transmission of the sensor to the arduino xbee missing me, but I get an error .. if anyone can tell me that gives me that error. and I thank the xbee transmission complete.
Hola a todos, estoy haciendo un proyecto de un sensor DS18B20 conectado a un Arduino uno , y este a su vez conectado a un Xbee. tengo problemas en la programación espero alguien me pueda ayudar pues estoy con mucha necesitas..
este es el código que hice para la transmisión del sensor al arduino me falta la del xbee, pero me da un error .. si alguien puede decirme por que me produce ese error. y agradezco que me completen la transmisión al xbee.
#include <OneWire.h>
#include <DallasTemperature.h>
int count =0;
float temp =0.0;
int tempsenal =2;
OneWire DS18B20(tempsenal);
DallasTemperature sensor(&DS18B20);
void setup (){
Serial.begin(19200);
sensor.begin();
}
void loop(){
sensor.requestTemperatures();
temp = sensor.getTempCByIndex(0);
Serial.print (temp);
Serial.println();
delay(1000);
}
the following code is the receiver in this'm worse I want to be transmitted via USB but not like this and gives me all possible errors if they can tell me how is the code .. or make me really appreciate some correction
el siguiente código es del receptor en este estoy peor lo quiero que se transmita por puerto usb pero no se como y este me da todos los errores posibles si pueden decirme como es el código.. o hacerme alguna corrección lo agradezco mucho
float temp =0.0;
void setup()
{
Serial.begin(19200);
}
void loop()
{
temp=Serial.read();
if (USB.available)
{
USB.send(temp);
}
}
I really need your help...