cancel
Showing results for 
Search instead for 
Did you mean: 

how to use USR SW2 Button

sam239955
Associate II
Posted on September 29, 2011 at 15:09

hi,

how can I get the user button event over the wrapper.cs / SDK ?

I need it for my application.

regards

Alex

4 REPLIES 4
sam239955
Associate II
Posted on September 30, 2011 at 13:20

ok question version 2.0:

In the Firmware of iNEMO there is the iNEMO_Button.c

there is the method:

uint32_t iNEMO_Button_Get_State(Button_TypeDef Button)

{

  return GPIO_ReadInputDataBit(BUTTON_PORT[Button], BUTTON_PIN[Button]);

}

how can I get the state in the iNemo C/C++ console demonstration?

PLEASE help!
sam239955
Associate II
Posted on September 30, 2011 at 15:31

ok if that isnt possible I had the idea to

to replace the pressure value with the button state value in the firmware

but i didnt find the part where the pressure sensor send data to via VCOM
Fabio
Associate II
Posted on September 30, 2011 at 15:42

You can provide a new frame with a new MexId in the protocol and get it with the INEMO2_SendFrameBase defined in the .h of the inemoV2 sdk; Or a more fast way could be the usage of trace command. Send a trace massage frame when the button is pressed, you can get it with the INEMO2_GetTrace function available in the .h.

ps please, do not spam your question in other post, with different subject.

Thanks and Best Regards

iNEMO Team

sam239955
Associate II
Posted on September 30, 2011 at 17:31

thank you very much Fabio!

sorry for that spamming!

I want to try it with the trace. But I don't have a Idea how to send a trace message when button is pressed and where to implement it (in main.c ?).

regards

Alex