1
00:00:05,000 --> 00:00:05,000
Purpose.

2
00:00:05,000 --> 00:00:11,000
I just download the code from GitHub that is available over here.

3
00:00:12,000 --> 00:00:16,000
I expect this inside the my python code.

4
00:00:17,000 --> 00:00:17,000
Okay.

5
00:00:17,000 --> 00:00:20,000
This is my sketch.

6
00:00:20,000 --> 00:00:25,000
This is available in this file you just downloaded from GitHub.

7
00:00:26,000 --> 00:00:27,000
Open it.

8
00:00:27,000 --> 00:00:30,000
Go to the sketches over here.

9
00:00:30,000 --> 00:00:31,000
You just find out.

10
00:00:31,000 --> 00:00:32,000
Prototype.

11
00:00:33,000 --> 00:00:34,000
Just open it.

12
00:00:40,000 --> 00:00:43,000
Just connect your Arduino with your PC.

13
00:00:45,000 --> 00:00:47,000
To find out the composer.

14
00:00:48,000 --> 00:00:50,000
Just go to the device manager.

15
00:00:52,000 --> 00:00:54,000
Open it in.

16
00:00:54,000 --> 00:00:55,000
The device manager.

17
00:00:56,000 --> 00:01:00,000
You just find out your home port inside the ports.

18
00:01:01,000 --> 00:01:06,000
As you see over here, I'm using Windows 10 inside the ports over here.

19
00:01:06,000 --> 00:01:10,000
This is my home port that is home.

20
00:01:10,000 --> 00:01:12,000
It just shows it.

21
00:01:13,000 --> 00:01:21,000
So this is the code you have to first bind to your Arduino before Python program.

22
00:01:21,000 --> 00:01:23,000
So setup in the tools.

23
00:01:23,000 --> 00:01:28,000
Just get the board is already know AVR boards.

24
00:01:28,000 --> 00:01:31,000
I just use Arduino Uno and the home port.

25
00:01:31,000 --> 00:01:32,000
It is already set.

26
00:01:33,000 --> 00:01:37,000
You just need to set these settings after this.

27
00:01:37,000 --> 00:01:39,000
Upload your code over here.

28
00:01:39,000 --> 00:01:44,000
This is your verify over here it is your upload.

29
00:01:44,000 --> 00:01:45,000
Just upload it.

30
00:01:45,000 --> 00:01:46,000
It will take hardly.

31
00:01:48,000 --> 00:01:49,000
3 to 4 seconds.

32
00:01:52,000 --> 00:01:57,000
I've done very fine right now, as you see.

33
00:01:59,000 --> 00:02:01,000
It is compiling the sketch.

34
00:02:05,000 --> 00:02:15,000
When the code is uploaded to your Arduino, it's over here and in both blink and check.

35
00:02:17,000 --> 00:02:21,000
So right now, uploading is in the process.

36
00:02:21,000 --> 00:02:24,000
So as you see, uploading is done.

37
00:02:24,000 --> 00:02:26,000
You just close this.

38
00:02:26,000 --> 00:02:29,000
You just go to your idle.

39
00:02:32,000 --> 00:02:33,000
Well, here, this is my python.

40
00:02:34,000 --> 00:02:36,000
Three point 11.4.

41
00:02:36,000 --> 00:02:41,000
It is 64 bit, so I will tell you how to.

42
00:02:42,000 --> 00:02:43,000
Hello, friends.

43
00:02:43,000 --> 00:02:51,000
Today I will tell you how to acquire digital signal using python code with the help of Arduino.

44
00:02:52,000 --> 00:02:55,000
For that purpose, first you have to import.

45
00:02:57,000 --> 00:02:58,000
You already know.

46
00:03:07,000 --> 00:03:08,000
Import.

47
00:03:10,000 --> 00:03:12,000
Already know after this.

48
00:03:12,000 --> 00:03:13,000
You just.

49
00:03:14,000 --> 00:03:17,000
And folk time also in this case because.

50
00:03:19,000 --> 00:03:26,000
In this case, if you are not using time, the signals speed is very high.

51
00:03:26,000 --> 00:03:31,000
Or you can say you can see of importing or acquisition is very high.

52
00:03:32,000 --> 00:03:35,000
So import time.

53
00:03:37,000 --> 00:03:40,000
Then you have to just set up the board.

54
00:03:42,000 --> 00:03:46,000
Mode variable name is there.

55
00:03:48,000 --> 00:03:54,000
Arduino code rate is 9600.

56
00:03:55,000 --> 00:03:57,000
Then you just.

57
00:03:58,000 --> 00:04:03,000
Set up the court and the court is my.

58
00:04:04,000 --> 00:04:04,000
Home.

59
00:04:08,000 --> 00:04:09,000
Eight.

