}
void loop ()
{
tiltRead = digitalRead(A5);
Serial.print("jewel box is open ");
Serial.println(tiltRead);
delay (1000);
if (tiltRead > 0) {
tone(buzzer,sound);
delay (1000);
}
else
(tiltRead < 0);
noTone(buzzer);
{
}
{
above there is my code wich worked fine on the board and getting data in my serial. how can i get this data to thingspeak using this code and these hardwares? or maybe is there another code?please help me guys
this is what i get in my serial. when i move the telt it gives a valeu of 1 and the buzzer goes of when it gives zero the buzzer doesnt go off.
10:02:56.178 -> jewel box is open 0
10:02:57.179 -> jewel box is open 0
10:02:58.183 -> jewel box is open 0
10:02:59.167 -> jewel box is open 1
10:03:01.197 -> jewel box is open 1
10:03:03.208 -> jewel box is open 1
10:03:05.164 -> jewel box is open 1
10:03:07.189 -> jewel box is open 0
10:03:08.163 -> jewel box is open 0
10:03:09.192 -> jewel box is open 0
10:03:10.203 -> jewel box is open 0
10:03:11.174 -> jewel box is open 0
10:03:12.161 -> jewel box is open 0
10:03:13.166 -> jewel box is open 0
10:03:14.163 -> jewel box is open 0