Exam assignment 2020 - Software Engineering Matthias Willem
A TypeScript library that can display temperature data in the console in LCD style according to following format:
______________________
| _ _ _ _ |
| | _| _||_| |_|| |
| ||_ / _| | |_ |
|______________________|
This package package is available on npmjs.com. Check it out!
Just run this command:
npm i @matthiaswillem/7-segment_display
If you want to create a package yourself
Node.js
Visual Studio Code ( Not really necessary but it is useful )
Install npm
npm install npm@latest -g
Install typescript
npm install -g typescript
Install ts-node
npm install -g ts-node
The documentation of the package can you find at the GitHub Pages
Here I will give you some examples for using this package. The main method is:
display(temperature: number, frame: boolean)
In the first parameter temperature, you can give a number what the temperature should be.
In the second parameter frame, you can the method you want a frame (true
) or not (false
).
An example command
display(12.34291, true)
The output
________________________
| _ _ _ _ |
| | _| _||_| |_|| |
| | |_ / _| | |_ |
|________________________|
An example Command
display(6, false)
The output
_ _ _ _ _
|_ | || | |_||
|_| / |_||_| |_
All NPM versions are the same of the github versions tags.
Project Setup
Added some files:
Edited some files:
Project Start - Read the temperature
Edited some files:
Put temperature chars into array + read
Edited some files:
Doesn't exist anymore. I removed it for a small bugfix and didn't noticed you can't ever publish the same version again after you removed one.
You can find more info here about it.
Array of the whole temperature
Edited some files:
Printing temperature array in one string
Edited some files:
Reworked printDisplay method Cleaner, DRY code. Removed spaces between numbers
Edited some files:
Added everywhere default the °C symbol.
Edited some files:
The basics work (No Frame, no 2x Font)
Fully rebuild project:
Edited some files:
Added the frame to the project
Edited some files:
This project is licensed under the MIT License - see the LICENSE file for details
Matthias Willem
Student Electronics-ICT VIVES Bruges
Generated using TypeDoc