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
U

ustredna

@ustredna
About
Posts
3
Topics
2
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • Problem with compilling for board with ATmega128
    U ustredna

    Hi all, i have problem with compiling mysensors sketch with relay actuator for my Megaboard with ATmega128.
    this is error log.
    why?
    please help...
    I use MegaCore board package for my Mega128 board.

    i need add NRF24l01 to my actuator devices with mega128 MCU.

    Peter

    Arduino: 1.8.2 (Windows 10), Board: "ATmega128, Disabled, Disabled (default), 11.0592 MHz external"
    
    Build options changed, rebuilding all
    In file included from C:\Users\peter\Documents\Arduino\libraries\MySensors/core/MyHwAVR.h:27:0,
    
                     from C:\Users\peter\Documents\Arduino\libraries\MySensors/core/MyHwAVR.cpp:22,
    
                     from C:\Users\peter\Documents\Arduino\libraries\MySensors/MySensors.h:65,
    
                     from C:\Users\peter\Documents\Arduino\relay_with_button_mysensors\relay_with_button_mysensors.ino:43:
    
    c:\program files (x86)\arduino\hardware\tools\avr\avr\include\avr\power.h: In function 'clock_div_t clock_prescale_get()':
    
    c:\program files (x86)\arduino\hardware\tools\avr\avr\include\avr\power.h:1805:16: error: invalid conversion from 'int' to 'clock_div_t' [-fpermissive]
    
             return 1;
    
                    ^
    
    In file included from C:\Users\peter\Documents\Arduino\libraries\MySensors/MySensors.h:65:0,
    
                     from C:\Users\peter\Documents\Arduino\relay_with_button_mysensors\relay_with_button_mysensors.ino:43:
    
    C:\Users\peter\Documents\Arduino\libraries\MySensors/core/MyHwAVR.cpp: In function 'void hwPowerDown(period_t)':
    
    C:\Users\peter\Documents\Arduino\libraries\MySensors/core/MyHwAVR.cpp:66:20: error: 'WDTCSR' was not declared in this scope
    
      uint8_t WDTsave = WDTCSR;
    
                        ^
    
    C:\Users\peter\Documents\Arduino\libraries\MySensors/core/MyHwAVR.cpp:70:33: error: 'WDIE' was not declared in this scope
    
       WDTCSR |= (1 << WDCE) | (1 << WDIE);
    
                                     ^
    
    C:\Users\peter\Documents\Arduino\libraries\MySensors/core/MyHwAVR.cpp: In function 'uint16_t hwCPUFrequency()':
    
    C:\Users\peter\Documents\Arduino\libraries\MySensors/core/MyHwAVR.cpp:226:2: error: 'TIFR1' was not declared in this scope
    
      TIFR1 = 0xFF;
    
      ^
    
    C:\Users\peter\Documents\Arduino\libraries\MySensors/core/MyHwAVR.cpp:231:20: error: 'WDTCSR' was not declared in this scope
    
      uint8_t WDTsave = WDTCSR;
    
                        ^
    
    C:\Users\peter\Documents\Arduino\libraries\MySensors/core/MyHwAVR.cpp:234:18: error: 'WDIE' was not declared in this scope
    
      WDTCSR |= (1 << WDIE);
    
                      ^
    
    In file included from c:\program files (x86)\arduino\hardware\tools\avr\avr\include\avr\io.h:99:0,
    
                     from c:\program files (x86)\arduino\hardware\tools\avr\avr\include\avr\pgmspace.h:90,
    
                     from C:\Users\peter\AppData\Local\Arduino15\packages\MegaCore\hardware\avr\2.0.0\cores\MCUdude_corefiles/Arduino.h:28,
    
                     from sketch\relay_with_button_mysensors.ino.cpp:1:
    
    C:\Users\peter\Documents\Arduino\libraries\MySensors/core/MyHwAVR.cpp:239:29: error: 'WDIF' was not declared in this scope
    
      while (bit_is_clear(WDTCSR,WDIF)) {};
    
                                 ^
    
    exit status 1
    Error compiling for board ATmega128.
    
    This report would have more information with
    "Show verbose output during compilation"
    option enabled in File -> Preferences.
    
    Hardware

  • Help with sleeping door sensor
    U ustredna

    In my specific application i use one GW as receiver and one node with Static NODE ID as transmitter.

    Development

  • Help with sleeping door sensor
    U ustredna

    Hi friend i need help with my code of sleeping door sensor.

    i need add sending actual status of digital input and battery level and send this info each 7 seconds to GW.

    #define MY_DEBUG
    #define MY_RADIO_NRF24
    uint8_t NodeID = 88;
    #define MY_NODE_ID NodeID
    #define MY_PARENT_NODE_ID 0
    uint8_t RF24_Channel = 30;
    #define MY_RF24_CHANNEL RF24_Channel
    
    #define LED_PIN 17
    #define PRIMARY_BUTTON_PIN 3   // Arduino Digital I/O pin for button/reed switch
    #define SECONDARY_BUTTON_PIN 2 // Arduino Digital I/O pin for button/reed switch
    
    unsigned long SLEEP_TIME = 7000; // Sleep time between tX
    
    #include <MySensors.h>
    
    #define SKETCH_NAME "Door RF Sensor"
    #define SKETCH_MAJOR_VER "1"
    #define SKETCH_MINOR_VER "1"
    #define PRIMARY_CHILD_ID 1
    #define SECONDARY_CHILD_ID 2
    
    
    MyMessage msg(PRIMARY_CHILD_ID, V_TRIPPED);
    MyMessage msg2(SECONDARY_CHILD_ID, V_TRIPPED);
    
    
    void before () {
      // Setup the buttons
      pinMode(PRIMARY_BUTTON_PIN, INPUT);
      pinMode(SECONDARY_BUTTON_PIN, INPUT);
    
      // Activate internal pull-ups
      digitalWrite(PRIMARY_BUTTON_PIN, HIGH);
      digitalWrite(SECONDARY_BUTTON_PIN, HIGH);
      pinMode(LED_PIN, OUTPUT);
      
      
     }
    
    void setup()
    {
    }
    
    void presentation()
    {
    	sendSketchInfo(SKETCH_NAME, SKETCH_MAJOR_VER "." SKETCH_MINOR_VER);
    	present(PRIMARY_CHILD_ID, S_DOOR);
    	present(SECONDARY_CHILD_ID, S_DOOR);
    }
    
    void loop()
    {
    	uint8_t value;
    	static uint8_t sentValue=2;
    	static uint8_t sentValue2=2;
      
    	// Short delay to allow buttons to properly settle
    	sleep(5);
    
    	value = digitalRead(PRIMARY_BUTTON_PIN);
    
    	if (value != sentValue) {
    		// Value has changed from last transmission, send the updated value
    		digitalWrite(LED_PIN, HIGH);
        delay (5);
    		send(msg.set(value==HIGH));
        digitalWrite(LED_PIN, LOW);
    		sentValue = value;
    	}
    
    	value = digitalRead(SECONDARY_BUTTON_PIN);
    
    	if (value != sentValue2) {
    		// Value has changed from last transmission, send the updated value
    		digitalWrite(LED_PIN, HIGH);
        delay (5);
    		send(msg2.set(value==HIGH));
         digitalWrite(LED_PIN, LOW);
    		sentValue2 = value;
    	}
    
     
    
    
    	// Sleep until something happens with the sensor
    	sleep(PRIMARY_BUTTON_PIN-2, CHANGE,SECONDARY_BUTTON_PIN-2, CHANGE, 7000);
    

    how make it...???

    also interrupt must working correctly.

    please help me with my code.

    tnx
    Peter

    Development
  • Login

  • Don't have an account? Register

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