Hardware Reference
In-Depth Information
Figure 26-2:
A new library has been added.
With that in place, it is now time to use the function you created previously.
Add the following lines to
setup()
, calling the library's function:
void setup() {
// put your setup code here, to run once:
Serial.begin(9600);
Serial.print("The answer is ");
Serial.println(theAnswer());
}
Compile it to make sure that everything works well. Then upload it to your
Arduino, and have a look at the serial output. Congratulations! You have just
created your i rst library.
Search WWH ::
Custom Search