46
edits
No edit summary |
No edit summary |
||
Line 29: | Line 29: | ||
The next step was to replace our previously used random numbers with actual gas concentration values measured by the sensor. We then expanded the system to incorporate six sensors and six motors, which required multiple iterations to perfect. A major challenge was implementing all sensor values, motors, and their corresponding variables into a function that allowed each sensor-motor pair to operate independently. We replaced the general delay time in the loop with millis() to enhance performance and flexibility. | The next step was to replace our previously used random numbers with actual gas concentration values measured by the sensor. We then expanded the system to incorporate six sensors and six motors, which required multiple iterations to perfect. A major challenge was implementing all sensor values, motors, and their corresponding variables into a function that allowed each sensor-motor pair to operate independently. We replaced the general delay time in the loop with millis() to enhance performance and flexibility. | ||
[[File:SG90 9g Micro Servo.jpg|thumb|273x273px]] | |||
After measuring the gas concentrations produced by plants over time, we made several adjustments to optimize the installation. Each motor was assigned an individual trigger value based on the gas readings from its respective sensor. Since sensor readings were taken at short intervals and did not fluctuate significantly, motors would have been triggered too frequently, leading to excessive noise. To mitigate this, we introduced individual delay times for each motor before they could be triggered again. To create a more natural and less predictable sound pattern, we introduced a "random factor." This factor was recalculated with each sensor reading and multiplied by the motor’s delay time, ensuring a more varied and pleasant auditory experience. | After measuring the gas concentrations produced by plants over time, we made several adjustments to optimize the installation. Each motor was assigned an individual trigger value based on the gas readings from its respective sensor. Since sensor readings were taken at short intervals and did not fluctuate significantly, motors would have been triggered too frequently, leading to excessive noise. To mitigate this, we introduced individual delay times for each motor before they could be triggered again. To create a more natural and less predictable sound pattern, we introduced a "random factor." This factor was recalculated with each sensor reading and multiplied by the motor’s delay time, ensuring a more varied and pleasant auditory experience. | ||
Line 39: | Line 39: | ||
* mq-2 sensor for combustible gas | * mq-2 sensor for combustible gas | ||
* SG90 9g Micro Servo | * SG90 9g Micro Servo | ||
<gallery mode="packed"> | |||
File:Bread board.jpg | |||
File:SG90 9g Micro Servo 2.jpg | |||
File:SG90 9g Micro Servo 3.jpg | |||
File:Mq-2 sensor for combustible gas .jpg | |||
</gallery> | |||
=== Code === | === Code === |
edits