Added submodule, Calculation is wrong.. but yea just to make first commit..

This commit is contained in:
Christian Lind Vie Madsen
2025-10-14 11:24:39 +02:00
parent ae192dfe08
commit 901b2c42ad
8 changed files with 203 additions and 0 deletions

34
main.c Normal file
View File

@@ -0,0 +1,34 @@
/*
* main.c
*
* Created on: 14 Oct 2025
* Author: Christian L. V. Madsen (OZ1CM)
*/
#include "cm_heatsink_emulator/cm_heatsink_emulator.h"
#define POWER 600 // Watts
#define AMBIENT_TEMPERATURE 25 // degC
#define C_TH 32688.36649 // Thermal capacity
cm_heatsink_thermalElement_t thermElements[3] = {
{
.label = "LED To NTC",
.R_th = 0.002021944
},{
.label = "NTC To Heat sink",
.R_th = 0.015981191
},{
.label = "Heat sink To Ambient",
.R_th = 0.121949843
},
};
cm_heatsinkEmul_t thermEmul;
int main(void ){
// Init Thermal emulator
cm_heatsinkEmul_init(&thermEmul, thermElements, 1/*(sizeof(thermElements) / sizeof(thermElements[0]))*/, POWER, AMBIENT_TEMPERATURE);
cm_heatsinkEmul_getRespon(&thermEmul, 0.1);
}