This program uses the "PSA" solar positioning algorithm calculating the sun position, based on longitude, latitude, and time zone. Then Mbed chip controls the two digital servos to rotate the solar panel to the correct azimuth and zenith angle.

Dependencies:   4DGL-uLCD-SE AX12 NetServices mbed spxml

Fork of AX12-HelloWorld by Chris Styles

Committer:
chris
Date:
Thu Mar 31 12:03:04 2011 +0000
Revision:
1:b12b06e2fc2d
Parent:
0:f6f8cf11779f
Child:
2:2a3493799f03

        

Who changed what in which revision?

UserRevisionLine numberNew contents of line
chris 0:f6f8cf11779f 1 #include "mbed.h"
chris 0:f6f8cf11779f 2 #include "AX12.h"
chris 0:f6f8cf11779f 3
chris 0:f6f8cf11779f 4 int main() {
chris 0:f6f8cf11779f 5
chris 0:f6f8cf11779f 6 AX12 myax12 (p9, p10, 1);
chris 1:b12b06e2fc2d 7
chris 0:f6f8cf11779f 8 while (1) {
chris 1:b12b06e2fc2d 9 myax12.SetGoal(0); // go to 0 degrees
chris 0:f6f8cf11779f 10 wait (2.0);
chris 1:b12b06e2fc2d 11 myax12.SetGoal(300); // go to 300 degrees
chris 0:f6f8cf11779f 12 wait (2.0);
chris 0:f6f8cf11779f 13 }
chris 0:f6f8cf11779f 14 }