Posts

C++ Programming Tutorial 7 - Defining Variables of the Same Type | Sinhala

Image
In this tutorial video we discuss about declaration and initialization with examples to give you an idea how to simplify the length of code to achieve the same result by using only a few lines of code. Each example in the video takes you to a more simplified version of the code. Many programmers write their code first as the wish and in the later stages they may look at ways to reduce the length of the code.As always a short code runs faster than a lengthy code. Try to practice the examples in the video and use few lines of code where ever possible. Download the PDF @ https://goo.gl/NieqYW All Codes Can be downloaded @ https://goo.gl/WBiiKI Download The Dev-C++ IDE @ https://sourceforge.net/projects/orwelldevcpp/

How to Identify the Pins of 2N3055 Transistor

Image
This video shows how to identify the pins 2n3055 transistor by two ways: 1.By using the datasheet of the transistor. 2.By using the multimeter & the datasheet. Although the datasheet provides the correct information to identify the pins of this transistor majority of the people find it very difficult to extract this information directly from the data sheet as identifying the pins from the transistor depends upon the physical dimensions of the transistor. Although the transistor layout looks symmetrical it is not ,so measuring or judging by the eye is difficult as the difference is only a few millimeters. In this video with the aid of a multimeter we determine the pins of this transistor very precisely. The datasheet clearly states  that the metal casing  of the transistor is the collector so the problem is actually determining the base and the emitter of the transistor. For the process we start by putting the multimeter to the diode mode and then connecting the probes to

C++ Programming Tutorial 3 - Comments in C++ | Sinhala

Image
Comments in C++ Programming Comments are used mainly to describe the code. Comments are ignored by the compiler. There are two types of comments: Single line comments. Multi-line comments. Single line comments start with two forward slashes // Comments are just to describe the code,they are never executed. Multi-line comments: This type of comments are used to comment out multiple lines. This type is better for giving a detail description of how the code functions. Multi line comments start with /* and end with */ In between the content is added. Multi line comments span multiple lines. You can even nest comments one type of comment inside another . Adding comments in the code makes no difference to The results of the code is as the comments have no influence on the code. Adding comments is a good practice as it facilitates a clear understanding of the code for you and others as well. Example: /* Hello user this Is an example of multi line commenting*/

How To Make a 0-12V Variable Power Supply In Sinhala | Part 02

Image
How To Make a 0-12V Variable Power Supply In Sinhala | Part 02 Expanding the setup to a 0-12V variable power supply. We have already completed the 12V fixed powersupply tutorial vide so if you havent watched it first watch it and continue. By now we have completed the project upto a 12V fixed power supply as our next step we are to make the power supply variable. Additional Components Required: D400 x1 2N3055 x1 100kO variable resistor 1kO  Determining the pins of the d400 transistor is very straight forward but it can be tricky in the case of 2n3055. Refer the pdf for the pin configuration of the D400 transistor: 2N3055 : According to the data sheet the metal casing is the collector of the transistor. The problem is identifying the base and the emitter of the transistor. Steps: Put the multimeter to the diode mode. Connect the probes of the multimeter to the two leads of the transistor. If there is a reading on the multimeter then the positive probe is the ba

C++ Programming Tutorial 2 - New Line Escape Character

Image
In this tutorial you will learn everything about using and printing on new lines. There are many methods to use new lines, the most fundermental method is to use  the endl operator at the end of the cout statement. The endl operator make sure that the next cout statement will be printedc on a new line. The endl can be replaced by the use of the new line character \n. the \ is an escape character.Sometimes is essential that we need to escape many lines before the next text is printed on to the screeen  for this in C++ the new line character can be used as required.  \n\n will escape two lines before the next text get printed on the screen. where the use of \n\n\n\n\n would print 5 blank lines before the next text is printed. C++ provides us futher options to simplify the code for printing text on to the screen. In C++ it is possible to print new lines as required inside a single cout ,  this is done by inserting the newline escape character where required inside the sta

Variable Resistors In Sinhala

Image
Variable Resistor එකක අගය සරලව ගණනය කර ගන්නා ආකාරය සිංහල බසින්!   These are a special type of resistors that provide us the ability to change their resistance as required by the user. Basically there are two versions available at traditional electronic shops as; -Volume control (Big Size) -Preset (Small Size) Volume control type can be very easy to manipulate due to the large size. These resistors cannot handle much power (~0.25W). These devices usually comes with three terminals and could be used in two major ways: 1. As a variable resistor. 2. As a potential divider. The smaller version (preset) are to be tuned to the required resistance with the help of a screw driver but the volume control type can be easily tuned as required with the help of our hand. Variable resistors have a variety of applications such as controlling your radio's volume, changing the speed of your fan... To use the device as a variable resistor we only use two pins out the three simple