0

When I compile my program i get this message

Sketch uses 7,074 bytes (21%) of program storage space. Maximum is 32,256 bytes. Global variables use 1,033 bytes (50%) of dynamic memory, leaving 1,015 bytes for local variables. Maximum is 2,048 bytes.

What do this message states?

this is my code

#include <SPI.h>
#include <MFRC522.h>

#define SS_PIN 10
#define RST_PIN 9
MFRC522 mfrc522(SS_PIN, RST_PIN);   // Create MFRC522 instance.

void setup() {
    Serial.begin(9600); // Initialize serial communications with the PC
    SPI.begin();            // Init SPI bus
    mfrc522.PCD_Init(); // Init MFRC522 card
    Serial.println("Scan PICC to see UID and type...");
}

void loop() {
    // Look for new cards
    if ( ! mfrc522.PICC_IsNewCardPresent()) {
        return;//go to start of loop if there is no card present
    }

    // Select one of the cards
    if ( ! mfrc522.PICC_ReadCardSerial()) {
        return;//if ReadCardSerial returns 1, the "uid" struct (see MFRC522.h lines 238-45)) contains the ID of the read card.
    }

    // Dump debug info about the card. PICC_HaltA() is automatically called.
    mfrc522.PICC_DumpToSerial(&(mfrc522.uid));
}

and I'm getting this message on blinking led long pin 13 too

Rajdeep Ratan
  • 61
  • 1
  • 1
  • 11
  • Not easy to say without seeing code. However big program memory usage is price for Arduino framework "genericity". Huge `RAM` usage might be caused by string literals without using `_FlashStringHelper` and `F("literals")`. And some of that is used by Arduino Framework (a far as I remember, it's about 200B). – KIIV Sep 27 '16 at 09:37
  • have uploaded the code – Rajdeep Ratan Sep 27 '16 at 09:44

2 Answers2

0

If you look at this question you'll see that without care, constant strings like "Scan PICC to see UID and type..." will use SRAM (dynamic memory) and not flash (program storage space).

Community
  • 1
  • 1
TomKeddie
  • 305
  • 1
  • 2
  • 10
-1

It is a message that informs you on the state of arduino's memory.

Dj0nny
  • 1
  • 4