Navigation

    • Register
    • Login
    • Search
    • OpenHardware.io
    • Categories
    • Recent
    • Tags
    • Popular
    1. Home
    2. Pewh
    3. Best
    • Profile
    • Following
    • Followers
    • Topics
    • Posts
    • Best
    • Groups

    Best posts made by Pewh

    • RE: Two pulse power meters on one Arduino

      I think I solved it myself after some searching on this forum.

      void receive(const MyMessage &message) {
      Serial.print("Receive.....");
      if (message.type == V_VAR1) {
            if (message.sensor == 1) {
              pulseCount = oldPulseCount = message.getLong();
              Serial.println("Received data from child 1: ");
              Serial.println(pulseCount);
          } 
            else if (message.sensor == 2) {
              pulseCount2 = oldPulseCount2 = message.getLong();
              Serial.println("Received data from child 2: ");
              Serial.println(pulseCount2);
          }
        pcReceived = true;
        }
      }
      
      posted in Troubleshooting
      Pewh
      Pewh