Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Script to start the relay according to the temperature setting
It is necessary create a micropython script to run the relay at the temperature setpoint. If the temperature is low the relay turns on and if the temperatuure is hight the relay turns off. who can tell you where to start
You need to learn how to do two things:
1) How to control a relay from MicroPython
2) How to read your temperature sensor.

For #1, I assume you will connect your relay to an I/O pin. You then need to use python to turn that pin on and off. You can read how to do that here:

#2 depends entirely on what kind of temperature sensor you are using. Is it a thermistor? an I2C device? or what?

More information, please.
Have a look at the MiPy-ESP framework.
This is a basic framework for building stable Micropython code on ESPs.
There is a relay project example in the code repo.

Best regards

Forum Jump:

Users browsing this thread: 1 Guest(s)