Go to advanced search

by robbo100
Wed Jan 01, 2014 8:14 pm
Forum: Interfacing (DSI, CSI, I2C, etc.)
Topic: Using Slice of Pi/o and 16x2 LCD at the same time?
Replies: 30
Views: 7116

Re: Using Slice of Pi/o and 16x2 LCD at the same time?

but I don't want to use the MCP23017 to drive the LCD, I just want to use the remaining GPIOs.
by robbo100
Wed Jan 01, 2014 7:24 pm
Forum: Interfacing (DSI, CSI, I2C, etc.)
Topic: Using Slice of Pi/o and 16x2 LCD at the same time?
Replies: 30
Views: 7116

Re: Using Slice of Pi/o and 16x2 LCD at the same time?

I spent ages googling all this, and found nothing, but just had another search and found the following page using the image search function within google - http://raspi.tv/2013/using-the-mcp23017-port-expander-with-wiringpi2-to-give-you-16-new-gpio-ports-part-3 So, assuming the Slice of Pi/o V1.2 is...
by robbo100
Wed Jan 01, 2014 6:29 pm
Forum: Interfacing (DSI, CSI, I2C, etc.)
Topic: Using Slice of Pi/o and 16x2 LCD at the same time?
Replies: 30
Views: 7116

Re: Using Slice of Pi/o and 16x2 LCD at the same time?

Right then, I am completely confused - it doesn't take much :lol: To recap, I have a Slice of Pi/o, with some free i/os (although I would like to use them all for if I can). As well as the digital i/o's the Slice of Pi/o has got another header (JP2) which (for want of a better term) "passes-through"...
by robbo100
Wed Jan 01, 2014 5:01 pm
Forum: Interfacing (DSI, CSI, I2C, etc.)
Topic: Using Slice of Pi/o and 16x2 LCD at the same time?
Replies: 30
Views: 7116

Re: Using Slice of Pi/o and 16x2 LCD at the same time?

Such a shame they didn't add a £0.49p dip switch and three resistors to allow it to be changed easily rather than hard wired. Good point! Sorry to be a pain, but I have found the section which explains the addressing system (Page 8 Figure 1.2 of this document: http://ww1.microchip.com/downloads/en/...
by robbo100
Wed Jan 01, 2014 1:48 pm
Forum: Interfacing (DSI, CSI, I2C, etc.)
Topic: Using Slice of Pi/o and 16x2 LCD at the same time?
Replies: 30
Views: 7116

Re: Using Slice of Pi/o and 16x2 LCD at the same time?

P.S. I bought that cheap display from ebay (since it was only a couple of quid), and hopefully it will arrive tomorrow, so I will be able to try it in any case.
by robbo100
Wed Jan 01, 2014 1:46 pm
Forum: Interfacing (DSI, CSI, I2C, etc.)
Topic: Using Slice of Pi/o and 16x2 LCD at the same time?
Replies: 30
Views: 7116

Re: Using Slice of Pi/o and 16x2 LCD at the same time?

Hi all, Thanks for your replies and help. If I am honest, I am probably slightly out of my depth :lol: Am I correct in saying that if my Slice of Pi/o is using the same address as the LCD will use then it won't work? I have the following address being used: [email protected] ~ $ i2cdetect -y 0 0 1 2 3 ...
by robbo100
Mon Dec 30, 2013 5:40 pm
Forum: Interfacing (DSI, CSI, I2C, etc.)
Topic: Using Slice of Pi/o and 16x2 LCD at the same time?
Replies: 30
Views: 7116

Re: Using Slice of Pi/o and 16x2 LCD at the same time?

Hi AJB2K3

I did know that I could do that. Are you proposing that I do this to drive the 7 segment displays without multiplexing (to avoid the refresh problems), or is this something linked to how the LCD might be use?

Sorry, I am not experienced enough to understand what you are proposing :oops:
by robbo100
Mon Dec 30, 2013 8:23 am
Forum: Interfacing (DSI, CSI, I2C, etc.)
Topic: Using Slice of Pi/o and 16x2 LCD at the same time?
Replies: 30
Views: 7116

Re: Using Slice of Pi/o and 16x2 LCD at the same time?

Actually, looking at the annotation on the Slice of Pi/o, the JP2 seems to show annotation for GPIOs 4, 17, 18, 22, 23, 24, 25, & 27 (whereas the datasheet on the second page of the PDF lists GPIO 0-7). So, it would seem that the correct GPIOs are available for the LCD. However, I would still be int...
by robbo100
Mon Dec 30, 2013 8:12 am
Forum: Interfacing (DSI, CSI, I2C, etc.)
Topic: Using Slice of Pi/o and 16x2 LCD at the same time?
Replies: 30
Views: 7116

Using Slice of Pi/o and 16x2 LCD at the same time?

