Go to advanced search

by texy
Thu Jan 17, 2013 8:04 am
Forum: Python
Topic: Nokia Pi LCD
Replies: 253
Views: 118397

Re: Nokia Pi LCD

Hopefully the boards will get to you soon ;) The work with SPI has seen fantastic improvements. Shame I,ve just sent an order for an updated pcb (with switches and as a shield rather than with ribbon cable). Maybe I can stop the order and redesign to ...
by malakai
Thu Jan 17, 2013 7:54 am
Forum: Python
Topic: Nokia Pi LCD
Replies: 253
Views: 118397

Re: Nokia Pi LCD

... I sent a message to 9030plc on eBay. I am using his board from http://www.Mypishop.com in the video. He may knock out a few test boards with the SPI pin outs to see how they come out. (I am still waiting on my boards from Texy I think dolphins are swimming them over :) ) I imagine if enough interest ...
by bgreat
Wed Jan 16, 2013 11:21 pm
Forum: Python
Topic: Nokia Pi LCD
Replies: 253
Views: 118397

Re: Nokia Pi LCD

I have two Hong Kong specials (one white backlight and one blue backlight). Less than US$3.50 each. Here's a photo of the back side of one: LCD_SPI_sm.jpg Same signals, brought out in a different order with differing silk screen. The same controller chip and glass, just a different breakout board. C...
by williamhbell
Wed Jan 16, 2013 8:53 pm
Forum: Python
Topic: Nokia Pi LCD
Replies: 253
Views: 118397

Re: Nokia Pi LCD

In case you want to use SPI instead of bit banging the communication, I would use the following pins: CE -- pin 24 (SPI_CE0) or pin 26 (SPI_CE1) DIN -- pin 19 (SPI_MOSI) CLK -- pin 23 (SPI_SCLK) LED -- pin 12 (PWM0) to allow varying ...
by bgreat
Wed Jan 16, 2013 8:00 pm
Forum: Python
Topic: Nokia Pi LCD
Replies: 253
Views: 118397

Re: Nokia Pi LCD

To use hardware SPI (required by my class file/examples), you must use the SPI pins. The SCLK and DIN are required as defined. The only optional connection is SCE which I have connected to CE0. You can use CE1 if you update the defaults ...
by malakai
Wed Jan 16, 2013 7:28 pm
Forum: Python
Topic: Nokia Pi LCD
Replies: 253
Views: 118397

Re: Nokia Pi LCD

Doh! thanks yes it was the spi-bcm2708 not commented out. Too many SD Card images. When I run it I get a white screen. My pins are a bit different so this is what I have: #gpio's : DC = 3 # gpio pin 15 = wiringpi no. 3 (BCM 22) RST = 0 ...
by bgreat
Wed Jan 16, 2013 4:06 pm
Forum: Python
Topic: Nokia Pi LCD
Replies: 253
Views: 118397

Re: Nokia Pi LCD

... dither for display. I am still experimenting, but it should also work with any ImageMagick converted BMP file. Please try it and let me know. nokiaSPI.py #!/usr/bin/env python # -*- coding: utf-8 -*- # # code improvements # 9/10/12 ###### # WGG - picked up from Raspberry Pi forums and modified ...
by alexeames
Wed Jan 16, 2013 9:20 am
Forum: Python
Topic: Nokia Pi LCD
Replies: 253
Views: 118397

Re: Nokia Pi LCD

Very interested in this but I am getting an error any help where I went wrong? Have you enabled spi? Once you've done it, it's easy to forget it's needed :lol: sudo nano /etc/modprobe.d/raspi-blacklist.conf make sure there IS a # before blacklist spi-bcm2708, so it looks ...
by malakai
Tue Jan 15, 2013 11:56 pm
Forum: Python
Topic: Nokia Pi LCD
Replies: 253
Views: 118397

Re: Nokia Pi LCD

... I went wrong? sudo apt-get install python-imaging python-imaging-tk sudo apt-get install python-pip sudo pip install wiringpi sudo pip install spidev sudo ./lcdtest.py LCD Display Test: ASCII 32 to 116 Traceback (most recent call last): File "./lcdtest.py", line 368, in <module> main() File ...
by bgreat
Tue Jan 15, 2013 9:58 pm
Forum: Python
Topic: Nokia Pi LCD
Replies: 253
Views: 118397

