Dimmable LED Actuator ver 1.4.1



  • @hek I am getting the following error when I compile this sketch under Mysensor ver 1.4.1. what can the problem be. If I do i on ver 1.4 it works

    DimmableLEDActuator.ino:33:17: error: no matching function for call to 'MySensor::MySensor(int, int)'
    DimmableLEDActuator.ino:33:17: note: candidates are:
    In file included from DimmableLEDActuator.ino:26:0:
    E:\ardruino progammes\libraries\MySensors/MySensor.h:79:2: note: MySensor::MySensor()
    MySensor();
    ^
    E:\ardruino progammes\libraries\MySensors/MySensor.h:79:2: note: candidate expects 0 arguments, 2 provided
    E:\ardruino progammes\libraries\MySensors/MySensor.h:70:7: note: MySensor::MySensor(const MySensor&)
    class MySensor
    ^
    E:\ardruino progammes\libraries\MySensors/MySensor.h:70:7: note: candidate expects 1 argument, 2 provided
    Error compiling.


  • Admin

    Compiles fine here. Did your restart the IDE after switching libraries?



  • @hek yes I did restart the IDE after installing. I did compile out sketches and the all work I only have an problem with this one.


  • Admin

    I'm running IDE 1.5.8.. could be differences when compiling.

    Ok, what happens if you remove the arguments from the constructor. Like this:

    MySensor gw;



  • @hek I alos runs IDE 1.5.8

    Yes it compiles if I only have it like this;

    MySensor gw;
    

    What is the values in the brakes for?


  • Admin

    MySensor(uint8_t cepin = 9, uint8_t cspin = 10);
    cepin - The pin attached to RF24 Chip Enable on the RF module (default 9)
    cspin - The pin attached to RF24 Chip Select (default 10)



  • @hek if I compile the sketch without that argument (9,10) the sensor is not working.



  • in openhab , dimmer switch change only two state 0 and 100.
    I didn't get change in between 0 to 100.

    please help me in openhab rule file for change.

    my rule file is

    when
    Item Fan_Hall_reg received command

    then
    	var Number percent = 0
    	if(Fan_Hall_reg.state instanceof DecimalType) percent = Fan_Hall_reg.state as DecimalType 
    		
    	if(receivedCommand==INCREASE) percent = percent + 5
    	if(receivedCommand==DECREASE) percent = percent - 5
    
    	if(percent<0)   percent = 0
    	if(percent>100) percent = 100
    	postUpdate(Fan_Hall_reg, percent);
    	sendCommand (Arduino , "Fan_Hall_reg=" + percent)
    

    in this rule I get only two state not in between that.


Log in to reply
 

Suggested Topics

  • 33
  • 5
  • 6
  • 17
  • 8
  • 2

70
Online

11.4k
Users

11.1k
Topics

112.7k
Posts