Go to advanced search

by bgreat
Wed Jan 16, 2013 12:24 am
Forum: Python
Topic: Negativ output on GPIO's
Replies: 22
Views: 4064

Re: Negativ output on GPIO's

Seems you have a corrupted SD card. After you have your Raspberry Pi booting again, please try the following from a command prompt: [email protected] ~ $ sudo python Python 2.7.3 (default, Jan 13 2013, 11:20:46) [GCC 4.6.3] on linux2 Type "help", "copyright", "credits" or "license" for more information...
by bgreat
Tue Jan 15, 2013 9:58 pm
Forum: Python
Topic: Nokia Pi LCD
Replies: 253
Views: 112185

Re: Nokia Pi LCD

That's the package. I installed it using pip: sudo pip install spidev I have been programming on Linux -- desktop and embedded -- 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...
by bgreat
Tue Jan 15, 2013 8:08 pm
Forum: Interfacing (DSI, CSI, I2C, etc.)
Topic: SPI LCD on Pi
Replies: 15
Views: 47720

Re: SPI LCD on Pi

/dev/fb0 is the primary display frame buffer for the Raspberry Pi. /dev/fb1 is the frame buffer for the TFT. If you read the previous blog entry on the same site -- Raspberry Pi and TFT Display -- it covers the kernel frame buffer driver being used for /dev/fb1. Without this kernel driver, the pytho...
by bgreat
Tue Jan 15, 2013 5:19 pm
Forum: Python
Topic: Nokia Pi LCD
Replies: 253
Views: 112185

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 brightness, otherwise any free GPIO RST -- pin 8, otherwise any...
by bgreat
Tue Jan 15, 2013 1:25 pm
Forum: Interfacing (DSI, CSI, I2C, etc.)
Topic: SPI LCD on Pi
Replies: 15
Views: 47720

Re: SPI LCD on Pi

CE0 is Pin 24, so it is the same wiring. Just a naming difference. One thing to note on the page you linked. The schematic is wrong for wiring the RF module. It shows the resistor in the ground path for the module. The resistor should be to the switch, but the ground should be connected directly to ...
by bgreat
Tue Jan 15, 2013 3:14 am
Forum: C/C++
Topic: G++ Segmentation Fault
Replies: 1
Views: 1130

Re: G++ Segmentation Fault

Looks like you may have a corrupted file system. I would try re-imaging the SD card from a new download.

I tested using your code on my Raspbian system and it compiled and executed without issue.

What OS are you using?

Enjoy!
Bill
by bgreat
Mon Jan 14, 2013 11:41 pm
Forum: Python
Topic: Negativ output on GPIO's
Replies: 22
Views: 4064

Re: Negativ output on GPIO's

Your code will set the pins to output, set the output to high (~3v3) and then wait one second and reset all of the pins. The GPIO.cleanup() returns the pins to an input high impedance. If you are using a typcial LCD meter, the response time is low enough that you will likely not capture the output l...
by bgreat
Mon Jan 14, 2013 8:18 pm
Forum: Interfacing (DSI, CSI, I2C, etc.)
Topic: SPI LCD on Pi
Replies: 15
Views: 47720

Re: SPI LCD on Pi

Pin 19 on the Raspberry Pi is MOSI (Master Out Slave In). The MISO (Master In Slave Out) is an SPI input on pin 21.

You do want to use Raspberry Pi pin 19 MOSI connected to the LCD SDA on pin 4.

You can refer to the AdaFruit web site and GitHub for programming.

Enjoy!
Bill
by bgreat
Mon Jan 14, 2013 8:06 pm
Forum: Python
Topic: How to make symbold in LCD
Replies: 17
Views: 5948

Re: How to make symbold in LCD

:D I know... but it was a quick test. I was busy testing various outputs and 50% was my last test. :D

I implemented to provide a CPU load % display. Very handy.

Enjoy!
Bill
by bgreat
Mon Jan 14, 2013 8:03 pm
Forum: Python
Topic: Python snake program
Replies: 2
Views: 820

Re: Python snake program

Are you running from the console text mode or X Windows?

Enjoy!
Bill
by bgreat
Mon Jan 14, 2013 7:58 pm
Forum: Python
Topic: Negativ output on GPIO's
Replies: 22
Views: 4064

Re: Negativ output on GPIO's

LED's have an anode (+) and cathode (-) pin. This means they require a specific polarity to light. When driving from the GPIO pin, you must correctly connect the LED to have it illuminate for a particular logic level. On a schematic, the anode side is represented by a triangle and the cathode is a b...
by bgreat
Sun Jan 13, 2013 7:59 pm
Forum: Python
Topic: How to make symbold in LCD
Replies: 17
Views: 5948

Re: How to make symbold in LCD

OK. Hooked an LCD display back to the Pi to check the CGRAM code. :oops: Found another typo. Should read: cgBell = [0x00,0x04,0x0e,0x0a,0x11,0x1f,0x06,0x00] 0x06 instead of 0x16... Here's the output from the example with text updated for a 20x4 LCD: CGRAM_small.jpg Line 3 shows the custom characters...
by bgreat
Sun Jan 13, 2013 3:37 pm
Forum: Interfacing (DSI, CSI, I2C, etc.)
Topic: 1,8" TFT on I2C BUS
Replies: 5
Views: 4988

Re: 1,8" TFT on I2C BUS

AdaFruit also has Python library posted on there GitHub for reference. Adafruit-ST7735-Library.

