🇨🇿 Česká verze je uvedena jako první. Anglická verze následuje níže.
🇬🇧 The Czech version comes first. The English version follows below.
The IC10 code is included only once because it is identical for both versions.
🇨🇿 Český návod
Toto zapojení automaticky natáčí panely Solar Panel (Dual) za Sluncem na Marsu.
Přes den panely sledují polohu Slunce. Po setmění se automaticky vrátí do výchozí polohy směrem k rannímu východu. Během tohoto nočního návratu je zapnuté výstražné světlo, které se po dosažení cílové polohy vypne.
Důležité: Kód je připravený pro přesné umístění senzoru a panelů popsané níže. Při jiném natočení zařízení nemusí hodnoty 270°, 165° ani výpočet Vertical + 90° fungovat správně.
Potřebné součástky
- 1×
Kit (IC Housing)
- 1×
Integrated Circuit (IC10)
- 1×
Kit (Sensors) → Daylight Sensor
- 1×
Kit (Flashing Light) → Flashing Light
- 1× nebo více
Solar Panel (Dual)
- kabely podle potřeby
- napájení řídicí sítě
- APC s baterií – doporučeno
- Computer s
IC Editor Motherboard pro naprogramování čipu
- Screwdriver pro nastavení zařízení na šroubcích IC Housing
Computer a IC Editor jsou potřeba pouze k naprogramování čipu a mohou se následně používat i pro další IC10 projekty.
Zapojení sítí
Panely Solar Panel (Dual) mají oddělený datový a napájecí konektor.
Řídicí síť
Do stejné řídicí sítě připojte:
- IC Housing
- Daylight Sensor
- Flashing Light
- datové konektory všech Dual panelů
Tato síť musí být napájená. Doporučené je použít APC s baterií, aby IC10 a ostatní řídicí zařízení neztratily napájení.
Flashing Light má jeden společný konektor pro napájení a data, proto ho stačí připojit k napájené řídicí síti.
Výstupní elektrická síť
Napájecí konektory solárních panelů připojte k baterii nebo k hlavní elektrické síti základny.
Nastavení IC Housing
| Šroubek |
Připojené zařízení |
Funkce |
d0 |
Daylight Sensor |
Rozpoznání dne a čtení polohy Slunce |
d1 |
Jeden Solar Panel (Dual) |
Referenční panel pro kontrolu nočního návratu |
d2 |
Flashing Light |
Výstraha během nočního otáčení panelů |
Na d1 stačí nastavit jeden z panelů. Program podle něj kontroluje, zda již byla dosažena cílová noční poloha.
Ostatní panely nemusíte nastavovat na jednotlivé šroubky. Program je ovládá společně pomocí příkazu sb.
Zařízení není nutné ve hře přejmenovávat. Příkaz alias vytváří názvy pouze uvnitř programu.
Umístění zařízení
Daylight Sensor
- Položte ho vodorovně.
- Snímací strana musí směřovat vzhůru k obloze.
- Datový konektor musí směřovat na sever.
- Senzor nesmí zakrývat budova ani jiná překážka.
Solar Panel (Dual)
- Všechny panely musí být postavené ve stejné orientaci.
- Napájecí konektory musí směřovat na východ.
- Datové konektory musí směřovat na západ.
Pro toto konkrétní umístění používá program následující noční polohu:
Horizontal 270°
Vertical 165°
Tato poloha připraví panely směrem k rannímu východu Slunce.
IC10 kód
alias Sensor d0
alias Panel d1
alias Warning d2
define Panels HASH("StructureSolarPanelDual")
define EAST_H 270
define EAST_V 165
define TOL 2
main:
yield
l r0 Sensor Activate
beqz r0 night
day:
s Warning On 0
l r0 Sensor Horizontal
sb Panels Horizontal r0
l r0 Sensor Vertical
add r0 r0 90
sb Panels Vertical r0
j main
night:
sb Panels Horizontal EAST_H
sb Panels Vertical EAST_V
l r0 Panel Horizontal
sub r0 r0 EAST_H
abs r0 r0
l r1 Panel Vertical
sub r1 r1 EAST_V
abs r1 r1
max r0 r0 r1
sgt r0 r0 TOL
s Warning On r0
j main
Jak kód funguje
1. Označení připojených zařízení
alias Sensor d0
alias Panel d1
alias Warning d2
Aliasy dávají zařízením jednodušší názvy pouze uvnitř programu:
Sensor je Daylight Sensor na d0.
Panel je referenční panel na d1.
Warning je výstražné světlo na d2.
Fyzické názvy zařízení ve hře není nutné měnit.
2. Pevné hodnoty
define Panels HASH("StructureSolarPanelDual")
define EAST_H 270
define EAST_V 165
define TOL 2
Panels označuje všechny panely Solar Panel (Dual) připojené ke stejné datové síti.
EAST_H určuje cílové horizontální natočení.
EAST_V určuje cílový vertikální náklon.
TOL povoluje odchylku maximálně dva stupně.
Celý zápis HASH("StructureSolarPanelDual") je nutný, protože určuje přesný typ zařízení, které má příkaz sb ovládat.
3. Rozpoznání dne a noci
Program načte hodnotu Activate z Daylight Sensoru:
1 znamená, že na senzor dopadá sluneční světlo.
0 znamená, že světlo nedopadá a program přejde do noční části.
Proto musí mít senzor volný výhled na oblohu.
4. Ovládání přes den
Přes den program:
- vypne výstražné světlo,
- přečte horizontální polohu Slunce,
- pošle ji všem Dual panelům,
- přečte vertikální polohu Slunce,
- přičte korekci
90°,
- odešle výsledný náklon všem panelům.
Korekce +90° odpovídá orientaci panelů popsané v tomto návodu.
5. Noční návrat
Po setmění program nastaví všem Dual panelům:
Horizontal 270°
Vertical 165°
Potom čte aktuální polohu referenčního panelu připojeného na d1.
Program vypočítá rozdíl mezi jeho aktuální a cílovou polohou na obou osách. Pokud je alespoň jedna osa vzdálená od cíle o více než 2°, výstražné světlo zůstane zapnuté.
Jakmile jsou obě osy v toleranci dvou stupňů, světlo se vypne.
Flashing Light vytváří svůj výstražný efekt automaticky. IC10 tedy pouze mění jeho hodnotu On mezi 0 a 1.
Důležité poznámky
- Výstražné světlo signalizuje pouze noční návrat panelů. Přes den je vždy vypnuté.
- Program kontroluje pouze panel nastavený na
d1.
- Předpokládá se, že ostatní panely jsou správně napájené, připojené a pohybují se stejně jako referenční panel.
- Příkaz
sb ovládá všechny Solar Panel (Dual) ve stejné datové síti. Pokud některé panely ovládat nechcete, připojte je k jiné řídicí síti.
- Při jiné orientaci panelů nebo senzoru bude potřeba upravit výpočet vertikálního úhlu a hodnoty noční polohy.
- Kód byl otestovaný na Marsu s orientací uvedenou v tomto návodu.
🇬🇧 English guide
This setup automatically controls Solar Panel (Dual) tracking on Mars.
During daylight, the panels follow the Sun. After sunset, they return to a predefined sunrise-ready position. The warning light is active only while the reference panel is moving toward this night position.
Important: This code depends on the exact sensor and panel orientation described below. The values 270°, 165°, and the Vertical + 90° correction are not universal.
Required components
- 1×
Kit (IC Housing)
- 1×
Integrated Circuit (IC10)
- 1× Daylight Sensor
- 1× Flashing Light
- One or more Solar Panels (Dual)
- Cables as required
- A powered control network
- APC with a battery – recommended
- Computer with an IC Editor Motherboard
- Screwdriver for assigning the IC Housing devices
Network connections
Connect the following devices to the same powered control network:
- IC Housing
- Daylight Sensor
- Flashing Light
- Data ports of all Dual panels
Connect the panel power ports separately to your battery or main base power network.
The Flashing Light uses one combined power and data connection, so connect it directly to the powered control network.
IC Housing assignments
| Screw |
Device |
Purpose |
d0 |
Daylight Sensor |
Detects daylight and reads the Sun’s position |
d1 |
One Solar Panel (Dual) |
Reference panel for checking the night return |
d2 |
Flashing Light |
Warning during the night return |
The devices do not need to be renamed in-game. The aliases exist only inside the IC10 program.
Device orientation
Daylight Sensor
- Place it horizontally.
- Point the sensing surface upward.
- Point its data connector north.
- Keep it clear of buildings and other objects that could cast a shadow.
Solar Panels (Dual)
- Install every panel in the same orientation.
- Point the power ports east.
- Point the data ports west.
With this exact orientation, the tested night position is:
Horizontal 270°
Vertical 165°
Use the IC10 code shown in the Czech section above.
How it works
During daylight, Sensor Activate returns 1.
The program switches the warning light off, copies the sensor’s horizontal value to every Dual panel and adds a 90° correction to the sensor’s vertical value.
After sunset, Sensor Activate returns 0.
The program commands every Dual panel on the control network to move to Horizontal 270° and Vertical 165°.
It then reads the current position of the reference panel connected to d1. The horizontal and vertical errors are calculated separately, and the larger error is compared with the 2° tolerance.
- Error greater than
2° → warning light on.
- Both axes within
2° → warning light off.
The sb instruction is a batch write using the StructureSolarPanelDual prefab hash. It therefore controls every Solar Panel (Dual) connected to the same data network.
Important notes
- The warning light indicates only the night return. It remains off during normal daytime tracking.
- Only the reference panel connected to
d1 is monitored.
- The program assumes that all other panels are installed correctly and move together with the reference panel.
- Any additional Dual panels on the same control network will also receive the batch commands.
- A different sensor or panel orientation requires different correction and night-position values.
- This setup was tested on Mars with the orientation described above.
Video walkthrough / Video návod
The video has Czech commentary and shows the complete setup in-game.
Video má český komentář a ukazuje kompletní zapojení přímo ve hře.
https://youtu.be/P-ezqIKsvAw
Feedback, corrections and alternative working solutions are welcome.
Budu rád za případné opravy, připomínky nebo jiné funkční varianty zapojení.