Tiny Core Linux

Tiny Core Base => Raspberry Pi => Topic started by: battlecow on September 25, 2013, 12:48:58 PM

Title: Making GPIO work with a 1wire DS18B20 device
Post by: battlecow 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?
Title: Re: Making GPIO work with a 1wire DS18B20 device
Post by: Rich 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
Title: Re: Making GPIO work with a 1wire DS18B20 device
Post by: battlecow 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
Title: Re: Making GPIO work with a 1wire DS18B20 device
Post by: battlecow 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...
Title: Re: Making GPIO work with a 1wire DS18B20 device
Post by: bmarkus 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.
Title: Re: Making GPIO work with a 1wire DS18B20 device
Post by: bellad on October 01, 2013, 09:45:50 AM
hello battlecow

use you  ds8482 i2c interface ?

Title: Re: Making GPIO work with a 1wire DS18B20 device
Post by: battlecow 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?
Title: Re: Making GPIO work with a 1wire DS18B20 device
Post by: bmarkus 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.
Title: Re: Making GPIO work with a 1wire DS18B20 device
Post by: battlecow 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.
Title: Re: Making GPIO work with a 1wire DS18B20 device
Post by: bellad on October 01, 2013, 10:25:46 AM
see atachment
Title: Re: Making GPIO work with a 1wire DS18B20 device
Post by: bmarkus 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?
Title: Re: Making GPIO work with a 1wire DS18B20 device
Post by: battlecow 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.
Title: Re: Making GPIO work with a 1wire DS18B20 device
Post by: bmarkus 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.
Title: Re: Making GPIO work with a 1wire DS18B20 device
Post by: battlecow on October 01, 2013, 11:05:28 AM
I have some time to test, where can you obtain the newer image?
Title: Re: Making GPIO work with a 1wire DS18B20 device
Post by: bmarkus on October 01, 2013, 11:14:14 AM
I have some time to test, where can you obtain the newer image?

http://forum.tinycorelinux.net/index.php/topic,15934.0.html
Title: Re: Making GPIO work with a 1wire DS18B20 device
Post by: bellad on October 01, 2013, 11:18:33 AM
SORRY
Title: Re: Making GPIO work with a 1wire DS18B20 device
Post by: bmarkus on October 01, 2013, 11:57:37 AM
SORRY

No problem :)