EasyManuals Logo

Arduino Pro Mini User Manual

Arduino Pro Mini
311 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Page #157 background imageLoading...
Page #157 background image
B00000010, B00000100, B00000000,
-
B00000010, B00000100, B00000000,
-
B00000010, B00000100, B00000000,
-
B00000010, B00000100, B00000000,
20
// ...
-
B00000010, B00000100, B00000000, // 5.5
-
B00000111, B11111110, B00000000,
-
B00001111, B11111111, B00000000,
-
B00011111, B11111111, B10000000,
25
B00111111, B11111111, B11000000,
-
B01111111, B11111111, B11100000,
-
B01111111, B11111111, B11100000,
-
B11111111, B11111111, B11110000,
-
B11111111, B11111111, B11110000,
30
B11111111, B11111111, B11110000,
-
B11111111, B11111111, B11110000,
-
B11111111, B11111111, B11110000,
-
B11111111, B11111111, B11110000,
-
B01111111, B11111111, B11100000,
35
B01111111, B11111111, B11100000,
-
B00111111, B11111111, B11000000,
-
B00011111, B11111111, B10000000,
-
B00001111, B11111111, B00000000,
-
B00000111, B11111110, B00000000,
40
B00000001, B11111000, B00000000,
-
B00000001, B11111000, B00000000,
-
};
-
This file looks weird at first, but its really simple. First, we include
Arduino.h
because well need to declare binary constants later. After that, we include
avr/pgmspace.h
because we want to store our image data in the Arduinos flash
RAM. Eventually, we include
thermometer.h
because we need the declaration of
our thermometer image data.
In line 4, we eventually define the
thermometer
variable we declared in
thermome-
ter.h
. The definition differs slightly from the declaration because it contains
the
PROGMEM
directive.
5
This directive tells the compiler to copy the data stored
in the
thermometer
variable to the Arduinos flash memory. Usually, when you
define a variable in an Arduino program, it occupies memory in the SRAM.
Most Arduinos dont have a lot of SRAM (the Arduino Uno only has 2 KB), so
its a valuable resource and you shouldnt waste it. As a rule of thumb, you
should store all constant data in the Arduinos flash RAM. Use SRAM only
for information that might change during program execution.
5.
http://arduino.cc/en/Reference/PROGMEM
Chapter 8. Generating Video Signals with an Arduino 140
report erratum discuss
www.it-ebooks.info

Table of Contents

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the Arduino Pro Mini and is the answer not in the manual?

Arduino Pro Mini Specifications

General IconGeneral
BrandArduino
ModelPro Mini
CategoryMotherboard
LanguageEnglish

Related product manuals