stationeers.de Mod workshop · Dominik1199
DE Sign in
  1. Home
  2. IC10 academy
  3. Day 11

Day 11 of 365 · Beginner · Month 1: First steps

LED displays: numbers, units, colours

LED displays show Setting – Mode picks the unit, Color the colour. And why Percent multiplies by 100 on its own.

Lesson 10 min Week 2

What you learn today

  • Show Setting on a display
  • Pick Mode with DisplayMode
  • Set Color

The housing shows a value, but a status panel for the whole base needs more. That is what LED displays are for, in three sizes: small (StructureConsoleLED5), medium and large.

Setting: the number

Whatever is in Setting is what the display shows. The small display has five digits, so up to 99999 in normal mode.

l r0 d0 Pressure
s d1 Setting r0      # shows the pressure in kPa

If it stays dark, check power and On first: a display that is switched off shows nothing, whatever is in Setting.

Mode: the unit

With Mode the display appends a unit. The most important numbers:

ModeNameDisplay
0DisplayMode.Defaultjust the number
1DisplayMode.PercentSetting × 100, whole number, with %
2DisplayMode.Powerwith W
3DisplayMode.Kelvinwith K
4DisplayMode.Celsiuswith °C
10DisplayMode.Stringtext instead of a number

Instead of the number you may write the name: s d1 Mode DisplayMode.Celsius is the same as s d1 Mode 4. More about such names comes in week 5.

Warning

Celsius does not convert. The mode only appends °C. If 293.15 comes from the sensor, the display reads “293.15 °C”. You subtract the 273.15 yourself.

Warning

Percent, on the other hand, does calculate. The display multiplies Setting by 100. RatioOxygen returns 0.21 – write the 0.21 straight in and it reads “21%”. If you multiplied by 100 yourself first, it shows 2100%.

l r1 d0 RatioOxygen  # for example 0.21
s d2 Mode 1          # Percent
s d2 Setting r1      # shows 21%

Color: the colour

Color sets the colour of the digits:

NumberColourNumberColour
0blue4red
1grey5yellow
2green6white
3orange11purple

There are names here too: Color.Green is 2, Color.Red is 4. A colour that follows the reading is something you build in week 4 with comparisons.

Diagram

LogicTypes of two devices Gas sensor Temperature 296.15 L Pressure 101.3 L RatioOxygen 0.21 L RatioCarbonDioxide 0.004 L LED display On 1 L S Setting 23 L S Color 2 L S Mode 0 L S L = readable · S = writable · temperature in Kelvin, pressure in kPa
A gas sensor only offers readings. An LED display accepts Setting, Mode and Color for writing.

Exercise

Task

A gas sensor is attached to d0, a small LED display each to d1 and d2.

  • d1: temperature in °C, mode Celsius, colour orange
  • d2: oxygen share in Percent mode – so that it reads “21%” at 21 % oxygen

Hints

Hint 1

Celsius mode is 4, orange is 3 – or DisplayMode.Celsius and Color.Orange.

Hint 2

You convert the temperature yourself: subtract 273.15.

Hint 3

For Percent do not multiply the share by 100, Mode is 1.

Quiz

5 questions. You pass from 60 % – the server does the grading.

Complete the day

  • Passed the simulator exercise
  • Passed the quiz with at least 60 %

Without an account progress is saved in this browser only.

Report a mistake in this lesson

Please sign in to report. Sign in

Esc
↑ ↓ selectEnter open/ opens search anywhere