"Was not declared in this scope" :(

Hello everyone,

I just started arduino programming and i am trying to “Bike Wheel WS2811 LED Effects With Arduino” project.

But its don’t run and i wanna do at project on my bicycle. Can someone fix this code please?

EDIT: I add the attachments. (My codes and alert photo)

wheel.ino (23.7 KB)

Timers.h (987 Bytes)

MPU60X0.h (36.4 KB)

font.ino (49.7 KB)

earth.ino (27 KB)

No one is going to fix your code for you (for free). There is the Gigs and Collaborations section where you can get code written for you. If you want help to fix the code first post it properly. The "how to use the forum" stickies will tell you how to format and post code and error messages. Post the whole error message.

Here is a post about scope that might help.
And this has a wealth of useful information.

You copied the code wrong. The original (https://raw.githubusercontent.com/balrog-kun/blinkenbike/master/wheel.ino) says

	/* Switch to 400KHz I2C */
	TWBR = ((F_CPU / 400000L) - 16) / 2;

	accgyro = MPU60X0(false, MPU60X0_DEFAULT_ADDRESS);
	accgyro.initialize();

and your code says:

	/* Switch to 400KHz I2C */
	TWBR = ((F_CPU / 400000L) - 16) / 2;
   acc_update();
	accgyro = MPU60X0(false, MPU60X0_DEFAULT_ADDRESS);
	accgyro.initialize();

See your mistake?

Hello, i have encountered a similar problem.

You should start your own thread. You should post your code (all the code) in code tags. A picture of a small part of your code is worthless. You should post the error message in code tags. You should read the "how to use the forum" stickies and the links therein.

Since acc_update() is not declared, just comment out the line that calls it. :slight_smile:

C:\Users\l\AppData\Local\Temp\ccSGL6Cs.ltrans0.ltrans.o: In function `prog_text12_set_leds':

D:\blinkenbike-master full\blinkenbike-master\wheel/wheel.ino:376: undefined reference to `fontdata_8x8'

D:\blinkenbike-master full\blinkenbike-master\wheel/wheel.ino:376: undefined reference to `fontdata_8x8'

C:\Users\l\AppData\Local\Temp\ccSGL6Cs.ltrans0.ltrans.o: In function `a_d_to_lon':

D:\blinkenbike-master full\blinkenbike-master\wheel/wheel.ino:534: undefined reference to `a_d_to_lon_data'

D:\blinkenbike-master full\blinkenbike-master\wheel/wheel.ino:534: undefined reference to `a_d_to_lon_data'

C:\Users\l\AppData\Local\Temp\ccSGL6Cs.ltrans0.ltrans.o: In function `prog_globe_set_leds(unsigned int, RGB_t*)':

D:\blinkenbike-master full\blinkenbike-master\wheel/wheel.ino:567: undefined reference to `y_lon_to_land'

D:\blinkenbike-master full\blinkenbike-master\wheel/wheel.ino:567: undefined reference to `y_lon_to_land'

C:\Users\l\AppData\Local\Temp\ccSGL6Cs.ltrans0.ltrans.o: In function `a_d_to_y':

D:\blinkenbike-master full\blinkenbike-master\wheel/wheel.ino:548: undefined reference to `a_d_to_y_data'

D:\blinkenbike-master full\blinkenbike-master\wheel/wheel.ino:548: undefined reference to `a_d_to_y_data'

collect2.exe: error: ld returned 1 exit status

exit status 1

Thanks to everyone! I'm from china .
My English is poor.
so.....