I connect a distance sensor to the k8055 board.
It is an analogue input.
When the sensor detect an object, the input value increase. It has different value when the object moves nearer or far.
You can use the function ReadAllAnalog to read (and store) the analog input values:
long lngAna1;
long lngAna2;
ReadAllAnalog(&lngAna1, &lngAna2); // Read all analog values
If you use Microsoft Visual C++ 2008 Express Edition, here is a link to the example project: box.net/shared/j6grkiv9jz
Thanks for the reply.
I’ll look on the code given.
[quote=“VEL255”]You can use the function ReadAllAnalog to read (and store) the analog input values:
long lngAna1;
long lngAna2;
ReadAllAnalog(&lngAna1, &lngAna2); // Read all analog values
If you use Microsoft Visual C++ 2008 Express Edition, here is a link to the example project: box.net/shared/j6grkiv9jz[/quote]