B00000010, B00000100, B00000000,
-
B00000010, B00000100, B00000000,
-
B00000010, B00000100, B00000000,
-
B00000010, B00000100, B00000000,
20
// ...
-
B00000010, B00000100, B00000000,
-
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 it s really simple. First, we include
because we ll need to declare binary constants later. After that, we include
avr/pgmspace.h
because we want to store our image data in the Arduino s flash
RAM. Eventually, we include
our thermometer image data.
In line 4, we eventually define the
ter.h
. The definition differs slightly from the declaration because it contains
the
PROGMEM
directive.
in the
variable to the Arduino s flash memory. Usually, when you
thermometer
define a variable in an Arduino program, it occupies memory in the SRAM.
Most Arduinos don t have a lot of SRAM (the Arduino Uno only has 2 KB), so
it s a valuable resource and you shouldn t waste it. As a rule of thumb, you
should store all constant data in the Arduino s 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
// 5.5
because we need the declaration of
thermometer.h
thermometer
5
This directive tells the compiler to copy the data stored
www.it-ebooks.info
variable we declared in
140
Arduino.h
thermome-
report erratum
discuss
Need help?
Do you have a question about the Arduino Uno and is the answer not in the manual?