Coding help...

Do you have a question on how to do something.
Ask in here.
Post Reply
89delta
Posts: 163
Joined: Mon Oct 15, 2012 7:21 pm
Location: Leesburg, GA

Coding help...

Post by 89delta »

So I'm looking to be able to set the longitude and latitude in our sunlocation code we have.

Sl.Init(-21.285833, 150.999722);

How would I be able to do that? Would it be something like this:

Int long=0;
Int long2=0;
For something like this:

So.Init(long.long2, 150.999722);

Thanks for the help.

Sent from my SM-N920T using Tapatalk
User avatar
cosmith71
Posts: 1437
Joined: Fri Mar 29, 2013 3:51 pm
Location: Oklahoma City

Re: Coding help...

Post by cosmith71 »

Use a float.

Code: Select all

float variablename = 123.4567
https://www.arduino.cc/en/Reference/Float

Alternatively, if you don't need a variable, just change the number in the Sl.Init to whatever location you like.
Post Reply