Posts

Showing posts from May, 2018

Arduino Bootloader

Image
Ever wondered how the code written in the IDE is actually executed ? Do you know where is the code stored in the Arduino and how does it get updated ? ATmega328P is the chip usually used in Arduino uno and nano. When the sketch is loaded it is actually loaded inside the micro-controller chip. This chip then runs the sketch once the Arduino is powered up. Almost all the micro-controllers use some form of a bootloader. When a micro-controller turns on,it runs a specific thing at a particular location (mostly 0x0000). This location usually contain a jump instruction to another place in the memory which is the start of the user program. The bootloader ,however, exits at a different memory location. On a power-up or reset, a bootloader is a section of memory that runs before the main code runs. It is used to setup the micro-controller or provide ability to update main program's code. The Arduino Bootloader supports re-programming the flash memory over serial. Like other micro-...

Arduino for Beginners

Image
The first toy which I came across in my endeavor in robotics was the Arduino Uno !  "Arduino" is an open-source computer hardware and software company which manufactures development boards. It designs single board micro-controllers such as uno ,mega,nano. It is basically the brain of the robot. It takes in input, process it based on the code and gives the desired output.   It is programmed using the C code but since it is cumbersome , Arduino firmware is loaded on ATmega chip which allows us to use the user-friendly Arduino programming language. The Arduino IDE is a cross-platform application which is written in Java.The program written in it is called a "sketch".  The setup() function : It is called once when it starts or resets.The variables and I/O pins are initialized here. The loop() function : As the name suggests it repeats itself continuously. Arduino Uno is the most popular board. It is an open-source micro-controller based on ATmega328...