Options
All
  • Public
  • Public/Protected
  • All
Menu

A Class created to output the big 7-segment display numbers.

Easy to use:

import DrawBigTemperature from './DrawBigTemperature'

const temperature = new Temperature(915.2);
temperature.printToConsole(); // Would print the temperature 915.2°C to the console
temperature.return(); // Would return the temperature 915.2°C in a string

This would print 915.2 ° C in the console

Hierarchy

  • DrawBigTemperature

Index

Constructors

constructor

  • Parameters

    • temperature: number

      is the temperature you want drawn in 7-segment display. ex: -12.5 The constructor takes the temperature and runs makes it into a String. This string is then looped for every character to make a 7-bit segment. The 2 functions .checkForMinus() and .checkForChar() are also used.

    Returns DrawBigTemperature

Properties

bottomRow

bottomRow: string = ""

bottomRow2

bottomRow2: string = ""

middleRow

middleRow: string = ""

middleRow2

middleRow2: string = ""

topRow

topRow: string = ""

Methods

addLoop

  • addLoop(toloop: string[]): void
  • Parameters

    • toloop: string[]

      Is the string array you want to loop through

      The function then adds the charachters on the correct row.

    Returns void

checkForComma

  • checkForComma(what: string): void
  • Parameters

    • what: string

      which string do you want to check for the comma?

      This is used for the Comma check. Draws a comma if the class == true.

    Returns void

checkForMinus

  • checkForMinus(what: string): void
  • Parameters

    • what: string

      what string do you want to check?

      This is used for drawing a minus sign if the string matches it.

    Returns void

printToConsole

  • printToConsole(): void

returnString

  • returnString(): string

Generated using TypeDoc