Arduino compile error -ESP32- mDash Quick Start example

Dear all

I’m trying to do mDash Quick Start Guide example smart light, but when I trying to compile their code I got error the below:

*/Users/Mohammad/Documents/Arduino/smart-litgh-mdash/smart-litgh-mdash.ino: In function 'void onShadowDelta(void*, void*)':*
  • smart-litgh-mdash:26:42: error: ‘mDashGetParams’ was not declared in this scope*
    *** const char params = mDashGetParams(ctx);**
  •                                          ^*
    
  • smart-litgh-mdash:29:45: error: ‘mDashGetBool’ was not declared in this scope*
    *** if (mDashGetBool(params, “$.state.on”, &iv)) state->on = iv;***
  •                                             ^*
    
  • smart-litgh-mdash:30:63: error: ‘mDashGetStr’ was not declared in this scope*
  •   if (mDashGetStr(params, "$.state.app.name", buf, sizeof(buf)) > 0) {*
    
  •                                                               ^*
    
  • /Users/Mohammad/Documents/Arduino/smart-litgh-mdash/smart-litgh-mdash.ino: In function ‘void onConnStateChange(void*, void*)’:*
  • smart-litgh-mdash:42:27: error: ‘MDASH_CONNECTED’ was not declared in this scope*
  •   if (connection_state == MDASH_CONNECTED) reportShadowState(state);*
    
  •                           ^*
    
  • /Users/Mohammad/Documents/Arduino/smart-litgh-mdash/smart-litgh-mdash.ino: In function ‘void setup()’:*
  • smart-litgh-mdash:62:52: error: ‘mDashExport’ was not declared in this scope*
  •   mDashExport("Shadow.Delta", onShadowDelta, &state);*
    
  •                                                    ^*
    
  • smart-litgh-mdash:63:29: error: ‘MDASH_EVENT_CONN_STATE’ was not declared in this scope*
  •   mDashRegisterEventHandler(MDASH_EVENT_CONN_STATE, onConnStateChange, &state);*

That problem relates to new release of mdash library. Sketch compiles fine with library version 1.1.2

Thanks Nick_Real, it’s working now, i downgraded mdash library 1.1.2

You can upgrade back again, but please, upgrade scetch too. They have update quick start example

1 Like

Yes please. Update both the library, and use the latest sketch.