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. VS838 IR receiver led anyone got it working with mys?

VS838 IR receiver led anyone got it working with mys?

Scheduled Pinned Locked Moved Troubleshooting
25 Posts 3 Posters 189 Views 3 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.
  • skywatchS Offline
    skywatchS Offline
    skywatch
    wrote on last edited by
    #21

    Second issue now solved, just the first one to investigate.... ;)

    1 Reply Last reply
    0
    • skywatchS Offline
      skywatchS Offline
      skywatch
      wrote on last edited by skywatch
      #22

      Both issues now resolved! :)

      More to follow..... ;)

      1 Reply Last reply
      0
      • skywatchS Offline
        skywatchS Offline
        skywatch
        wrote on last edited by
        #23

        So here is what I learned from all this....

        Issue 1 - Was caused by the fact that IRsend was called at first boot - nothing wrong with that, but what I didn't know was that IRsend disables IR receive.
        The solution was as simple as adding one more line to that section of code as follows.....

         if (newcodeRX == 1 || lightrequest == 1) {
            irsend.sendNEC(INcode, 32);
            newcodeRX = 0;
            lightrequest = 0; 
            irrecv.enableIRIn(); // Start the receiver
           }
        

        This re-enables the receiver and then all is working as expected!

        As for the second issue......Well, I'll just post the code for anyone interested.....

         if (irrecv.decode(&results)) {
            IRin = results.value,HEX;
            
          if (IRin == 0xFFA25D) {
            lights = 1;
            Serial.print("Lights ON... ");
          }
        
          if (IRin == 0xFFE21D) {
            lights = 0;
            Serial.print("Lights OFF... ");
          }
        
          if (lights != last_lights) {
            saveState(10, lights);
            send(msgLights.set(lights));
            last_lights = lights;
            }
        
             irrecv.resume(); // Receive the next value
        
          }
        

        It's always soooooo easy when you know how! ;)

        Onwards and upwards! :)

        YveauxY 1 Reply Last reply
        1
        • skywatchS skywatch

          So here is what I learned from all this....

          Issue 1 - Was caused by the fact that IRsend was called at first boot - nothing wrong with that, but what I didn't know was that IRsend disables IR receive.
          The solution was as simple as adding one more line to that section of code as follows.....

           if (newcodeRX == 1 || lightrequest == 1) {
              irsend.sendNEC(INcode, 32);
              newcodeRX = 0;
              lightrequest = 0; 
              irrecv.enableIRIn(); // Start the receiver
             }
          

          This re-enables the receiver and then all is working as expected!

          As for the second issue......Well, I'll just post the code for anyone interested.....

           if (irrecv.decode(&results)) {
              IRin = results.value,HEX;
              
            if (IRin == 0xFFA25D) {
              lights = 1;
              Serial.print("Lights ON... ");
            }
          
            if (IRin == 0xFFE21D) {
              lights = 0;
              Serial.print("Lights OFF... ");
            }
          
            if (lights != last_lights) {
              saveState(10, lights);
              send(msgLights.set(lights));
              last_lights = lights;
              }
          
               irrecv.resume(); // Receive the next value
          
            }
          

          It's always soooooo easy when you know how! ;)

          Onwards and upwards! :)

          YveauxY Offline
          YveauxY Offline
          Yveaux
          Mod
          wrote on last edited by
          #24

          @skywatch great to hear you resolved your issues!

          http://yveaux.blogspot.nl

          1 Reply Last reply
          0
          • skywatchS Offline
            skywatchS Offline
            skywatch
            wrote on last edited by
            #25

            Many thanks @electrik and @Yveaux , some moral support is often pivotal in getting things done!

            @Yveaux IDE 1.8.12 is now available and working fine on win10 x64 for me :)

            1 Reply Last reply
            0
            Reply
            • Reply as topic
            Log in to reply
            • Oldest to Newest
            • Newest to Oldest
            • Most Votes


            30

            Online

            11.7k

            Users

            11.2k

            Topics

            113.1k

            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