/thermostat_js

A thermostat control written in javascript

Primary LanguageJavaScript

#Thermostat A thermostat control program in Javascript

Learning Objectives:

Learning to use Jasmine for Behaviour Driven Development (BDD)

Technologies used

Technology Used for
Javascript programming language for websites
Jasmine a behavior-driven development framework for testing JavaScript code
Jquery a JavaScript library designed to simplify the client-side scripting of HTML

How to run it:

$ open index.html

Running the tests:

$ open SpecRunner.html

Project Brief:

  • Thermostat starts with a set point (target temperature) of 20 degrees
  • You can increase the set point with the up button
  • You can decrease the set point with the down button
  • The minimum setpoint is 10 degrees
  • If power saving mode is on, the maximum setpoint is 25 degrees
  • If power saving mode is off, the maximum setpoint is 30 degrees
  • Power saving mode is on by default
  • You can reset the setpoint to 20 by clicking the reset button
  • The thermostat colours the display based on energy usage - < 18 is green, < 25 is yellow, otherwise red