Go to advanced search

by bgreat
Thu Jan 24, 2013 12:32 pm
Forum: Python
Topic: Nokia Pi LCD
Replies: 253
Views: 110242

Re: Nokia Pi LCD

Glad its working for everyone again. The contrast seems to be a bit touchy. I have noticed that it is temperature sensitive. There is a display command for temperature compensation, but I have not looked at how it interacts with the other settings.

Enjoy!
Bill
by bgreat
Thu Jan 24, 2013 3:51 am
Forum: Other projects
Topic: C code to run an hd44780 16x2 lcd
Replies: 6
Views: 4062

Re: C code to run an hd44780 16x2 lcd

In writeBytes(), I think you want to change:

Code: Select all

    pinMode(header->registerSelect, mode);
to:

Code: Select all

    digitalWrite(header->registerSelect, mode);
You want to change the output value, not the I/O direction.

Enjoy!
Bill
by bgreat
Thu Jan 24, 2013 3:33 am
Forum: Python
Topic: Nokia Pi LCD
Replies: 253
Views: 110242

Re: Nokia Pi LCD

The bitmap display routine is picky. There is an earlier post describing the steps for making a compatible BMP file. You could also try reading in as a PIL image and converting it to be compatible. The lenna display code is a good example of the steps needed. I would be willing to try the image on m...
by bgreat
Wed Jan 23, 2013 11:27 pm
Forum: Python
Topic: Nokia Pi LCD
Replies: 253
Views: 110242

Re: Nokia Pi LCD

I was having problems with my Model B, Rev 1 (256MB) board. But this evening after fully updating the Raspbian image it is working flawlessly. I'm not sure what may have changed, but the SPI code works with Rev 1 and Rev 2 boards for me as of today. I am posting my code again, just in case there is ...
by bgreat
Wed Jan 23, 2013 1:32 pm
Forum: Linux Kernel
Topic: Strange behaviour of kernel module
Replies: 17
Views: 3425

Re: Strange behaviour of kernel module

You did add board revision detection and manage the change in GPIO signals? Rev 1 --> GPIO 21 becomes Rev 2 --> GPIO 27 ? This would be my first suspect for a "stuck" bit. Also, it was reported in another thread that there is a bug that configures the GPIO 27 pin as output during start up. This coul...
by bgreat
Tue Jan 22, 2013 7:16 pm
Forum: Python
Topic: Where to start?
Replies: 5
Views: 1193

Re: Where to start?

There is an online course that has just started at Dr. Chuck Online . It is geared as a weekly course with lectures, exercises, and online grading. Interestingly, it includes the Raspberry Pi in the Python instructions. The course and course materials are free. If you are not interested in the onlin...
by bgreat
Tue Jan 22, 2013 1:08 pm
Forum: Python
Topic: Nokia Pi LCD
Replies: 253
Views: 110242

Re: Nokia Pi LCD

Time to get out the way back machine and see if my Rev 1 works with the un-updated Raspbian.

Thank you for the feedback!

Enjoy!
Bill
by bgreat
Tue Jan 22, 2013 3:43 am
Forum: Python
Topic: Nokia Pi LCD
Replies: 253
Views: 110242

Re: Nokia Pi LCD

Exactly what I am seeing. I thought I had originally tested this on my Rev 1 board, but now it will not work. Tried my prior versions of the code also with the same negative results. I'm wondering if it is an OS or firmware update that broke this. I'm going to go back to an original Raspbian 2012-12...
by bgreat
Tue Jan 22, 2013 3:09 am
Forum: Python
Topic: Nokia Pi LCD
Replies: 253
Views: 110242

Re: Nokia Pi LCD

Interestingly, the problem is definitely hardware specific. Swapping SD cards between Raspberry Pi's made no difference. My Rev 1 board does not work when using the spidev interface, but works with bit banging. Only other difference is the working system is headless and the non-working system is usi...
by bgreat
Tue Jan 22, 2013 2:45 am
Forum: Python
Topic: Nokia Pi LCD
Replies: 253
Views: 110242

Re: Nokia Pi LCD

Texy's wiring Pi based program to print text on the display works after modifying the connection settings to be: ... but running your test program, I still get a blank display even with the slower speed. Ok. I've reproduced your issue on another of my Raspberry Pi's. I am still trying to track the ...
by bgreat
Mon Jan 21, 2013 4:09 pm
Forum: General programming discussion
Topic: Python GPIO
Replies: 4
Views: 1046

Re: Python GPIO

The error message says it all... To access the GPIO with the GPIO library, you must run your application (or python) as root. Try: sudo python or sudo python yourscript.py This is because you are accessing the system memory map directly via /dev/mem which is a protected resource. You must have root ...
by bgreat
Mon Jan 21, 2013 1:24 pm
Forum: Python
Topic: Nokia Pi LCD
Replies: 253
Views: 110242

Re: Nokia Pi LCD

Same software configuration I am using. I have two displays that are working without issue on my Rev 2 board. I will try my Rev 1 board tonight to see if it works differently. One more question. How long is the interconnect from the Raspberry Pi to the display? Just so I can try a similar connection...
by bgreat
Mon Jan 21, 2013 12:06 am
Forum: Python
Topic: Nokia Pi LCD
Replies: 253
Views: 110242

