Monday, 1 February 2016

Arduino concepts & misconcepts #2

Do you  know what is going to happen whenever you click on "upload"?
First the software compiles the code and displays the errors(if present) and if compilation is successful & if your Arduino board is connected to your PC through USB, then entire code will be uploaded to your Arduino Flash Memory(present in Atmega chip,the big chip that is present on your board).

 In Arduino Uno, flash memory is of 32Kb size so the program size must be within 32Kb . If it exceeds 32Kb, then you should resize the code by Optimisation(reducing the unwanted code) or you can use Mega board which has Flash Memory of 256Kb.

Once one code(sketch) was uploaded successfully, the same code persists till you upload other code to the board. This is the main Advantage of Arduino. There is a general misconception that Arduino has to be connected to your PC and run it (without removing USB connection). But this is WRONG. Once code is successfully uploaded to your board, Arduino just takes 5V from the USB port and nothing else(unless you are using Serial Communication). So this(supplying 5V to Arduino board) can also be achieved by using batteries. Hence it is clear that you need not connect your Arduino board to your PC once code was successfully uploaded to your board.


*** What is Serial Communication ?.
*** To which pins should we connect Battery ? and How many others methods to power an Arduino?





No comments:

Post a Comment