oceny
Posts: 5
Joined: Sat Mar 09, 2013 10:16 am

Little radio project with Nokia Pi LCD + Switch Shield board

Mon Jun 10, 2013 9:12 am

Little radio project with Nokia Pi LCD + Switch Shield board.

Just a few pictures, i can post the python script if somebody is interested.
gr.

Laurent
IMG_1553.jpg
IMG_1553.jpg (46.4 KiB) Viewed 1742 times
IMG_1555.jpg
IMG_1555.jpg (33.44 KiB) Viewed 1742 times
IMG_1557.jpg
IMG_1557.jpg (32.83 KiB) Viewed 1742 times

User avatar
malakai
Posts: 1382
Joined: Sat Sep 15, 2012 10:35 am
Contact: Website

Re: Nokia Pi LCD + Switch Shield board v2

Mon Jun 10, 2013 9:17 am

Looks nice. As far as the scripts I am always interested :)
http://www.raspians.com - always looking for content feel free to ask to have it posted. Or sign up and message me to become a contributor to the site. Raspians is not affiliated with the Raspberry Pi Foundation. (RPi's + You = Raspians)

oceny
Posts: 5
Joined: Sat Mar 09, 2013 10:16 am

Re: Nokia Pi LCD + Switch Shield board v2

Wed Jun 12, 2013 3:18 pm

This is the link for the python script
http://www.raspberrypi.org/phpBB3/viewt ... 14#p368614

JulianBrooks
Posts: 35
Joined: Wed Mar 20, 2013 1:08 pm

Re: Nokia Pi LCD + Switch Shield board v2

Fri Jun 21, 2013 10:01 am

texy wrote:Hi Julian,
I can post some code that just sets up the hpio's, pull-downs, and reads the switches, but as Dan has stated,
It probably won't help you in the long run ;)
Texy
Hey Texy,

Hope you don't mind but may I 'bump' you for your kind offer of assistance please?

I do understand that it may not be helpful in the long term but short term it definitely would, and this is where I'm still stuck!

Cheers,

Julian

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

Re: Nokia Pi LCD + Switch Shield board v2

Fri Jun 21, 2013 11:30 am

Apologies Julian, this dropped off my radar :oops:
I will post a minimal test program before the weekend is out.
Regards,
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

JulianBrooks
Posts: 35
Joined: Wed Mar 20, 2013 1:08 pm

Re: Nokia Pi LCD + Switch Shield board v2

Fri Jun 21, 2013 12:06 pm

Thanks Texy, appreciate it:)

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

Re: Nokia Pi LCD + Switch Shield board v2

Fri Jun 21, 2013 6:24 pm

Hi Julian,
give this code a try :

Code: Select all

#!/usr/bin/python
# Nokia Pi Shield v2 button test prog
# v1 20/6/13

import wiringpi2 as wiringpi
import time

IN = OFF = 0
OUT = ON = 1
PUD_DOWN = 1

UP  = 13 # gpio pin 21 = UP
DOWN  = 11 # gpio pin 26 = DOWN
LEFT  = 5  # gpio pin 18 = LEFT
RIGHT  = 4  # gpio pin 16 = RIGHT
SELECT  = 2  # gpio pin 13 = SELECT

#set up the gpio's for the 5 buttons
wiringpi.wiringPiSetup()
for pin in [UP, RIGHT, DOWN, LEFT, SELECT]:
  wiringpi.pinMode(pin, IN) # set to input
  wiringpi.pullUpDnControl(pin, PUD_DOWN) # enable pull down resistor

# run the loop
while True:
    input_value1 = wiringpi.digitalRead(UP)
    input_value2 = wiringpi.digitalRead(DOWN)
    input_value3 = wiringpi.digitalRead(LEFT)
    input_value4 = wiringpi.digitalRead(RIGHT)
    input_value5 = wiringpi.digitalRead(SELECT)

    print "UP = ",input_value1
    print "DOWN = ",input_value2
    print "LEFT = ",input_value3
    print "RIGHT = ",input_value4
    print "SELECT = ",input_value5
    time.sleep(.5)

...I just remembered you only need the DOWN button, so take out references to the other, ie the code should be :

Code: Select all

#!/usr/bin/python
# Nokia Pi Shield button test prog
# v1 20/6/13

import wiringpi2 as wiringpi
import time

IN = OFF = 0
OUT = ON = 1
PUD_DOWN = 1

UP  = 13 # gpio pin 21 = UP
DOWN  = 11 # gpio pin 26 = DOWN
LEFT  = 5  # gpio pin 18 = LEFT
RIGHT  = 4  # gpio pin 16 = RIGHT
SELECT  = 2  # gpio pin 13 = SELECT

#set up the gpio's for the 5 buttons
wiringpi.wiringPiSetup()
for pin in [UP, RIGHT, DOWN, LEFT, SELECT]:
  wiringpi.pinMode(pin, IN) # set to input
  wiringpi.pullUpDnControl(pin, PUD_DOWN) # enable pull down resistor

# run the loop
while True:
    input_value2 = wiringpi.digitalRead(DOWN)

    print "DOWN = ",input_value2
    time.sleep(.5)
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

Return to “For sale”