First time I have tried this and it's not working. Second Uno is power but the sketch is not loading into it apparently. Seems to work on 1st UNO and after the 2nd UNO times out failing to connect the sketch runs in the 1st UNO.
ERROR Msg:
Sketch uses 2852 bytes (1%) of program storage space. Maximum is 253952 bytes.
Global variables use 194 bytes (2%) of dynamic memory, leaving 7998 bytes for local variables. Maximum is 8192 bytes.
avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: stk500v2_getsync(): timeout communicating with programmer
An error occurred while uploading the sketch
Using pins A4 A5 to communicate and yes they are crossed w/ 1kΩ pullup resistors on the lines
C:
//Communicating Between Arduino Units
#include<Wire.h>
#include<TimerOne.h>
int state = 0;
int value;
long int newtime;
void setup() {
Wire.begin(1);
Wire.onReceive(gotRate);
pinMode(13, OUTPUT);
digitalWrite(13, state);
}
void loop() {
}
void gotRate(int howMany){
if(Wire.available())
{
value=Wire.read();
newtime=value*1000000;
Timer1.initialize(newtime);
Timer1.attachInterrupt(blinkme);
}
}
void blinkme(){
state=!state;
digitalWrite(13,state);
}
Sketch uses 2852 bytes (1%) of program storage space. Maximum is 253952 bytes.
Global variables use 194 bytes (2%) of dynamic memory, leaving 7998 bytes for local variables. Maximum is 8192 bytes.
avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: stk500v2_getsync(): timeout communicating with programmer
An error occurred while uploading the sketch
Using pins A4 A5 to communicate and yes they are crossed w/ 1kΩ pullup resistors on the lines