ClimateNetTumoLabs / raspberry_soft

0 stars 0 forks source link

Wind Direction Sensor Data Transmission Issue #24

Open HovhannesApinyan opened 5 months ago

HovhannesApinyan commented 5 months ago

Problem: The wind direction sensor has stopped transmitting data after a certain point.

Objective: Identify whether the issue stems from the code, sensor malfunction, or associated chip.

Action:

  1. Investigate when the sensor ceased functioning.
  2. Determine if the problem lies in the code, sensor hardware, or chip.
  3. Test and analyze to isolate the root cause.
  4. Provide a concise report outlining the identified issue and recommended solution.
HovhannesApinyan commented 5 months ago

@AlternativeFuture We need to understand why certain behaviors happen instead of just dealing with their surface signs. Understanding why these behaviors occur is crucial for devising effective and sustainable solutions.

Objective:

  1. Analyze and pinpoint the root problem.
  2. Document why and when this issue occurs and where the core problem lies.
  3. Solve the problem and create more durable and adaptable code.
hovhannesyepremyan commented 5 months ago

This issue occurs when we decrease “MEASURING_TIME”. The root of the problem is the incorrectly documented config.py file and 2 conditions ordering.

# It is recommended to set the value >= than
# MAX_READING_TIME + 10
MEASURING_TIME = 310

“MEASURING_TIME” must not be greater than or equal to “MAX_READING_TIME” + 10 seconds; it must be greater than “MAX_READING_TIME” + 10 seconds

also, a minor change in the read_sensor.py

I solved the problem; you can find the correction in corresponding PULL REQUEST