Added dummy light driver. Now skywebsense likes Z1
The light sensor driver is mapped to the same pin as the potentiometer in Z1 Starter Platform. sky-websense is untouched, though.
This commit is contained in:
parent
414d926966
commit
701a42e239
6 changed files with 311 additions and 5 deletions
|
@ -42,7 +42,7 @@
|
|||
#include "httpd-simple.h"
|
||||
#include "webserver-nogui.h"
|
||||
#include "dev/sht11-sensor.h"
|
||||
//#include "dev/light-sensor.h"
|
||||
#include "dev/light-sensor.h"
|
||||
#include "dev/leds.h"
|
||||
#include <stdio.h>
|
||||
|
||||
|
@ -59,8 +59,7 @@ static int sensors_pos;
|
|||
static int
|
||||
get_light(void)
|
||||
{
|
||||
//return 10 * light_sensor.value(LIGHT_SENSOR_PHOTOSYNTHETIC) / 7;
|
||||
return 0;
|
||||
return 10 * light_sensor.value(LIGHT_SENSOR_PHOTOSYNTHETIC) / 7;
|
||||
}
|
||||
/*---------------------------------------------------------------------------*/
|
||||
static int
|
||||
|
@ -152,7 +151,7 @@ PROCESS_THREAD(web_sense_process, ev, data)
|
|||
process_start(&webserver_nogui_process, NULL);
|
||||
|
||||
etimer_set(&timer, CLOCK_SECOND * 2);
|
||||
//SENSORS_ACTIVATE(light_sensor);
|
||||
SENSORS_ACTIVATE(light_sensor);
|
||||
SENSORS_ACTIVATE(sht11_sensor);
|
||||
|
||||
while(1) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue