danialhbma / ITP-SE12-Power-Monitoring

ICT3111 Integrative Team Project
1 stars 0 forks source link

Implementation: Ambient Light Sensor #36

Closed yucan-yu closed 1 year ago

yucan-yu commented 1 year ago

As a result of additional requirements:

  1. Contact and retrieve physical sensor (assuming SEN0390) from Wen Jun.
  2. Create a new Ambient class that handles the reading and publishing of ambient light data.
  3. Test sensor in different settings such as well-lit, dim, and dark room environments.
yucan-yu commented 1 year ago

Completed:

  1. To retrieve physical ambient light sensor from Wen Jun next Wed, 050723 afternoon.
  2. Implemented a new Ambient class purely using theory (via reading of documentation). Unable to perform any unit tests currently as sensor is not with me.

TODO:

  1. Ensure code is running as per intended. Once validated, to test the sensors in the different settings mentioned above.
  2. Will only push code after everything is deemed to work fine.
yucan-yu commented 1 year ago

Apologies, forgot to update. Current progress:

Note that I2C address is 0x4A as mentioned by Sarah; will HOTO sensor tomorrow.

yucan-yu commented 1 year ago

Sensor HOTO'ed, in my hands now.

yucan-yu commented 1 year ago

Sensor implemented and working:

Code implemented; tested and working in different environments:

  1. Lights on
  2. Lights off
  3. Environment light

Note: Light readings not updating well with an infinite loop (only showing initial value), but no issues if using deepsleep. Thus, deemed appropriate for solution.