2017-05-04 00:33:20 -07:00
|
|
|
/*
|
|
|
|
* Author: Abhishek Malik <abhishek.malik@intel.com>
|
|
|
|
* Copyright (c) 2017 Intel Corporation.
|
|
|
|
*
|
2019-07-30 19:41:32 -07:00
|
|
|
* This program and the accompanying materials are made available under the
|
|
|
|
* terms of the The MIT License which is available at
|
|
|
|
* https://opensource.org/licenses/MIT.
|
2017-05-04 00:33:20 -07:00
|
|
|
*
|
2019-07-30 19:41:32 -07:00
|
|
|
* SPDX-License-Identifier: MIT
|
2017-05-04 00:33:20 -07:00
|
|
|
*/
|
|
|
|
|
|
|
|
#include <stdio.h>
|
|
|
|
#include <stdlib.h>
|
|
|
|
#include <string.h>
|
|
|
|
#include <stdlib.h>
|
|
|
|
#include <unistd.h>
|
|
|
|
#include "veml6070.h"
|
|
|
|
|
|
|
|
#include "upm_utilities.h"
|
|
|
|
|
|
|
|
int main()
|
|
|
|
{
|
2017-05-18 13:55:21 -07:00
|
|
|
veml6070_context dev = veml6070_init(0);
|
2017-05-04 00:33:20 -07:00
|
|
|
if(dev == NULL) {
|
|
|
|
printf("Unable to initialize sensor\n");
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
upm_delay(1);
|
|
|
|
|
|
|
|
while(1){
|
|
|
|
printf("Retrieved UV Value: %d\n", veml6070_get_uv_intensity(dev));
|
|
|
|
upm_delay(1);
|
|
|
|
}
|
|
|
|
|
|
|
|
return 0;
|
|
|
|
}
|