Arduino / ST question


(Dome) #1

I’m working on an Arduino-compatible project called the Smart Room Controller. It’s intended to be tucked away in an enclosure or somewhere out of sight and I’ve already got it interfacing SmartThings with LED strip lighting, an inexpensive motion sensor, a contact sensor, a water sensor, and an IR remote.

I’m trying to add a DS18B20 one wire temperature sensor to the mix. I already have the code ready to send temperature changes from the Arduino to the ST cloud. My question is how to correctly “package” the information at the Arduino level, and a good way for the Device Type to display it in a tile.

Ideally, I’d like to send it formatted like: temp:70. I tried this but it displays a conversion error:

smartthing.send(temp);

My full project with video is .


Daiken Air Con with Arduino?
(Andrew Urman) #2

@dome I think I remember doing that a long time ago. I used this:

char buf[20];
dtostrf(liters, 5, 2, buf);
smartthing.send(buf);

Try that out and let me know if it works.


(Dome) #3

Thanks @urman , I’ll try it and let you know.