Re: Nokia Pi LCD

... -- for some time, but I am new to Python. Still, it was simple to get spidev working. I adapted some code I had found on the forums to use the SPI interface via spidev. I've been playing with it for the last week since my Nokia displays arrived. The code is listed below, but it's not pretty ...
by alexeames
Tue Jan 15, 2013 8:48 pm
Forum: Python
Topic: Nokia Pi LCD
Replies: 253
Views: 118397

Re: Nokia Pi LCD

I am using the SPI interface via spidev for a relative fast interface with lower CPU load. I can get 30-100 updates per second depending on what I am displaying. Kind of silly to go over 30 fps since the LCD physical response is ...
by bgreat
Tue Jan 15, 2013 5:19 pm
Forum: Python
Topic: Nokia Pi LCD
Replies: 253
Views: 118397

Re: Nokia Pi LCD

In case you want to use SPI instead of bit banging the communication, I would use the following pins: CE -- pin 24 (SPI_CE0) or pin 26 (SPI_CE1) DIN -- pin 19 (SPI_MOSI) CLK -- pin 23 (SPI_SCLK) LED -- pin 12 (PWM0) to allow varying the ...
by sd_read
Sun Jan 13, 2013 2:37 pm
Forum: Python
Topic: Adding a second but different I2C device to the BMP085
Replies: 30
Views: 11972

Re: Adding a second but different I2C device to the BMP085

I think I am confusing the I2C protocol with the SPI protocol which I more commonly work with. What I need is an equivalent to "read_word_data(addr,cmd)" but does not use the addr or cmd arguments. So, using the format of figure 2 in my original ...
by dairon
Wed Jan 02, 2013 11:16 am
Forum: Python
Topic: Radio link with GPIO possible?
Replies: 17
Views: 8006

Re: Radio link with GPIO possible?

... I/O, ADC, and PWM. Even the reset pin can be reconfigured as an I/O pin. tinyAVR features a Universal Serial Interface (USI) which can be used as SPI, UART or TWI. [/i] So should be no problem to get these two connected ;) How do I address the tty in C? Where have you found the commands? ls -lR ...
by sn0w
Thu Dec 27, 2012 12:41 am
Forum: Python
Topic: Using SPI with Python
Replies: 2
Views: 1501

Re: Using SPI with Python

Thanks for the reply, but I think we talk about 2 different things. Maybe I wasn't really clear, sorry for that. My point is that I want to use a fuction like I use in C, but i tell that function to not use any CS and I do it myself. (So I don't waste any GPIO pin.) Lets say: spi_write($data, NO_CS)...
by IanH2
Mon Dec 24, 2012 8:09 am
Forum: Python
Topic: Using SPI with Python
Replies: 2
Views: 1501

Re: Using SPI with Python

Assuming you want the Po to be SPI master, CS will be an output, so you could always ignore it, and wire the slaves' CS to GPIO pins. Personally, I'd be inclined to use a 74HC138 or similar, to demultiplex the Pi's CS between up to 8 devices; ...
by sn0w
Sun Dec 23, 2012 6:32 pm
Forum: Python
Topic: Using SPI with Python
Replies: 2
Views: 1501

Using SPI with Python

Hi folks, I'm totally new to Python and I want to adapt all my C/C++ code to Python and atm I'm stuck with SPI. The problem is, I need to control more than 2 SPI slaves but the RPi only offers 2 CS pins, in C I was just using SPI without the automated CS control and I set the ...
by texy
Wed Dec 19, 2012 8:16 pm
Forum: Python
Topic: Nokia Pi LCD
Replies: 253
Views: 118397

Re: Nokia Pi LCD

... for pin in [DIN, SCLK, DC, RST, SCE]: wiringpi.pinMode(pin, ON) wiringpi.pinMode(LED,2) wiringpi.pwmWrite(LED,128) def SPI(value): # data = DIN # clock = SCLK # MSB first for i in reversed(xrange(8)): wiringpi.digitalWrite(DIN, (value >> i) & 1) wiringpi.digitalWrite(SCLK, ...
by duncanbojangles
Tue Dec 11, 2012 3:18 am
Forum: Python
Topic: Nokia Pi LCD
Replies: 253
Views: 118397