Re: Nokia Pi LCD

I can see no reason for it to not work.

Maybe an issue with the SPI driver. What OS image are you using? I have done all of my testing with the Raspbian Wheezy (2012-12-16) image.

Enjoy!
Bill
by bgreat
Sun Jan 20, 2013 11:42 pm
Forum: HATs and other add-ons
Topic: Gertboard Kit - Swapping the LEDs for another colour/size
Replies: 3
Views: 1058

Re: Gertboard Kit - Swapping the LEDs for another colour/siz

You did not miss anything. The 20 mA is the maximum continuous current rating. It would be used to obtain the maximum rated brightness. It is not the normal operating current for most uses.

Enjoy!
Bill
by bgreat
Sun Jan 20, 2013 11:33 pm
Forum: Python
Topic: GPIO and root (again)
Replies: 21
Views: 6759

Re: GPIO and root (again)

To run a command at start up, add it to the '/etc/rc.local' script. Note, your command should run to completion and return control to the system or be run in the background using '&'.

To run a command as another user, you can use 'sudo -u username command'.

Enjoy!
Bill
by bgreat
Sun Jan 20, 2013 8:09 pm
Forum: Python
Topic: GPIO and root (again)
Replies: 21
Views: 6759

Re: GPIO and root (again)

Confirmed the Broadcom numbering is in use. My misunderstanding of Gordon's code. Since the gpio command by default uses wiringPi numbering, I thought the 'Sys' version of the setup did also. My lesson for the day... never assume... read, test, and verify... So I decided to test. Tried the following...
by bgreat
Sun Jan 20, 2013 5:16 pm
Forum: General discussion
Topic: Transistor Question
Replies: 21
Views: 4865

Re: Transistor Question

Perhaps I didn't overlooked it, but I didn't see any direct reply. Am I right in assuming it'd be safe to run with the 5V rail instead of the 3V3 rail for my LED circuit? Yes. That is why I showed the 5V on my diagram. ;) The transistor effectively isolates the switched current and voltage from the...
by bgreat
Sun Jan 20, 2013 2:56 pm
Forum: Python
Topic: Nokia Pi LCD
Replies: 253
Views: 110242

Re: Nokia Pi LCD

:oops: Wow! you two are making me blush.

I love the clock! :lol:

Enjoy!
Bill
by bgreat
Sun Jan 20, 2013 2:51 pm
Forum: Python
Topic: GPIO and root (again)
Replies: 21
Views: 6759

Re: GPIO and root (again)

When you use wiringPiSetupSys() the pin numbering is different. It switches from the BCM (GPIO) numbering to the WiringPi numbering scheme.

See Gordon's WiringPi Pins page.

Enjoy!
Bill
by bgreat
Sun Jan 20, 2013 2:17 am
Forum: General discussion
Topic: Transistor Question
Replies: 21
Views: 4865

Re: Transistor Question

I would still eliminate the diode in the base circuit. It only serves as a fixed voltage drop in that configuration.

Enjoy!
Bill
by bgreat
Sun Jan 20, 2013 1:52 am
Forum: General discussion
Topic: Transistor Question
Replies: 21
Views: 4865

Re: Transistor Question

I use a slightly different configuration, but first thing... get rid of the diode. I generally wire as: LED_NPN.jpg R1 ==> 4.7k to 10k ohm R2 ==> 470 to 1k ohm (set your brightness) If you connect to 3.3 VDC instead of 5 VDC, lower R2 for equivalent brightness. TIP120 is a little more heavy duty tha...
by bgreat
Sat Jan 19, 2013 11:58 pm
Forum: Python
Topic: Nokia Pi LCD
Replies: 253
Views: 110242

Re: Nokia Pi LCD

The pin connection from the code is the expected connection. The output indicates the code is successfully using the SPI interface (it's just the time to build an image and send to the display). The display only receives data and can not respond, so there is no simple way from the code to verify the...
by bgreat
Sat Jan 19, 2013 11:45 pm
Forum: Python
Topic: GPIO and root (again)
Replies: 21
Views: 6759

Re: GPIO and root (again)

You need the following at a minimum to the initialization:

Code: Select all

    wiringpi.wiringPiSetupGpio()
    wiringpi.pinMode(self.pin,wiringpi.OUTPUT)
Enjoy!
Bill
by bgreat
Sat Jan 19, 2013 4:52 pm
Forum: Python
Topic: GPIO and root (again)
Replies: 21
Views: 6759

Re: GPIO and root (again)

From Gordon's web page at WiringPi Functions void pullUpDnControl (int pin, int pud) ; This sets the pull-up or pull-down resistor mode on the given pin, which should be set as an input. Unlike the Arduino, the BCM2835 has both pull-up an down internal resistors. The parameter pud should be; PUD_OFF...
by bgreat
Sat Jan 19, 2013 4:34 pm
Forum: Python
Topic: Negativ output on GPIO's
Replies: 22
Views: 3917

Re: Negativ output on GPIO's

Yep. Error in the sheet I quickly looked at. Pin 4 is 5 VDC. I even use it for powering one of my Pi's.

Go to advanced search