WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: Making GPIO work with a 1wire DS18B20 device  (Read 9669 times)

Offline battlecow

  • Newbie
  • *
  • Posts: 9
Making GPIO work with a 1wire DS18B20 device
« on: September 25, 2013, 12:48:58 PM »
I have been searching trying to find either some source code to compile or some better explanation to how to utilize the Rpi-gpio tcz package and cannot seem to find an answer or the correct package.  My setup is this:
Rpi model B
A DS18B20 temp sensor attached to a breadboard via a pi cobbler through the gpio header

With Rasbian all I had to do was add the correct drivers and away we went reading some temps, now I want to move this setup to this distro, but am missing some (hopefully obvious) piece of the puzzle. 
Has anyone accomplished something similar to this setup?
Has anyone gotten the w1-gpio and w1-therm drivers compiled, if so where is the source code, or what package are they a part of?

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11518
Re: Making GPIO work with a 1wire DS18B20 device
« Reply #1 on: September 25, 2013, 03:39:04 PM »
Hi battlecow
Is this related to what you are looking for:
http://forum.tinycorelinux.net/index.php/topic,15463.msg91173.html#msg91173

Offline battlecow

  • Newbie
  • *
  • Posts: 9
Re: Making GPIO work with a 1wire DS18B20 device
« Reply #2 on: September 25, 2013, 04:26:25 PM »
That could be? I read through that and tried everything on there but when I run i2cdetect -y 0/1 both come back empty handed and there is no 1wire directory named for the part serial like there should be...

*EDIT*
And if I try to run owfs --i2c=ALL:ALL --allow_other /mnt/1wire
I get: owlib.c:(56) No valid 1-wire buses found
« Last Edit: September 25, 2013, 04:56:19 PM by battlecow »

Offline battlecow

  • Newbie
  • *
  • Posts: 9
Re: Making GPIO work with a 1wire DS18B20 device
« Reply #3 on: September 30, 2013, 05:24:46 PM »
What is the pin configuration for using the temperature sensor?  I am using the example guide found here: http://learn.adafruit.com/downloads/pdf/adafruits-raspberry-pi-lesson-11-ds18b20-temperature-sensing.pdf and if that is not correct that would probably be my problem...

Offline bmarkus

  • Administrator
  • Hero Member
  • *****
  • Posts: 7183
    • My Community Forum
Re: Making GPIO work with a 1wire DS18B20 device
« Reply #4 on: October 01, 2013, 04:26:04 AM »
I will get a temp sensor this week so I can try it in a week or two.
Béla
Ham Radio callsign: HA5DI

"Amateur Radio: The First Technology-Based Social Network."

Offline bellad

  • Jr. Member
  • **
  • Posts: 65
Re: Making GPIO work with a 1wire DS18B20 device
« Reply #5 on: October 01, 2013, 09:45:50 AM »
hello battlecow

use you  ds8482 i2c interface ?

bellad.flnet.org

Offline battlecow

  • Newbie
  • *
  • Posts: 9
Re: Making GPIO work with a 1wire DS18B20 device
« Reply #6 on: October 01, 2013, 09:58:34 AM »
The only thing I have attached is the temperature sensor currently to the GPIO pin 4, I followed the instructions from the link above and have no issues with other distros as I just got it working in 10 minutes using Arch linux last night, but I would really like to get this working on Tiny Core.  I do not have any other controller aside from the pin out and the temperature sensor. 
Is a bus master required for an i2c connection?  I thought I could get this working without one?

Offline bmarkus

  • Administrator
  • Hero Member
  • *****
  • Posts: 7183
    • My Community Forum
Re: Making GPIO work with a 1wire DS18B20 device
« Reply #7 on: October 01, 2013, 10:08:14 AM »
Is a bus master required for an i2c connection?  I thought I could get this working without one?

i2c? It is a diffrent topic.  DS18B20 is a Dallas 1-wire bus device, not i2c.
Béla
Ham Radio callsign: HA5DI

"Amateur Radio: The First Technology-Based Social Network."

Offline battlecow

  • Newbie
  • *
  • Posts: 9
Re: Making GPIO work with a 1wire DS18B20 device
« Reply #8 on: October 01, 2013, 10:11:08 AM »
Okay that is what I was thinking that this is a 1 wire issue not an i2c issue.

Offline bellad

  • Jr. Member
  • **
  • Posts: 65
Re: Making GPIO work with a 1wire DS18B20 device
« Reply #9 on: October 01, 2013, 10:25:46 AM »
see atachment
bellad.flnet.org

Offline bmarkus

  • Administrator
  • Hero Member
  • *****
  • Posts: 7183
    • My Community Forum
Re: Making GPIO work with a 1wire DS18B20 device
« Reply #10 on: October 01, 2013, 10:56:51 AM »
see atachment

bellad@

Any comment why this picture published? We are talking about a 1-wire device connected directly to GPIO pin while on your diagram there is an i2c/1-wire gateway used.

battlecow@

BTW are you trying it with 4.7.7 or 5.0alpha3?
« Last Edit: October 01, 2013, 11:02:18 AM by bmarkus »
Béla
Ham Radio callsign: HA5DI

"Amateur Radio: The First Technology-Based Social Network."

Offline battlecow

  • Newbie
  • *
  • Posts: 9
Re: Making GPIO work with a 1wire DS18B20 device
« Reply #11 on: October 01, 2013, 11:00:50 AM »
I am using the latest build: piCore-20130331.img.gz and anything installed has come directly from the tce downloader.  I can check versions of items when I get home if you need/ want me to try a new version.

Offline bmarkus

  • Administrator
  • Hero Member
  • *****
  • Posts: 7183
    • My Community Forum
Re: Making GPIO work with a 1wire DS18B20 device
« Reply #12 on: October 01, 2013, 11:04:26 AM »
I am using the latest build: piCore-20130331.img.gz and anything installed has come directly from the tce downloader.  I can check versions of items when I get home if you need/ want me to try a new version.

Would be good to see with 5.0alpha3 but do not waste your time just for this. I will grab a sensor in the next days and check what is happening.
Béla
Ham Radio callsign: HA5DI

"Amateur Radio: The First Technology-Based Social Network."

Offline battlecow

  • Newbie
  • *
  • Posts: 9
Re: Making GPIO work with a 1wire DS18B20 device
« Reply #13 on: October 01, 2013, 11:05:28 AM »
I have some time to test, where can you obtain the newer image?

Offline bmarkus

  • Administrator
  • Hero Member
  • *****
  • Posts: 7183
    • My Community Forum
Re: Making GPIO work with a 1wire DS18B20 device
« Reply #14 on: October 01, 2013, 11:14:14 AM »
Béla
Ham Radio callsign: HA5DI

"Amateur Radio: The First Technology-Based Social Network."