HI There
I have been having a pay with the EasyTransfer library between to of my uno, i have two 10k pots on the one which adjust to led brightness on the other uno all works fine
Here are my sketches:
uno with two pots:
#include <EasyTransfer.h>
EasyTransfer ET;
struct DATA_STRUCTURE{
int percentage;
char temp;
};
DATA_STRUCTURE myData;
int val;
int val2;
void setup()
{
//Initalizing EasyTransfer Serial Ports
Serial.begin(9600);
ET.begin(details(myData), &Serial);
//counter = 0;
}
void loop()
{
 val = analogRead(A0);      // reads the value of the potentiometer (value between 0 and 1023)
 val = map(val, 0, 1023, 0, 250);  // scale it to use it with the servo (value between 0 and 180)
Â
 val2 = analogRead(A1);      // reads the value of the potentiometer (value between 0 and 1023)
 val2 = map(val2, 0, 1023, 0, 250);  // scale it to use it with the servo (value between 0 and 180)
Â
//Setting Values to Variables
myData.temp   = val;
myData.percentage = val2;
//Sending Data
ET.sendData();
delay(1000);
}
And the uno with the two LEDs:
#include <EasyTransfer.h>
EasyTransfer ET;
struct DATA_STRUCTURE{
int percentage;
char temp;
};
DATA_STRUCTURE myData;
void setup()
{
Serial.begin(9600);
ET.begin(details(myData), &Serial);
pinMode(13, OUTPUT);
pinMode(12, OUTPUT);
}
void loop()
{
//Extract data if data is received
if(ET.receiveData())
{
delay(250);
analogWrite(12, myData.percentage);
analogWrite(13, myData.temp);
}
}
Now i would prefer to change the uno with the two LEDs for a Leonardo, up load my sketch and i can not get it to do anything
why is this and how can i over come this?
Many thanks
Joe