# Is software developed for the mangOH red fully compatible with the mangOH yellow?

**URL:** <https://mangoh.discourse.group/t/is-software-developed-for-the-mangoh-red-fully-compatible-with-the-mangoh-yellow/4800>\
**Category:** mangOH Yellow\
**Created:** [July 9, 2020, 12:15am UTC](https://mangoh.discourse.group/t/is-software-developed-for-the-mangoh-red-fully-compatible-with-the-mangoh-yellow/4800 "2020-07-09T00:15:49Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![RA\_Petal](https://avatars.discourse-cdn.com/v4/letter/r/ed655f/32.png) [@RA\_Petal](https://mangoh.discourse.group/u/RA_Petal)\
**Post date:** [July 9, 2020, 12:15am UTC](https://mangoh.discourse.group/t/is-software-developed-for-the-mangoh-red-fully-compatible-with-the-mangoh-yellow/4800/1 "2020-07-09T00:15:49Z")

</div>

Hello,

So I am developing software currently for the MangOH red system, but I have plans to jump to MangOH yellow once its available. Will any code I develop for the MangOH red be usable on the yellow?

---

<div class="post-metadata">

**Author:** ![paulmeis](https://avatars.discourse-cdn.com/v4/letter/p/c57346/32.png) [@paulmeis](https://mangoh.discourse.group/u/paulmeis)\
**Post date:** [July 10, 2020, 12:31pm UTC](https://mangoh.discourse.group/t/is-software-developed-for-the-mangoh-red-fully-compatible-with-the-mangoh-yellow/4800/2 "2020-07-10T12:31:56Z")

</div>

Hello,

Not knowing what your code looks like, it’s hard to tell. Be aware there are a lot of hardware differences between mangOH Red and mangOH Yellow.  
For example this can be a problem if you’re using the board GPIOs because the mapping is different.

Also, what module is mounted on your mangOH Red ? is it the WP7702 ?

---

<div class="post-metadata">

**Author:** ![RA\_Petal](https://avatars.discourse-cdn.com/v4/letter/r/ed655f/32.png) [@RA\_Petal](https://mangoh.discourse.group/u/RA_Petal)\
**Post date:** [July 10, 2020, 10:44pm UTC](https://mangoh.discourse.group/t/is-software-developed-for-the-mangoh-red-fully-compatible-with-the-mangoh-yellow/4800/3 "2020-07-10T22:44:26Z")

</div>

I see, I will be using the same module, but will the GPIOs still be different?

---

<div class="post-metadata">

**Author:** ![paulmeis](https://avatars.discourse-cdn.com/v4/letter/p/c57346/32.png) [@paulmeis](https://mangoh.discourse.group/u/paulmeis)\
**Post date:** [July 13, 2020, 8:01am UTC](https://mangoh.discourse.group/t/is-software-developed-for-the-mangoh-red-fully-compatible-with-the-mangoh-yellow/4800/4 "2020-07-13T08:01:50Z")

</div>

Some of them will be different. For example on mangOH Yellow the accelerometer interruption pin is linked to GPIO 38, and on mangOH Red the same pin is linked to GPIO 36.  
You can check differences on the schematics of the boards:

- [mangOH Red](https://mangoh.io/uploaded-documents/Reference/mangOH%20Red/Hardware/Schematics/MangoRed_DV6_final.pdf)
- [mangOH Yellow](https://mangoh.io/uploaded-documents/Reference/mangOH%20Yellow/Hardware/Schematics/mangoh_yellow_21.pdf)

Using Legato, you can bind GPIO services based on your board. To do that, you can define a build variable in your sdef:

```auto
buildVars:
{
    BOARD = mangoh_yellow
    // BOARD = mangoh_red
}

```

Then in your adef you can do this:

```auto
bindings:
{
#if ${BOARD} = mangoh_yellow
    app.appComponent.le_gpioPinAccel -> gpioService.le_gpioPin38
#elif ${BOARD} = mangoh_red
    app.appComponent.le_gpioPinAccel -> gpioService.le_gpioPin36
#endif
}

```

And you’ll be able to write a generic source code for both your mangOH Red and mangOH Yellow.

I don’t know if it’s the correct way to do this, but it worked fine for me 🙂
