Offline
Newbie
Karma: 0
Posts: 9
|
 |
« on: June 30, 2011, 12:10:17 pm » |
Anyone had any luck getting the SP03 working on I2C? Looking at other code samples and the documentation, this is what I have to say custom text:
Wire.beginTransmission(0x62); //Address Wire.send(0x00); // Command Register Wire.send(0x00); // NULL Wire.send(0x00); // Volume (Max) Wire.send(0x05); // Speed Wire.send(0x03); // Pitch Wire.send("This is a test"); // Text to say Wire.send(0x00); // NULL Wire.endTransmission(); // ***** Hangs here!!! ***** Wire.beginTransmission(0x62); Wire.send(0x00); // Command Register Wire.send(0x40); // Command to say stored buffer text Wire.endTransmission();
And this is what I have to say a pre-stored phrase: Wire.beginTransmission(0x62); Wire.send(0x00); Wire.send(0x02); Wire.endTransmission();
I have found that this all hangs on endTransmission no matter what I do. If anyone has any suggestion/comment/whatever, lets have it.
|
|
|
|
|
Logged
|
|
|
|
|
Global Moderator
Boston area, metrowest
Offline
Brattain Member
Karma: 247
Posts: 16535
Available for Design & Build services
|
 |
« Reply #1 on: June 30, 2011, 12:21:15 pm » |
What is SPO3?
|
|
|
|
|
Logged
|
|
|
|
|
Worcester, MA
Offline
God Member
Karma: 2
Posts: 619
Arduino rocks
|
 |
« Reply #2 on: June 30, 2011, 12:25:09 pm » |
Are you sure the address is 0x62 not 0xC4 ?
|
|
|
|
|
Logged
|
|
|
|
|
Massachusetts, USA
Offline
Tesla Member
Karma: 96
Posts: 6372
|
 |
« Reply #3 on: June 30, 2011, 12:26:38 pm » |
http://www.robotstorehk.com/SP03Tech.pdfDid you include the required I2C pull-up resistors in your circuit?
|
|
|
|
|
Logged
|
|
|
|
|
Global Moderator
Boston area, metrowest
Offline
Brattain Member
Karma: 247
Posts: 16535
Available for Design & Build services
|
 |
« Reply #4 on: June 30, 2011, 12:42:34 pm » |
Are these available in the US? Looks like a neat board.
|
|
|
|
|
Logged
|
|
|
|
|
|
|
Massachusetts, USA
Offline
Tesla Member
Karma: 96
Posts: 6372
|
 |
« Reply #6 on: June 30, 2011, 02:33:17 pm » |
@johnwasser: The code I provide is the actual code I use.
I asked about the pull-up resistors. That's hardware not code.
|
|
|
|
|
Logged
|
|
|
|
|
Offline
Newbie
Karma: 0
Posts: 9
|
 |
« Reply #7 on: June 30, 2011, 03:14:21 pm » |
@johnwasser Yup. I have pullups on the bus. I also tried it directly off the Arduino (Just for S&G) and also tried it chained off my MD25 (Which has pull ups also). Part of my trouble shooting process, I tried different cables (Thinking I may have a short or a break) and also tried different devices (SRF08 CMPS09 both work perfectly).
|
|
|
|
|
Logged
|
|
|
|
|
Worcester, MA
Offline
God Member
Karma: 2
Posts: 619
Arduino rocks
|
 |
« Reply #8 on: June 30, 2011, 03:17:20 pm » |
|
|
|
|
|
Logged
|
|
|
|
|
Offline
Newbie
Karma: 0
Posts: 9
|
 |
« Reply #9 on: June 30, 2011, 03:35:31 pm » |
@wayneft Cool tool. I will run it tonight and see what it comes up with.
|
|
|
|
|
Logged
|
|
|
|
|
Offline
Newbie
Karma: 0
Posts: 9
|
 |
« Reply #10 on: July 01, 2011, 12:08:35 am » |
@wayneft I dont know what the malfunction here is, but I just ran through a number of tests with two SRF08's a CMPS09, and an MD25 all connected together. They all performed their functions perfectly. The I2C scanner apparently does not work with an Uno32 for some reason. So, none of my devices showed up at all. Anyway, I messed around with the SP03 some more, and found that I could not even get the version number from it. It is simply non-responsive on I2c at all! So... just gonna have to (cringe) do it on Serial... 
|
|
|
|
|
Logged
|
|
|
|
|
Massachusetts, USA
Offline
Tesla Member
Karma: 96
Posts: 6372
|
 |
« Reply #11 on: July 01, 2011, 07:28:05 am » |
The I2C scanner apparently does not work with an Uno32 for some reason. So, none of my devices showed up at all.
This is the first you've mentioned UNO32, the PIC-based "Arduino compatible" board. Perhaps you should try the UNO32 community for support. It seems likely that the PIC processor and associated software is not fully compatible with Arduino code.
|
|
|
|
|
Logged
|
|
|
|
|
Offline
Newbie
Karma: 0
Posts: 9
|
 |
« Reply #12 on: July 01, 2011, 11:24:12 am » |
@johnwasser The purpose of this initial post was to see if anyone had experience with this component and could hopefully share some code to get it working. I have no intent to diagnose if/how/why the I2C scanner does not work because that is not within scope of this thread, and it is not even in scope of this board since it is most likely an issue Chipkit has to address and resolve.
End result is that apparently this component (SP03) is having an I2C issue. I dont think the issue is with the Uno32 since all my other boards work flawlessly. Hence, I am simply going to use Serial on this unless there is an unlikely solution from Chipkit.
|
|
|
|
|
Logged
|
|
|
|
|
|