<< Back

Exercise 2.2 - Sensors

c) Temperature warnings with threshold

This is the console. All output created with writeLog() is shown here.

Enter a threshold for the temperature and press "Set threshold". When the threshold is exceeded, the LED will turn red.


script.js

This is the JavaScript code behind the above application.