Pre-requisites
Buy the components
Use struct data type to declare, create and use it in a function. The struct functions are abstracted in a seperate folder to show how it can be used and referred in the main.ino
.
The struct LatLong
can be declared:
struct LatLong {
double latitude;
double longitude;
};
The struct can be defined:
LatLong latlong = {1.2480631, 103.8285657};
The struct can be used in a function declaration:
void goToSentosa(struct LatLong *);
The struct can be used in a function definition:
void goToSentosa(struct LatLong *ll) {
...
}