{"id":8733,"date":"2018-04-10T07:08:15","date_gmt":"2018-04-10T11:08:15","guid":{"rendered":"https:\/\/qxf2.com\/blog\/?p=8733"},"modified":"2018-04-25T02:10:14","modified_gmt":"2018-04-25T06:10:14","slug":"arduino-tutorials-for-testers-light-dimmer","status":"publish","type":"post","link":"https:\/\/qxf2.com\/blog\/arduino-tutorials-for-testers-light-dimmer\/","title":{"rendered":"Arduino Tutorials for Testers: build a Light Dimmer"},"content":{"rendered":"<p>In this tutorial, you will learn about Ohm&#8217;s Law, how to build a Light Dimmer and two important basic modules\/commands of Arduino i.e. Analog Read and Analog Write. This is the second installment in Arduino tutorial series. We have designed the series to be hands-on. You will produce something useful at the end of each tutorial. You will also learn just enough electronics and theory to be able to understand and troubleshoot any problems you may face.<\/p>\n<hr \/>\n<h3>Components Required:<\/h3>\n<p>Below are the main components required for this tutorial other than Arduino Uno, Breadboard and Jumper Wires:<\/p>\n<ol>\n<li>Potentiometer (POT): It is a variable type of resistor. You can vary the resistance by rotating the knob of the potentiometer. To know more about internal structure and terminals refer a link <a href=\"https:\/\/www.electronics-tutorials.ws\/resistor\/potentiometer.html\">here<\/a>.\n<p><figure id=\"attachment_8736\" aria-describedby=\"caption-attachment-8736\" style=\"width: 256px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/qxf2.com\/blog\/wp-content\/uploads\/2018\/03\/Potentiometer.jpg\" data-rel=\"lightbox-image-0\" data-rl_title=\"\" data-rl_caption=\"\" title=\"\"><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-8736 size-medium\" src=\"https:\/\/qxf2.com\/blog\/wp-content\/uploads\/2018\/03\/Potentiometer-256x300.jpg\" alt=\"Potentiometer\" width=\"256\" height=\"300\" srcset=\"https:\/\/qxf2.com\/blog\/wp-content\/uploads\/2018\/03\/Potentiometer-256x300.jpg 256w, https:\/\/qxf2.com\/blog\/wp-content\/uploads\/2018\/03\/Potentiometer-768x899.jpg 768w, https:\/\/qxf2.com\/blog\/wp-content\/uploads\/2018\/03\/Potentiometer-874x1024.jpg 874w, https:\/\/qxf2.com\/blog\/wp-content\/uploads\/2018\/03\/Potentiometer.jpg 888w\" sizes=\"auto, (max-width: 256px) 100vw, 256px\" \/><\/a><figcaption id=\"caption-attachment-8736\" class=\"wp-caption-text\">Fig. 1 Potentiometer<\/figcaption><\/figure><\/li>\n<li>LED: Refer the following fig. 2 to identify the terminals of LED\n<figure id=\"attachment_8928\" aria-describedby=\"caption-attachment-8928\" style=\"width: 150px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/qxf2.com\/blog\/wp-content\/uploads\/2018\/04\/electronic-39971_1280.png\" data-rel=\"lightbox-image-1\" data-rl_title=\"\" data-rl_caption=\"\" title=\"\"><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-8928 size-medium\" src=\"https:\/\/qxf2.com\/blog\/wp-content\/uploads\/2018\/04\/electronic-39971_1280-150x300.png\" alt=\"LED top view, side view, and symbol\" width=\"150\" height=\"300\" srcset=\"https:\/\/qxf2.com\/blog\/wp-content\/uploads\/2018\/04\/electronic-39971_1280-150x300.png 150w, https:\/\/qxf2.com\/blog\/wp-content\/uploads\/2018\/04\/electronic-39971_1280-512x1024.png 512w, https:\/\/qxf2.com\/blog\/wp-content\/uploads\/2018\/04\/electronic-39971_1280.png 640w\" sizes=\"auto, (max-width: 150px) 100vw, 150px\" \/><\/a><figcaption id=\"caption-attachment-8928\" class=\"wp-caption-text\">Fig. 2 LED top view, side view, and symbol<\/figcaption><\/figure>\n<p>Take the LED in your hand and look at the LED from the top view. Observe at the outer body structure, you will see a circular body with a cut at one side of the body that looks like &#8216;-&#8216; (minus) shape as shown in above Fig. 1 at the top\/first image. The terminal near to minus &#8216;-&#8216; shape\/cut is a cathode (-ve) terminal. You can also identify terminals by looking at the LED from a side view as shown in above Fig. 1 at the middle of the image. Look at the internal structure of LED, the terminal with small kite shape is Anode (+ve) terminal.<\/li>\n<\/ol>\n<p><strong>Note:<\/strong> You can get these components fairly easily at many places (including online). We bought for our engineers <a href=\"https:\/\/www.amazon.in\/dp\/B01KNR581U\/ref=ox_ya_os_product\">this Arduino super-starter kit<\/a>.<\/p>\n<hr \/>\n<h3>Ohm&#8217;s Law:<\/h3>\n<p>It is a very very important law in Electronics. This law is based on the relationship between Voltage(V), Current(I) and Resistance(R).<\/p>\n<p>Mathematical Form of Ohm&#8217;s Law:<\/p>\n<pre style=\"text-align: center;\" lang=\"python\">V = I x R<\/pre>\n<p>Based on above equation, you can say,<\/p>\n<ol>\n<li>If Resistance &#8216;R&#8217; is constant, then &#8216;V&#8217; is directly proportional to &#8216;I&#8217; i.e. if you increase voltage &#8216;V&#8217;, then the current &#8216;I&#8217; in the circuit will increase proportionally and vice-versa.<\/li>\n<li>If &#8216;V&#8217; is constant, then &#8216;I&#8217; is indirectly proportional to &#8216;R&#8217;. i.e. if you increase the resistance &#8216;R&#8217; of a circuit, then the current &#8216;I&#8217; in a circuit will decrease proportionally and vice-versa.<\/li>\n<\/ol>\n<p>You can practically check the above observations by building a circuit as shown below in fig.3 using a <a href=\"https:\/\/www.tinkercad.com\/\">simulator<\/a> or you can build a physical circuit.<\/p>\n<figure id=\"attachment_8739\" aria-describedby=\"caption-attachment-8739\" style=\"width: 625px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/qxf2.com\/blog\/wp-content\/uploads\/2018\/03\/ohms-law-combined.jpg\" data-rel=\"lightbox-image-2\" data-rl_title=\"\" data-rl_caption=\"\" title=\"\"><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-8739 size-full\" src=\"https:\/\/qxf2.com\/blog\/wp-content\/uploads\/2018\/03\/ohms-law-combined.jpg\" alt=\"Ohm's Law\" width=\"625\" height=\"240\" srcset=\"https:\/\/qxf2.com\/blog\/wp-content\/uploads\/2018\/03\/ohms-law-combined.jpg 625w, https:\/\/qxf2.com\/blog\/wp-content\/uploads\/2018\/03\/ohms-law-combined-300x115.jpg 300w\" sizes=\"auto, (max-width: 625px) 100vw, 625px\" \/><\/a><figcaption id=\"caption-attachment-8739\" class=\"wp-caption-text\">Fig. 3 Ohm&#8217;s Law<\/figcaption><\/figure>\n<p>If you are looking for more details about Ohm&#8217;s Law refer to the link <a href=\"https:\/\/www.build-electronic-circuits.com\/ohms-law\/\">here<\/a>.<\/p>\n<p>Now, let&#8217;s move on to building Light Dimmer. Pull out all component mentioned above from your kit or from component list of the <a href=\"https:\/\/www.tinkercad.com\/\">simulator<\/a>.<\/p>\n<hr \/>\n<h3>STEP 1: Connect Potentiometer to any analog pin of Arduino<\/h3>\n<figure id=\"attachment_8740\" aria-describedby=\"caption-attachment-8740\" style=\"width: 800px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/qxf2.com\/blog\/wp-content\/uploads\/2018\/03\/connect-pot-to-arduino.jpg\" data-rel=\"lightbox-image-3\" data-rl_title=\"\" data-rl_caption=\"\" title=\"\"><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-8740 size-full\" src=\"https:\/\/qxf2.com\/blog\/wp-content\/uploads\/2018\/03\/connect-pot-to-arduino.jpg\" alt=\"Connect Potentiometer(POT) to Arduino\" width=\"800\" height=\"330\" srcset=\"https:\/\/qxf2.com\/blog\/wp-content\/uploads\/2018\/03\/connect-pot-to-arduino.jpg 800w, https:\/\/qxf2.com\/blog\/wp-content\/uploads\/2018\/03\/connect-pot-to-arduino-300x124.jpg 300w, https:\/\/qxf2.com\/blog\/wp-content\/uploads\/2018\/03\/connect-pot-to-arduino-768x317.jpg 768w\" sizes=\"auto, (max-width: 800px) 100vw, 800px\" \/><\/a><figcaption id=\"caption-attachment-8740\" class=\"wp-caption-text\">Fig. 4 Connect Potentiometer(POT) to Arduino<\/figcaption><\/figure>\n<p>Look at the above fig.4 and start building a circuit on your breadboard\/Simulator. Here, you need to select an analog pin of Arduino. We selected pin number A1 randomly. Use a jumper wire to connect pin number A1 of the board and middle terminal of the potentiometer(POT), connect the first terminal of POT to the 5V (Vcc) pin of board and third terminal of POT to GND pin of the board. Now, look at above equivalent schematic diagram of POT, Potentiometer will act as <a href=\"https:\/\/www.allaboutcircuits.com\/tools\/voltage-divider-calculator\/\">voltage divider circuit<\/a>. The value of R1 and R2 changes with respect to a change in the position of POT knob. But the value of the total resistor (R1+R2) remains same. So, current(I) in the circuit is same\/constant as total resistance is same. Now if you apply Ohm&#8217;s law across R1 and R2, you will get the individual voltage drop of &#8216;I*R1&#8217; and &#8216;I*R2&#8217; across R1 and R2 respectively. If you see the connection diagram, you will notice, we are measuring the voltage across R2 using pin A1. Arduino Uno has 6 analog pins which consist of 10 bit internal ADC (Analog to Digital Converter). So, the voltage at pin A1 will be converted into 10-bit digital value and the value is between 0 to 1023 in decimal.<\/p>\n<hr \/>\n<h3>Step 2: Write a code to Read Analog Input on Serial Monitor:<\/h3>\n<p>Refer below flowchart to understand the flow of code.<\/p>\n<figure id=\"attachment_8746\" aria-describedby=\"caption-attachment-8746\" style=\"width: 373px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/qxf2.com\/blog\/wp-content\/uploads\/2018\/03\/flowchart-Analog_read.png\" data-rel=\"lightbox-image-4\" data-rl_title=\"\" data-rl_caption=\"\" title=\"\"><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-8746 size-full\" src=\"https:\/\/qxf2.com\/blog\/wp-content\/uploads\/2018\/03\/flowchart-Analog_read.png\" alt=\"Flowchart to read an analog pin\" width=\"373\" height=\"351\" srcset=\"https:\/\/qxf2.com\/blog\/wp-content\/uploads\/2018\/03\/flowchart-Analog_read.png 373w, https:\/\/qxf2.com\/blog\/wp-content\/uploads\/2018\/03\/flowchart-Analog_read-300x282.png 300w\" sizes=\"auto, (max-width: 373px) 100vw, 373px\" \/><\/a><figcaption id=\"caption-attachment-8746\" class=\"wp-caption-text\">Fig. 5 Flowchart to read an analog pin<\/figcaption><\/figure>\n<h4>Arduino Code\/Sketch:<\/h4>\n<pre lang=\"Arduino\">int potPin = A1 ; \/\/Declare a variable and assign pin number\r\nint potValue = 0; \/\/Declare a variable to store POT value\r\n\r\nvoid setup(){\r\n  \/\/ put your setup code here, to run once:\r\n  pinMode(potPin, INPUT);  \/\/ Set POT pin as input pin\r\n  Serial.begin(9600);      \/\/ Initialize serial monitor \r\n}\r\n\r\nvoid loop(){\r\n  \/\/ put your main code here, to run repeatedly:\r\n  potValue = analogRead(potPin);  \/\/ Read Analog input and store it in variable\r\n  Serial.print(\"POT Value = \");   \/\/ Print text\r\n  Serial.println(potValue);       \/\/ Print value on Serial Monitor\r\n  delay(100);                     \/\/ Added some delay\r\n}\r\n<\/pre>\n<p>Above code uses <strong>analogRead() <\/strong>command\/function to read the analog signal available at pin A1. Arduino Uno board consists of 6 channel 10 bit ADC (Analog to Digital Converters) which converts\/maps (0-5)Volts to an integer value (0-1023). For more details about it refer link <a href=\"https:\/\/www.arduino.cc\/reference\/en\/language\/functions\/analog-io\/analogread\/\">here<\/a>.<\/p>\n<p>Upload the above code and check potentiometer value (i.e. the voltage across the analog pin) on Serial Monitor by changing the knob of the potentiometer.<\/p>\n<hr \/>\n<h3>Step 3: Connect LED to any Digital PWM(~) pin of Arduino:<\/h3>\n<figure id=\"attachment_8747\" aria-describedby=\"caption-attachment-8747\" style=\"width: 634px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/qxf2.com\/blog\/wp-content\/uploads\/2018\/03\/led-connection-pwm.jpg\" data-rel=\"lightbox-image-5\" data-rl_title=\"\" data-rl_caption=\"\" title=\"\"><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-8747 size-full\" src=\"https:\/\/qxf2.com\/blog\/wp-content\/uploads\/2018\/03\/led-connection-pwm.jpg\" alt=\"Connect LED to Digital PWM pin\" width=\"634\" height=\"388\" srcset=\"https:\/\/qxf2.com\/blog\/wp-content\/uploads\/2018\/03\/led-connection-pwm.jpg 634w, https:\/\/qxf2.com\/blog\/wp-content\/uploads\/2018\/03\/led-connection-pwm-300x184.jpg 300w\" sizes=\"auto, (max-width: 634px) 100vw, 634px\" \/><\/a><figcaption id=\"caption-attachment-8747\" class=\"wp-caption-text\">Fig. 6 Connect LED to Digital PWM pin<\/figcaption><\/figure>\n<p>Look at the above fig. 6 and continue building a circuit on a breadboard or simulator without disturbing previous steps connection because we are going to combine both circuits in next step. Here, you need to select any digital PWM(~) pin of Arduino to control the brightness of LED. To know more about the concept of PWM(Pulse Width Modulation) watch a video <a href=\"https:\/\/www.youtube.com\/watch?v=B_Ysdv1xRbA\" data-rel=\"lightbox-video-0\">here<\/a>. We selected pin number 3. Use a jumper wire to connect pin number 3 of the board and any one terminal of the resistor R1. Connect the second terminal of the resistor R1 to the anode of LED and connect the cathode of LED to GND pin of the board.<\/p>\n<hr \/>\n<h3>Step 4: Write a code to control the brightness of LED:<\/h3>\n<p>Refer below flowchart to understand the flow of code.<\/p>\n<figure id=\"attachment_8748\" aria-describedby=\"caption-attachment-8748\" style=\"width: 459px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/qxf2.com\/blog\/wp-content\/uploads\/2018\/03\/flowchart-_Analog_Write.png\" data-rel=\"lightbox-image-6\" data-rl_title=\"\" data-rl_caption=\"\" title=\"\"><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-8748 size-full\" src=\"https:\/\/qxf2.com\/blog\/wp-content\/uploads\/2018\/03\/flowchart-_Analog_Write.png\" alt=\"Flowchart to control the brightness of the LED\" width=\"459\" height=\"372\" srcset=\"https:\/\/qxf2.com\/blog\/wp-content\/uploads\/2018\/03\/flowchart-_Analog_Write.png 459w, https:\/\/qxf2.com\/blog\/wp-content\/uploads\/2018\/03\/flowchart-_Analog_Write-300x243.png 300w\" sizes=\"auto, (max-width: 459px) 100vw, 459px\" \/><\/a><figcaption id=\"caption-attachment-8748\" class=\"wp-caption-text\">Fig 7. Flowchart to control the brightness of the LED<\/figcaption><\/figure>\n<h4>Arduino Sketch\/Code:<\/h4>\n<pre lang=\"Arduino\">int LEDPin = 3;  \/\/Declare a variable and assign pin number\r\nvoid setup(){\r\n\/\/ put your setup code here, to run once:\r\npinMode(LEDPin, OUTPUT);    \/\/ Set LED pin as output pin\r\nSerial.begin(9600);         \/\/ Initialize serial monitor\r\n}\r\n\r\nvoid loop(){\r\n\/\/ put your main code here, to run repeatedly:\r\nSerial.println(\"Please enter brightness value of LED (0 - 255)\");  \/\/ promt a message for users\r\nwhile(Serial.available() == 0){}           \/\/ wait here until user input the data\r\nint brightnessValue = Serial.parseInt();   \/\/ Read Integer value from Serial Monitor\r\nanalogWrite(LEDPin, brightnessValue);      \/\/ Write brightness value on pin to control the brightness of LED\r\ndelay(1000);                               \/\/ Added Delay of 1 sec\r\n}\r\n<\/pre>\n<p>Above code will take the brightness value of LED between 0 to 255 from Users and using user-provided brightness value, Arduino controls the brightness of LED. Here, we used <strong>AnalogWrite()<\/strong> command\/function to write analog value (set PWM wave of required duty cycle) to LED pin.<\/p>\n<p><strong>Note: <\/strong>Only PWM(~) digital pins support Analog Write functionality. For more details refer link <a href=\"https:\/\/www.arduino.cc\/reference\/en\/language\/functions\/analog-io\/analogwrite\/\">here<\/a>.<\/p>\n<p>Upload the above code, provide any LED brightness value between &#8216;0&#8217; to &#8216;255&#8217; from serial monitor and check LED brightness.<\/p>\n<hr \/>\n<h3>Step 5: Build Light Dimmer Circuit<\/h3>\n<figure id=\"attachment_8749\" aria-describedby=\"caption-attachment-8749\" style=\"width: 574px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/qxf2.com\/blog\/wp-content\/uploads\/2018\/03\/LED_Dimmer.png\" data-rel=\"lightbox-image-7\" data-rl_title=\"\" data-rl_caption=\"\" title=\"\"><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-8749 size-full\" src=\"https:\/\/qxf2.com\/blog\/wp-content\/uploads\/2018\/03\/LED_Dimmer.png\" alt=\"Light Dimmer Circuit\" width=\"574\" height=\"485\" srcset=\"https:\/\/qxf2.com\/blog\/wp-content\/uploads\/2018\/03\/LED_Dimmer.png 574w, https:\/\/qxf2.com\/blog\/wp-content\/uploads\/2018\/03\/LED_Dimmer-300x253.png 300w\" sizes=\"auto, (max-width: 574px) 100vw, 574px\" \/><\/a><figcaption id=\"caption-attachment-8749\" class=\"wp-caption-text\">Fig. 8 Light Dimmer Circuit<\/figcaption><\/figure>\n<p>To build the above Light Dimmer Circuit, you just need to combine step 1 and 3. If you have not disturbed your connections during step 3, your circuit will look like the connection diagram shown in above fig.8.<\/p>\n<hr \/>\n<h3>Step 6: Code for Light Dimmer<\/h3>\n<p>Refer below flowchart to understand the flow of code.<\/p>\n<figure id=\"attachment_8751\" aria-describedby=\"caption-attachment-8751\" style=\"width: 519px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/qxf2.com\/blog\/wp-content\/uploads\/2018\/03\/Flowchart-_Light_Dimmer.png\" data-rel=\"lightbox-image-8\" data-rl_title=\"\" data-rl_caption=\"\" title=\"\"><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-8751 size-full\" src=\"https:\/\/qxf2.com\/blog\/wp-content\/uploads\/2018\/03\/Flowchart-_Light_Dimmer.png\" alt=\"Flowchart of Light Dimmer\" width=\"519\" height=\"435\" srcset=\"https:\/\/qxf2.com\/blog\/wp-content\/uploads\/2018\/03\/Flowchart-_Light_Dimmer.png 519w, https:\/\/qxf2.com\/blog\/wp-content\/uploads\/2018\/03\/Flowchart-_Light_Dimmer-300x251.png 300w\" sizes=\"auto, (max-width: 519px) 100vw, 519px\" \/><\/a><figcaption id=\"caption-attachment-8751\" class=\"wp-caption-text\">Fig. 9 Flowchart of Light Dimmer<\/figcaption><\/figure>\n<h4>Arduino Sketch\/Code:<\/h4>\n<pre lang=\"Arduino\">int potPin = A1 ;          \/\/Declare a variable and assign POT pin number\r\nint potValue = 0;          \/\/Declare a variable to store POT value\r\nint ledPin = 3;            \/\/Declare a variable and assign LED pin number\r\n\r\nvoid setup(){\r\n  \/\/ put your setup code here, to run once:\r\n  pinMode(potPin, INPUT);    \/\/ Set POT pin as input pin\r\n  pinMode(ledPin, OUTPUT);   \/\/ Set LED pin as output pin\r\n  Serial.begin(9600);        \/\/ Initialize serial monitor \r\n}\r\n\r\nvoid loop(){\r\n  \/\/ put your main code here, to run repeatedly:\r\n  potValue = analogRead(potPin);       \/\/ Read Analog input and store it in variable\r\n  Serial.print(\"POT Value = \");        \/\/ Print text on Serial Monitor\r\n  Serial.println(potValue);            \/\/ Print value on Serial Monitor\r\n  int brightnessValue = map(potValue, 0, 1023, 0, 255); \/\/Convert value 0-1023 to 0-255\r\n  analogWrite(ledPin, brightnessValue); \/\/ Set LED brightness\r\n  Serial.print(\"Brightness Value = \");  \/\/ Print text on Serial Monitor\r\n  Serial.println(brightnessValue);      \/\/ Print value on Serial Monitor\r\n  delay(1000);                         \t\/\/ Added some delay\r\n}\r\n<\/pre>\n<p>Above code reads the potentiometer value which is connected to pin A1 using <strong>analogRead() <\/strong>command\/function, stores that value in a variable &#8216;potValue&#8217; and prints it on the serial monitor for reference purpose. &#8216;potValue&#8217; which you get from the <strong>analogRead()<\/strong> function is of 10-bit, but <strong>analogWrite()<\/strong> command\/function requires a 8-bit value to set PWM at LED pin 4. So, it is necessary to convert 10-bit value to 8-bit value. You can do the conversion using <strong>map() <\/strong>function. To know more about map() function refer to the link <a href=\"https:\/\/www.arduino.cc\/reference\/en\/language\/functions\/math\/map\/\">here<\/a>. The converted 8-bit value is stored in a variable &#8216;brightnessValue&#8217; and then used along with the <strong>analogWrite()<\/strong> function to control the brightness of LED.<\/p>\n<p>Upload the above code and check the change in the brightness of LED by varying potentiometer knob.<\/p>\n<hr \/>\n<p>Hope you enjoyed the tutorial. In this tutorial, you learned about how to read and write analog values on Arduino pins. Look at our next tutorial <a href=\"https:\/\/qxf2.com\/blog\/arduino-tutorials-for-testers-servo-motors\/\">here<\/a>, you will learn about how to interface stepper motor with Arduino and controlling the servo position for specific application. If you follow along, at the end of this <a href=\"https:\/\/qxf2.com\/blog\/arduino-tutorial-series-for-testers\/\">series<\/a>, you will distinguish how hardware devices\/instruments\/products are designed, you can guess how they are programmed, you will get ideas about how to test it and you can build and help others in building products.<\/p>\n<p><strong>Learn more <a href=\"https:\/\/qxf2.com\/blog\/about-qxf2\/\">about Qxf2 Services<\/a>.<\/strong><\/p>\n<hr \/>\n","protected":false},"excerpt":{"rendered":"<p>In this tutorial, you will learn about Ohm&#8217;s Law, how to build a Light Dimmer and two important basic modules\/commands of Arduino i.e. Analog Read and Analog Write. This is the second installment in Arduino tutorial series. We have designed the series to be hands-on. You will produce something useful at the end of each tutorial. You will also learn [&hellip;]<\/p>\n","protected":false},"author":12,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[159,117],"tags":[119],"class_list":["post-8733","post","type-post","status-publish","format-standard","hentry","category-arduino","category-hardware-testing","tag-arduino"],"_links":{"self":[{"href":"https:\/\/qxf2.com\/blog\/wp-json\/wp\/v2\/posts\/8733","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/qxf2.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/qxf2.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/qxf2.com\/blog\/wp-json\/wp\/v2\/users\/12"}],"replies":[{"embeddable":true,"href":"https:\/\/qxf2.com\/blog\/wp-json\/wp\/v2\/comments?post=8733"}],"version-history":[{"count":32,"href":"https:\/\/qxf2.com\/blog\/wp-json\/wp\/v2\/posts\/8733\/revisions"}],"predecessor-version":[{"id":9305,"href":"https:\/\/qxf2.com\/blog\/wp-json\/wp\/v2\/posts\/8733\/revisions\/9305"}],"wp:attachment":[{"href":"https:\/\/qxf2.com\/blog\/wp-json\/wp\/v2\/media?parent=8733"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/qxf2.com\/blog\/wp-json\/wp\/v2\/categories?post=8733"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/qxf2.com\/blog\/wp-json\/wp\/v2\/tags?post=8733"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}