Home >> Solar Projects >> Sun Program part 1 >> Sun Program part 2 >> Sun Program part 3 >> Sun Program part 4 

A (BETA) Sun Tracking Program (Part 2)

Previous                                             Next

Note: This program has been replaced by the Sun Tracker program. Someone might still find it useful though, so I'm leaving it up.

At this point in time, the only way to set up the Sun Program for your own particular location is to do so in the Scintilla Text Editor, AKA SciTE. I would like to build an interface for it one day, but there are several other things on the list which are more useful that I'm going to do first.

Even though it might be unsettling to those who aren't used to looking at program code, using SciTE isn't difficult. Once you've gone through the steps, you'll see that it is no more intimidating then using a word processor. 

Downloading the Sun Tracking Program

Go ahead and download the program by clicking here. Once downloaded you should find a ruby file named "SunProgram.rb," and a copyright license (which basically just says that you can't sue me after you accidently incinerate your cat with the solar death ray you just built) all inside a zipped folder.   

Downloading SciTE

Setting up this program is a little different from what you are probably used to. In order to do so, you must first download both SciTE and the Ruby programming language. You can get them both at once by going here http://www.ruby-lang.org/en/downloads/ and choosing the one click installer.

The one click installer is only available for the Windows operating system. It is possible to install Ruby on both a Mac and Linux, but I've personally never tried it before, so I can't recommend a site that will show you how to do it.

It's also possible that your Mac or Linux OS already has it installed. You can skip this step if it does.

Also, any text editor will work just so long as you have the Ruby language set up on your computer. SciTE is bundled with the one click installer though, so you might as well use that one.

Running the Program for the First Time

1. Start SciTE

2. Click file on the menu bar and go to open. Find the folder "Sun Program" that I told you to download and unzip above and open the ruby file "Sun Program.rb".

3. Press F8 on your keyboard. This should open the output pane on the right side of the screen. (Clicking "view" on the menu bar and then clicking "output" will also work.)

4. Press F5 on your keyboard. (Clicking "tools" on the menu bar and then "go" also works.)

If all goes well, a new file named "Sun Tracking G-code.ngc" will be created in the "Sun Program" folder. Open it, and you should see output similar to the below text.

Note: There will be many more lines in the file than what is below.

G01 F100
G01 Y34.3135 X136.3124
G04 P59.855330235348
G01 Y34.438 X136.5749
G04 P59.8553296013052
G01 Y34.5619 X136.8381
G04 P59.855328967262
G01 Y34.6852 X137.1022

If you see text similar to G04 P59.855330235348 repeated over and over, it is still working. It just means the sun is below the horizon at that moment.

The output above will not be correct until you input your own latitude and longitude. The next page has instructions on how to do that.

Previous                                            Next

Home >> Solar Projects >> Sun Program part 1 >> Sun Program part 2 >> Sun Program part 3 >> Sun Program part 4