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
J

jhonnygolpe

@jhonnygolpe
About
Posts
9
Topics
2
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • Arduino freezes when I'm writing EEPROM
    J jhonnygolpe

    Nevertheless I must review all my code.... It's been working for a time... But lately it freezes again

    Troubleshooting

  • Arduino freezes when I'm writing EEPROM
    J jhonnygolpe

    It's a

    do { 
    ...t 
    } while();
    

    loop. It's similar to the while, but with this one you can control that the routine inside the do{...} it's always executed at least once.

    Troubleshooting

  • Arduino freezes when I'm writing EEPROM
    J jhonnygolpe

    Not really... inside the do loop, that it's repeated anytime, updates valueU and nowMillis values, so it's not an infinite loop.
    I think it was a problem with the receive function... after calling

    
        else {
          moveBlind(dimvalue); 
          return;
        }
      }
    

    the moveBlind function I missed the return;
    Now it seems to work fine.... I'm sure I'll have some more errors, but i'm satisfied by the moment.
    Thanks a lot to everybody

    Troubleshooting

  • Arduino freezes when I'm writing EEPROM
    J jhonnygolpe

    [EDIT] I've found that I missed a return; call on the receive() function... and now it's working fine...
    Really I'm not sure where it fails. And yes, the next step it's write a lot of 'DEBUG'. I've tested changing the eeprom address with the same results, so I'm assuming the fault it's in my code :worried:
    But always falls after a downAction movement...

    Troubleshooting

  • Arduino freezes when I'm writing EEPROM
    J jhonnygolpe

    Well, i'm working with Arduino Uno, directly connected to the 220V/5v converter, so the power can't be the problem. I will enclose the code, and to help the reading of it, i'll try to explain it. On the Arduino there are connected a DHT22 sensor, and 2 relays and 2 buttons to control the blinds. I'm using my former motorized blinds, with its wall-mounted controllers (now one button to UP, another to DOWN). I want to use the previous controllers, and add remote control to move the blinds. So in the loop() function, I check if any of the buttons has been pressed, or if it's the time to send some info to the gateway. I use to have problems when I move down the blind remotely, with the receive function. With the debug activated, it seems to freeze after finishing the downAction() function...
    By the time, I'm gonna try the code with another arduino and another EEPROM address.
    As you will see I'm using another DEBUG class, very similar to the mysensors'oneSerialDebug.h blindsControlEL.ino

    Troubleshooting

  • Arduino freezes when I'm writing EEPROM
    J jhonnygolpe

    Hi again. I've just tried your advises and, of course, I've solve my compilation errors. Thanks for your help !!
    But I can't write and rewrite the EEPROM correctly yet. It seems like I'm writing on a new address an y time, so in 2 or 3 times of savind data, arduino freezes.
    Now I've defined

    #define EEPROM_LOCAL_ADDRESS 2
    

    and after just 2 or 3 times of using

    saveState(EEPROM_LOCAL_ADDRESS,  (uint8_t)newPosition);
    

    arduino freezes.
    I've a test code, very similar, but without saving or reading from the EEPROM and works fine, so I suppose it's my fault using correctly those functions.
    Thanks again

    Troubleshooting

  • Arduino freezes when I'm writing EEPROM
    J jhonnygolpe

    just tested.... when I replace EEPROM_LOCAL_ADDRESS with EEPROM_LOCAL_CONFIG_ADDRESS, I get some compile warnings, all with the same text:
    warning: large integer implicitly truncated to unsigned type [-Woverflow]
    but the code it's uploaded. But again it freezes by the first time that saveState(EEPROM_LOCAL_CONFIG_ADDRESS, 0) is used.

    Troubleshooting

  • Arduino freezes when I'm writing EEPROM
    J jhonnygolpe

    Hi. I'm trying to sa#define EEPROM_LOCAL_ADDRESS Insert Code Here

        (EEPROM_NODE_ID_ADDRESS+8)
    

    and saving like:

    saveState(EEPROM_LOCAL_ADDRESS,  (uint16_t)newPosition);
    

    but always after a saveState instruction, my program freezes.
    I don't know if mysensors uses all the EEPROM area and so my code generates a problem with it.
    Any help would be apreciated.
    thanks

    Troubleshooting

  • I need a dual communication example...
    J jhonnygolpe

    Hello. I'm newbie with mySensors. I need my sensor nodes to be able to transmit their states (as Humidity sensors, for example), but most of the time they'd been waiting (and listening) for instructions from the gateway. I'm sure it's a common issue, but I can't find an example doing that: Nodes waiting for instructions from the GW, and reporting state every XX seconds to the GW.
    Thanks a lot in advance

    My Project
  • Login

  • Don't have an account? Register

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