Hardware Reference
In-Depth Information
reset the TFT screen when the TFT subsystem is ready, or as required by the
sketch. DC is used as an extension to SPI to tell the TFT screen if the incoming
message is either data, or an instruction. Also, the chip select pins for both the
TFT screen and the SD card reader.
Figure 13-2: Project assembly (Image created with Fritzing)
On lines 12 and 13, two int variables are declared: lightPos and currentTemp .
These two variables contain the graph position and the current temperature,
respectively.
On line 15, a PImage object is created, called background . This is where the
sketch loads an image into memory and allows you to display a background
image on the screen.
On line 18, a TFT object, named screen , is created. It is instantiated with
three arguments, the three pins used to control the screen. The SPI wires are
not specii ed because they are on i xed pins. Because they cannot be changed,
there is no need to specify them.
Search WWH ::




Custom Search