This is micropython code for esp32 It gets temperature and humidity from DHT22 sensor and sends it via socket to server