void setup()
{
Serial.begin(9600);
Serial1.begin(9600);
}
void loop()
{
while (Serial1.available())
Serial.write(Serial1.read());
while (Serial.available())
Serial1.write(Serial.read());
}
However, when I open up my serial read out, the tags that are printed aren’t the number tags like I would expect (7C0056ABB435). They look like this: ?d^▒f▒▒ٹ2*▒▒▒
What should I do to fix this? Thanks for the help in advance!
Try a search for the sensor on the forums. There are quite a few topics about it from which you can get a lot of information.
If I’m not mistaken there are even libraries available for the sensor which would make things a lot easier.
Thanks for the help, I got my tags working and reading in serial. But now I need to take that tag and use it as a variable to be posted to my dashboard and website that I’m developing. I know how to use Particle.variable() and Particle.dashboard(), but how do I put the tag into a variable? Here’s my code so far, I just had to change write to print to get the correct character conversion.
void setup()
{
Serial.begin(9600);
Serial1.begin(9600);
}
void loop()
{
while (Serial1.available())
Serial.print(Serial1.read());
while (Serial.available())
Serial1.print(Serial.read());
}
}
Variables aren't posted but requested, that's a big difference.
And that doesn't exist I believe...
That said, I think you should have a look at particle.publish() and perhaps the tutorial section of the forums. Search for @bko's tutorials on both variables as well as server sent events
I’ve only ever played with that sensor for a couple of minutes, but I know that there are some very nice topics about it on the forums. If you have a search, you’re sure to find some examples. Using a library might also help.