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

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

Project: status panel

Project: a status panel with pressure, temperature and oxygen, plus a lever for the light. All six pins are in use.

Project 25 min Week 2

What you learn today

  • Show pressure, temperature and oxygen
  • Convert units
  • A lever switches the lighting

Next to the airlock there should be a panel that shows at a glance whether everything inside is fine. You now know everything you need for it: l and s, LogicTypes, pins, the housing and the display modes.

The setup

PinDeviceJob
d0gas sensormeasures the room air
d1LED displaypressure in kPa
d2LED displaytemperature in °C
d3LED displayoxygen in %
d4leverlighting on/off
d5wall lightlighting
dbhousingpressure in atmospheres

All six pins are in use. That is the limit – a seventh device would need a second chip or the network instructions from week 5.

The conversions

  • Temperature: the sensor returns Kelvin, so subtract 273.15. The display gets Mode 4 (Celsius) and only appends the °C.
  • Oxygen: RatioOxygen returns 0 to 1. Mode 1 (Percent) multiplies by 100 itself – so write the share in unchanged.
  • Atmospheres: kPa divided by 101.325.
l r1 d0 Temperature
sub r1 r1 273.15
s d2 Setting r1
s d2 Mode 4        # Celsius

Milestones

  1. d1 shows the pressure in kPa.
  2. d2 shows the temperature in °C, mode Celsius.
  3. d3 shows the oxygen, mode Percent.
  4. The lever on d4 switches the light on d5 on …
  5. … and off again.
  6. The housing shows the pressure in atmospheres.
Note

The program still runs through once. The panel therefore shows the state at start-up. In week 3 it gets a loop and follows every change.

Tip

Work milestone by milestone and run the tests after each step. A green milestone stays green if you keep building cleanly.

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
The gas sensor delivers the readings, the LED displays accept Setting, Mode and Color.

Project task

Task

Build the status panel from the lesson:

  • d1: pressure in kPa
  • d2: temperature in °C, mode Celsius (4)
  • d3: oxygen, mode Percent (1)
  • lever d4 switches light d5
  • db Setting: pressure in atmospheres (kPa / 101.325)

Milestones

  1. Milestone 1: pressure in kPa
  2. Milestone 2: temperature in °C
  3. Milestone 3: oxygen in percent
  4. Milestone 4: lever switches the light on
  5. Milestone 5: lever off, light off
  6. Milestone 6: housing shows atmospheres

Hints

Hint 1

Read the pressure into r0 once and use it twice: for d1 and for the atmospheres.

Hint 2

Percent multiplies by 100 itself – write the share unchanged.

Hint 3

Light: l r3 d4 Open, then s d5 On r3.

Quiz

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

Complete the day

  • Passed all milestones of the project
  • 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