Can't understand this program

The program itself is attached as a png file.

Two files.

Please help me figure it out.

Thanks :slight_smile:

What part don't you understand? I mean besides the fact that a picture of text is just about useless. Why don't you cut and paste the actual text like someone with a little intelligence and give someone a chance to help you? Why would you think a picture of the screen would be better?

Please read the forum rules first and learn the rules for posting code. I have a feeling that if you would actually do some reading on this site you might get all your questions answered yourself. But at least take the time to read the forum rules.

Looks like you need to study up on Direct Port Manipulation.
https://www.arduino.cc/en/Reference/PortManipulation

byte c, out;
void setup()
{
  Serial.begin(9600);
  DDRB = 0x3F;
  out = 1;
  PORTB = out;
}

void loop()
{
  if (Serial.available() > 0)
  {
    c = Serial.read();
    if (c == '+') out = out << 1;
    if (out == 0x20) out = 1;
    PORTB = out;
  }
}

Is this a classroom exercise? I can’t tell because the text in the document is Hebrew. You also cut off the wiring diagram.

I would post a picture of my answer to your question, but I've misplaced my camera....

Regards,
Ray L.

Seems like school work…