Arduino is a hardware which is used to connect the computer and the project model so that we can control it by using Arduino code accordingly! Project model can be a robot, quadcopter or a sensor or also can be a digital pin!
I wanted to learn about Arduino and then I thought, I should share it also! So, there are a lot of types of Arduino, you can google it as well. But, the Arduino Uno is the most “standard” Arduino board currently and is probably the best choice for beginners like me who are just getting started with the platform.
Arduino UNO parts:-
There are 14 digital pins and 6 analog pins as you can see but if you need more pins, then you can also use a multiplexer.
It has ATmega328 which is a single chip microcontroller. So, Arduino is not a micro-controller! It has two micro-controllers actually, as you can see (ATmega328 and ATmega 16U2).
A micro-controller is an IC which contains a CPU(Central Processing Unit) as well as RAM, ROM and other peripherals.
A micro-controller is an IC which contains a CPU(Central Processing Unit) as well as RAM, ROM and other peripherals.
And a microprocessor is an IC that has ALU (Arithmetic Logical Unit) for all the mathematical operations with extreme speed that any microcontroller with its CPU won't be able to perform. But, with the new modifications now that are being done, you might even be able to do so.
it is used for arithmetic logarithmic functions for the whole process that we do on the laptop. Because, what we do on the laptop is all mathematics like drawing, selecting files, etc. It is also used for controlling the system and also for storing the data. And it’s not about controlling hardware parts like the microcontroller
Now, in the microcontroller, we have RAM which is Random-access memory and ROM which is read-only memory. The basic difference between them is that a ROM chip is non-volatile storage and does not require a constant source of power to retain information stored on it. When power is turned off, a RAM chip will lose the information stored on it because the RAM chip is volatile and requires a constant source of power to retain information. Note that RAM loses data and not ROM.
Now, why we need RAM and ROM? cause RAM is used by CPU for quick actions when a computer is running so it doesn't need to store data permanently in RAM.
Raspberry Pi is called a single chip computer. It has its own operating system. It has an ARM microprocessor. It is 100 times better than Arduino. It can wirelessly connect to the internet. It's amazing when it comes to image processing and IOT.
Now returning to Arduino:-
What we code and write in Arduino IDE happens on ATmega328 and ATmega16U2 converts the signals from USB into bits that can be read by the serial pins Rx and Tx of ATmega328.
Now, why we need RAM and ROM? cause RAM is used by CPU for quick actions when a computer is running so it doesn't need to store data permanently in RAM.
Raspberry Pi is called a single chip computer. It has its own operating system. It has an ARM microprocessor. It is 100 times better than Arduino. It can wirelessly connect to the internet. It's amazing when it comes to image processing and IOT.
Now returning to Arduino:-
What we code and write in Arduino IDE happens on ATmega328 and ATmega16U2 converts the signals from USB into bits that can be read by the serial pins Rx and Tx of ATmega328.
Arduino IDE:-
pinMode(pin, mode)
Sets pin to either INPUT or OUTPUT
digitalRead(pin)
Reads HIGH or LOW from a pin.We use it for LEDs because they give output as 0/1 i.e ON/OFF.
digitalWrite(pin, value)
Writes HIGH or LOW to a pin
analogRead(pin)
Reads analog signal/value from the pin and the ADC of microcontroller converts the value into digital format (ADC- analog to digital converter). We use this function for the temperature sensor, potentiometer, IR sensors,e.t.c which takes analog input.
It reads it on a scale of (0-255).255 is equal to 5 of the digital and 0 to 0 of.So, in
analog, we can get the intermediate values between 0 to 5 including floating values.
While writing the code on Arduino, we need to set serial port which is in tools of button bar of Arduino IDE and then select board as Arduino UNO or whichever you are using.
Serial is used for communication between the Arduino board and a computer or other devices. The serial port which is on Arduino board communicates on digital pins 0 (RX) and 1 (TX) as well as with the computer via USB.
Compiling the program turns it into binary data
Then uploading it sends the bits through USB cable to the ATmega16U2 which converts the signal into bits which can be read by ATmega328.
The two LEDs near the USB connector on the Arduino board blink when data is transmitted
RX blinks when the Arduino is receiving data
TX blinks when the Arduino is transmitting data
Serial.begin(9600) opens the serial port, sets data rate to 9600 bps i.e it sets the data rate in bits per second (baud) for serial data transmission.
These are the basic things about Arduino but, very important things without which, we can't use it well.
If you have any doubt or want to suggest something, just comment below.Thank you!
Best of Luck and have a nice day!
Good job chhaya🤙🤙
ReplyDelete-maity
Thank you! :)
DeleteGood one bro.. keep up the good work...
ReplyDeleteThank you! :)
DeleteGood work,keep it up,best of luck
ReplyDeleteHey!, thanks for reading. I'll try my best.
DeleteVery usefull
ReplyDeleteThank you for reading! I am glad that you found it useful.
DeleteThanks! And Have a nice day!
Useful thanks
ReplyDeleteThanks for reading! I'm glad it was helpful... Have a nice day!
Delete