Yahoo Groups archive

Lpc2000

Index last updated: 2026-04-28 23:31 UTC

Message

RE: [lpc2000] code for lpc2129 to read sensors

2004-10-04 by Lasse Madsen

I haven't worked with that processor but I must be a pice of cake ...

You can read the sensor in an idle loop...



#define output PORTP0.1  // define the ADXL 202 output 

void read_sensor ( unsigned long *x, unsigned long *y )
{
while ( output );
while ( !output );
while ( output ) x+=1;
while ( !output ) y+=1; 
}


unsigned long x,y;

read_sensor (x,y);

printf("\r\nFrequency is: %f",(float)1/(x+y));
printf("\r\nPeriod High: %lu",x);
printf("\r\nPeriod Low: %lu",y);

Best regards
Lasse Madsen



-----Original Message-----
From: dasbento@... [mailto:dasbento@...] 
Sent: 4. oktober 2004 13:34
To: lpc2000@yahoogroups.com
Subject: [lpc2000] code for lpc2129 to read sensors


Hello,  
  
I'm working with the lpc2129 to read and to process data of inertial
sensors. By chance anybody already developed some code, for example,
to read the accelerometer ADXL202E and the gyro ADXRS300?? 


Best regards
_________________________________________________________
CEAC Cursos de formação profissional - peça informações aqui.:
http://ceac.online.pt/




 
Yahoo! Groups Links

Attachments

Move to quarantaine

This moves the raw source file on disk only. The archive index is not changed automatically, so you still need to run a manual refresh afterward.