1
00:00:04,000 --> 00:00:05,000
Hello, friends.

2
00:00:05,000 --> 00:00:13,000
Today I will show you how to control onboard four LEDs using an image.

3
00:00:14,000 --> 00:00:21,000
In that case, I just first control the whole four LEDs using software code.

4
00:00:21,000 --> 00:00:26,000
After this I just control the Led using particular button.

5
00:00:26,000 --> 00:00:27,000
Okay.

6
00:00:27,000 --> 00:00:36,000
So let's first in this case, I just create a project and over here I, as you see, already project

7
00:00:36,000 --> 00:00:38,000
is created in this.

8
00:00:38,000 --> 00:00:50,000
I just go to the VI and over here in this particular VI, I just select my Rio toolbox over here.

9
00:00:50,000 --> 00:00:55,000
I just need to select the LEDs Express VI.

10
00:00:56,000 --> 00:01:05,000
In this case, it will ask me how many LEDs with how many LEDs I want to work.

11
00:01:05,000 --> 00:01:11,000
Okay, so over here, as you see, I got all the four LEDs right now.

12
00:01:11,000 --> 00:01:14,000
So let's first select all the four LEDs.

13
00:01:15,000 --> 00:01:20,000
Right now I'm just using four LEDs.

14
00:01:20,000 --> 00:01:21,000
Express VI.

15
00:01:21,000 --> 00:01:31,000
Okay, As you see over here, all the four LEDs comes create buttons over here.

16
00:01:32,000 --> 00:01:38,000
So led zero over here.

17
00:01:38,000 --> 00:01:40,000
I just make a copy of it.

18
00:01:43,000 --> 00:01:46,000
Just arrange these LEDs.

19
00:01:49,000 --> 00:01:51,000
0234.

20
00:01:51,000 --> 00:01:53,000
This is my one.

21
00:01:56,000 --> 00:01:59,000
This is my two.

22
00:02:02,000 --> 00:02:04,000
This is my three.

23
00:02:06,000 --> 00:02:09,000
Okay, Now you just need to connect.

24
00:02:14,000 --> 00:02:16,000
Control, you minimize it.

25
00:02:16,000 --> 00:02:20,000
Just place a while loop for continuous reading.

26
00:02:21,000 --> 00:02:22,000
Writing.

27
00:02:22,000 --> 00:02:23,000
Not reading.

28
00:02:25,000 --> 00:02:26,000
Deploy the code.

29
00:02:26,000 --> 00:02:29,000
When you just run it, it will deploy the code for you.

30
00:02:29,000 --> 00:02:30,000
Save it.

31
00:02:33,000 --> 00:02:37,000
All the four LEDs we can control using these four buttons.

32
00:02:44,000 --> 00:02:51,000
Right now, I just press 101, two, three.

33
00:02:52,000 --> 00:02:56,000
In the hardware part, you can just check over here right now.

34
00:02:56,000 --> 00:03:03,000
All the four LEDs are in on state right now, all the four LEDs in off state.

35
00:03:03,000 --> 00:03:09,000
So this is how you can generate signals using these express VI.

36
00:03:09,000 --> 00:03:14,000
Now I just create another project using button.

37
00:03:14,000 --> 00:03:21,000
Also, I want to control these LEDs using particular button.

38
00:03:22,000 --> 00:03:25,000
So I just go to my Mario.

39
00:03:28,000 --> 00:03:28,000
Toolbox.

40
00:03:29,000 --> 00:03:33,000
I just drag button.

41
00:03:36,000 --> 00:03:43,000
In this case, I'm just using this button to control these four LEDs.

42
00:03:43,000 --> 00:03:49,000
In the first case, I just connect all the LEDs with this particular button.

43
00:03:49,000 --> 00:03:53,000
When I just press this button, all the four LEDs will turn on.

44
00:03:53,000 --> 00:03:55,000
Otherwise it will turn off.

45
00:03:55,000 --> 00:03:57,000
Just remove this control.

46
00:03:57,000 --> 00:04:02,000
B So in this case, I'm generating signal.

47
00:04:06,000 --> 00:04:08,000
Using this particular onboard button.

48
00:04:12,000 --> 00:04:17,000
So now just save it.

49
00:04:18,000 --> 00:04:19,000
Deploy it.

50
00:04:21,000 --> 00:04:25,000
In this case, there is no control in the software part.

51
00:04:26,000 --> 00:04:29,000
The control is only to stop the code.

52
00:04:30,000 --> 00:04:30,000
Okay.

53
00:04:30,000 --> 00:04:36,000
So right now, when I just press this particular button, all the four LEDs turn on.

54
00:04:37,000 --> 00:04:38,000
As you see.

55
00:04:40,000 --> 00:04:48,000
So it is up to me how to control this on board led right now.

56
00:04:48,000 --> 00:04:53,000
Right now I just make another code for you.

57
00:04:53,000 --> 00:05:00,000
Let's say in this place I'm just using negate function also.

58
00:05:05,000 --> 00:05:05,000
For.

59
00:05:07,000 --> 00:05:10,000
First one and third one.

60
00:05:17,000 --> 00:05:21,000
No multiple negates required.

61
00:05:22,000 --> 00:05:32,000
So I just connect over here and this one is my connected to this one.

