Codebender motion sketch compile error



  • I'm trying to use codebender to upload the default motion sensor node to my Arduino and am getting this compile error:

    In file included from (library file) MySensor/MyGateway.cpp:12:
    (library file) MySensor/MyGateway.h:39:28: error: use of undeclared identifier 'DEFAULT_CE_PIN'
    
                    MyGateway(uint8_t _cepin=DEFAULT_CE_PIN, uint8_t _cspin=DEFAULT_CS_PIN, uint8_t _inclusion_time = 1, uint8_t _inclusion_pin = 3, uint8_t _rx=6, uint8_t _tx=5, uint8_t _er=4);
                                             ^
    
    

    Can someone tell me how to get around this?


  • Admin

    That's strange... did you clone the sketch together with library? Are you having some old MySensors version in your account?



  • @hek said:

    That's strange... did you clone the sketch together with library? Are you having some old MySensors version in your account?

    To be honest, I have no idea. I was trying to run it directly from the sensor information page from the build link. I do have an account, but I have no idea if I have an old version. I guess I'll have to investigate my account and see if I can update/uninstall the old version.



  • @hek said:

    That's strange... did you clone the sketch together with library? Are you having some old MySensors version in your account?

    I'm back at this and am totally confused. I thought that the codebender site would have the updated MS code and examples. Do I need to do something specifically to get it to work with my account? I'm trying to upload the humidity sensor sketch and am getting this error:

    
    (sketch file) HumiditySensor.ino:40:5: error: no matching constructor for initialization of 'DHT'
    
    DHT dht;
        ^
    (library file) DHT/DHT.h:31:3: note: candidate constructor not viable: requires at least 2 arguments, but 0 were provided
      DHT(uint8_t pin, uint8_t type, uint8_t count=6);
      ^
    (library file) DHT/DHT.h:23:7: note: candidate constructor (the implicit copy constructor) not viable: requires 1 argument, but 0 were provided
    class DHT {
          ^
    

    I do have the Arduino IDE installed but it seems to be all messed up. I'm trying to uninstall it and get it working again. I'm not sure how I munged it up but I have no way to upload MS stuff. Any help is greatly appreciated. I only have a small window of time to work on these side projects so any help is really appreciated.


  • Admin

    Codebender only support arduino 1.0 (if I remember right), which isn't compatible with mysensors 2.0. So latest and greatest of mysensors can't be supplied through codebender.



  • @tbowmo Still very unclear how this works. I'm assuming that codebender is self contained and that I should be able to use it to upload code to my arduino . I understand that this may be outdated, but it should still work right?

    At this point I'm just trying to find some way to upload a temp/humidity sketch to my node and I'm having a heck of time getting things working.

    I don't really care if I use 2.0 or an older version, but I'm not seeing a 2.0 example of the temp/humidity sketch. Does one exist?


  • Admin

    @chuckconnors

    Sorry, I don't use codebender at all, so I do not know how it works.. (I got my info from what @hek told me last weekend during our meet-up at his place)



  • @tbowmo Sorry. I was unclear. I don't mind using the Arduino IDE on my windows machine, but I don't know how to install the correct libraries to use the legacy code. Either that or is there a temp/humidity example sketch for 2.0? I can't find one in the code examples and I don't know what needs to be modified from the older version to make it work with 2.0. Just changing the include name is not enough.


  • Admin

    @chuckconnors

    We moved a lot of examples to a separate repository on GH during our release, as we can't have all the 3rd party libraries distributed with the core..

    This is located at https://github.com/mysensors/MySensorsArduinoExamples, where you can find lot's of examples (all of them is updated to 2.0.0)


Log in to reply
 

Suggested Topics

  • 4
  • 15
  • 9
  • 8
  • 9
  • 2

0
Online

11.4k
Users

11.1k
Topics

112.7k
Posts