1
Vote

Problem reading analog devices .Net Micro Framework Driver

description

Hardware:
GHI FEZ Cobra II Mainboard
GHI DaisyLink attached to socket 1 (Y socket)
GHI LightSensor (analog sensor)

Software / Firmware:
4.2.11.1 Firmware
NETMF 4.2
DaisyLink 2.42.0.0
Compiled the dotnetwarrior.NetMF.DL40.dll with Micro Framework 4.2

Code:
using dotnetwarrior.NetMF.DL40; //Also added reference to Gadgeteer.DaisyLink assembly

DLIOModule _dlioModule_4 = new DLIOModule(1); //Socket 1

// Using DaisyLink board pin marked P1.4
IAnalogInputPin AD1_4 = _dlioModule_4.CreateAnalogInputPin(AnalogInputPinId.PIO1_4);

double raw = AD1_4.ReadRaw(); //This always returns 65535.0
double read = AD1_4.Read(); //This always returns 1.0


Notes: I can test the voltage on the DaisyLink 3.3 pin (it is 3.3.09), and the voltage coming from the Light Sensor (usually about 2.7). However, the raw and read methods always return 65535.0, and 1.0, respectively.

Any suggestions would be appreciated.

comments

taylorza wrote May 14, 2014 at 2:49 AM

Hi,

Did you update the firmware on the DL40? The stock firmware from GHI does not provide the functionality for this library, you need to flash the DL40 with the firmware from this project.

You can find the binaries on the GHI site at the following location
https://www.ghielectronics.com/community/codeshare/entry/633