- From: Daniel Nilsson <comedi-list_at_dnil.se>
- Date: Tue, 14 Feb 2006 22:22:35 +0100
On Tue, Feb 14, 2006 at 04:34:24PM +0000, Francisco Mota wrote:
> Hi Daniel,
> Thanks for the answer. Yes I do.
> Cheers,
> Francisco Mota
>
> PS. The code is below
>
> =================
> #include <math.h>
> #include <stdio.h>
> #include <unistd.h>
> #include <comedilib.h>
>
> int subdev = 0;
> int chan = 0;
> //int range = 0;
> int aref = AREF_GROUND;
>
> int main()
> {
> comedi_t *it;
> unsigned int in=0; // unsigned
> int test=0;
>
> it=comedi_open("/dev/comedi0");
>
> comedi_dio_config(it, subdev, chan, COMEDI_INPUT);
>
> test=comedi_dio_read(it, subdev, chan,&in);
>
> printf("%d %d\n", test,in);
>
> return 0;
>
> }
Sorry, I don't know why this doesn't work then...
--
Daniel Nilsson
Received on 2006-02-14Z21:22:35