# First node problems - compiling

**URL:** <https://www.thethingsnetwork.org/forum/t/first-node-problems-compiling/39881>\
**Category:** How to get started\
**Created:** [September 13, 2020, 1:36pm UTC](https://www.thethingsnetwork.org/forum/t/first-node-problems-compiling/39881 "2020-09-13T13:36:53Z")\
**Posts on this page:** 1\
**Showing post:** 17

<div class="post-metadata">

**Author:** ![MasMat](https://www.thethingsnetwork.org/forum/user_avatar/www.thethingsnetwork.org/masmat/32/36190_2.png) [@MasMat](https://www.thethingsnetwork.org/forum/u/MasMat)\
**Post date:** [September 21, 2020, 6:49pm UTC](https://www.thethingsnetwork.org/forum/t/first-node-problems-compiling/39881/17 "2020-09-21T18:49:15Z")

</div>

OK, so found my cold solder and fixed it. Nothing got through but I reset the “frames counter” on Console and it started working. What is it?

@descartes my loop-function’s meaningful part is:

```auto
     if (Door1StateChanged == 1 || Door2StateChanged == 1) {
        Serial.print("Door1Pin:");
        Serial.println(digitalRead(Door1Pin));
        Serial.print("Door2Pin:");
        Serial.println(digitalRead(Door2Pin));
        TX_INTERVAL = 0; // Change detected, push change faster
        Serial.println("Transmiting now");
        os_setTimedCallback(&sendjob, os_getTime()+sec2osticks(TX_INTERVAL), do_send);
        Door1StateChanged = 0;
        Door2StateChanged = 0;
      }

```

…and that seems to work. Only to lead to problems decoding. I watched the video and racked my brain. This coding is something I’m completely new to. Before I move to the advice from @cslorabox , I will try to make sense of this:

My decoder:

```auto
function Decoder(bytes, port) {
  var door1 = (bytes[0]);
  var door2 = (bytes[1]);
    
  return {
    Door1: door1,
    Door2: door2
  }
}

```

Debug: Door1Pin:1 Door2Pin:0  
Data: 31302C2030

Output:  
{  
“Door1”: 49,  
“Door2”: 48  
}  
What’s wrong with my decoder?

---

_[View the full topic](https://www.thethingsnetwork.org/forum/t/first-node-problems-compiling/39881)._
