SparkFun Forums 

Where electronics enthusiasts find answers.

Discussions on the software and hardware for Atmel's STK standard.
By Nostraquedeo
#97501
I downloaded the zip sketch files and installed the Arduino 0018. :D I go to the sketch button then add file and loaded the Makefile file. Press play and it asked for main.c file and tried to compile it. It said it needed one of the other files. :roll: After awhile I figured it out that I needed to load them all. :idea: Then when I press the play button it gives me am error in the for loop in the ADXL345.c file stating :?

"In function 'adxl345_read':
error: 'for' loop initial declaration used outside C99 mode In function 'adxl345_write':".

So I found help files saying that you can't declare a variable inside a function. :shock: So I move the "int bit=7" on line 45 before the "for" and fix the adxl345_write function too. 8)

So now it compiles further and hangs up in "fat.c" with a :?:

In function 'fat_append_clusters':
error: 'for' loop initial declaration used outside C99 mode In function 'fat_interpret_dir_entry':
In function 'fat_write_dir_entry':
In function 'fat_get_fs_free_16_callback':
In function 'fat_get_fs_free_32_callback':

Now this for loop is much more complex and I'm starting to think I must have something set up wrong but cant find it. :( I know the Eval board works. I just cant compile the code that was associated with it. :cry:
Will this code work with an older version? :x
Do i need to apply the files in a certain way or place? :oops:

Please help! I keep reading and reading to figure this out but I can't. If I could just compile the files that came with it I would feel free to experiment but If I burn blink to this board and cant reload the accelerometer function I wont do it. :lol: