Problem with analog shield

Hi, I´m trying to detect current with an Analog Shield by Digilent connected to an Arduino DUE with the command, but the program crashes when we read. Have the same problem occured for anyone else and how did you solve it?

the code look like this:

#include <SPI.h>	//required for ChipKIT but does not affect Arduino
#include <analogShield.h>   //Include to use analog shield.

void setup()

  //no setup

unsigned int count = 0;
void loop()
  count =;  //read in on port labeled 'IN0'
  analog.write(0, count);  //write out the value on port labeled 'OUT0'

thanks for the help

Might this question be better off in the Due section of the forum ?

Are you sure that the analogue shield is compatible with the Due ?

What do you mean by "crashes" - how do you know? It might seem to stop responding, but that's not necessarily a crash.

In your main loop output a Serial.println (together with your delay) so you can tell whether the loop is still running or not.

Just FYI, Just started looking into this but I have not been able to get the Digilent analog shield to work on either the mega2560 or the DUE. Works fine on Uno.

Looking at the library it appears someone attempted to make it due compatible but comments say it was not tested on due.

Total bummer because I need the memory and speed of the due. I will try to hack the library and make it work. Will post it if successful.

Maybe that tip on skipping the library and going direct will work.

If you're looking for speed and memory check this out:

"Version 3.6 features a 32 bit 180 MHz ARM Cortex-M4 processor with floating point unit. All digital and analog pins are 3.3 volts. Do not apply more than 3.3V to any signal pin."

More details on features:

Hopefully the libraries are compatible with the board above. It's Arduino compatible and they do offer a 5V version.