62
00:05:32,000 --> 00:05:33,000
And over here.

63
00:05:34,000 --> 00:05:39,000
Now I just save it, Run it.

64
00:05:39,000 --> 00:05:41,000
It is deploying the code.

65
00:05:41,000 --> 00:05:46,000
Initially, two LEDs are turned on and two are in off state.

66
00:05:49,000 --> 00:05:50,000
According to the code.

67
00:05:51,000 --> 00:05:56,000
As you see, when I just press my button, these two goes off.

68
00:05:56,000 --> 00:05:59,000
Another two goes on, as you see.

69
00:06:00,000 --> 00:06:07,000
So you can make a running code using this also.

70
00:06:08,000 --> 00:06:12,000
Okay, so this is how you can build.

71
00:06:13,000 --> 00:06:18,000
Now I just go with another code.

72
00:06:18,000 --> 00:06:20,000
I just stop this code.

73
00:06:21,000 --> 00:06:24,000
In this particular case, I just show you another case.

74
00:06:24,000 --> 00:06:35,000
Also, right now, I just remove this particular part from or connection from the Mario.

75
00:06:35,000 --> 00:06:37,000
Right now Mario is powered.

76
00:06:37,000 --> 00:06:41,000
I just it just contain the program.

77
00:06:41,000 --> 00:06:53,000
Also, as you see right now, when I just connect it again, I need to configure this as you see on

78
00:06:53,000 --> 00:06:56,000
the software part, connection to the target has been lost.

79
00:06:58,000 --> 00:07:00,000
I need to configure this again.

80
00:07:01,000 --> 00:07:08,000
As you see right now, it is configuring just close this one, minimize this.

81
00:07:08,000 --> 00:07:20,000
Let's check it is present over here or not refresh it or need to connect.

82
00:07:23,000 --> 00:07:23,000
Let's check.

83
00:07:23,000 --> 00:07:24,000
It is connecting.

84
00:07:26,000 --> 00:07:30,000
So this is how you can apply.

85
00:07:33,000 --> 00:07:41,000
This is how you can control your Mario using express code.

86
00:07:42,000 --> 00:07:45,000
As you see, it is now initializing.

87
00:07:46,000 --> 00:07:48,000
Right now it is green.

88
00:07:48,000 --> 00:07:49,000
It is connected.

89
00:07:49,000 --> 00:07:52,000
Let's just create another code.

90
00:07:52,000 --> 00:08:01,000
I'm not using this button over here in place of this control Z.

91
00:08:02,000 --> 00:08:09,000
Control B, I'm just creating a code running light led code.

92
00:08:09,000 --> 00:08:14,000
So I just create shift registers over here.

93
00:08:14,000 --> 00:08:22,000
Initially, let's say these shift registers are false condition.

94
00:08:24,000 --> 00:08:29,000
Otherwise it will generate true condition.

95
00:08:31,000 --> 00:08:31,000
True False.

96
00:08:31,000 --> 00:08:32,000
True.

97
00:08:32,000 --> 00:08:32,000
False condition.

98
00:08:32,000 --> 00:08:38,000
It will generate and just also place some delay over here.

99
00:08:39,000 --> 00:08:43,000
I just want to create a 500 millisecond delay.

100
00:08:43,000 --> 00:08:56,000
So one, initially it is turned on and three also and two off and four also off.

101
00:08:57,000 --> 00:08:59,000
Okay, So this is the code.

102
00:08:59,000 --> 00:09:04,000
And let's just use the button to control the loop.

103
00:09:05,000 --> 00:09:08,000
Again, go to the Mario button.

104
00:09:19,000 --> 00:09:19,000
Press.

105
00:09:19,000 --> 00:09:20,000
Okay.

106
00:09:23,000 --> 00:09:31,000
In place of this button, I want to control this loop using this particular button.

107
00:09:31,000 --> 00:09:32,000
Just connect it.

108
00:09:33,000 --> 00:09:34,000
Save it.

109
00:09:34,000 --> 00:09:37,000
Control s, run it.

110
00:09:40,000 --> 00:09:41,000
Let's check what happened.

111
00:09:48,000 --> 00:09:50,000
The code is deployed.

112
00:09:53,000 --> 00:09:57,000
As you see it, is running.

113
00:09:57,000 --> 00:10:01,000
Lights are running on and off, on and off.

114
00:10:02,000 --> 00:10:09,000
If you want to just make the speed faster, first, you need to stop the code.

115
00:10:09,000 --> 00:10:12,000
I'm just stopping it from here only.

116
00:10:17,000 --> 00:10:25,000
As you see now, I just want to make it 100 milliseconds again.

117
00:10:25,000 --> 00:10:26,000
I want to deploy the code.

118
00:10:26,000 --> 00:10:33,000
In this case, the LEDs are running more faster as compared to the previous one.

119
00:10:33,000 --> 00:10:36,000
Right now it is 100 milliseconds.

120
00:10:36,000 --> 00:10:40,000
Previously it is 500 milliseconds.

121
00:10:40,000 --> 00:10:42,000
DeLay is there, as you see.

122
00:10:42,000 --> 00:10:50,000
So this is how you can build your own code using Express VI in case of Mario.

123
00:10:50,000 --> 00:10:51,000
Thank you.

