diff --git a/Project/applications/smartcities/sensors.c b/Project/applications/smartcities/sensors.c index 5ea92ba..a702178 100644 --- a/Project/applications/smartcities/sensors.c +++ b/Project/applications/smartcities/sensors.c @@ -1,8 +1,9 @@ #include "sensors.h" -sensor light_sensor = {LIGHT_ADDR, "Light sensor", "illumination", "lux",NULL}; -sensor ultrasound_sensor = {DISTANCE_ADDR, "Ultrasound sensor", "distance", "cm",NULL}; -sensor pressure_sensor = {PRESSURE_ADDR, "Pressure sensor", "pressure", "kPa",NULL}; +sensor light_sensor = {LIGHT_ADDR, "Light sensor", "illumination", "lux",NULL}; +sensor ultrasound_sensor = {DISTANCE_ADDR, "Ultrasound sensor", "distance", "cm",NULL}; +sensor pressure_sensor = {PRESSURE_ADDR, "Pressure sensor", "pressure", "kPa",NULL}; +sensor humidity_temp_sensor = {HUMIDITY_TEMP_ADDR, "Humidity and Temperature","ÂșC,RH",NULL}; uint32_t get_light_data(void) { @@ -21,7 +22,7 @@ uint16_t get_light_ch0(void) I2C_start(I2C1,LIGHT_ADDR << 1, I2C_Direction_Transmitter); I2C_write(I2C1, 0x0D); I2C_stop(I2C1); - + I2C_start(I2C1, LIGHT_ADDR << 1, I2C_Direction_Receiver); data = I2C_read_ack(I2C1); data = data << 8;