Hello, friends.
Today I just discussed about two sensors.
One is HDR and one is touch sensor.
So both the sensors will generate analog signal as well as digital signal.
In the case of analog signal, it will generate when we just go with the LDR, it will generate around
4.8V and the same way 4.7V touch sensor generate.
If we go with the digital signal, it will generate a high when we touch it or when we place my hand
over the LDR.
As you see over here on the port A over here, I just made the connection for LDR and made the connection
for this touch sensor over the port, see?
So right now I just show you the.
Programming part of these particular cases.
So first I just use digital input signal.
Well.
In this case I just use for Port A.
This will show me the output of Port A.
I just select the PIN number ten over here because I just connect it to PIN number 13.
The output of LDR.
Now I just use another Express VI for the touch sensor also.
Just go to the Mario.
Digital input.
And over here, I just need to select the port.
See?
Digital pin zero.
Or see discipline.
Zero.
I have selected over here.
Touch sensor and IR sensor both are interfaced.
With my radio.
Now I just want to show the output of these two.
Signals over the.
LEDs.
So I just use this particular.
A lady.
I want to show the output over the software as well, over the hardware.
So I just.
Select two LEDs.
I just use PIN number zero for LDR and three for.
That census.
So right now I also want to use the button to stop the code that is on board.
Board.
On board button.
I'm not using any stop button in this case.
I just want to stop the.
My area code using hardware.
Button only.
So as you see over here, this is my signal.
This is my touch sensor signal.
I just create a while loop over here to continue.
Reading and writing.
Just stopping.
I just connect this button to the while loop.
Now I just save it.
You just need to run the code.
In this case.
I'm just forget to.
Create control indicator over the software.
In this case, we just check the output or the hardware only.
So when I just put my hand over the as you see, zero goes high on board and when I just touch it will
turn on the Led three.
So now I just stop this.
So I just press the button.
It will stop my code.
Now also.
Check the output.
Let us say this is my elder.
Another button I want to use.
Let's say this is my touch sensor.
I just change the color of this particular.
You just go to the properties.
In the properties.
You just set the turn on color.
Right now the color is yellow.
I just use another led to check the button status that is on board button.
It is my button.
To stop.
So over here again, I just change the color.
Let's say it is red.
So just need to connect these.
Elder.
That sensor.
And this is my button.
So you need to save it again.
Run this code.
You can also create this code using low level coding.
So now.
As you see when I just put my hand.
Led on board.
Led zero goes high, goes high on the software part.
Touch Sensor.
As you see.
And now just press the button.
It will stop my loop.
So this is how you can create your own codes using Miro application.
Miro Educational Board.
So this is all about today's lecture.
Thank you.