Are you sure, you are using the correct pins? TEM1 = GPIO14, TEM2 = GPIO4 LED (grn) = GPIO13 LED (red) = GPIO12