Options
All
  • Public
  • Public/Protected
  • All
Menu

lcd-temperature-robind

Temperatuur LCD Display by Robin Deleu

NPM Version MIT license NPM Downloads

This program acts as a temperaturedisplay. When you give input the program it show you the temperature in digitstyle.

Getting Started

Prerequisites

You will need to instal node.js and ts-node to be able to run this program.

Instal node.js:

cinst nodejs.install

Instal ts-node

npm install -g ts-node

Or you just can use the npm library like this:

npm i lcd-temperature-robind

Using the program

The program is ready to use, if you want to use all functions you will need to edit some things. The options are set a frame around the display, the other option is to make all digits bigger.

You can edit everything in the configurationfile in the src directory.

const framework = 1
const bignumbers = 1

Framework stands for the frame around the digits. If you leave it on 1 it will have the frame, if you set it to 0 the frame will not be displayed.

Bignumbers stands how big the numbers would be (small or large). If you leave it on 1 it will have the big numbers, if you set it to 0 the numbers will be displayed smaller.

If you want to edit the temperature that will be displayed you can change the value on the temperatuur file that is located in the src directory.

const temp = 67.89

The temperature is in °C and is limited to 2 digits after the decimal point.

If you want to run the program, you will need to run this command:

ts-node .\index.ts

Examples of code output

Example one

The settings are: frame on, bignumbers on and it's 67,89 °C.

const framework = 1
const bignumbers = 1
const temp = 67.89

output:

 -------

 |  --  |
 | |    |
 | |    |
 |  --  |
 | |  | |
 | |  | |
 |  --  |


 |  --  |
 |    | |
 |    | |
 |    | |
 |    | |


 |      |
 |   /  |


 |  --  |
 | |  | |
 | |  | |
 |  --  |
 | |  | |
 | |  | |
 |  --  |


 |  --  |
 | |  | |
 | |  | |
 |  --  |
 |    | |
 |    | |
 |  --  |


 |  --  |
 | |  | |
 | |  | |
 |  --  |

 |  --  |
 | |    |
 | |    |
 | |    |
 | |    |
 |  --  |

 -------

Example two

The settings are: frame off, bignumbers on and it's 20,54 °C.

const framework = 0
const bignumbers = 1
const temp = 20.54

output:

   --
    |
    |
  --
 |
 |
  --


  --
 |  |
 |  |
 |  |
  --



  /


  --
 |
 |
  --
    |
    |
  --


 |  |
 |  |
  --
    |
    |


  --
 |  |
 |  |
  --

  --
 |
 |
 |
 |
  --

Example three

The settings are: frame off, bignumbers off and it's 11,86 °C.

const framework = 0
const bignumbers = 0
const temp = 11.86

output:


   |
   |


   |
   |



  /


  -
 | |
  -
 | |
  -


  -
 |
  -
 | |
  -


  -
 | |
  -

  -
 |
 |
  -

Example four

The settings are: frame on, bignumbers off and it's 97,42 °C.

const framework = 1
const bignumbers = 0
const temp = 97.42

output:

 -------

 |  -  |
 | | | |
 |  -  |
 |   | |
 |  -  |


 |  -  |
 |   | |
 |   | |


 |     |
 |  /  |


 | | | |
 |  -  |
 |   | |


 |  -  |
 |   | |
 |  -  |
 | |   |
 |  -  |


 |  -  |
 | | | |
 |  -  |

 |  -  |
 | |   |
 | |   |
 |  -  |

 -------

Documentation

Link to extra documentation

Authors

  • Robin Deleu - Student VIVES University of Applied Sciences

License

This project is licensed under the MIT License see the LICENSE.md file for details

Generated using TypeDoc