Hello, friends.
Today I will tell you how to read a digital signal using any USB DAC card with the help of Python programming.
So over here I have the code.
You have to just import any max.
Then you have to call or you have to start the task in the task.
You have to just specify the digital pin as an input pin.
As you see, Task Dot D stands for digital input channels and digital input channel.
And in this case the device name is DEV1, and the port I'm using is zero and line is zero.
As you already know, in my previous videos, I already told you that the digital pins we can use as
an output port or as an input port means we can generate signal using the specified digital pin and
we can also acquire the signal or also acquire the digital signal using the that specified pin means
it will work on dual mode.
It will generate a signal or it will acquire a digital signal.
Okay, so over here I just start the task right now.
The value task read and print value start last, stop the task.
So you have to run it.
So now just move to the hardware part in the hardware part.
As you already know, over here we have digital pins and right now I'm using this pin number zero or
port zero, and I'm just using a five volt signal with this.
I'm just using a button that is my push button.
You have to push it.
It will pass the value that is five volt to the port zero digital pin zero.
When you move your hand, it will stop the value.
Or you can say right now the value is not passing to the port zero.
In that case, the value is false and if you press it, the value is true means it will pass five volt
to the digital port.
So now I just pressing it and hit on run button run module.
As you see, I'm getting over here.
True value.
Now I'm just moving my hand and again, I'm just running the code run module as you see right now.
I got false again when I pressing the value, just minimize it.
Run it again.
Run it.
So now true when I again move it, move my hand from the button.
So now I again run it.
So now I just got the value false.
So this is how you can read a digital signal from deck card 6001 with the help of Python programming.
Thank you.