cancel
Showing results for 
Search instead for 
Did you mean: 

ModusToolbox Bluetooth SDK

PrRa_4726466
New Contributor

Hi,

I have purchased CYBT_213043 mesh evaluation board and for my application i need to get the data from light sensor. I found temperature and PIR sensor code in Modus toolbox-2.1 but i am unable to find the light sensor code. Could you guys help me in finding the code for light sensor so that it would be helpful for me to progress in my project.

Kit link for reference

https://www.cypress.com/documentation/development-kitsboards/cybt-213043-mesh-ez-bt-module-mesh-eval...

0 Likes
1 Solution
Charles_Lai
Moderator
Moderator

Hi,

The Ambient Light Sensor code for CYBT-213043-MESH is not published yet. Please stay tuned and you can follow cypresssemiconductorco at GitHub to get the news and updates of code examples.

<<<<<<<<<<<<<>>>>>>>>>>>>>

Sincere regards from C. L.

<<<<<<<<<<<<<>>>>>>>>>>>>>

View solution in original post

0 Likes
4 Replies
Charles_Lai
Moderator
Moderator

Hi,

all the mesh code examples of CYBT-213043-MESH should be listed in the following link.

GitHub - cypresssemiconductorco/mtb-examples-CYBT-213043-EVAL-btsdk-mesh-demo: Mesh Demo Examples

The code example to Ambient Light Sensor (ALS) may not be merged to the CYBT-213043-MESH examples but the library supporting ALS can be found in the following link:

GitHub - cypresssemiconductorco/sensor-light: This library provides code to support use of a phototr...

You can merge the code to CYBT-213043-MESH by yourself.

<<<<<<<<<<<<<>>>>>>>>>>>>>

Sincere regards from​ C. L.

<<<<<<<<<<<<<>>>>>>>>>>>>>

0 Likes
PrRa_4726466
New Contributor

Hi ChunleiL,

Thanks for your quick response, I have went through the Light sensor link, Unfortunately its is a different light sensor which uses ADC pin to collect data but i am using CYBT-213043-MESH which has MAX44009 light sensor works on I2C protocol to send the sensor data. So i can't merge the code that you have shared to me. If possible please share me the library that works for CYBT-213043-MESH Eval board.

0 Likes
Charles_Lai
Moderator
Moderator

Hi,

The Ambient Light Sensor code for CYBT-213043-MESH is not published yet. Please stay tuned and you can follow cypresssemiconductorco at GitHub to get the news and updates of code examples.

<<<<<<<<<<<<<>>>>>>>>>>>>>

Sincere regards from C. L.

<<<<<<<<<<<<<>>>>>>>>>>>>>

View solution in original post

0 Likes
PrRa_4726466
New Contributor

Hi,

I tried to write the program for ambient light sensor using the middle ware driver component in wiced_btsdk file. In the main.c file i  passed the WICED GPIO pins to be used as scl and sda to the init function. But while building the application i got an error stating that "element initializer is not computable at load time" The error redirects to the bolded lines in the below code. Could i know what would be the problem and how to resolve it.

Link for ambient_light_sensor_component file is

https://github.com/cypresssemiconductorco/btsdk-drivers/tree/master/COMPONENT_ambient_light_sensor_l...

//code in main file

uint8_t cfg_data[2] = { MAX44009_CFG_REGISTER, 0x40 };

uint8_t irq_set[2] = { MAX44009_INTERRUPT_ENABLE, 0x01 };

uint8_t low_threshold_set[2] = { MAX44009_LOW_THRESHOLD, 0x03 }; //set low threadhold to 2.16

uint8_t threshold_timer_set[2] = { MAX44009_THRESHOLD_TIMER, 0x00 };

static void         max44009IntProc(void* data, uint8_t port_pin);

max44009_user_set_t max44009_usr_set =

{

        .scl_pin = WICED_P27,

        .sda_pin = WICED_P32,

        .irq_pin = WICED_P29,

//error starts here

        .cfg_reg_value = cfg_data,

        .irq_enable_reg_value = irq_set,

        .low_threshold_reg_value = low_threshold_set,

        .threshold_timer_reg_value = threshold_timer_set,

};

void max44009IntProc(void* data, uint8_t port_pin) {

 

    max44009IntClean();

}

max44009_init(&max44009_usr_set, max44009IntProc, NULL);

0 Likes