After reading some more, I'm going to order one of these for myself.

Enjoy!
Bill
by bgreat
Sun Jan 13, 2013 3:31 pm
Forum: Python
Topic: How to make symbold in LCD
Replies: 17
Views: 5948

Re: How to make symbold in LCD

Go back to the prior version of code that was working for you. Confirm it is still working. Then, make a backup, and add the lines for setting up the other character generator location and accessing. Note that I did not confirm the indent on the code I posted. You will need to put it in the code wit...
by bgreat
Sun Jan 13, 2013 1:59 pm
Forum: Interfacing (DSI, CSI, I2C, etc.)
Topic: 1,8" TFT on I2C BUS
Replies: 5
Views: 4988

Re: 1,8" TFT on I2C BUS

This module appears to be command compatible with the Adafruit 128x160 display. TheThe pinout is different, but the software will work. There is a Raspberry Pi example at Raspberry Pi, 1.8″ TFT, RF Receiver and Temperature Sensor . This example uses the a frame buffer interface with the TFT, but sho...
by bgreat
Sun Jan 13, 2013 1:21 pm
Forum: Beginners
Topic: Wifi and wpa_supplicant
Replies: 5
Views: 11061

Re: Wifi and wpa_supplicant

Using latest Raspbian with two wireless networks configured. /etc/network/interfaces auto lo iface lo inet loopback iface eth0 inet dhcp allow-hotplug wlan0 iface wlan0 inet manual wpa-roam /etc/wpa_supplicant/wpa_supplicant.conf iface default inet dhcp /etc/wpa_supplicant/spa_supplicant.conf ctrl_i...
by bgreat
Sun Jan 13, 2013 1:10 pm
Forum: Troubleshooting
Topic: Two new R-pi's without wired network.
Replies: 11
Views: 1503

Re: Two new R-pi's without wired network.

The Raspberry Pi is properly identifying your network interface, while the ifconfig output indicates there is no network connection detected and no traffic is being directed to or received from the network. Reviewing the schematic shows a direct connection from the Ethernet socket to the interface c...
by bgreat
Sun Jan 13, 2013 1:19 am
Forum: Python
Topic: How to make symbold in LCD
Replies: 17
Views: 5948

Re: How to make symbold in LCD

Small typo... should be:

Code: Select all

    cgBell = [0x00,0x04,0x0e,0x0a,0x11,0x1f,0x16,0x00]
Enjoy!
Bill
by bgreat
Sat Jan 12, 2013 11:06 pm
Forum: Python
Topic: How to make symbold in LCD
Replies: 17
Views: 5948

Re: How to make symbold in LCD

I initialize the characters I use for the bar graph here: """ Initialize character generator for horizontal bar graph """ self.write4bits(self.LCD_SETCGRAMADDR+0) for i in range(8): self.write4bits(0x00,True) self.write4bits(self.LCD_SETCGRAMADDR+8) for i in range(8): self.write4bits(0x10,True) self...
by bgreat
Sat Jan 12, 2013 10:31 pm
Forum: General discussion
Topic: Copy automatically, GUI
Replies: 2
Views: 719

Re: Copy automatically, GUI

'rsync' would be my command of choice. It will only copy what has changed.

Enjoy!
Bill
by bgreat
Sat Jan 12, 2013 10:29 pm
Forum: Troubleshooting
Topic: Two new R-pi's without wired network.
Replies: 11
Views: 1503

Re: Two new R-pi's without wired network.

Can you post the output of 'ifconfig' and 'dmesg | grep -i eth0' please. This may give additional information.

Enjoy!
Bill
by bgreat
Sat Jan 12, 2013 7:53 pm
Forum: Python
Topic: How to make symbold in LCD
Replies: 17
Views: 5948

Re: How to make symbold in LCD

Here is a modified version of code I picked up from the forums and online for an LCD class. I added a bar graph using custom characters. #!/usr/bin/python # # based on code from lrvick and LiquidCrystal # lrvic - https://github.com/lrvick/raspi-hd44780/blob/master/hd44780.py # LiquidCrystal - https:...
by bgreat
Sat Jan 12, 2013 3:26 pm
Forum: Beginners
Topic: puTTY on Windows - which one?
Replies: 5
Views: 1098

Re: puTTY on Windows - which one?

Just go to http://www.putty.org/ for the "official" release. The "illegal" warning is due simply to the encryption technology available. In some countries there are laws governing the use and/or distribution of certain encryption technologies. The statement on the site is simply to protect the site ...
by bgreat
Sat Jan 12, 2013 3:18 pm
Forum: Python
Topic: Basic Coding Help
Replies: 12
Views: 1369

Re: Basic Coding Help

:roll:

Change it to:

Code: Select all

        self.windowSize = size
To define/set 'windowSize' as an attribute of 'self'...

The interpreter told you there was no such attribute for 'self'... Reading the code showed what appeared to be minor typo...

Ah well...

Enjoy!
Bill
by bgreat
Sat Jan 12, 2013 3:09 pm
Forum: Interfacing (DSI, CSI, I2C, etc.)
Topic: 1,8" TFT on I2C BUS
Replies: 5
Views: 4988

Re: 1,8" TFT on I2C BUS

Displays of this type typically use SPI and not I2C for driving the display. I see there is a set of I2C pins, but do you have more information such as a datasheet or command list? The part number for display (HY-1.8 SPI) would also seem to indicate it is a SPI style device. The only information I l...

Go to advanced search