mirror of
https://github.com/eclipse/upm.git
synced 2025-03-17 22:17:28 +03:00

Added examples for: mq303a m24lr64e mpr121 servo a110x gp2y0a ttp223 loudness tsl2561 Signed-off-by: Abhishek Malik <abhishek.malik@intel.com>
26 lines
462 B
C
26 lines
462 B
C
//Modified: Abhishek Malik <abhishek.malik@intel.com>
|
|
|
|
#include <stdio.h>
|
|
#include <stdlib.h>
|
|
#include <string.h>
|
|
#include <stdlib.h>
|
|
#include <unistd.h>
|
|
#include "loudness.h"
|
|
|
|
int main()
|
|
{
|
|
loudness_context dev = loudness_init(14);
|
|
int val;
|
|
while(1){
|
|
if(loudness_get_value(dev, &val) != UPM_SUCCESS){
|
|
printf("Failed to get any values from the sensor\n");
|
|
}
|
|
printf("Loudness Value: %d\n", val);
|
|
upm_delay(1);
|
|
}
|
|
loudness_close(dev);
|
|
|
|
return 0;
|
|
}
|
|
|