Thursday, April 4, 2019

RBG Colour Model Experiment

RBG Colour framework ExperimentIntroduction illusion is a visual attribute of objects that results from the light they emit, transmit or reflect. 1 These pretension moot us the ability to appreciate things around us. With this, we can easily define or give meaning to the things we see well-nigh every day. We can see these raft of colours in paintings, surroundings, the food we eat, and almost everything, as almost everything has food color. Electronic systems phthisis several(predicate) color models to represent data visually. 2 One of these color models is RGB color model. A color in RGB color model is expressed by how much of severally red, green, blue is included 2, hence the acronym RGB. In this experiment, we lit the RGB LED with different colors in Arduino, with the use of RGB color model.Materials with DescriptionDFRduino Uno R3 (1)The arduino circuit board.Jumper Cables M/M (4)Serves as the connector to different pins in the circuit.RGB LED (1)A diode that emits lig ht and to be used as an output in the circuit. It declare oneselfs different colors of light by setting its RGB (Red, Green, Blue) take account. It consists of 3 anodes, oneness for distributively color in RGB, and one cathode.220 Resistor (3)An electric device that leave behind control the flow of current through the circuit.Procedure (self-explained) attribute the components to the breadboard base on the tables below.ResistorBreadboardStartEndAD9G9BD7G7CD6G6Table 1 Resistor PositionsRGB LEDRedCathode(-)GreenBlueBreadboardI9I8I7I6Table 2 RGB Led PositionJumper fit outsBreadboardArduinoStartEnd1C6DP 102C7DP 113C9DP 94H8GNDTable 3 Jumper Wire PositionsAfter plotting the components to the breadboard. Connect the USB cable to the computer and the circuit.Compile and upload the code.Circuit Diagram markCode Analysis int redPin, greenPin, bluePin this code sets the pin numbers of each color from RGB LED to their respective pin time slot in the Arduino.void setup() a one-time initi alization method. Set all redPin, greenPin, and bluePin as output by using pinMode(pin, pinType) implicit in(p) function.void loop() a method that constantly iterates the statements inside the block. In this experiment, we hitd different colors, by generating ergodic numbers from random(min, max) each color from red, green and blue.random(0, 255) a built-in function that generates random number from look-a interchangeable 0 to 255.void colorRGB(int r, int g, int b) a user-defined method that accepts values of r, g, and b. This method is also responsible for assigning the values/colors for the pins of the RGB LED by using analogWrite(pin, value). When these colors are combined together, the RGB LED will create a different color based on the values of the RGB written by analogWrite().constrain(value, min, max) a built-in function that checks whether value is in the range of min and max. If so, return the value. If value is greater than max, this function will return max. If value is less than min, this function will return min. This code is essential to check whether the value is less than 0 or greater than 255, as analogWrite can only accept values 0-255. Also, the color values for each color in RGB can only be 0 255. For example R = 255, G = 0, B = 255, this will create a violet color.delay(n) lets the circuit sleep or delay for n milliseconds.Comparison of Code vs. Hardware OutputIt is noticeable that the code controls and manages how will the hardware provide an output. It is also important that the pins used in the hardware should be the same in the code. This experiment introduced a new kind of LED that can represent or display different colors. The RGB LED changes its color by using random number generation as part of the code, and setting those values to each color in RGB pins in the LED.Recommendation/EnhancementThe experiment can be integrated in disco bars, to produce different colors of lights. This can be also used for medical purposes for pe ople who may suffer color blindness. For example, an RGB LED, will produce colors, and the individual will describe the color he or she saw. A billboard composed of multiple RGB LEDs can be used to act like as pixels in a graphic image.1WordNet Search 3.1, Online. Available http//wordnetweb.princeton.edu/perl/webwn?s=colorsub=Search+WordNeto2=o0=1o8=1o1=1o7=o5=o9=o6=o3=o4=h=.2RGB Color Model Wikipedia, Online. Available https//en.wikipedia.org/wiki/RGB_color_model. Accessed 9 January 2017.

No comments:

Post a Comment

Note: Only a member of this blog may post a comment.