60
00:04:10,000 --> 00:04:13,000
So this is my setup.

61
00:04:13,000 --> 00:04:14,000
Now you have to just.

62
00:04:16,000 --> 00:04:20,000
Set up the mode that is input mode in this case.

63
00:04:20,000 --> 00:04:24,000
So mode dot.

64
00:04:26,000 --> 00:04:30,000
Arduino, not Arduino.

65
00:04:30,000 --> 00:04:30,000
It is a pinmode.

66
00:04:32,000 --> 00:04:32,000
In more.

67
00:04:38,000 --> 00:04:40,000
So first you have to set up the pin.

68
00:04:40,000 --> 00:04:44,000
Let's say in my case, I'm just using 11 pin.

69
00:04:45,000 --> 00:04:53,000
Then you have to just set up the mode is this mode is input mode.

70
00:04:53,000 --> 00:04:59,000
Because I just want to read the signal in the case of Arduino, both the.

71
00:05:00,000 --> 00:05:02,000
These digital twins were here.

72
00:05:02,000 --> 00:05:05,000
Total number of 13 digital twins are available.

73
00:05:05,000 --> 00:05:10,000
You can use these 13 points as input or as output.

74
00:05:10,000 --> 00:05:11,000
It is up to you.

75
00:05:11,000 --> 00:05:15,000
So now I just use while loop over here.

76
00:05:18,000 --> 00:05:19,000
So why?

77
00:05:19,000 --> 00:05:21,000
Because I want to set up.

78
00:05:24,000 --> 00:05:26,000
It's more time also.

79
00:05:29,000 --> 00:05:29,000
True.

80
00:05:29,000 --> 00:05:32,000
While it is true when the condition is true.

81
00:05:35,000 --> 00:05:36,000
A variable.

82
00:05:36,000 --> 00:05:38,000
Is there another variable?

83
00:05:39,000 --> 00:05:43,000
It will grab the data from that pin.

84
00:05:43,000 --> 00:05:48,000
That is pin number 11 board.

85
00:05:50,000 --> 00:05:51,000
Dot digital read.

86
00:05:52,000 --> 00:05:54,000
Digital read.

87
00:05:56,000 --> 00:05:56,000
In this case.

88
00:05:57,000 --> 00:05:59,000
You just said the PIN number.

89
00:05:59,000 --> 00:06:01,000
In this case, it is 11.

90
00:06:02,000 --> 00:06:11,000
Now, if you want to check out the word value is there for the PIN number 11, you just print it.

91
00:06:12,000 --> 00:06:21,000
Print A because A will contain the value and now the function of time is there.

92
00:06:21,000 --> 00:06:32,000
So time dot sleep or here I just put the time in seconds, so I just put 0.5 seconds.

93
00:06:32,000 --> 00:06:33,000
So just save it.

94
00:06:33,000 --> 00:06:35,000
Now go to the hardware part.

95
00:06:36,000 --> 00:06:38,000
So I just use two pins.

96
00:06:39,000 --> 00:06:42,000
So one is my VCC.

97
00:06:42,000 --> 00:06:46,000
So this is my five volt signal that is equivalent to one.

98
00:06:46,000 --> 00:06:48,000
And over here, this is my ground.

99
00:06:48,000 --> 00:06:54,000
So now I just use one pin for.

100
00:06:55,000 --> 00:06:56,000
11th win.

101
00:06:56,000 --> 00:06:58,000
This is my over here.

102
00:06:58,000 --> 00:06:59,000
This is my 11th win.

103
00:06:59,000 --> 00:07:05,000
And the blue one is my positive win and green one is my ground pin.

104
00:07:05,000 --> 00:07:11,000
So I just initially connect 11th pin with the high signal.

105
00:07:11,000 --> 00:07:12,000
Let's check what happened.

106
00:07:14,000 --> 00:07:16,000
So save it.

107
00:07:16,000 --> 00:07:17,000
Run it.

108
00:07:19,000 --> 00:07:20,000
When you run it.

109
00:07:22,000 --> 00:07:25,000
As you see over here, you got the value.

110
00:07:25,000 --> 00:07:26,000
One, one, one.

111
00:07:27,000 --> 00:07:29,000
After every.

112
00:07:30,000 --> 00:07:32,000
Point five seconds.

113
00:07:32,000 --> 00:07:38,000
So when you remove it and connect ground to it, let's check over here.

114
00:07:38,000 --> 00:07:43,000
As you see, zero zero is present at the.

115
00:07:45,000 --> 00:07:46,000
I really sell.

116
00:07:47,000 --> 00:07:55,000
So this is how you can read digital signal and using with the help of Arduino.

117
00:07:56,000 --> 00:07:58,000
So this is all about today's lecture.

118
00:07:58,000 --> 00:07:59,000
Thank you.

