Page 1 of 2

NXT-G PCF8591 block...

Posted: 16 Nov 2010, 02:17
by nxtreme
I just received the Extreme NXT 2nd edition book. I had the first one in digital format and when the second edition came out I figured I just had to get it as I really enjoyed the first edition. I've speed read the whole thing and it looks like fun, my favorites being the servo controller and the keypad setup. However, I did have one problem. There is a PCF8591 block mentioned in the book. Well, actually two blocks. The Mindsensors one and a different one that is supposedly better. And, I can see why. The Mindsensors block is fairly complicated.

My problem is I can't find the block. It is mentioned in chapter two that NXTasy.org hosts the blocks needed in the book but as we all know, NXTasy is dead :). Xander uploaded the blocks from the repository here but nowhere do I see mention of the PCF8591 block. I also checked both Philo and Mr. Gasperi's websites but it doesn't appear as if they have them. Does anyone have an idea of where I can get this block (or have a copy hidden in the deep, dark depths of their hard drive?)? I might eventually try to see if it's possible to use the I2C R/W blocks but I want to keep it simple for now.

Oh and do yourself a favor and get a copy of the book ;). You can get it on Amazon.com for under $10 US shipped.

Re: NXT-G PCF8591 block...

Posted: 29 Dec 2010, 17:22
by nxtreme
Sorry to bring up an old post. I emailed Philo, who told me that Mr. Gasperi might have a copy of the block. He did and said that I could upload it here. So, I'm uploading it here so that those still programming with the old dinosaur, NXT-G, can use it as well. Would one of the admins mind uploading this to the repository? Credit goes to Michael Gasperi for creating the block and sending me a copy.
8591.zip
PCF8591 NXT-G block.
(136.31 KiB) Downloaded 431 times

Re: NXT-G PCF8591 block...

Posted: 29 Dec 2010, 19:29
by mightor
It's available right here: http://www.mindsensors.com/index.php?mo ... ment_id=78 :)

- Xander

Re: NXT-G PCF8591 block...

Posted: 29 Dec 2010, 20:23
by nxtreme
mightor wrote:It's available right here: http://www.mindsensors.com/index.php?mo ... ment_id=78 :)
It is... and it isn't :P. That's a different block that does the same thing. Like I said before, it is rather buggy and I find Michael Gasperi's version easier to use. It's pretty much just four outs and one it. Each to his own, I guess :D.

Re: NXT-G PCF8591 block...

Posted: 30 Dec 2010, 00:33
by aagruntpuddock
There is a program (looks like some version of C) on this site :- http://www.tau.ac.il/~stoledo/lego/i2c- ... 591accel.c

Absolutely no idea what it is for so don't know if it is useful or not.

Re: NXT-G PCF8591 block...

Posted: 30 Dec 2010, 03:03
by nxtreme
Yes, I saw that code and was trying to base some NXT-G code off of it, using the I2C read/write blocks but never got it working. Finally broke down and figured that I'd use a block intended for the 8591 chip. That's when I created this topic... Thanks though!

Re: NXT-G PCF8591 block...

Posted: 30 Dec 2010, 07:15
by mightor
nxtreme wrote:Like I said before, it is rather buggy and I find Michael Gasperi's version easier to use.
Do them a favour and send Mindsensors a bug report about the block. They're not going to know without your feedback :)

- Xander

Re: NXT-G PCF8591 block...

Posted: 30 Dec 2010, 17:08
by nxtreme
Okie dokie. As soon as I have some time to play around with it and find out exactly what doesn't work the way it should, I will :). Now, off to tame my pet Panther that's wandering around the house...

Re: NXT-G PCF8591 block...

Posted: 19 Feb 2011, 02:59
by nxtreme
I finally emailed Philo, who passed me on to Michael Gasperi, who told me that yes, he did have a copy of the block. I found out that he actually made it, and since NXTasy was the only place it was published (AFAIK), it disappeared. Anyways, I was going to post the zip that he sent me, but forgot (until now...). Anyways, here it is. Haven't actually used it yet, but will eventually. Xander or afanofosc, could you maybe put this in the repository? Thanks again Michael!
8591.zip
I think this is the right one... dual-booting can be a pain at times...
(136.31 KiB) Downloaded 393 times

Re: NXT-G PCF8591 block...

Posted: 19 Feb 2011, 08:59
by h-g-t
Don't know if it included the same file but source code from that book (and many others) can be found at http://www.apress.com/book/sourcecodes