alanesq / BasicOLEDMenu

A very simple menu system using an oled and rotary encoder
GNU General Public License v3.0
49 stars 10 forks source link

Problem Uploading #1

Open Eldre1 opened 3 years ago

Eldre1 commented 3 years ago

I'm using an Arduino Pro Mini. The SDA and SCL pins are still A5 and A4. However I get this same error when I try to upload to an Uno so I don't think it is a board issue. This code looks awesome and I want to try it but I am having this issue:

It doesn't like this line of code: " Wire.begin(I2C_SDA,I2C_SCL); "

It highlights it when I try to upload it and gives me the following error info

C:\Program Files (x86)\Arduino\hardware\arduino\avr\libraries\Wire\src/Wire.h:53:10: note: candidate expects 0 arguments, 2 provided C:\Program Files (x86)\Arduino\hardware\arduino\avr\libraries\Wire\src/Wire.h:54:10: note: candidate: void TwoWire::begin(uint8_t) void begin(uint8_t); ^~~~~ C:\Program Files (x86)\Arduino\hardware\arduino\avr\libraries\Wire\src/Wire.h:54:10: note: candidate expects 1 argument, 2 provided C:\Program Files (x86)\Arduino\hardware\arduino\avr\libraries\Wire\src/Wire.h:55:10: note: candidate: void TwoWire::begin(int) void begin(int); ^~~~~ C:\Program Files (x86)\Arduino\hardware\arduino\avr\libraries\Wire\src/Wire.h:55:10: note: candidate expects 1 argument, 2 provided exit status 1 no matching function for call to 'TwoWire::begin(const uint8_t&, const uint8_t&)'

alanesq commented 3 years ago

Hi, I suspect the problem is that because on that board you have no choice on which pins to use it is complaining that you are trying to define them?

try: Wire.begin();