Raspberery Pi Internet Radio

Moderators: adafruit_support_bill, adafruit

Forum rules
Talk about Adafruit Raspberry Pi® accessories! Please do not ask for Linux support, this is for Adafruit products only! For Raspberry Pi help please visit: http://www.raspberrypi.org/phpBB3/
User avatar
donde
 
Posts: 192
Joined: Wed May 25, 2011 1:52 am

Raspberery Pi Internet Radio

Post by donde »

I'm at this point and sudo command fails below. Please help!

LCD and Final Configuration

cd Python-WiFi-Radio
sudo python Adafruit_CharLCDPlate.py

I get this:

Code: Select all

  
Traceback (most recent call last):
  File "Adafruit_CharLCDPlate.py", line 442, in <module>
    lcd = Adafruit_CharLCDPlate()
  File "Adafruit_CharLCDPlate.py", line 93, in __init__
    self.i2c.address, self.MCP23017_IOCON_BANK1, 0)
IOError: [Errno 5] Input/output error
Line #
442 lcd = Adafruit_CharLCDPlate()

92 self.i2c.bus.write_byte_data(
93 self.i2c.address, self.MCP23017_IOCON_BANK1, 0)

LCD does not light light up.
Last edited by donde on Mon Sep 30, 2013 12:39 pm, edited 1 time in total.

User avatar
pburgess
 
Posts: 4161
Joined: Sun Oct 26, 2008 2:29 am

Re: Raspberery Pi Internet Radio

Post by pburgess »

This usually indicates that the Pi and Plate aren't talking (the port expander chip, specifically). Can you post a couple clear photos of your plate, both front and back? We'll look it over for any soldering gremlins.

User avatar
donde
 
Posts: 192
Joined: Wed May 25, 2011 1:52 am

Re: Raspberery Pi Internet Radio

Post by donde »

Pi and Plate aren't talking
Appended: I was thinking, maybe sudo apt-get update "did a number"

Did another visual with headband magnifer + Ledu magnifer lamp. Touched up a couple solder jointss, but knew I was wasting time. They were connected. Fired up the Pi and Plate and tried again with ssh [email protected], and then pianobar. Pandora radio works OK except for initial 1 or 2 pops. I now do notice I can adjust contrast pot and see 16 squares across Blue LCD. So that part works. Right now using wired LAN instead of WiFi, thinking 200 ma less may help troubleshoot. Quit pianobar and did this again.

cd Python-WiFi-Radio
sudo python Adafruit_CharLCDPlate.py

Got same error lines of previous post.

PS Twitter Box still works perfectly!

donde

I'll take some pictures of Plate and send them.

PICTURES BELOW
IMG_0999r.JPG
IMG_0999r.JPG (77.19 KiB) Viewed 952 times
IMG_0996r.JPG
IMG_0996r.JPG (92.08 KiB) Viewed 952 times
Attachments
IMG_0998r.JPG
IMG_0998r.JPG (71.14 KiB) Viewed 948 times

User avatar
donde
 
Posts: 192
Joined: Wed May 25, 2011 1:52 am

Re: Raspberery Pi Internet Radio

Post by donde »

Have not heard from Phil of Adafruit, so made some more tests.
I put Occidentalis on another SD card, this time 8 GB instead of 4, and Class 10.
Then I followed instructions for just the Raspberry Pi Plate LCD. No WiFi Radio code.
I inputted the code very carefully from the Usage section of the tutorial.
Finnaly I got to this point:
sudo python Adafruit_CharLCDPlate.py
I sent the command.
Got the same error message as before.

Traceback (most recent call last):
File "Adafruit_CharLCDPlate.py", line 442, in <module>
lcd = Adafruit_CharLCDPlate()
File "Adafruit_CharLCDPlate.py", line 93, in __init__
self.i2c.address, self.MCP23017_IOCON_BANK1, 0)
IOError: [Errno 5] Input/output error

Also could not find this in: Adafruit_CharLCDPlate.py
lcd = Adafruit_CharLCDPlate(busnum = 0)
or
lcd = Adafruit_CharLCDPlate(busnum = 1)
Usage says "If you have a rev 2 (512MB) Pi, or if you're not getting anything displaying, it might be due to the I2C bus number change in the Pi hardware. Edit Adafruit_CharLCD.py using a command like "nano Adafruit_CharLCD.py" and change the line.

This is not as important as the I/O error above.

Maybe bus expander is bad?
Adafruit, please help...thanks...donde

User avatar
adafruit_support_rick
 
Posts: 35092
Joined: Tue Mar 15, 2011 11:42 am

Re: Raspberery Pi Internet Radio

Post by adafruit_support_rick »

What do you get from i2cdetect -y 0 or i2cdetect -y 1
Is the plate visible on either bus?
What model and revision Pi do you have?

User avatar
donde
 
Posts: 192
Joined: Wed May 25, 2011 1:52 am

Re: Raspberery Pi Internet Radio

Post by donde »

What do you get
sudo i2cdetect -y 0
Shows a table 00 to 70 down and 0 to f across with no entry in table.

sudo i2cdetect -y 1
Shows same table but with a 20 in column 0, row 20

