0.0.2 • Published 4 years ago

examenopdracht-debaetslaura v0.0.2

Weekly downloads
-
License
ISC
Repository
github
Last release
4 years ago

Examenopdracht 2020 - Temperatuur LCD Display - De Baets Laura

npm badge

ESLint

Markdown Linter

Tests

Description

This library was created using typescript. It displays the temperature in an LCD style in the console. Below you can see an example:

 ___________________________
|    _     _        _   _   |
|  | _|    _||_|   |_| |    |
|  ||_  /  _|  |       |_   |
|___________________________|

Installation instructions

TODO hoe te installeren/ gebruiken

Multiple usage instructions and examples

general usage

If you want to use the library you just have to add these 2 lines in your program.

const application = new App({temperature: "-123456789, °C",size:"normal",border: true})
application.getLCD()

On this line below you must give the temperature, the size and say if you want a frame.

  • At the temperature you can only enter the following characters: "0123456789, ° C"
  • With the size you can choose between normal and big
  • At the border you have to give if you want a frame.(true = with frame, false = without frame)

You can change the order. this does not affect the operation of the library.

const application = new App({temperature: "-123456789, °C",size:"normal",border: true})

The line below then ensures that the temperature is printed in the console.

application.getLCD()

examples of the LCD library

normal size and without frame

const application = new App({temperature: "-123456789, °C",size:"normal",border: false})
application.getLCD()
       _  _     _  _  _  _  _        _  _
 _   | _| _||_||_ |_   ||_||_|      |_||
     ||_  _|  | _||_|  ||_| _| /       |_

normal size and with frame

const application = new App({temperature: "-123456789, °C",size:"normal",border: true})
application.getLCD()
 ____________________________________________
|        _  _     _  _  _  _  _        _  _  |
|  _   | _| _||_||_ |_   ||_||_|      |_||   |
|      ||_  _|  | _||_|  ||_| _| /       |_  |
|____________________________________________|

big size and without frame

const application = new App({temperature: "-123456789, °C",size:"big",border: false})
application.getLCD()
           ___  ___       ___  ___  ___  ___  ___            ___  ___
         |    |    ||   ||    |        ||   ||   |          |   ||
         |    |    ||   ||    |        ||   ||   |          |   ||
 ___       ___  ___  ___  ___  ___       ___  ___            ___
         ||        |    |    ||   |    ||   |    |               |
         ||        |    |    ||   |    ||   |    |   /           |
           ___  ___       ___  ___       ___  ___   /             ___

big size and with frame

const application = new App({temperature: "-123456789, °C",size:"big",border: true})
application.getLCD()
 ________________________________________________________________________ 
|            ___  ___       ___  ___  ___  ___  ___            ___  ___  |
|          |    |    ||   ||    |        ||   ||   |          |   ||     |
|          |    |    ||   ||    |        ||   ||   |          |   ||     |
|  ___       ___  ___  ___  ___  ___       ___  ___            ___       |
|          ||        |    |    ||   |    ||   |    |               |     |
|          ||        |    |    ||   |    ||   |    |   /           |     |
|            ___  ___       ___  ___       ___  ___   /             ___  |
|________________________________________________________________________|

frame is dependent of the length

const application = new App({temperature: "100°C",size:"big",border: true})
application.getLCD()
 _________________
|     _  _  _  _  |
|   || || ||_||   |
|   ||_||_|   |_  |
|_________________|

Youtube

Look at the video with examples. You can watch the video below here

IMAGE ALT TEXT HERE

License

Distributed under the MIT License. See License.txt for more information.

Author information

De Baets Laura

Student at VIVES Brugge Elektronica -ICT

e-mail: laura.debaets@student.vives.be

other stuff

NPM

Set stuff on NPM

npm version <new version number>
npm publish

here you can visit the website -> npm

tests

test_succes

documentatie pagina's link

// source of the split() method: https://www.samanthaming.com/tidbits/83-4-ways-to-convert-string-to-character-array/

0.0.2

4 years ago

0.0.0

4 years ago