Answered step by step
Verified Expert Solution
Question
1 Approved Answer
You are to develop a control code to fulfill these specifications: The Force Sensor can sense a force from 0 N to 1 0 N
You are to develop a control code to fulfill these specifications:
The Force Sensor can sense a force from N to N at input A
If the force is below N then only green LED is blinking.
If the force is above N then only red led is blinking.
Otherwise, both LEDs are blinking.
The servo angle is continuously controlled such that it varies automatically from O at N to O at N That is the limits are: N gives O fully opened; N gives O fully closed
The blinking delay time of LEDs is such that N causes a long delay of ms; and N causes short delay of ms Meaning the blinking rate is inversely proportional to the force. So low force gives slow blinking, high force gives fast blinking.
The sensed force value, the blinking rate, and the rotated angle are to be displayed on the serial monitor.
Force sensor output value in decimal are N produces a decimal ; N produces in decimal.
Assume the application scenario as this:
The force sensor is attached to a window.
The openingandclosing angle of the window is controlled by the servo.
If the wind blowing on to the window causes a force of below N then is considered a safe cool breeze day and ok to open the window with large angle as controlled by the servo. The green LED is blinking at slower rate.
If the force by the wind is above N then red LED is blinking at a faster rate as a sign of warning of strong wind blowing, and the window is opened at smaller angle by the servo control. When the force is N the window is totally closed O and the red LED is blinking very fast.
Otherwise, both LEDs are blinking alternately indicating it is a windy day and the window angle is appropriately adjusted by the servo.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started