Hi all, Using Python, I have created a small thermostat control system, whereby I use a Slice of Pi/o V1.2 ( http://openmicros.org/GSG/Slice%20of%20Pi-O%20-%20v1-2%20getting%20started%20guide.pdf ) to achieve the following functions: - Drive a multiplexed 4 digit 7 segment display (using 11 outputs ...
by robbo100
Tue Dec 10, 2013 7:25 am
Forum: Staffroom, classroom and projects
Topic: Night School
Replies: 7
Views: 3257

Re: Night School

p.s.

The outputs for the relays and the common cathodes of the 7 segment displays are all inverted (1 is off, 0 is on), owing to the transistors that I am using.
by robbo100
Tue Dec 10, 2013 7:10 am
Forum: Staffroom, classroom and projects
Topic: Night School
Replies: 7
Views: 3257

Re: Night School

I'd like to see how you've done it. I am a little bit (very) embarrassed to show my code, since I have no idea what I am doing, but here it goes: #!/usr/bin/python # Copyright 2012 Daniel Berlin (with some changes by Adafruit Industries/Limor Fried) # # Permission is hereby granted, free of charge,...
by robbo100
Sun Dec 08, 2013 10:44 pm
Forum: Staffroom, classroom and projects
Topic: Night School
Replies: 7
Views: 3257

Re: Night School

I have managed to fix it and get my threading working.

Still keen to have some formal tuition though, so if anyone know of anything available,
Please let me know.

Thanks
by robbo100
Sun Dec 08, 2013 8:27 pm
Forum: Python
Topic: Recalling a thread when thread complete
Replies: 14
Views: 2185

Re: Recalling a thread when thread complete

Thanks,

I will give those ideas a try.
by robbo100
Sun Dec 08, 2013 6:28 pm
Forum: Python
Topic: Recalling a thread when thread complete
Replies: 14
Views: 2185

Re: Recalling a thread when thread complete

well, when I say "perfectly"... it would be great if the display refresh was higher to stop the display flashing, but that is the only thing that isn't ideal.

Now I need to work on the other functions.

Thanks

Robbo100
by robbo100
Sun Dec 08, 2013 6:25 pm
Forum: Python
Topic: Recalling a thread when thread complete
Replies: 14
Views: 2185

Re: Recalling a thread when thread complete

ignore me.

I have worked it out by declaring the variable as global from within the thread (before, I was doing it in the main code),

It is all working perfectly! I can't belive it! :D
by robbo100
Sun Dec 08, 2013 6:05 pm
Forum: Python
Topic: Recalling a thread when thread complete
Replies: 14
Views: 2185

Re: Recalling a thread when thread complete

Personally I'd just declare the temperature variable global. i.e. In any function which accesses temperature put global temperature This shouldn't be a problem as there should be only one writer. Thanks, I have tried putting "global target_temperature", before setting up the target_temperature vari...
by robbo100
Sun Dec 08, 2013 5:17 pm
Forum: Python
Topic: Recalling a thread when thread complete
Replies: 14
Views: 2185

Re: Recalling a thread when thread complete

Right, I think I may have made some progress. I have put the 7 segment display and button-press code into a thread, which I run on a forever loop. This works fine. I then have the temperature sensing code (which is slow) in the main section of code, on another forever loop. This works fine too! Both...
by robbo100
Sun Dec 08, 2013 4:12 pm
Forum: Python
Topic: Recalling a thread when thread complete
Replies: 14
Views: 2185

Re: Recalling a thread when thread complete

Thanks Kent,

I think I am officially confused.

The problem is, if I stop and do something else within the code, then my display will stop showing (which is why I thought I needed to use threading).

I am not sure this will work.
by robbo100
Sun Dec 08, 2013 3:50 pm
Forum: Python
Topic: Recalling a thread when thread complete
Replies: 14
Views: 2185

Re: Recalling a thread when thread complete

I'm not a Python person. I think threads are mean to be long running, i.e. they exists throughout your main program. You should probably have a while loop in your thread which delays, reads temperature, stores temperature in a global, and repeats. Thanks Joan, I have to admit, I am a bit confused. ...
by robbo100
Sun Dec 08, 2013 12:47 pm
Forum: Python
Topic: Recalling a thread when thread complete
Replies: 14
Views: 2185

Recalling a thread when thread complete

I am very new to Python, but thought I should just crack on with a project and learn as I go.So, I am writing a thermostat program in Python to read temperatures from some 1 wire thermometers via GPIO 4, whilst driving couple of multiplexed 7 segment displays and relays via a Slice Of Pi/o V1.2 (wit...
by robbo100
Sun Dec 08, 2013 9:07 am
Forum: Staffroom, classroom and projects
Topic: Night School
Replies: 7
Views: 3257

Re: Night School

There's lots of homework you can do before you go to PiSchool. http://www.raspberrypi.org/phpBB3/viewtopic.php?f=47&t=51436 - see the "Additional Resources" section. http://themagpi.com - read all eighteen back issues. Hi Dougie, Thanks for the quick reply, and sorry for not getting back sooner. On...
by robbo100
Wed Dec 04, 2013 8:04 pm
Forum: Staffroom, classroom and projects
Topic: Night School
Replies: 7
Views: 3257

Night School

Hi all I know a very small amount about programming, having learnt BBC Basic when I was in school, back in the day. So I went out and bought a Pi, thinking I could use it to teach my kids to program using Scratch. The reality was, that it was much easier to to use the MacBook to teach the kids Scrat...
by robbo100
Mon May 06, 2013 9:42 am
Forum: Media centres
Topic: TVHeadend won't automatically start
Replies: 0
Views: 1275

TVHeadend won't automatically start

Hi all I have decided to make an in-car media hub for my Nexus 10 to access whilst on the road, or away camping (or to be honest, when ever we are away from home). I sucessfully setup a wireless hotspot and network shares on the pi, and can connect to the pi and play media using the Nexus, it also h...
by robbo100
Fri May 03, 2013 8:05 am
Forum: Networking and servers
Topic: RPi access point using cheap RTL8188 based dongle
Replies: 14
Views: 4827

Re: RPi access point using cheap RTL8188 based dongle

Thinking about it on the way to work this morning, it may just be that the service isn't started. To get it to work I restart the service, but I haven't tried just starting it. I wonder if I might have just put a typo in the command used to tell the Pi to start it automatically on startup. I will ha...

Go to advanced search