GroveStreams
homerruma private msg quote post Address this user
Hello
I would not know how to send data on the temperature of the DS18b20 via arduino to grovestreams.
If someone has a code I would share it.
thank you
Post 1 IP   flag post
JChristensen private msg quote post Address this user
If the difficulty is in reading the DS18B20, the Arduino forum has more examples and discussion than a person can enjoy ;-) Also see http://www.pjrc.com/teensy/td_libs_OneWire.html

If the difficulty is in sending the data to GroveStreams, see Support > Developers > Feed Examples > Arduino - Quick Start, https://grovestreams.com/developers/getting_started_arduino_temp.html
Post 2 IP   flag post
steveb private msg quote post Address this user
I have some code that does this, but it does a lot of other stuff too (reads a couple of electricity meters, reads temperature, posts to grovestreams, offers a web server to allow you to connect to the arduino and monitor / control it directly) - happy to post it if anyone would find it useful but it's a bit of a mess still and rather much a work in progress, and certainly not an example of best practice of how to do anything... Also the code is so large that it needs an arduino MEGA to run on, since it needs >2Kb RAM that the uno has. It may be optimisable down, but if you know how to do this you are better off starting from scratch in my option!

-Steve
Post 3 IP   flag post
lucianosanchez private msg quote post Address this user
Hi steveb,

I know this is quite old but if you have this code I would love to see what you have. I have a bit more sensors than you at the moment but I would be interested to see how you got this code working. I am following this thread as an example on another forum but have not had any luck getting it to work:

http://www.backyardaquaponics.com/forum/viewtopic.php?f=50&t=22607

Thanks,

Luciano
Post 4 IP   flag post
steveb private msg quote post Address this user
try this

https://drive.google.com/file/d/0B9h_aUHqcryvUEhIbDJQS0JvMGM/view?usp=sharing

it's also dragging back several old memories. I had to use low level string concatenations to avoid older arduinos from running out of RAM when making the grovestreams post

I solved a great deal of problems here - the app now needs a mega to run on because of the memory requirements of the webserver part but you may be able to block this out.

In the end I used a non-stock arduino firmware that supported watchdog timers so if the system crashed it could auto-reboot. it takes a 1-wire reading (or maybe two), counts the flashes from an photodiode to get a meter reading, reads the infrared irda generation meter using an elster library , it has a web server that you can connect to to review current values (rather than wait for grovestreams) - do not expose this to the outside world as the port scans and other internet filth soon crashes the shonky webserver - and you can trigger relays from the web page.

do not, under any circumstances, treat this as an example of how to do anything at all. You may also need to use an old version of the arduino compiler, although these are saved as .INO files so probably good.

This is not quite "my first arduino" code but pretty close!

-Steve

-edit- if you need any of the libraries, shout out and I will see if I can dig them out
Post 5 IP   flag post
seckford private msg quote post Address this user
There's a version that can handle up to four DS18B20 at:
http://pastebin.com/cUBBCjc2

It's run for a couple of years on an Arduino Ethernet, and has a fair
amount of debugging code if you need to check things out.

Will
Post 6 IP   flag post
lucianosanchez private msg quote post Address this user
Will,

I looked at the link you sent me. Thank you. I am a little confused though. Is that code supposed to replace the DallasTemperature Library? Is that it's own Library or does it have to be embedded in my Arduino Code for it to work?

Luciano
Post 7 IP   flag post
seckford private msg quote post Address this user
It uses the standard (1.05) Arduino MemoryFree SPI Ethernet and OneWire libraries; you may not have the MemoryFree library, which I don't think is part of the standard distribution, but you can drop any functions that need it. It's just useful for debugging.

Will
Post 8 IP   flag post
fixingthingsguy private msg quote post Address this user
I am currently using an nodemcu-ESP8266 w/DS18B20 programmed using the Arduino IDE. There are examples in the IDE. As far as I remember I pulled in the .h files(including Dallas) as prescribed in the examples using the latest IDE (FYI, the Arduino team implemented changes that allow Arduino sketches to run on the ESP8266, works quite well with some understanding of the nodemcu ESP8266 device)
The additions for GS are very similar to the Arduino example and you can use that.
My code is a little rusty, not cleaned, but works. I can send it you if you like. I also use the GS to control the update frequency of the ESP8266/DS18B20. Single DSB only.
Post 9 IP   flag post
2965 9 9
Log in or sign up to compose a reply.