Hello, me and my friends are working on a school project but we are now stucked and need help. in our project we are transferring information from sensors (gas sensor MQ6 and temprature sensor TC74) which connected to one arduino to another arduino with xbee. and from the second arduino we are sending it to HTML page in the internet.
we are using Arduino UNO, XBee 2mW and Ethernet Shield 2
we managed to comunicate between the arduinos.the data from one arduino is wrriten in the serial of the other arduino, so the xbee works. and the ethernet shield also works.
bur the problem is that we can't transfer what is wrriten on the serial to the internet.
we believe the problem is in this part of the code:
if (Serial.available()>0)
{
delay(1000);
Serial.read();
q = Serial.readString();
if (Serial.peek()== '0 ')
{
Serial.read();
t = Serial.readString();
}
if (Serial.peek()=='gas level is ')
{
Serial.read();
g = Serial.readString();
}
while (Serial.available()>0)
{Serial.read();}
}
we tried to take the data in the serial and enter it to string type variables, but for some reason it didn't work and we don't know how to fix this problem.
ok, my target is to send information from sensors to the internet. At first, I sent the information from the sensors to Arduino and to the serial monitor. After that I sent the information in the serial to second Arduinio (through xbee). Now the second Arduino write in the serial monitor: " temp is 20 gas level is Normal " Example My problem is that I don't success to remove the information which in the serial monitor to the internet. I tried to set the values 20 and Normal into a string and send them as a string variable, but I didn't success to set them into a variable.
My problem is that I don't success to remove the information which in the serial monitor to the internet. I tried to set the values 20 and Normal into a string and send them as a string variable, but I didn't success to set them into a variable.
The data in the Serial Monitor application came FROM the Arduino. There is NO reason to be trying to read anything from the Serial port.
If the data is coming from the XBee, and contains crap you don't want, make the sender stop sending the crap!
The data is coming from the Xbee, but in the HTML page it is written again and again like:
"temp is 20gas level is Normal temp is 20gas level is Norma temp is 20gas level is Norma temp is 20gas level is Norma temp is 20gas level is Norma"
because this is how it appers on the Serial Monitor.
The data is coming from the Xbee, but in the HTML page it is written again and again like:
I'm wondering if there is some part of "POST ALL OF YOUR CODE" that is beyond your reading comprehension?
If something something that simple is beyond your reading comprehension, then why would we assume that more difficult concepts won't be? If something that simple is not beyond your reading comprehension, then why should we take any time to read and/or respond to your posts when you won't do that?