Go to advanced search

by bgreat
Sat Jan 19, 2013 1:14 pm
Forum: Python
Topic: Nokia Pi LCD
Replies: 253
Views: 112115

Re: Nokia Pi LCD

Looks like the py-spidev and wiringpi are installed since it does make it beyond the import statements. But the blacklist entry has not been removed so the /dev/spidev0.x device can not be opened. After following the instructions and rebooting, confirm you have the correct /dev entries using 'ls': p...
by bgreat
Sat Jan 19, 2013 1:07 pm
Forum: Python
Topic: Whats wrong with my LCD code?
Replies: 7
Views: 1917

Re: Whats wrong with my LCD code?

Yes, please post the code. Also, what editor are you using for modifying the code? Seems that the save code source is being corrupted. The files you are attempting to execute must be 'plain text' without any formatting added by a word processing style application. If you are editing on another compu...
by bgreat
Fri Jan 18, 2013 7:12 pm
Forum: Python
Topic: Negativ output on GPIO's
Replies: 22
Views: 4058

Re: Negativ output on GPIO's

Great to see you have things working now! Pin 1 --> 3.3 VDC Pin 2 --> 5 VDC Pin 6 --> GND Both pin out images are correct. ;) For Rev. 1 boards, pins 4, 9, 14, 17, 20, 25 were listed as "do not connect", but tied to ground. They were reserved for future use. With the Rev. 2 boards, these pins became...
by bgreat
Fri Jan 18, 2013 7:04 pm
Forum: Python
Topic: Python GPIO
Replies: 6
Views: 15110

Re: Python GPIO

Also, the reason for your needing to add the GPIO.setmode() call at the beginning of your application is due to an update to the GPIO module to support both board connect pin numbering and Broadcom GPIO numbering schemes. When this was added it became necessary to add the initialization call to indi...
by bgreat
Fri Jan 18, 2013 7:00 pm
Forum: Python
Topic: Python GPIO
Replies: 6
Views: 15110

Re: Python GPIO

The first warning can be ignored. To eliminate the warning on subsequent execution of your program, add the following at the end of your script: GPIO.cleanup() If you read your error message carefully and compare it to the code you were trying to type in, you will see that you have a typo. You typed...
by bgreat
Fri Jan 18, 2013 1:59 pm
Forum: Python
Topic: Whats wrong with my LCD code?
Replies: 7
Views: 1917

Re: Whats wrong with my LCD code?

Are you getting an error message when you attempt to run or no display? First thing I noticed is the 'lcd.begin(16,1)'. This says you are using a 16 character by 1 line display. Is this correct? The typical display is a 16x2 display, which would need a 'lcd.begin(16,2)' line. Are you running like th...
by bgreat
Fri Jan 18, 2013 1:49 am
Forum: Interfacing (DSI, CSI, I2C, etc.)
Topic: How to enable SPI Controller Bidirectional mode (SPI_3WIRE)?
Replies: 8
Views: 7034

