Adding Libraries- No luck

Hello! Teacher here learning Arduino with my students:

I have a student working on a Pong Game project we found on YouTube. We have copied his code but get:

exit status 1
Error compiling for board Arduino Uno.

We added the 2 libraries: Adafruit GFX Library and Adafruit SSD1331 OLED Driver Library for Arduino. But it looks like it gets added twice since its in his code and we copied it over. Not sure if that could be part of the problem.

Any help would be greatly appreciated!

There is always more to the error message than the final two lines you posted. In the IDE, there is a copy button that will copy the entire error message that you can then post here, inside code tags which would be more helpful.

Not sure what you mean by getting added wtice since it is in his code? The entire library? just a reference to the library with #include? Posting the code here would be helpful.

All these topics are covered here to help you get the most out of these forums: How to get the best out of this forum - Using Arduino / Installation & Troubleshooting - Arduino Forum

It is worth the 10 minute read.

1 Like

I just tried compiling the code from the link you provided, and it compiles without error.

Did you make changes to the code from the YouTube link? If you did, please provide the code using code tags by clicking CODE at the top of the reply.

If not, please post the entire compiler output as suggested by @blh64

Thanks! I was actually able to get it to clear by adding another library. However, even though the code is good, We're getting another error:

Sketch uses 15028 bytes (46%) of program storage space. Maximum is 32256 bytes.
Global variables use 299 bytes (14%) of dynamic memory, leaving 1749 bytes for local variables. Maximum is 2048 bytes.

avrdude: stk500_getparm(): (a) protocol error, expect=0x14, resp=0x04
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_recv(): programmer is not responding
avrdude: initialization failed, rc=-1
Double check connections and try again, or use -F to override
this check.

avrdude: stk500_recv(): programmer is not responding
avrdude: ser_close(): can't reset attributes for device: Invalid argument
the selected serial port avrdude: ser_close(): can't reset attributes for device: Invalid argument
does not exist or your board is not connected

I'm using an Arduino Uno- is this a connection as in

avrdude: verification error, first mismatch at byte 0x0180
0x30 != 0x36
avrdude: verification error, first mismatch at byte 0x0180

avrdude: verification error; content mismatch

We're working with an Arduino Uno board- is this an issue with the board itself?

There are several reasons why the bootloader may not be behaving correctly.

This YouTube video provides some troubleshooting tips that may be of help.

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.