Anonymous

InaMORAta: Difference between revisions

From dankwiki
Line 6: Line 6:


==Communication==
==Communication==
We'll want to report RPMs to the controlling host, and probably take PWM and RGB orders from it. We might use [[LoRa]] for this later. For now, we'll use MQTT over WiFi from the Heltec.
We might use [[LoRa]] for this later; for now, we use MQTT over WiFi from the Heltec. The Heltec exists purely to make the network connection and broker between MQTT and the MEGA; the latter does all the actual work and sensing.
===MQTT topics===
===MQTT topics===
* <tt>sensors/mora3.therm</tt> floating-point temperature in celsius
* <tt>sensors/mora3.therm</tt> floating-point temperature in celsius
Line 16: Line 16:
* <tt>control/mora3/pwm</tt> accepts an integer 0–255 specifying the fan PWM
* <tt>control/mora3/pwm</tt> accepts an integer 0–255 specifying the fan PWM
** published by controller, subscribed by Heltec
** published by controller, subscribed by Heltec
===Recovery===
Currently, the controller sends messages only on change. This doesn't fly if the components can go down. We ought have the Heltec publish two more data, the effective PWM and effective RGB, and it ought get these from the MEGA. That way, the controller can publish whenever the effective values do not equal the desired values.
We could have the controller simply regularly publish the desired states, but the protocol above lets the controller know when the MEGA has an incorrect understanding of state (if e.g. the Heltec stops passing along control messages).


==Powering the system==
==Powering the system==