Hardware Reference
In-Depth Information
That's the whole program. When
it's running, it should look like Figure
7-16.
8
Continued from previous page.
// erase the previous readings:
noStroke();
fill(0);
rect(xPos,yPos, 180, 80);
// change the fill color for the text:
fill(#4F9FE1);
// print the readings:
text(date, xPos, yPos + lineHeight);
text(time, xPos, yPos + (2 * lineHeight));
text("Voltage: " + voltage + "V", xPos, yPos + (3 * lineHeight));
text("Signal Strength: -" + thisSignalStrength + " dBm", xPos,
yPos + (4 * lineHeight));
}
Figure 7-16
The output of the solar graph program.
These sensor values were faked with a
flashlight! Your actual values may differ.
 
Search WWH ::




Custom Search