| Author |
Message |
|
docilio
Expert
Joined: Sun Sep 09, 2007 10:12 am Posts: 116
|
 NXT + PCF8574
I am trying to work with RobotC + PCF8574
and until now i can't do nothing with it...
The sample program on RobotC doesn't work for me and i really don't know why.
Anyone could help?
|
| Mon Jun 02, 2008 7:00 am |
|
 |
|
mightor
Moderator
Joined: Wed Mar 05, 2008 8:14 am Posts: 2858 Location: Rotterdam, The Netherlands
|
I would love to know how to use this thing, too. I have one but I have not used it yet.
Regards,
Xander
_________________| Some people, when confronted with a problem, think, "I know, I'll use threads," | and then two they hav erpoblesms. (@nedbat)| My Blog: I'd Rather Be Building Robots| ROBOTC 3rd Party Driver Suite: [ Project Page]
|
| Tue Jun 03, 2008 4:05 am |
|
 |
|
Ford Prefect
Senior Roboticist
Joined: Sat Mar 01, 2008 12:52 pm Posts: 936 Location: a small planet in the vicinity of Beteigeuze
|
hi,
in our German forum we have a member who wrote a program with this PCF to connect a small keypad to the NXT:
http://www.mindstormsforum.de/viewtopic.php?t=2885
foto:
HTH!
_________________ Ford Prefect
Never purchase release 1.x ! (ancient programmer's wisdom) "Don't argue with idiots. They'll drag you down to their level and then beat you with experience."
|
| Tue Jun 03, 2008 8:58 am |
|
 |
|
mightor
Moderator
Joined: Wed Mar 05, 2008 8:14 am Posts: 2858 Location: Rotterdam, The Netherlands
|
Super toll! Thanks for the link, Ford
I am going to have to learn I2C if I am ever to mate my NXT with one of these babies:
It's a Propeller Proto Board, a test board with an 8 core uController (the Parallax Propeller) running at 80MHz. I have two robots powered by these. True multiprocessing  I have a spare board, complete with VGA connector and 2xPS2 for keyboard and mouse.
Regards,
Xander
_________________| Some people, when confronted with a problem, think, "I know, I'll use threads," | and then two they hav erpoblesms. (@nedbat)| My Blog: I'd Rather Be Building Robots| ROBOTC 3rd Party Driver Suite: [ Project Page]
|
| Tue Jun 03, 2008 9:14 am |
|
 |
|
Ford Prefect
Senior Roboticist
Joined: Sat Mar 01, 2008 12:52 pm Posts: 936 Location: a small planet in the vicinity of Beteigeuze
|
I'm glad if I could help!
I myself unfortunately am unable to solder anything - as we call it: I got "two left hands".
But for my neural net I'm looking for a sensor multiplexer for analog sensors, like 20 Touch or Sharp GP2D12 Sensors (<- THAT would be GREAT!)
Are you experienced for such a thing?
_________________ Ford Prefect
Never purchase release 1.x ! (ancient programmer's wisdom) "Don't argue with idiots. They'll drag you down to their level and then beat you with experience."
Last edited by Ford Prefect on Tue Jun 03, 2008 11:59 am, edited 1 time in total.
|
| Tue Jun 03, 2008 9:27 am |
|
 |
|
mightor
Moderator
Joined: Wed Mar 05, 2008 8:14 am Posts: 2858 Location: Rotterdam, The Netherlands
|
Well, I am not an expert, but I manage. The protoboard pictured above comes pre-assembled, so you don't need to do much to make it work. As for ADCs to suit your need, a friend of mine swears by the Maxim MAX127. It has something like 8 x 12bit analogue channels and a very nice I2C interface. They're a little pricey (about 15-20 euro) but you can order "product samples" for free from the website if you have some company address to send them to
Here is some more info on them: LINK.
As for soldering, why not get yourself a breadboard:
No need to solder then, I love those things. Once you have it all working, you stick it onto a proper board and solder it all together. Breadboards are very much in the Lego-spirit, put it together, play with it, then take it apart again.
Regards,
Xander
_________________| Some people, when confronted with a problem, think, "I know, I'll use threads," | and then two they hav erpoblesms. (@nedbat)| My Blog: I'd Rather Be Building Robots| ROBOTC 3rd Party Driver Suite: [ Project Page]
|
| Tue Jun 03, 2008 9:41 am |
|
 |
|
Ford Prefect
Senior Roboticist
Joined: Sat Mar 01, 2008 12:52 pm Posts: 936 Location: a small planet in the vicinity of Beteigeuze
|
thx for the link, but I don't understand anything of those electronics... (otherwise I probably were even able to solder...  )
_________________ Ford Prefect
Never purchase release 1.x ! (ancient programmer's wisdom) "Don't argue with idiots. They'll drag you down to their level and then beat you with experience."
|
| Tue Jun 03, 2008 10:07 am |
|
 |
|
mightor
Moderator
Joined: Wed Mar 05, 2008 8:14 am Posts: 2858 Location: Rotterdam, The Netherlands
|
Surely if you can wrap your brain around AI and NNs, you can figure out a small electronic circuit
Regards,
Xander
_________________| Some people, when confronted with a problem, think, "I know, I'll use threads," | and then two they hav erpoblesms. (@nedbat)| My Blog: I'd Rather Be Building Robots| ROBOTC 3rd Party Driver Suite: [ Project Page]
|
| Tue Jun 03, 2008 1:00 pm |
|
 |
|
starwarslegokid
Moderator
Joined: Wed Jan 31, 2007 3:39 am Posts: 298 Location: San Diego, California. USA
|
Hi Docilio
It looks like there could be a I2C bug in the last 2 beta releases, and I2C devices are not working. This could be the issue. Dicks working on that right now, so hang in there B-)
viewtopic.php?t=591
Scott
_________________Mmmm Legos B-) My Robot Projects: http://www.freewebs.com/robotprojects/
|
| Tue Jun 03, 2008 2:14 pm |
|
 |
|
Ford Prefect
Senior Roboticist
Joined: Sat Mar 01, 2008 12:52 pm Posts: 936 Location: a small planet in the vicinity of Beteigeuze
|
maybe, if I found the time to learn sth. about resistors and transistors and IC's (and English) - but the only thing I know is sth about mathmatics (besides my profession). Unfortunately, nobody is prefect - eehm: perfect. 
_________________ Ford Prefect
Never purchase release 1.x ! (ancient programmer's wisdom) "Don't argue with idiots. They'll drag you down to their level and then beat you with experience."
|
| Tue Jun 03, 2008 3:43 pm |
|
 |
|
starwarslegokid
Moderator
Joined: Wed Jan 31, 2007 3:39 am Posts: 298 Location: San Diego, California. USA
|
lol poke fun at the moderator 
_________________Mmmm Legos B-) My Robot Projects: http://www.freewebs.com/robotprojects/
|
| Tue Jun 03, 2008 3:46 pm |
|
 |
|
squiggy
Rookie
Joined: Fri Apr 20, 2007 3:22 am Posts: 36
|
 Re: NXT + PCF8574
Are you talking abnout minsdsenors unit?
I've used one a few times, what exactly are you trying to do with it?
|
| Tue Jun 03, 2008 6:11 pm |
|
 |
|
squiggy
Rookie
Joined: Fri Apr 20, 2007 3:22 am Posts: 36
|
Here's a sample to use as an input device:
typedef struct{
byte i2cMessageSize;
byte i2cDeviceAddress;
byte i2cWriteMessage;
} i2c_mess;
task main()
{
byte value[2];
int outputNumber;
byte cnt = 0;
SensorType[S1] = sensorI2CCustomFast;
i2c_mess ledArray;
ledArray.i2cMessageSize = 1;
ledArray.i2cDeviceAddress = 0x70;
ledArray.i2cWriteMessage = 0xFF;
while(1)
{
cnt++;
if (nI2CStatus[S1] == NO_ERR)
sendI2CMsg(S1,ledArray.i2cMessageSize,1); // set pins high for input
if (nI2CStatus[S1] == NO_ERR)
readI2CReply(S1, value[0],1); // read pins
outputNumber =(int) value[0];
nxtDisplayTextLine(4, "value %d", outputNumber);
}
}
I also have some out put samples at home I can post later on if you'd like.
If you built the mindsensors board you have to be careful that the address jumpers are set up correctly. And the documantation they have for it is wrong. They give you the adrressing for the PCF8574 but they give you the PCF8574A. The base address of the PCF8574A is 0x70.
|
| Tue Jun 03, 2008 6:17 pm |
|
 |
|
squiggy
Rookie
Joined: Fri Apr 20, 2007 3:22 am Posts: 36
|
I was thinking the same thing. =P
Somebody posted an I2cslave object for the propeller a few weeks ago. I haven't had a chance to try it yet.
 |  |  |  | mightor wrote: Super toll! Thanks for the link, Ford  I am going to have to learn I2C if I am ever to mate my NXT with one of these babies:  It's a Propeller Proto Board, a test board with an 8 core uController (the Parallax Propeller) running at 80MHz. I have two robots powered by these. True multiprocessing  I have a spare board, complete with VGA connector and 2xPS2 for keyboard and mouse. Regards, Xander |  |  |  |  |
|
| Tue Jun 03, 2008 6:19 pm |
|
 |
|
mightor
Moderator
Joined: Wed Mar 05, 2008 8:14 am Posts: 2858 Location: Rotterdam, The Netherlands
|
I saw Hippy's post. I can't wait to try it out. So many things to play with, so little time! Thanks for the code for the mindsensors unit, btw.
Edit: Any code you might have, would be great! Please post whatever you [have|are willing to share].
Regards,
Xander
_________________| Some people, when confronted with a problem, think, "I know, I'll use threads," | and then two they hav erpoblesms. (@nedbat)| My Blog: I'd Rather Be Building Robots| ROBOTC 3rd Party Driver Suite: [ Project Page]
|
| Tue Jun 03, 2008 11:08 pm |
|
|
Who is online |
Users browsing this forum: No registered users and 4 guests |
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot post attachments in this forum
|
|