Error using meShield


#1

Hello,

I downloaded the latest version of MBlock (3.4) I uploaded the firmware to the MeOrion and a small program does work.When i try to upload the same program to an arduino with a MeShield i got the error message:
In file included from C:\Program Files (x86)\mBlock\Arduino\libraries\makeblock\src/Me7SegmentDisplay.h:70:0,
from C:\Program Files (x86)\mBlock\Arduino\libraries\makeblock\src/MeShield.h:39,
from project_9_2.ino:5:
C:\Program Files (x86)\mBlock\Arduino\libraries\makeblock\src/MePort.h:76:19: error: ‘mePort’ has a previous declaration as 'MePort_Sig mePort [17]'
extern MePort_Sig mePort[17]; // mePort[0] is nonsense
^
Error compiling

I did an upgrade of the firmware to the Me-Uno-Shield. In both cases i use the newest libraries. In both cases i use the upload to arduino option in the mBlock app.


#2

Hi Aant,

Have you chosen the Me UNO Shield under the Board option on mBlock software?
You may paste the program you were going to upload to the Arduino uno with Me uno shield.


#3

Here is the code:
#include <Arduino.h>
#include <Wire.h>
#include <SoftwareSerial.h>

#include <MeShield.h>

double angle_rad = PI/180.0;
double angle_deg = 180.0/PI;
MeRGBLed rgbled_3(3, 4);

void setup(){
}

void loop(){
rgbled_3.setColor(1,150,0,0);
rgbled_3.show();
_loop();
}

void _delay(float seconds){
long endTime = millis() + seconds * 1000;
while(millis() < endTime)_loop();
}

void _loop(){
}

When this code is uses with a Orion shield and so the line #include <MeShield.h> will be changed in #include <MeOrion.h> and the ports are updated it will compile and upload but as it is no with MeShield i get this error.

With regards,
Aant


#4

Hi Aant,

Could you please paste the Graphical mBlock program as well?


#5

Hi,
Here is the the screenshot. As I said when i use the orion shield this “program” is fine. By fine I mean i can compile it and can upload it, with a meUnoShield i can’t even compile it and the one thing what is different is the meOrion.h or meShield,h include.

With regards
Aant


#6

Hi Aant,

Thanks for your feedback on this issue.
It has been verified and the next version mBlock (which may be published on next week) will solve it.


#7