Introduction
Here you can see a short introduction to understand all the concepts we will talk about later.
A microcontroller is a programmable integrated circuit, capable of executing the commands recorded in its memory. Led RGB cathode common: it has 4 pins, one of which is longer than the others and corresponds to the GND.
An analogue signal is one whose value continuously varies over time. In contrast, a digital (or discrete) signal is one with a value at a specific time interval. Analog output: allow the value of a numerical variable internal to the controller to be converted into voltage or current. Analog input: They are characterised by reading voltage values from 0 to 5 Volts with a resolution of 1024 (10 bits). If we divide 5 by 1024 we must be able to detect variations in the level of the input signal of almost 5 mV. LDR: light dependent resistor The resistors are used to decrease, adapt the current and are normally connected in series. LED: Light emitting diode (semiconductor) and have polarity, i.e. they can only be connected in one direction, as they do not work in the other direction. Also inside it has a PN function, there is a semiconductor of type P (excess of positive charge) and N (excess of negative charge). Arduino Uno has a resolution of 10 bits, i.e. values between 0 and 1023. Arduino Due has a resolution of 12 bits, i.e. values between 0 and 4095. PN Junction: The PN junction is the basis of microcontrollers, the transistors have two modes: 0 and 1 which can act as a switch and as an amplifier. The NPN or PNP base amplifies both equally well.
Impurity atoms with 5 valence electrons produce n-type semiconductors by the contribution of extra electrons. Impurity atoms with 3 valence electrons produce p-type semiconductors by producing a "hole" or electron deficiency.
It should also be noted that if a low voltage is given, it will not be necessary because it will not be able to do the recombination. TSMC: Taiwan Semiconductor Manufacturing Company, the Taiwanese company that supplies all the microchips. PWM: pulse-width modulation, (I am working with 1 and 0) what we are trying to do is to make the LED make variations.
GPIO: General Purpose Input Output Approx 18: ADC: Analog Digital Converter = analog inputs 10 bits Approx 16 PWM: Pulse Width Modulation = analog output 12 bits 3V3 is the way to write 3.3V because the dots can be erased or not seen. RX and TX stands for receive and transmit and are special pins where they cannot be connected to any type of output or input, analogue or digital. BOOT is used to reset and clear the memory.
Code structure:
Comments are always at the beginning and are explanations of what it is intended to be. If they occupy more than one line, you have to put /* at each line and / to end the comment. After the comments we have to include all the necessary libraries (as it gets more complicated we will add more). Then we have to define the different constantens variables with the word 'const in' Ex: ledPin = 5 Unlike JavaScript, there is no general variable called var or let, but they have to be typed as for example the 'int' type of integara which stands for integers. Other types can be 'char' for single letter characters or 'string' for strings of characters with more than one letter, 'float' for decimal numbers, up to 32 decimal places and 'double' for decimal numbers with more accuracy, as float does not have much accuracy. In addition, there are more complex variables, in which Arduino falls short and it is necessary to work with processing, ARDUINO can be considered a derivative of C, while PROCESSING can be considered a derivative of JAVA. The advantage of PROCESSING is that we use all the possibilities of webcam, microphone, keyboard and mouse of the computer, and we can apply them to the ESP32. The disadvantage is that I have to have the computer switched on and connected for it to work, whereas the ARDUINO can work with only one battery. An example of a PROCESSING variable can be Pimage, which can store images and manipulate them. There are several types of compiled languages like for example arduino (c++, c) in the 1960's and interpreted ones like for example Python, which therefore includes Micropython and circuitpython (1990's).
New Materials
And our teacher explained and gave us different materials to make our own project: Transistors, which serve as a current amplifier, like a switch.
There are different types of transistors depending on the PN junction.
Diodes serve to give only one direction to the current, they are also PN junction and are made of semiconductors.
Ceramic capacitor, no polarity, units in nanofarads.
Electrolitic capacitor, used to accumulate electric charge and then release it. Its unit is in microfarads, and has polarity.
555: It can be used as a timer and has several internal transistors and diodes, it is a potentiometer or variable resistor.
745N74L547N: We join many transistors and we obtain microxips. SSI (Small Size Integrations)=100transistors MSI(Medium Size Integrations)=1000transistors LSI(Large Size Integrations)=10000transistors
7447: specialised microxip for 7-segment displays.
By: Juan Antonio Calvete and Joel PoderĂ³s.