One wire example in E-Book

Hi,

Tried to run the subject line but I get an error of :
Error 1 The type or namespace name ‘Cpu’ could not be found (are you missing a using directive or an assembly reference?)

I copied and pasted directly from the book to my project. I added the FEZDomino_GHIElectronics.NETMF.FEZ and GHIElectronics.NETMF.Hardware references. What other references do I need to add or is there a missing line of code?

Thanks!

Ok. Figured it out myself after looking at more of the online documentation. Had to add the following references: Microsoft.SPOT.Hardware
Microsoft.SPOT.IO

Add these along with the rest I listed in previous post.

I do not think you need SPOT.IO but you almost always should add SPOT.Hardware

Yes, didn’t need the SPOT.IO. I have a new problem with this though I think. When run the debug I get this output: The program ‘[8] Micro Framework application: Managed’ has exited with code 0 (0x0).

I’ve tried putting this line of code at the beginning:
Debug.Print(“Hello.”);

I did that to see where a problem may be. It does not print that out the debug window like when I tried in the first project of the book. I just received my Domino today and put in a DS18s20 at Di13. Changed the code to use Di13 instead. I wanted to at least get the ROM ID first then change the rest of the code to work with that device correctly. Any thoughts would be much appreciated!

Maybe your firmware is not the latest.

Try this, remove all GHI libraries and try the Debug.Print you have. If it worked fine then your firmware or SDK is not the latest and not matching.

  1. Make sure you have latest SDK (compare release notes from your PC to one on our website)
  2. Make sure you update the firmware from the latest SDK.

You the chimp! Didn’t have the latest firmware. Had April 2 2010 version instead of April 26 2010. Thanks for the prompt support!

Ok…I was having a problem reading from any 1-wire device using the ebook example. I figured out I needed to use Di3 as it is the pin having the pull up resistor according to the schematic. The brochure shows An4 and An5 have the pull ups but the *s are on Di3 and Di2. Should be good to go now! :smiley:

The brochure is definitely wrong! We’ll fix it on Monday. This is a copy/paste error from the FEZ Mini brochure.

Thanks for the support.

The brochure is fixed