Stationeers

Stationeers

81 ratings
(IC Code) Perfect Solar Tracking 2.0 With Reset
2
   
Award
Favorite
Favorited
Unfavorite
File Size
Posted
117.796 KB
28 Jan, 2020 @ 10:22am
1 Change Note ( view )

Subscribe to download
(IC Code) Perfect Solar Tracking 2.0 With Reset

Description
Perfect Solar Tracking 2.0 resetting, using only one daylight sensor
​For a better understanding of how this system works please check out my video at https://youtu.be/PFqFinZVRxU

--
Special Thanks to Boscage!
62 Comments
Fenris 11 May, 2022 @ 12:44pm 
If I run setting sun orbit 2 instead of default 1 - should I then change anything in the script ?
Right now the script doesn't seem to work
LP 11 Apr, 2022 @ 4:33pm 
Won't run. Multiple code errors. Looks like depreciating daylight sensor modes broke this.
Mokmo 31 Mar, 2022 @ 8:34pm 
So it requires a batch writer circuit per type of solar panel. Could use the sb commands.
Stormfire962 26 Feb, 2022 @ 3:39pm 
@Daniel - Make sure the data port on your day light sensor is facing north. Otherwise it will not work.
Daniel 15 Dec, 2021 @ 9:03am 
soo, uhh, i tryed this and other stuff .. but i never seem to get solar traacking to work .. using this code i got the panels to work but they follow the sun at paralel to the ground ... while my sun is up in the sky .. WTfH am i doing wrong .. pls ... help
Cumu[FR] 1 Nov, 2021 @ 1:39am 
Hello, You don't need batch writer you can command all solar panels with this command:

sb -539224550 Vertical vangle
sb -539224550 Horizontal hangle
Waldo 6 Sep, 2021 @ 1:51am 
ok, it's giving me an error on line 14, or where s DaySen Mode 2
Peptide 1 Sep, 2021 @ 3:52pm 
Use this code here:

[code]
alias DaySen d0
alias writeVert d1
alias writeHor d2
alias angle r0
alias running r1
s DaySen Mode 2
yield
Start:
#Sun up check
l angle DaySen SolarAngle
s DaySen Mode 1
bgt angle 92 Reset
move running 0
#Vertical
l angle DaySen Vertical
sub angle 75 angle
div angle angle 1.5
s db Setting angle
s writeVert On 1
yield
s writeVert On 0
yield
#Horizontal
l angle DaySen Horizontal
s DaySen Mode 2
mul angle angle -1
s db Setting angle
s writeHor On 1
yield
s writeHor On 0
yield
j Start
#Sun not up Reset
Reset:
bnez running Start
s db Setting 0
s writeVert On 1
yield
s writeVert On 0
yield
s db Setting -90
s writeHor On 1
yield
s writeHor On 0
yield
move running 1
j Start[/code]
Peptide 1 Sep, 2021 @ 3:30pm 
@Lammert

Setup wiring as per the video.

For IC just change solarangle in vertical and horizontal sections to Horizontal and Vertical respectively. Make sure its case sensitive etc. Make sure you're exporting to the IC too. I have it working on Mars albeit slightly off angle so will check code.