The Raspberry Pi has 512 Meg on the board, it should be Version 2. It has a Copyright 2011,2012.
A serial # FXNM121155160

User avatar
adafruit_support_rick
 
Posts: 35092
Joined: Tue Mar 15, 2011 11:42 am

Re: Raspberery Pi Internet Radio

Post by adafruit_support_rick »

OK - we've seen strange things like this before. The error message you're getting is the same one I get with no CharLCDPlate attached. Yet yours shows up in i2cdetect.

In all the other cases like this that I've seen, the setup was with a Pi Cobbler and problem was a poor ground connection. I've never seen it with a plate. Yet it must be something like that. Your solders look fine, but have you tried re-flowing the solders on the 2x13 pin header?

If that doesn't work, then I can't think of anything else but to replace the LCD plate. Give it a shot, and if it doesn't help, email [email protected] with a link to this thread and ask for a new plate.

User avatar
donde
 
Posts: 192
Joined: Wed May 25, 2011 1:52 am

Re: Raspberery Pi Internet Radio

Post by donde »

Yet yours shows up in i2cdetect.
What should I see in i2cdetect when everything is working correctly?

I'll check the 2 x 13 header again.

Also, if I send for a new LCD Plate, could you be sure the chip and LCD are working OK?

donde

User avatar
adafruit_support_rick
 
Posts: 35092
Joined: Tue Mar 15, 2011 11:42 am

Re: Raspberery Pi Internet Radio

Post by adafruit_support_rick »

You should see 0x20 in i2cdetect, and you do. But the python program is acting like 0x20 isn't there. That's the problem.

User avatar
donde
 
Posts: 192
Joined: Wed May 25, 2011 1:52 am

Re: Raspberery Pi Internet Radio

Post by donde »

You should see 0x20
Do you want me to look at some part of the python program? Maybe a sudo apt-get update which I did changed something in the code? Like you, I just can't believe the LCD plate is bad. This WiFi project came out some time ago. Could you setup the LCD Plate and a RPi, using latest the downloads like I did from the tutorial. And then do an Update. Maybe, we'll discover something. :D
But, then again, I'm probably the only one having this particular trouble at this period of time. I got the kit about a week ago.
Appended:
I have a good quality scope.

User avatar
adafruit_support_rick
 
Posts: 35092
Joined: Tue Mar 15, 2011 11:42 am

Re: Raspberery Pi Internet Radio

Post by adafruit_support_rick »

In LCDtest.py, change this line to specify bus 1:

Code: Select all

# Initialize the LCD plate.  Should auto-detect correct I2C bus.  If not,
# pass '0' for early 256 MB Model B boards or '1' for all later versions
lcd = Adafruit_CharLCDPlate(1)

User avatar
donde
 
Posts: 192
Joined: Wed May 25, 2011 1:52 am

Re: Raspberery Pi Internet Radio

Post by donde »

In LCDtest.py,
Rick...Did what you said...No Joy...same error message

User avatar
adafruit_support_rick
 
Posts: 35092
Joined: Tue Mar 15, 2011 11:42 am

Re: Raspberery Pi Internet Radio

Post by adafruit_support_rick »

So, let's review.
- You ran LCDtest.py with bus 0 specifically called out, and you still get the same error.
- You ran LCDtest.py with bus 1 specifically called out, and you still get the same error.
- You ran CharLCDPlate.py, which should auto-detect the bus, and you still get the same error.
- You re-flowed the solders on the 2x13 pin header, and you still get the same error.

Does that sound right? You get the error in all cases?

User avatar
donde
 
Posts: 192
Joined: Wed May 25, 2011 1:52 am

Re: Raspberery Pi Internet Radio

Post by donde »

So, let's review.
Hey Rick...it works! The Pie Plate is good. I forgot I have a RPi Rev 1. I've been using Rev 2. I tried it with same SD card. The LCD test came right up. Went back to Rev 2, same error. I've been reading. The GPIO pins are named differently between Rev 1 and 2. Attached files show differences. Does the software understand the GPIO difference and correct for it? If so, my Rev 2 does not. This Pie Plate only likes Rev 1.

GPIO Rev 2
GPIO Rev 2
Raspberry-Pi-GPIO-Layout-Revision-2.png (58.11 KiB) Viewed 855 times
GPIO Rev 1
GPIO Rev 1
Raspberry-Pi-GPIO-Layout-Revision-1.png (57.9 KiB) Viewed 855 times

User avatar
adafruit_support_rick
 
Posts: 35092
Joined: Tue Mar 15, 2011 11:42 am

Re: Raspberery Pi Internet Radio

Post by adafruit_support_rick »

The I2C pins are in the same place between R1 and R2 - it's just that they're mapped to different buses. So the plate doesn't care which version it's attached to.

Are you using the same SD card on both Pi's? That might explain why the auto detect fails. But the call in LCDtest.py should override the auto detect. Very strange.

Locked
Forum rules
Talk about Adafruit Raspberry Pi® accessories! Please do not ask for Linux support, this is for Adafruit products only! For Raspberry Pi help please visit: http://www.raspberrypi.org/phpBB3/

Return to “Adafruit Raspberry Pi® accessories”