I tried simple code in Arduino nano as below
#include <Wire.h>
void setup() {
Wire.begin(); // join i2c bus (address optional for master)
}
byte x = 0;
void loop() {
Wire.beginTransmission(8); // transmit to device #8
Wire.write("1"); // sends five bytes
Wire.endTransmission(); // stop transmitting
delay(500);
Wire.beginTransmission(8); // transmit to device #8
Wire.write("2"); // sends five bytes
Wire.endTransmission(); // stop transmitting
delay(500);
}
But I am getting this
Arduino: 1.8.13 (Windows 7), TD: 1.53, Board: "Arduino Nano, ATmega328P"
Sketch uses 2714 bytes (8%) of program storage space. Maximum is 30720 bytes.
Global variables use 229 bytes (11%) of dynamic memory, leaving 1819 bytes for local variables. Maximum is 2048 bytes.
avrdude: stk500_getsync() attempt 1 of 10: not in sync: resp=0x00
avrdude: stk500_getsync() attempt 2 of 10: not in sync: resp=0x00
avrdude: stk500_getsync() attempt 3 of 10: not in sync: resp=0x00
avrdude: stk500_getsync() attempt 4 of 10: not in sync: resp=0x00
avrdude: stk500_getsync() attempt 5 of 10: not in sync: resp=0x00
avrdude: stk500_getsync() attempt 6 of 10: not in sync: resp=0x00
avrdude: stk500_getsync() attempt 7 of 10: not in sync: resp=0x00
avrdude: stk500_getsync() attempt 8 of 10: not in sync: resp=0x00
avrdude: stk500_getsync() attempt 9 of 10: not in sync: resp=0x00
avrdude: stk500_getsync() attempt 10 of 10: not in sync: resp=0x00
An error occurred while uploading the sketch
This report would have more information with
"Show verbose output during compilation"
option enabled in File -> Preferences.
I don't understand it .what mean by this Error.
How to solve it??????