lcd-temperature-robind
v1.0.3
Published
this is my libriary to convert a temperature to a lcd style output
Downloads
7
Readme
Temperatuur LCD Display by Robin Deleu
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 can just 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 for bigger numbers. 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.
For running the program you will need to run this command:
ts-node .\index.ts
Examples of code output
Example one
Here we set the frame on, the big numbers on and it is 67,89 °C.
const framework = 1
const bignumbers = 1
const temp = 67.89
output:
-------
| -- |
| | |
| | |
| -- |
| | | |
| | | |
| -- |
| -- |
| | |
| | |
| | |
| | |
| |
| / |
| -- |
| | | |
| | | |
| -- |
| | | |
| | | |
| -- |
| -- |
| | | |
| | | |
| -- |
| | |
| | |
| -- |
| -- |
| | | |
| | | |
| -- |
| -- |
| | |
| | |
| | |
| | |
| -- |
-------
Example two
Here we set the frame off, the big numbers on and it is 20,54 °C.
const framework = 0
const bignumbers = 1
const temp = 20.54
output:
--
|
|
--
|
|
--
--
| |
| |
| |
--
/
--
|
|
--
|
|
--
| |
| |
--
|
|
--
| |
| |
--
--
|
|
|
|
--
Example three
Here we set the frame off, the big numbers off and it is 11,86 °C.
const framework = 0
const bignumbers = 0
const temp = 11.86
output:
|
|
|
|
/
-
| |
-
| |
-
-
|
-
| |
-
-
| |
-
-
|
|
-
Example four
Here we set the frame on, the big numbers off and it is 97,42 °C.
const framework = 1
const bignumbers = 0
const temp = 97.42
output:
-------
| - |
| | | |
| - |
| | |
| - |
| - |
| | |
| | |
| |
| / |
| | | |
| - |
| | |
| - |
| | |
| - |
| | |
| - |
| - |
| | | |
| - |
| - |
| | |
| | |
| - |
-------
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