Go Down

Topic: APC220 programming (Read 661 times) previous topic - next topic

Yasin_tashani

I wanted the sender code for the sender APC220

With two Arduino

Please help me I need her a lot

UKHeliBob

Split from an unrelated topic

Do not hijack topics
Please do not send me PMs asking for help.  Post in the forum then everyone will benefit from seeing the questions and answers.

groundFungus

Here is my APC220 test sketch. 

Code: [Select]
#include <SoftwareSerial.h>

SoftwareSerial apc(4,7);

void setup()
{
   Serial.begin(115200);
   apc.begin(9600);
}

void loop()
{
  unsigned long now = millis();
  static unsigned long timer = 0;
  unsigned long interval = 1000;
  if(now - timer >= interval)
  {
   timer = millis();
   Serial.print("Sending  ");
   Serial.println(now);
   apc.println(now);
  }
  if(apc.available() > 0)
  {
   Serial.print(char(apc.read()));
  }
}

Go Up