# How to include header file node red

**URL:** <https://discourse.nodered.org/t/how-to-include-header-file-node-red/11936>\
**Category:** General\
**Created:** [7 June 2019 10:15 UTC](https://discourse.nodered.org/t/how-to-include-header-file-node-red/11936 "2019-06-07T10:15:06Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![tramanah](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/tramanah/32/9122_2.png) [@tramanah](https://discourse.nodered.org/u/tramanah)\
**Post date:** [7 June 2019 10:15 UTC](https://discourse.nodered.org/t/how-to-include-header-file-node-red/11936/1 "2019-06-07T10:15:06Z")

</div>

good day, I am trying to using c++ code with header file in node red. May I know how to go about it.

```auto
#include "../arduPi.h"
#include "../sim7x00.h"

// Pin definition
int POWERKEY = 6;

int8_t answer;

void setup() {
	sim7600.PowerOn(POWERKEY);
	sim7600.GPSPositioning();
}

void loop() {

}

int main() {
	setup();
	while (1) {
		loop();
	}
	return (0);

```

---

<div class="post-metadata">

**Author:** ![knolleary](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/knolleary/32/3_2.png) [@knolleary](https://discourse.nodered.org/u/knolleary)\
**Post date:** [7 June 2019 10:40 UTC](https://discourse.nodered.org/t/how-to-include-header-file-node-red/11936/2 "2019-06-07T10:40:55Z")

</div>

Hi @tramanah

in what way do you want to use that C++ code with Node-RED?

That looks like code you run on an embedded device. Node-RED does not run on embedded devices.

Maybe if you describe what you are trying to do we can point in you in the right direction.

---

<div class="post-metadata">

**Author:** ![tramanah](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/tramanah/32/9122_2.png) [@tramanah](https://discourse.nodered.org/u/tramanah)\
**Post date:** [8 June 2019 00:11 UTC](https://discourse.nodered.org/t/how-to-include-header-file-node-red/11936/3 "2019-06-08T00:11:09Z")

</div>

Hi, I did purchase -\> 4G / 3G / 2G / GSM / GPRS / GNSS HAT for Raspberry Pi.

> **[4G / 3G / 2G / GSM / GPRS / GNSS HAT for Raspberry Pi](https://www.cytron.io/p-4g-3g-2g-gsm-gprs-gnss-hat-for-raspberry-pi?src=search.instant)**
>
> The SIM7600E-H 4G HAT is a 4G/3G/2G communication and GNSS positioning module, which supports LTE CAT4 up to 150Mbps for downlink data transfer and it is pretty low power consumption. In simple words, this HAT (for Raspberry Pi) supports cellular...

  
Its come with library files & AT commands manual.  
i do manage most of the function with AT Commands on Node Red.

The point i stuck is when reboot this device. i have to manual press POWERKEY to establish GSM communication. This can be enable in code as per attach in above post. The sample code in C++.  
Anyway i can do it in NODE RED

Thank you

---

<div class="post-metadata">

**Author:** ![TotallyInformation](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/totallyinformation/32/31_2.png) [@TotallyInformation](https://discourse.nodered.org/u/TotallyInformation)\
**Post date:** [8 June 2019 00:29 UTC](https://discourse.nodered.org/t/how-to-include-header-file-node-red/11936/4 "2019-06-08T00:29:36Z")

</div>

One way would be to compile that code into an executable that you can then call from Node-RED.