Re: How to enable SPI Controller Bidirectional mode (SPI_3WI

Looking forward to seeing how this works out. Please update this thread if you make some progress.

Enjoy!
Bill
by bgreat
Thu Jan 17, 2013 11:16 pm
Forum: Interfacing (DSI, CSI, I2C, etc.)
Topic: How to enable SPI Controller Bidirectional mode (SPI_3WIRE)?
Replies: 8
Views: 7034

Re: How to enable SPI Controller Bidirectional mode (SPI_3WI

Reading the LCD controller data sheet, it appears to be operating in bidirectional 4-wire mode and not 3-wire mode. You should be able to set the REN bit to read per 10.2.2 of the Broadcom Raspberry Pi document. This will tristate the data pin while you generate a dummy transaction to clock in the r...
by bgreat
Thu Jan 17, 2013 10:16 pm
Forum: General discussion
Topic: Split screen in script?
Replies: 25
Views: 4184

Re: Split screen in script?

My mistake. I picked that up from another site with what I now know is incorrect information. A quick read of the dependencies shows tmux or screen as being required for byobu. If you install with neither present, then both are installed. Fascinating. I typically use screen, but neither tmux or byob...
by bgreat
Thu Jan 17, 2013 9:04 pm
Forum: Python
Topic: Negativ output on GPIO's
Replies: 22
Views: 4058

Re: Negativ output on GPIO's

Good thought process, but the numbers refer to the Broadcom BCM numbering which is from GPIO 0 through GPIO 25 for Rev. 1 Raspberry Pi and GPIO 2 through 27 for Rev. 2 Raspberry Pi boards. For reference, physical P1 pin number versus BCM GPIO number: RasPi P1 Pin BCM GPIO R1 BCM GPIO R2 RasPi Name =...
by bgreat
Thu Jan 17, 2013 7:01 pm
Forum: Interfacing (DSI, CSI, I2C, etc.)
Topic: How to enable SPI Controller Bidirectional mode (SPI_3WIRE)?
Replies: 8
Views: 7034

Re: How to enable SPI Controller Bidirectional mode (SPI_3WI

Interesting. I did not have that information. Using the Python spidev module, you set SPI to three wire mode using the 'threewire' boolean. Looking at the code, this calls the spidev ioctl with SPI_3WIRE set. Walking the kernel sources should let you see what register configuration this requires. Fo...
by bgreat
Thu Jan 17, 2013 4:59 pm
Forum: General discussion
Topic: Split screen in script?
Replies: 25
Views: 4184

Re: Split screen in script?

byobu is a tmux enhancement that has some nice default features and allows split screen and multi-panel screen configurations.

sudo apt-get install byobu

byobu Project Home

Enjoy!
Bill
by bgreat
Thu Jan 17, 2013 4:52 pm
Forum: Raspbian
Topic: Sound problem - aplay lock up
Replies: 6
Views: 1732

Re: Sound problem - aplay lock up

Here are the results of some tests. All tests are started from a clean shutdown, power off, power on sequence. Test 1: Original SD card with Wheezy 16-Dec-2012, all apt-get update, apt-get dist-upgrade: aplay locks after three .wav files are played Test 2: New SD card with Wheezy 16-Dec-2012, no upd...
by bgreat
Thu Jan 17, 2013 4:24 pm
Forum: Interfacing (DSI, CSI, I2C, etc.)
Topic: How to enable SPI Controller Bidirectional mode (SPI_3WIRE)?
Replies: 8
Views: 7034

Re: How to enable SPI Controller Bidirectional mode (SPI_3WI

The LCD Module itself is write only. You can not read the content of the display. If you are attempting to use the SD card feature, then you will need to wire the SD SPI data and clock lines in parallel with the LCD SPI lines, then use the remaining SPI chip select plus the SPI input for the card. P...
by bgreat
Thu Jan 17, 2013 1:23 pm
Forum: Raspbian
Topic: Sound problem - aplay lock up
Replies: 6
Views: 1732

Re: Sound problem - aplay lock up

I did a little more investigation. This only occurs with the digital audio via HDMI. The analog audio output works fine. Today I will reimage my SD and confirm the problem is coincident with an update.

Thanks and enjoy!
Bill
by bgreat
Thu Jan 17, 2013 1:07 am
Forum: Raspbian
Topic: Sound problem - aplay lock up
Replies: 6
Views: 1732

Sound problem - aplay lock up

Good day! I do not use sound often and was surprised to find out after that my HDMI sound was working with 16-Dec-2012 Raspbian Wheezy release. I spent a lot of time using aplay and mpg321 verifying that I could now play all of the sounds in the /usr/share/scratch/Media/Sounds directories. Mostly fo...
by bgreat
Wed Jan 16, 2013 11:43 pm
Forum: HATs and other add-ons
Topic: Testing Gertboard
Replies: 20
Views: 2600

Re: Testing Gertboard

:D Great! A little late, but instead of looping around the header pin, you can scrape the solder resist off to expose the trace and solder directly to the trace that goes under the header to the pin. I loved building my Gertboard! Just wish it was still available as a kit. MCM sold out again before ...
by bgreat
Wed Jan 16, 2013 11:28 pm
Forum: Python
Topic: Nokia Pi LCD
Replies: 253
Views: 112115

Re: Nokia Pi LCD

Sweet thanks a couple jumper wires and I'm in business. That code is slick. Love the image effects. Thanks all so much :) well worth all the head banging on my desk Glad you liked it. I'm still working on improvements. Just finished a font display test and some pie chart displays that are coming al...
by bgreat
Wed Jan 16, 2013 11:21 pm
Forum: Python
Topic: Nokia Pi LCD
Replies: 253
Views: 112115

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 bgreat
Wed Jan 16, 2013 8:00 pm
Forum: Python
Topic: Nokia Pi LCD
Replies: 253
Views: 112115

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 or pass 'dev=(0,1)' to the class initializer. # SPI connection ...
by bgreat
Wed Jan 16, 2013 4:30 pm
Forum: Advanced users
Topic: chmod Problem
Replies: 3
Views: 1235

Re: chmod Problem

Use the following for changing the directory usrid bit: [email protected] ~ $ mkdir freddy [email protected] ~ $ ls -ld freddy drwxr-xr-x 2 pi pi 4096 Jan 16 11:27 freddy [email protected] ~ $ chmod +s,g+w freddy [email protected] ~ $ ls -ld freddy drwsrwsr-x 2 pi pi 4096 Jan 16 11:27 freddy [email protected] ~ $ ...
by bgreat
Wed Jan 16, 2013 4:06 pm
Forum: Python
Topic: Nokia Pi LCD
Replies: 253
Views: 112115

Re: Nokia Pi LCD

Here is my first cut at turning the original code with additions into a Python class. It is incomplete as I am still working on making it more generic, but I do have a demonstration of using PIL to load an image with resize then threshold or dither for display. I am still experimenting, but it shoul...
by bgreat
Wed Jan 16, 2013 12:41 pm
Forum: Python
Topic: Nokia Pi LCD
Replies: 253
Views: 112115

Re: Nokia Pi LCD

I misread your previous error post, so my chmod suggestion was nonsense in your case. :oops: Getting spidev module loaded is the key. The same BMP code is in the version I posted. I used Paint in windows to make a B/W BMP and it worked as expected. I loaded an image in paint, changed the image to th...
by bgreat
Wed Jan 16, 2013 4:16 am
Forum: HATs and other add-ons
Topic: Testing Gertboard
Replies: 20
Views: 2600

Re: Testing Gertboard

Good to see the regulator is OK. If the 3v3 is not on C1, then the trace may be broken between the regulator pin 3 and C1. You can solder a bare wire from the regulator to top of C1. The scrap from cutting off an LED leads would be a good choice. Make a good solder connection on both ends keeping th...
by bgreat
Wed Jan 16, 2013 12:31 am
Forum: Python
Topic: Nokia Pi LCD
Replies: 253
Views: 112115

Re: Nokia Pi LCD

Try running using:

Code: Select all

sudo python ./lcdtest.py
If that works, make it executable and try running:

Code: Select all

> chmod +x lcdtest.py
> sudo ./lcdtest.py
Enjoy!
Bill

Go to advanced search