# Issue when using YellowSensor

**URL:** <https://mangoh.discourse.group/t/issue-when-using-yellowsensor/4941>\
**Category:** mangOH Yellow\
**Created:** [July 29, 2020, 1:58pm UTC](https://mangoh.discourse.group/t/issue-when-using-yellowsensor/4941 "2020-07-29T13:58:58Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![juliefiE](https://avatars.discourse-cdn.com/v4/letter/j/94ad74/32.png) [@juliefiE](https://mangoh.discourse.group/u/juliefiE)\
**Post date:** [July 29, 2020, 1:58pm UTC](https://mangoh.discourse.group/t/issue-when-using-yellowsensor/4941/1 "2020-07-29T13:58:59Z")

</div>

Hello,

I am currently trying to adapt the RedSensorToCloud apps to mangOH Yellow. Based on the same mechanism as for mangOH Red, I created to apps : YellowSensor and YellowCloud.  
When I tried to update the system on my mangOH, something went wrong when starting the YellowSensor app. I couldn’t tell what happened since I used the exact same components as the YellowSensor sample project.  
Here’s what my logread -f tells me :  
[Sans titre](https://mangoh.discourse.group/uploads/short-url/uO1sd6oqRKrx7xzc0DDSauZgE7A) (98.4 KB)

And here is my YellowSensor app :  
start: manual

```
executables:
{
    yellowSensor = ( $CURDIR/../components/sensors/light 
                     $CURDIR/../components/sensors/imu )
}

processes:
{
    run:
    {
        ( yellowSensor )
    }

    envVars:
    {
	LE_LOG_LEVEL = DEBUG
    }

    faultAction: restart
}

extern:
{
    yellowSensor.light.light
    yellowSensor.periodicSensor.dhubIO

    yellowSensor.imu.imu
    yellowSensor.imu.temperature
}

bindings:
{
    yellowSensor.light.dhubIO -> dataHub.io
    yellowSensor.periodicSensor.dhubIO -> dataHub.io
    yellowSensor.imu.dhubIO -> dataHub.io
}
```

---

<div class="post-metadata">

**Author:** ![jchitty](https://sea2.discourse-cdn.com/flex016/user_avatar/mangoh.discourse.group/jchitty/32/846_2.png) [@jchitty](https://mangoh.discourse.group/u/jchitty)\
**Post date:** [July 29, 2020, 5:09pm UTC](https://mangoh.discourse.group/t/issue-when-using-yellowsensor/4941/2 "2020-07-29T17:09:23Z")

</div>

The first issue seems to be your light sensor failing.

From your log file:

```auto
Jan 6 00:17:55 swi-mdm9x28-wp user.emerg Legato: *EMR* | yellowSensor[2079]/light T=main | lightSensor.c _light_COMPONENT_INIT() 78 | Assert Failed: 'LocalIioContext'
Jan 6 02:17:55 swi-mdm9x28-wp user.info Legato: INFO | supervisor[1095]/supervisor T=main | proc.c proc_SigChildHandler() 2079 | Process 'yellowSensor' (PID: 2079) has exited with exit code 1.

```

This seems to be triggering cascading faults. ☹

---

<div class="post-metadata">

**Author:** ![juliefiE](https://avatars.discourse-cdn.com/v4/letter/j/94ad74/32.png) [@juliefiE](https://mangoh.discourse.group/u/juliefiE)\
**Post date:** [July 30, 2020, 12:19pm UTC](https://mangoh.discourse.group/t/issue-when-using-yellowsensor/4941/3 "2020-07-30T12:19:03Z")

</div>

Problem is : I am using the sample YellowSensor project, the exact same components and .c files. That’s why I don’t get why it is failing. I tried to dig into the Libiio library but didn’t find much to help me. The “Assert Failed” is because of the iio\_create\_local\_context that returns NULL when there’s an error…

> LocalIioContext = iio\_create\_local\_context();  
> LE\_ASSERT(LocalIioContext);
