/thermostat

This week's challenge was to create and design a thermostat with javascript. Although this was a pairing project,I decided to go solo and see how far I could get 🌡🌡

Primary LanguageJavaScript

Thermostat challenge 🌡🌡

Although this was a pair-programming challenge, I wanted to test myself to see how far I could get and cement my understanding on javascript for this challenge. My first strategy was to write down the user stories below to set a goal list of what I wanted my thermostat to be. Note: These User stories are in short-form.

How to Check it Out

  1. Git clone the project
git clone https://github.com/thatdania/thermostat.git
  1. change into the project directory in the terminal
cd thermostat 
  1. change into the views folders
cd views 
  1. run the html file to see the basics of the thermostat
open index.html 
  1. check out the test framework and those tests that are accomplished as well
cd thermostat
open SpecRunner.html 

User Stories:

By writing these in short form, it allowed me to start tackling the problem from a small scale. Below are all the ones I've completed.

- Thermostat starts at 20 degrees
- You can increase the temperature with an up function
- You can decrease the temperature with a down function
- The minimum temperature is 10 degrees
- If power saving mode is on, the maximum temperature is 25 degrees
- If power saving mode is off, the maximum temperature is 32 degrees
- Power saving mode is on by default
- You can reset the temperature to 20 with a reset function
- You can ask about the thermostat's current energy usage: < 18 is low-usage, < 25 is medium-usage, anything else is high-usage.
- (In the challenges where we add an interface, low-usage will be indicated with green, medium-usage indicated with black, high-usage indicated with red.)