Author Topic: 1-wire library on Digx  (Read 4818 times)

aerohost

  • Newbie
  • *
  • Posts: 7
1-wire library on Digx
« on: January 01, 2014, 11:59:51 am »
Hi, just received my Digx with level shifter board - it looks very capable. My primary focus is on 1-wire sensors, is there any info anywhere about using Digx with 1-wire, can't seem to find anything.

Tks, AB

Adalricus

  • Newbie
  • *
  • Posts: 8
« Last Edit: January 01, 2014, 03:33:40 pm by Adalricus »

aerohost

  • Newbie
  • *
  • Posts: 7
Re: 1-wire library on Digx
« Reply #2 on: January 02, 2014, 09:57:28 pm »
Hi Adalricus, thanks for the links. I was wondering if you have actually had these working with the new Digx?

AB

digistump

  • Administrator
  • Hero Member
  • *****
  • Posts: 1465
Re: 1-wire library on Digx
« Reply #3 on: January 03, 2014, 12:14:53 am »
The DigiX addons has a working one wire library - see the temperature sensor example DigiX Beta Bonus -> Bonus Temp

Adalricus

  • Newbie
  • *
  • Posts: 8
Re: 1-wire library on Digx
« Reply #4 on: January 03, 2014, 12:21:37 am »
oh missed that one my bad

aerohost

  • Newbie
  • *
  • Posts: 7
Re: 1-wire library on Digx
« Reply #5 on: January 08, 2014, 11:20:05 am »
Hi, so I installed everything and uploaded the DS1xS20_temperature sketch into the digx. It doesn't work, so I'm wondering why. The serial monitor just keeps displaying 'no more addresses' so I know the script is running.

I had it working on a Yun using 5v, but I hooked it up to the 3.3v supply on the Digx. Does anybody know if I still need to use the 4.7k resistor if using 3.3 instead of 5v? Will I blow something if I use 5v supply?

Tks, A

digistump

  • Administrator
  • Hero Member
  • *****
  • Posts: 1465
Re: 1-wire library on Digx
« Reply #6 on: January 08, 2014, 01:29:38 pm »
Try the included  DigiX Beta Bonus -> Bonus Temp example as I mentioned before - with the sensor on pin 8 (or any pin, just adjust ds(8) line) powered by 3.3v with a 4.7k between 3.3v and the data pin. That has worked for me many times.


aerohost

  • Newbie
  • *
  • Posts: 7
Re: 1-wire library on Digx
« Reply #7 on: January 08, 2014, 02:00:44 pm »
Hi, works fine, thanks. Didn't realize it was a double header and had the wire connected to the outer port. Duoh. Too much I/O for me. :)

Regards, A

aerohost

  • Newbie
  • *
  • Posts: 7
Re: 1-wire library on Digx
« Reply #8 on: January 08, 2014, 08:20:48 pm »
Hi, so I have run the Bonus Temp example with 3 temp sensors plugged in with short wires on a breadboard. I'm running into the same problem I had with the Yun in that the sketch will run for perhaps 6 or 7 hours, then just stop. Any ideas?

Tks, A

digistump

  • Administrator
  • Hero Member
  • *****
  • Posts: 1465
Re: 1-wire library on Digx
« Reply #9 on: January 08, 2014, 09:50:37 pm »
I imagine the OneWire library has a timer/variable in it or similar that is overflowing - in what way does it stop - no more output to serial? or just can't find the sensors?

aerohost

  • Newbie
  • *
  • Posts: 7
Re: 1-wire library on Digx
« Reply #10 on: January 08, 2014, 11:19:34 pm »
the serial monitor stops and the board has to have the sketch uploaded again to restart,cold boot won't do it ...

aerohost

  • Newbie
  • *
  • Posts: 7
Re: 1-wire library on Digx
« Reply #11 on: January 09, 2014, 08:07:52 am »
Hi, so I started another test yesterday afternoon and let it run all night, and it was still running this morning, so perhaps all is ok. I'll continue to monitor it.

Tks, A