Missing Bootloader?

need help asap!!!!!!

My Arduino UNO REV3 was working fine with Arduino IDE. But then i programmed it using gpio of raspberry pi. it was programmed correctly. But now the IDE give the error stk500 not in sync. what could have possibly gone wrong?

Does the last sketch upload do a lot of activity on D0, D1 that could interfere with Serial activity?
You may need to press & hold Reset until the IDE shows “Compiled xxx of 32xxx bytes” and then release Reset to fire up the bootloader.

akshaygupta1997: need help asap!!!!!!

My Arduino UNO REV3 was working fine with Arduino IDE. But then i programmed it using gpio of raspberry pi. it was programmed correctly. But now the IDE give the error stk500 not in sync. what could have possibly gone wrong?

When you programmed it with the GPIO of the raspberry pi, did you connect it to pins 0, 1 and gnd, and program it via the UART? (if yes, it should be working)

Or did you program it by connecting to the SPI pins, and program it via ICSP (aka ISP, SPI programming, etc)? When you program via ICSP, it erases whatever was there before - including the bootloader (the bootloader is able to erase the flash 1 page at a time - via ICSP, the only way to erase flash is with chip erase, which wipes the entire flash) . So if you upload a sketch via ICSP, serial uploads won't work until you connect it to an ICSP programmer and 'burn bootloader' to put the bootloader back.

When the Pi's avrdude directly controls the Pi's gpio pins it is an ICSP tool which will remove the bootloader. To put the bootloader back use the Pi the same way (as an ICSP tool) to upload the bootloader. Once that is fixed, it's time to review your school plan. Why did you use the Pi like this, and what are the other options. The pi can also run avrdude through its serial port, or a USB to serial bridge (just like a desktop), which will load firmware to the serial bootloader so the bootloader can write the firmware to flash memory.

@DrAzzy your post did not show when I posted this, and the forum software did not let me know, first time I've seen that.

Most likely the OP did something like this:

https://learn.adafruit.com/program-an-avr-or-arduino-using-raspberry-pi-gpio-pins/installation

To bootload over a Pi serial port, first it needs to be disabled as a debug port and then enabled for use as a serial device, also the RTS and CTS pin functions can be enabled (since nRTS can be used in place of nDTR, to start the bootloader). Anyway, I don't think that is likely to be what the OP did, but I think it is a good option.