Temperature sensor support?

Dear everyone

I fell upon this temperature sensor, which has a 1 wire interface. It might work inside a motor. Don’t know that, but it sure will fit well in a LED lamp. It does not require a analog pin to work, any digital pin will do.

Good idea.

I’m sure there are thousands of temperature sensors out there, so we’d be looking for a generic solution. Maybe simplefoc should provide an interface for how temperature sensors can be added / interact with the motor control.

Looking at how thermo control works in linux cpu/heat management then there is typically a high and critical temperature. Above high then perhaps voltage_limit is reduced (perhaps using another PID loop). Above critical and the motor shuts off protecting magnets and windings from further heat damage.