In this ever-growing world of IoT (Internet of things), there are a lot of IoT devices which are openly available to us in the market. But for students, learners or a hobbyist who actually wants to play around or make an IoT device, the first criteria is to learn the basics by playing around with IoT boards like Arduino, Node mcu, Raspberry pi, etc., which helps in the basic development of the subject and could also be used in future hardcore projects. And if you ever Google IoT boards, the first name that would pop up on every site would be an Arduino.
WHAT’S AN ARDUINO?
An Arduino is an open- source electronics platform which consists of a hardware micro-controller board and a software IDE. As the word open-source suggests, its source code and data sheet are made public, so anyone can modify or redistribute it without worrying about legal issues. The Arduino has different micro controller boards like Uno, Mega, Lilypad, Leonardo, etc. But the Uno is much more commonly used and thus people tend to call it as “Arduino” while referring to other boards as Arduino Mega, Lilypad Arduino, Arduino Leonardo, etc. All the boards use the same Integrated Development Environment (IDE) known as Arduino IDE which is a software used to edit, debug and compile the codes.
IMPORTANT PARTS OF AN ARDUINO UNO:
- USB Port
- Power Port
- Voltage Regulator
- Crystal Oscillator
- Digital Pins
- Analog Pins
- Reset Button
- TX/RX LED
The Arduino uses an USB type B port from where the Arduino can be connected to the PC by using an USB 2.0 type A/B. This pathway between the Arduino and the PC is used to upload the codes on the board and it also acts as a power supply for the board.
The Arduino also has a barrel power jack from where it can also be powered up directly from the AC mains by using an AC to DC adapter or by using a battery. The input voltage to this port should not exceed 20V.
The function of the Voltage Regulator is to convert the input voltage to 5V, stabilize the voltage and provide it to the other parts on the board.
ATMEGA328P MICRO CONTROLLER
The Arduino has a pre-programmed built-in Atmega328P micro-controller which is considered to be the brain of the board. It is 8-bit, 28 pin micro-controller which is the largest on the board. It has a 32Kb flash memory to store codes, a RAM of 2KB and an EEPROM of 1Kb.
The Arduino uses a 16MHz Crystal Oscillator. The Crystal Oscillator provides a clock to the micro-controller. 16MHz Crystal ticks 16 million times a second and the micro-controller does an operation at every tick.
An Arduino Uno has 14 digital input/output pins out of which 6 pins can be used as PWM output. Digital pins provide 5V voltage when they are high and each pin can provide current up to 40mA.
An Arduino Uno has 6 analog input/output pins which can also be used as digital input/output pins. The Analog input voltages gets converted into digital bits by an ADC for the micro-controller to understand.
The reset button of the Arduino is used to rerun the program uploaded on the board from the start.
TX stands for transmit and RX stands for receive. These LEDs glow up and act as an indicator when the Arduino transmits or receives data.
INTEGRATED DEVELOPMENT ENVIRONMENT (IDE)
IDE stands for integrated development environment. It is a software which generally consists of a built-in source code editor, build automation tools, debugger and a compiler. An IDE makes work for programmers much easier as most of the tools required for working on a particular code are built-in, in it. Some IDEs also have the feature that helps in predicting related commands when the programmer types its initials and the Arduino IDE is one of them. In real life terms, it is like a kitchen where u can find everything necessary to make food rather than using your living room and wasting time trying to find the useful items for it.
Arduino IDE is one of the simplest IDEs and the codes are written in C and C++. It can be installed in Windows, macOS, Linux and is also available as a web app. Arduino IDE doesn't have a debugger and it mainly consists of a code editor, compiler, a loader and a serial monitor. Arduino IDE is not just limited to Arduino boards, there are a wide list of boards also supported by this IDE.
The Verify button of the Arduino is used to compile the code from the editor window. It checks all the syntaxes and displays the errors in the console.
The Upload button compiles and uploads or transfers the code to the Arduino board.
The New button is used to open a new window of the application with an unedited default editor window.
The Open button is used to open any previously saved programs or any Arduino programs present in your device.
The Save button is used to save your current work.
The Serial Monitor button opens a serial monitor window that communicates by receiving and sending serial data with the Arduino. It allows the users to send data to the Arduino and also receive back. It only functions when the board is connected to the Arduino IDE.
The Editor Window is used to write codes.
The Error Console displays all the errors while compiling, uploading, etc. It also displays information when a code is uploaded successfully.
The Status Bar is used to check the COM port at which the Arduino is connected. It also displays the type of board connected.
Katika ulimwengu huu unaokua wa IoT, kuna vifaa vingi vya IoT ambavyo vinapatikana kwa wazi kwenye soko. Kwa wanafunzi, wanafunzi au hobbyists ambao wanataka kucheza au kutengeneza kifaa cha IoT, vigezo vya kwanza ni kujifunza mambo ya msingi kwa kucheza na bodi za IoT kama Arduino, Node, Mcu, Raspberry Pi, n.k., ambayo husaidia katika maendeleo ya msingi ya somo na inaweza pia kutumika katika miradi ya baadaye ya hardcore. Ikiwa utaangalia Google kwa bodi za IoT, jina la kwanza ambalo litatokea kwenye tovuti yoyote itakuwa Arduino. Arduino ni nini? Arduino ni jukwaa la elektroniki la chanzo wazi ambalo lina bodi ya mikro-dhibiti ya vifaa na IDE ya programu. Kama neno la chanzo wazi linavyopendekeza, nambari yake ya chanzo na karatasi ya data ni kufanywa hadharani, hivyo mtu yeyote anaweza kurekebisha au kusambaza tena bila kuwa na wasiwasi kuhusu masuala ya kisheria. Arduino ina bodi tofauti za microcontroller kama Uno, Mega, Lilypad, Leonardo, nk. Lakini Uno ni zaidi ya kawaida kutumika na hivyo watu huwa na wito wake kama <unk>Arduino<unk> wakati akirejelea bodi nyingine kama Arduino Mega, Lilypad Arduino, Arduino Leonardo, nk. Bodi zote zinatumia mazingira sawa ya maendeleo (IDE) inayojulikana kama Arduino IDE ambayo ni programu inayotumiwa kuhariri, debug na kukusanya nambari. Vipengele muhimu vya Arduino: Port ya USB, Port ya Nguvu, Msimamizi wa Voltage, Crystal Oscillator, Pini za Dijiti, Pini za Analog, kifungo cha Reset, LED ya TX, RX, na USB Type-B, ambayo inaweza kuunganishwa na PC kwa kutumia USB 2.0 Type-A. Njia hii kati ya Arduino na PC hutumiwa kupakia nambari kwenye bodi na pia hufanya kazi kama usambazaji wa nguvu kwa bodi. Arduino pia ina jack ya nguvu ya pipa ambayo inaweza pia kuendeshwa moja kwa moja kutoka kwa umeme wa AC kwa kutumia adapter ya AC-DC au kwa kutumia betri. Mzunguko wa voltage ya kuingia kwenye bandari hii haipaswi kuzidi 20V. Voltage Regulator ni moja ya vifaa vya kugeuza voltage ya pembejeo kwa 5V, na kuimarisha voltage ya voltage na kuifanya iweze kuendeshwa kwa sehemu nyingine za bodi. Arduino ina Atmega328P Microcontroller iliyojengwa kabla ya programu, ambayo ni ubongo wa bodi. Ni 8-bit, 28-pin microcontroller ambayo ni kubwa zaidi kwenye bodi. Ina 32Kb flash kumbukumbu kuhifadhi codes, 2Kb RAM na 1Kb EEPROM. Arduino ina 16MHz Crystal Oscillator Crystal Oscillator hutoa saa kwa micro-controller. 16MHz Crystal ticks mara milioni 16 kwa sekunde na microcontroller hufanya operesheni katika kila tick. Arduino Uno ina 14 digital input na pato pini, ambayo 6 inaweza kutumika kama PWM pato. Pini za dijiti hutoa voltage ya 5V wakati ni kubwa na kila pini inaweza kutoa sasa hadi 40mA. Arduino Uno ina pini 6 za analog za kuingia na kutoka ambazo zinaweza pia kutumika kama pini za kuingia na kutoka kwa dijiti. Analog input voltage ni kubadilishwa katika bits digital na ADC kwa microcontroller kuelewa. kifungo reset ya Arduino ni kutumika kwa rerun programu kupakuliwa juu ya bodi kutoka mwanzo. TX inamaanisha kutuma na RX inamaanisha kupokea. LEDs hizi kuwaka na kutenda kama kiashiria wakati Arduino inatoa au anapokea data. Integrated Development Environment (IDE) ni kifupi cha Integrated Development Environment (Integrated Development Environment). Ni programu ambayo kwa ujumla inajumuisha kujengwa katika chanzo code mhariri, kujenga zana za automatisering, debugger na compiler. IDE hufanya kazi kwa waandaaji wa programu rahisi zaidi kama zana nyingi zinazohitajika kwa kufanya kazi kwenye nambari fulani zimejengwa ndani yake. Baadhi ya IDE pia kuwa na kipengele kwamba husaidia katika kutabiri amri zinazohusiana wakati programu aina ya initials yake na Arduino IDE ni moja yao. Katika hali halisi ya maisha, ni kama jikoni ambapo unaweza kupata kila kitu muhimu cha kufanya chakula badala ya kutumia chumba chako cha kuishi na kupoteza muda kujaribu kupata vitu muhimu kwa ajili yake. Arduino ni moja ya IDE rahisi na kanuni ni imeandikwa katika C na C ++. Inaweza kuwekwa katika Windows, macOS, Linux na pia inapatikana kama programu ya wavuti. Arduino IDE haina debugger na ni hasa inajumuisha code mhariri, compiler, loader na mfululizo mfuatiliaji. Arduino IDE ni moja ya bodi za Arduino ambazo zinasaidia kazi nyingi za kompyuta. Bonyeza kuthibitisha ya Arduino ni kutumika kwa kukusanya kanuni kutoka dirisha mhariri. Ni kuangalia syntaxes wote na inaonyesha makosa katika console. kifungo Upload compiles na uploads au uhamisho code kwa bodi Arduino. kifungo Mpya ni kutumika kufungua dirisha jipya la maombi na dirisha editor default unedited. Fungua kifungo ni kutumika kufungua programu yoyote iliyowekwa hapo awali au programu yoyote Arduino sasa katika kifaa chako. Bonyeza Hifadhi hutumiwa kuhifadhi kazi yako ya sasa. kifungo Serial Monitor hufungua mfululizo mfuatiliaji dirisha kwamba kuwasiliana kwa kupokea na kutuma data mfululizo na Arduino. Inaruhusu watumiaji kutuma data kwa Arduino na pia kupokea nyuma. Ni kazi tu wakati bodi ni kushikamana na Arduino IDE. Mhariri Window ni kutumika kuandika kanuni. Kosa Console inaonyesha makosa yote wakati wa kukusanya, kupakia, nk. Pia inaonyesha habari wakati kanuni ni kupakuliwa kwa mafanikio. Status Bar ni kutumika kuangalia COM bandari ambayo Arduino ni kushikamana. Pia inaonyesha aina ya bodi kushikamana.