Go Down

Topic: FLASH-lib for Arduino (Read 1 time) previous topic - next topic

Rafael_23

hello.
I'm trying to use the flash lib in the code below but I get some errors that I think have to do with the lib.
I downloaded and put in the folder of the Arduino libraries. Added the lib but still got errors.
Can someone tell me how can I solve this?

Code: [Select]

#include <Flash.h>
int x = 0;

void setup(){
  FLASH_ARRAY(int, value, 1, 2, 2, 5, 6, 7, 10);
}

void loop(){
  x = value[1];
}



ERRORS:

sketch_nov07a.ino: In function 'void setup()':
sketch_nov07a:6: error: expected primary-expression before 'int'
sketch_nov07a:6: error: 'value' was not declared in this scope
sketch_nov07a:6: error: 'FLASH_ARRAY' was not declared in this scope
sketch_nov07a.ino: In function 'void loop()':
sketch_nov07a:10: error: 'value' was not declared in this scope

thank you

PaulS

Quote
I downloaded and put in the folder of the Arduino libraries.

From where? Where did you put it? "In the right place" is the wrong answer.

Rafael_23

You can see in the attached image where I put the lib.

I downloaded the lib in http://arduiniana.org/libraries/flash/comment-page-3/#comment-105688

After that did include the lib in the programming window, and when compiling one of the examples of the lib program returns me errors that indicated above.

Thanks

Erni

#3
Nov 10, 2013, 04:37 pm Last Edit: Nov 10, 2013, 04:50 pm by Erni Reason: 1
The Name of the folder should be Flash , and not Flash4.

http://arduino.cc/en/Guide/Libraries

FLASH_ARRAY should be global (outside setup), take a look at the examples

Rafael_23

Thanks a lot  ;)

It works.
Even noticed that they had the same name and therefore was giving error in compilation.
I made the changes and it is amazing.

Thank you

Go Up
 


Please enter a valid email to subscribe

Confirm your email address

We need to confirm your email address.
To complete the subscription, please click the link in the email we just sent you.

Thank you for subscribing!

Arduino
via Egeo 16
Torino, 10131
Italy