IVy
Posts: 3
Joined: Tue Jan 05, 2016 4:34 am

Using a Tontec 3.5 touch screen and DS18B20

Tue Jan 05, 2016 5:21 am

Hello, I am new to the Pi and Linux but I am attempting to put together a Raspberry Pi 2 with a Tontec 3.5 touch screen (found here: http://www.itontec.com/product-detail/product-name-9/) and a DS18B20 temperature sensor. My problem is that the screen's connector uses the #4 pin and all the documentation I can find on the DS18B20 temperature sensor shows that it needs to be on the #4 pin. Yet, my understanding is that multiple DS18B20 can be connected on pin #4 taking advantage of the "Device Tree" functionality so maybe I can still connect the sensor on pin #4 even if it is used by the screen.

Has anyone tried to connect the sensor with this screen or maybe you have a suggestion for a sensor that can be connected on another pin on the Pi?

Any help would be greatly appreciated.

texy
Forum Moderator
Forum Moderator
Posts: 5173
Joined: Sat Mar 03, 2012 10:59 am
Location: Berkshire, England

Re: Using a Tontec 3.5 touch screen and DS18B20

Tue Jan 05, 2016 7:49 am

Hi and welcome to the forum.
Although the driver defaults to GPIO4, another pin can be defined such as in this post :
viewtopic.php?f=37&t=130798&p=875156&hi ... 20#p875156

Hope this helps,
Texy
Various male/female 40- and 26-way GPIO header for sale here ( IDEAL FOR YOUR PiZero ):
https://www.raspberrypi.org/forums/viewtopic.php?f=93&t=147682#p971555

Leon Trotsky
Posts: 2
Joined: Tue Jan 05, 2016 11:45 am

Re: Using a Tontec 3.5 touch screen and DS18B20

Tue Jan 05, 2016 11:48 am

Hi IVy,

I bought a Tontec 3.5" Touchscreen for my son's Raspberry Pi2, but have found that it does not work from booting up and that we have to connect the Pi via the HDMI cable first, login and then we can use the touchscreen. This obviously negates the point of having the touchscreen, if you need another screen as well!

Am I getting something wrong? Perhaps we have set it up incorrectly? Did you manage to get the screen to work straight from booting up?

Many thanks,

Leon.

IVy
Posts: 3
Joined: Tue Jan 05, 2016 4:34 am

Re: Using a Tontec 3.5 touch screen and DS18B20

Wed Jan 06, 2016 1:55 am

Texy, thank you very much for the link to the pin change info. I will try it as soon as my sensors are delivered and I now am more confident that this will be easy to implement.

Leon, i have assembled the whole thing but not set the screen to the touchscreen as I need to do some work on the Raspbian interface and I prefer to do all this work on my normal monitor. Having said that, the instruction sheet that came with the screen from Amazon explains how to change the default from HDMI to this screen. I also found a link that has detailed configuration steps for it. I will post it as soon as I get to my computer tonight.

IVy
Posts: 3
Joined: Tue Jan 05, 2016 4:34 am

Re: Using a Tontec 3.5 touch screen and DS18B20

Wed Jan 06, 2016 3:27 am

Ok, here is the link but I assume that you have done most of this correctly since your screen works after logging in. Now considering my near 0 experience with Linux, I may have an explanation why you are not able to use the screen before the user login. In step 5 "Configure X to use /dev/fb1" you are creating a file under "/usr/...." and that may mean that this configuration is for a specific user and will not take effect until the user is logged in. Did you try to have Raspbian auto login? Again, I may be dead wrong here but I hope this link helps

http://cooljc.me.uk/?p=64

texy
Forum Moderator
Forum Moderator
Posts: 5173
Joined: Sat Mar 03, 2012 10:59 am
Location: Berkshire, England

Re: Using a Tontec 3.5 touch screen and DS18B20

Wed Jan 06, 2016 7:15 am

IVy wrote:Ok, here is the link but I assume that you have done most of this correctly since your screen works after logging in. Now considering my near 0 experience with Linux, I may have an explanation why you are not able to use the screen before the user login. In step 5 "Configure X to use /dev/fb1" you are creating a file under "/usr/...." and that may mean that this configuration is for a specific user and will not take effect until the user is logged in. Did you try to have Raspbian auto login? Again, I may be dead wrong here but I hope this link helps

http://cooljc.me.uk/?p=64
I think you'll find those instructions obsolete. Raspbian has moved onto a Device Tree structure, and also fbtft has been incorporated into the pi kernel, so you should be able to use an overlay to drive the display. A quick search found this post :
viewtopic.php?f=44&t=118670#p806242

I would start with a clean new Raspbian image, then download the zipfile and follow those instructions.
Texy
Various male/female 40- and 26-way GPIO header for sale here ( IDEAL FOR YOUR PiZero ):
https://www.raspberrypi.org/forums/viewtopic.php?f=93&t=147682#p971555

Leon Trotsky
Posts: 2
Joined: Tue Jan 05, 2016 11:45 am

Re: Using a Tontec 3.5 touch screen and DS18B20

Wed Jan 06, 2016 9:17 am

IVy & Texy,

Thank you both. I'm new to the Pi too and my computing knowledge is somewhat limited to p and n type doping of semiconductors and Boolean algebra so it's going to be a steep learning curve!

IVy your comment makes sense, but when I have time I will have to try to understand Texy's comment in more detail if things have moved on. Last time I saw a kernel, I was about to eat it! Thank fictitious entities for Wikipedia.

Leon.

Return to “Beginners”