Medusa Mini- Arduino Problems Flash.h

Hi!
I Would like to get some help!
I am programming a Medusa Mini In Arduino 1.5.8 and even at the basic example of ButtonLED it gives me the following, even for compling:

I am using Arduino 1.5.8, Medusa Mini V1.3 and USB Client DP v1.3.

Arduino: 1.5.8 (Windows 7), Board: “FEZ Medusa”

In file included from C:\Users\Lacus\Documents\Arduino\libraries\Gadgeteering\src\Modules\FLASH.cpp:17:0:
C:\Users\Lacus\Documents\Arduino\libraries\Gadgeteering\src\Modules\FLASH.h:42:48: error: field initializer is not constant
static const unsigned int BLOCK_SIZE = 64 * 1024;
^
C:\Users\Lacus\Documents\Arduino\libraries\Gadgeteering\src\Modules\FLASH.cpp: In member function ‘bool gadgeteering::modules::flash::erase_block(unsigned int, unsigned int)’:
C:\Users\Lacus\Documents\Arduino\libraries\Gadgeteering\src\Modules\FLASH.cpp:115:11: error: in evaluation of 'operator+=(unsigned int, const unsigned int)'
address += flash::BLOCK_SIZE;
^
Error compiling.

This report would have more information with
"Show verbose output during compilation"
enabled in File > Preferences.

I hope someone can help me.
Thank you in advance!

@ zacilaci - Does the error persist if you use the 1.0.6 version of the Arduino IDE?

Alright installing Arduino 1.5.4 R2 seems okay, I got Medusa in tools, Boards, but now I have a New error:

Arduino: 1.5.4 (Windows 7), Board: “FEZ Medusa”

C:\Users\Lacus\Documents\Arduino\libraries\Gadgeteering\src\Mainboards\FEZMedusaMini.cpp: In member function ‘virtual void gadgeteering::mainboards::fez_medusa_mini::i2c_begin(gadgeteering::i2c_channel)’:
C:\Users\Lacus\Documents\Arduino\libraries\Gadgeteering\src\Mainboards\FEZMedusaMini.cpp:425: error: ‘Wire’ was not declared in this scope
C:\Users\Lacus\Documents\Arduino\libraries\Gadgeteering\src\Mainboards\FEZMedusaMini.cpp: In member function ‘virtual bool gadgeteering::mainboards::fez_medusa_mini::i2c_write(gadgeteering::i2c_channel, unsigned char, const unsigned char*, unsigned int, bool, bool)’:
C:\Users\Lacus\Documents\Arduino\libraries\Gadgeteering\src\Mainboards\FEZMedusaMini.cpp:448: error: ‘Wire’ was not declared in this scope
C:\Users\Lacus\Documents\Arduino\libraries\Gadgeteering\src\Mainboards\FEZMedusaMini.cpp:450: error: ‘Wire’ was not declared in this scope
C:\Users\Lacus\Documents\Arduino\libraries\Gadgeteering\src\Mainboards\FEZMedusaMini.cpp: In member function ‘virtual bool gadgeteering::mainboards::fez_medusa_mini::i2c_read(gadgeteering::i2c_channel, unsigned char, unsigned char*, unsigned int, bool, bool)’:
C:\Users\Lacus\Documents\Arduino\libraries\Gadgeteering\src\Mainboards\FEZMedusaMini.cpp:470: error: ‘Wire’ was not declared in this scope
C:\Users\Lacus\Documents\Arduino\libraries\Gadgeteering\src\Mainboards\FEZMedusaMini.cpp:474: error: ‘Wire’ was not declared in this scope
C:\Users\Lacus\Documents\Arduino\libraries\Gadgeteering\src\Mainboards\FEZMedusaMini.cpp:477: error: ‘Wire’ was not declared in this scope

This report would have more information with
"Show verbose output during compilation"
enabled in File > Preferences.

sorry :frowning: I seem to be pretty hopeless…

@ zacilaci - Can you try adding #include <Wire.h> to the start of your program?

The examples found in Documents\Arduino\libraries\Gadgeteering\examples\ButtonLED should help you. You will probably need to include SPI as well. I’ve copied the example code below just in case you don’t have it. I saw you have most of it included but I am not sure if you have all of the includes since your screenshot didn’t show them.


 #include <Wire.h>
 #include <SPI.h>

 #include <Gadgeteering.h>

//Make sure to uncomment the mainboard you are using below.

//#include <Mainboards/FEZMedusaShield3D.h>
//#include <Mainboards/FEZMedusaShield.h>
//#include <Mainboards/FEZMedusaS12.h>
//#include <Mainboards/FEZMedusaMini.h>

 #include <Modules/Button.h>

using namespace gadgeteering;
using namespace gadgeteering::mainboards;
using namespace gadgeteering::modules;

//fez_medusa_shield_3d board;
//fez_medusa_shield board;
//fez_medusa_s12 board;
//fez_medusa_mini board;

button b(1);

void setup()
{
  
}

void loop()
{
  b.set_led(b.is_pressed());
  system::sleep(50);
}

Yeah I got it in Basically, but still does not want to work :smiley: maybe because of my usb client module? (USB Client DP v1.3)? I don’t really know.