Re: Nokia Pi LCD

... self.SCLK, self.DC, self.RST, self.SCE]: wiringpi.pinMode(pin, self.ON) wiringpi.pinMode(self.LED, 0x02) wiringpi.pwmWrite(self.LED, 128) def SPI(self, value): for i in reversed(xrange(0x08)): wiringpi.digitalWrite(self.DIN, value >> i & 0x01) wiringpi.digitalWrite(self.SCLK, self.ON) wiringpi.digitalWrite(self.SCLK, ...
by dvanhaeke
Tue Dec 04, 2012 6:53 pm
Forum: Python
Topic: Temperature/Light controlled LED
Replies: 12
Views: 4376

Temperature/Light controlled LED

... LED activate ? #!/usr/bin/env python import time import os import RPi.GPIO as GPIO import eeml GPIO.setmode(GPIO.BCM) DEBUG = 1 LOGGER = 1 # read SPI data from MCP3008 chip, 8 possible adc's (0 thru 7) def readadc(adcnum, clockpin, mosipin, misopin, cspin): if ((adcnum > 7) or (adcnum < 0)): return ...
by texy
Sun Dec 02, 2012 4:20 pm
Forum: Python
Topic: Nokia Pi LCD
Replies: 253
Views: 118397

Re: Nokia Pi LCD

... for pin in [DIN, SCLK, DC, RST, SCE]: wiringpi.pinMode(pin, ON) wiringpi.pinMode(LED,2) wiringpi.pwmWrite(LED,128) def SPI(value): # data = DIN # clock = SCLK # MSB first for i in reversed(xrange(8)): wiringpi.digitalWrite(DIN, (value >> i) & 1) wiringpi.digitalWrite(SCLK, ...
by OS1
Thu Nov 08, 2012 10:37 pm
Forum: Python
Topic: Nokia Pi LCD
Replies: 253
Views: 118397

Re: Nokia Pi LCD

... for pin in [DIN, SCLK, DC, RST, SCE]: wiringpi.pinMode(pin, ON) wiringpi.pinMode(LED,2) wiringpi.pwmWrite(LED,128) def SPI(value): # data = DIN # clock = SCLK # MSB first for i in reversed(xrange(8)): wiringpi.digitalWrite(DIN, (value >> i) & 1) wiringpi.digitalWrite(SCLK, ...
by paultnl
Thu Nov 08, 2012 3:29 pm
Forum: Python
Topic: Nokia Pi LCD
Replies: 253
Views: 118397

Re: Nokia Pi LCD

... # extended mode lcd_cmd(0x14) # bias lcd_cmd(contrast) # vop lcd_cmd(0x20) # basic mode lcd_cmd(0xc) # non-inverted display cls() def SPI(c): # data = DIN # clock = SCLK # MSB first # value = c for i in xrange(8): wiringpi.digitalWrite(DIN,((c & (1 << (7-i))) > 0)) wiringpi.digitalWrite(SCLK, ...
by texy
Wed Nov 07, 2012 7:06 pm
Forum: Python
Topic: Nokia Pi LCD
Replies: 253
Views: 118397

Re: Nokia Pi LCD

... # extended mode lcd_cmd(0x14) # bias lcd_cmd(contrast) # vop lcd_cmd(0x20) # basic mode lcd_cmd(0xc) # non-inverted display cls() def SPI(c): # data = DIN # clock = SCLK # MSB first # value = c for i in xrange(8): wiringpi.digitalWrite(DIN,((c & (1 << (7-i))) > 0)) wiringpi.digitalWrite(SCLK, ...
by BillyBag2
Wed Nov 07, 2012 4:50 pm
Forum: Python
Topic: Nokia Pi LCD
Replies: 253
Views: 118397

Re: Nokia Pi LCD

I wrote some code for this device. It wrote to SPI device as a stream and also controlled the GPIO. You have to be careful to flush all SPI before changing the GPIO. If you do not flush you are still sending old data to the new new GPIO setting. ...

Go to advanced search