Skip to content
  • MySensors
  • OpenHardware.io
  • Categories
  • Recent
  • Tags
  • Popular
Skins
  • Light
  • Brite
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Brand Logo
  1. Home
  2. Troubleshooting
  3. Scene controller are not find in inclusion

Scene controller are not find in inclusion

Scheduled Pinned Locked Moved Troubleshooting
2 Posts 1 Posters 824 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • N Offline
    N Offline
    NBM
    wrote on last edited by
    #1

    Hi

    I have i problem with inclusion a scener controller to my vera lite with a seriel gateway version 1.4 and 1.5 lib.

    When i'm uploading an other sketch to the arduino pro mini and including the sensor it finds the sensor. So it is not an connect problem with the wires.

    My sketch look like this:

    // Simple SceneController 
    
    #include <MySensor.h>
    #include <SPI.h>
    #include <Bounce2.h>
    
    #define CHILD_ID 3
    // PIN for the buttons
    byte buttons[] = {3, 4, 5, 6};
    #define NUMBUTTONS sizeof(buttons)
    byte pressed[NUMBUTTONS], justpressed[NUMBUTTONS], justreleased[NUMBUTTONS];
    
    MySensor gw;
    Bounce debouncer[NUMBUTTONS];
    
    int oldValue[NUMBUTTONS];
    
    MyMessage msgOn(CHILD_ID,V_SCENE_ON);
    MyMessage msgOff(CHILD_ID,V_SCENE_OFF);
    
    void setup()  
    {  
      gw.begin();
    
      // Send the Sketch Version Information to the Gateway
      gw.sendSketchInfo("LK 4-Tryk", "1.0");
      // Register binary input sensor to gw (they will be created as child devices)
      gw.present(CHILD_ID, S_SCENE_CONTROLLER);
      
      /// Make input & enable pull-up resistors on switch pins
      for (short i=0; i < NUMBUTTONS; i++){
      
        pinMode(buttons[i], INPUT);
        digitalWrite(buttons[i], HIGH);
        oldValue[i] = -1;
        // After setting up the button, setup debouncer
        debouncer[i].attach(buttons[i]);
        debouncer[i].interval(5);
      } 
    }
    
    
    //  Check if digital input has changed and send in new value
    void loop() 
    {
      for (short i=0; i < NUMBUTTONS; i++){
        debouncer[i].update();
        // Get the update value
        int value = debouncer[i].read();
     
        if (value != oldValue[i]) {
           // Send in the new value
           if (value==HIGH) {
             gw.send(msgOff.set(i));
           }
           else {
             gw.send(msgOn.set(i));
           }
           oldValue[i] = value;
        }
      }
    }
    

    Can anyone help me?

    And do anyone have an ide how to make the sketch battery friendly? So it uses as little power as possible.

    Thank you.

    /Nikolaj

    1 Reply Last reply
    0
    • N Offline
      N Offline
      NBM
      wrote on last edited by
      #2

      Skærmbillede 2015-11-19 kl. 17.44.48.png

      I'm getting this on the vera. I have update the firmware on vera lite.

      1 Reply Last reply
      0

      Hello! It looks like you're interested in this conversation, but you don't have an account yet.

      Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

      With your input, this post could be even better 💗

      Register Login
      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      12

      Online

      12.0k

      Users

      11.2k

      Topics

      113.4k

      Posts


      Copyright 2025 TBD   |   Forum Guidelines   |   Privacy Policy   |   Terms of Service
      • Login

      • Don't have an account? Register

      • Login or register to search.
      • First post
        Last post
      0
      • MySensors
      • OpenHardware.io
      • Categories
      • Recent
      • Tags
      • Popular