Git Product home page Git Product logo

mblock's People

Contributors

bigeyex avatar edeseses avatar hejingtao avatar kungvwow avatar mbotx avatar ouhaixiong avatar xeecos avatar yuerugou avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

mblock's Issues

mbot specific block cause compilation failures

We've been using mbots to show basic robotics to kids. Today, for no apparent reason, all programs failed to compile and upload when blocks like <if remote [button] pressed> or [set led] were used anywhere in the program. I've been looking into it for quite some time now, and I just can't find any explanation.

Compilation fails in 4 different computers (Win XP, win 7, win 8, win 10) and in >8 different mbot boards, with the proper firmware previously loaded.

Any clues about what's happening?

Not able to set pinMode for digitalread

The default pinmode for digital input of arduino ports seems to be INPUT instead of INPUT_PULLUP.
This leaves the input port in a floating state, requiring to add an pull-up or pull-down resistor to the project. By enabling the available internal pull-up resistor the need for adding resistors to a project can be prevented.

Also tried to change the baseboard_firmware.ino by changing

 case  DIGITAL:{
   pinMode(pin,INPUT);
   sendFloat(digitalRead(pin));
 }
 break;

into

 case  DIGITAL:{
   pinMode(pin,INPUT_PULLUP);
   sendFloat(digitalRead(pin));
 }
 break;

and in the Arduino.s2e

    ["B", "read digital pin %n","getDigital","9",
    {"encode":"{d0}","setup":"pinMode({0},INPUT);\n","inc":"","def":"","work":"digitalRead({0})","loop":""}],

to

    ["B", "read digital pin %n","getDigital","9",
    {"encode":"{d0}","setup":"pinMode({0},INPUT_PULLUP);\n","inc":"","def":"","work":"digitalRead({0})","loop":""}],

When running an application using a digital read with "When . Clicked" using the mBlock firmware, the pull-up resistor is not enabled and the voltage on the input port is still floating. If ran as an Arduino program the pinmode is set to INPUT_PULLUP and reading the input on the pin gives a stable signal.

void setup(){
pinMode(5,INPUT_PULLUP);
digitalWrite(5,1);
}

locale is not fetched

First of all: thanks a lot for this Linux port! First tests look great!

When starting mblock, it always starts in Chinese.
The app.getLocale() function is used, so I expect the language to be pulled from the OS (my locale is nl).
I tried changing the path in linux-unpacked/resources/web/js/libs/translator.js and I tried changing the default locale there, but it doesn't change the behaviour.
It seems to me the path to the locales in that file is wrong (localePath = __dirname + '/../../../i18n/locales) - there is no i18n folder.
I'm not familiar with Electron, so I might have it completely wrong.

AIRSerial.ane is not the latest version!

After I compile the mBlock source,it produce a "META-INF" directory, then I check the "AIRSerial.dll" file, I find that the size of "AIRSerial.dll" is different.

The AIRSerial.ane can not work.!

Linux version: Bluetooth problems

Hi! I am using the 4.0 Linux version. While the bluetooth works if I connect first with blueman (serial port /dev/rfcomm0) and then choose Connect > Serial Port > /dev/rfcomm0 from mBlock, if from mBlock I choose Connect > Bluetooth > MakeBlock(00:0D:19:0E:16:B5) then it connects ok but many blocks from the Robots section (lightsensor on board, ultrasonic sensor Port distance, button on board) does not work. This is rather confusing for everyday. Why one would have to use the serial port menu instead of the bluetooth menu in mblock?... It would be better at least to move the /dev/rfcomm0 option from the Serial Port to Bluetooth Port menu or maybe in both...?

Release Version vs Source Code Version

I have a huge question regarding the release version & the source code version, this Monday (4/14/2016) i was surprised that there was a new version of mBlock (yay!), version 3.3.0 to be precise, i went immediately to mblock.cc to check the Release Notes, but it hasn't been updated its still in version 3.2.2, so i came here to check that too, and here there are also no Release Notes, Realizing that there was no explicit release note or changelog, i went into the branches section to check for changes but the only branch available is master and it hasn't been updated in 3 months, What is going on? is the real source code being kept apart from the one here on Github?, am i missing something?

mBlock for Linux

When will be a Linux package available?

I supported mBot Project on Kickstarter. But I saw that the software is only available for Mac and Windows, but not for Linux.
As I only use Ubuntu on all Computers, the mBot robots will be useless for me.

As the Software is Open Source, it should be no Problem to also build a Linux Package!

As Linux is the only Open Source operating System of the three, the Open Source mBlock Software should certainly be available for Linux also!!!

I will be Glad to support you with testing Linux packages.

Best Regards
Buggi

Problem when upload to arduino card

We work in school, behind samba domain, users are not admin and their profils are on network, when we want to upload to arduino we had this error :
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17

include <Arduino.h>

include <Wire.h>

include <SoftwareSerial.h>

double angle_rad = PI/180.0;
double angle_deg = 180.0/PI;

void setup(){
pinMode(5,OUTPUT);
}

void loop(){
digitalWrite(5,1);
delay(1000_0.2);
digitalWrite(5,0);
delay(1000_0.2);
}
C:\Program Files\mBlock\Arduino\arduino_debug.exe --upload --board arduino:avr:uno --port COM3 --verbose --preserve-temp-files U:\config_eole\Application Data\cc.mblock.3.3.0\Local Store\scratchTemp\project____a___a_5_2\project____a___a_5_2.ino
Loading configuration...
java.nio.file.AccessDeniedException: U:\config_eole\Application Data\Arduino15 -> C:\Users\admin.profil\AppData\Local\Arduino15 <=== users have no access to this folder !!!!!!
at sun.nio.fs.WindowsException.translateToIOException(WindowsException.java:83)
at sun.nio.fs.WindowsException.rethrowAsIOException(WindowsException.java:97)
at sun.nio.fs.WindowsFileCopy.move(WindowsFileCopy.java:387)
at sun.nio.fs.WindowsFileSystemProvider.move(WindowsFileSystemProvider.java:287)
at java.nio.file.Files.move(Files.java:1395)
at processing.app.windows.Platform.fixSettingsLocation(Platform.java:219)
at processing.app.PreferencesData.init(PreferencesData.java:36)
at processing.app.BaseNoGui.initParameters(BaseNoGui.java:993)
at processing.app.Base.guardedMain(Base.java:159)
at processing.app.Base.main(Base.java:137)
send encode mode
mode binaire mode charactère
recv encode mode
mode binaire mode charactère

if we are administrator, all work fine.
Sorry for my bad english.
thank

USB DONGLE - Cannot connect to the 2.4G device

When trying "Connect -> 2.4G Serial -> Connect" mblock 4.0 responds with the message "Cannot connect to the 2.4G device. Please check your USB connection or use another USB port".

I have tryied changing the USB dongle from one port to another.
I changed the permissions of every /dev/hidraw* device to crwxrxwrxw.

Unfortunately, all my efforts were useless.

When I launched it from the shell as "pedbel" I could copy this messages:

pedbel@INF-2-64bit:/tmp/mBlock$ ./mblock
/tmp/mBlock/resources/tools/arduino
app listening on port 7070!
NOT SANDBOXED
Vector smash protection is enabled.
ready
es_ES:es:en
已更新菜单
已更新菜单
已更新菜单
现在进行2.4G连接。。。
已更新菜单
已更新菜单
<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<

Save Project As does not work

I attempted to use the Save Project As item from the menu. I changed the name and clicked Save, but the project is not saved under the new name.

OS: OS X 10.11.3
mBlock: 3.2.2

How to compile the source code?

Can you provide me the details on how to compile mBlock?

I need a new version with my Dutch-translation in it.
But I need it very soon (Tuesday next week).

mBot "play tone on note" block makes mbot crash

In Scratch mode (not Arduino mode): When the block "play tone on note" is executed with tones "D3", "E5" or "A7" the mBot stops responding.

Only after the serial port is disconnected and reconnected (by clicking "Connection" > "Serial Port" > "COMx") the mBot will be responsive again.

Where can I find the latest sources (version 2.2.1.0902) ?

I downloaded a couple of days ago the latest version of mblock from http://www.mblock.cc/.
Its 'behavior' does not match the latest source code versions here on github, so I wondered where I could find the latest updates on GITHUB?
I noted it since the menu item "check SW update" is not available here in github in the mblock.as module.
The modules are available in the downloaded package, that's clear.

Simple 'led blink script' does not work on mBot

Environment

mBlock 3.1 - Windows 10 - mBot Connected via USB cable

Issue

This script:

mbot-blink-leds

works after doing a 'Connect > Upgrade Firmware', but if you do 'Connect > Reset Default Program' the script makes 1 led blink with the wrong colors...

Expected behaviour

  • 'Upgrade Firmware' and 'Reset Default Program' should result in the same robot behaviour
  • The difference between 'Upgrade Firmware' and 'Reset Default Program' should be documented
  • The simple script above should work in both arduino programs ('Firmware' and 'Default Program')
  • The source code of both arduino programs should be available

與新版 Scratch 繁中不一致

我能協助把繁中的部分給整理出來,只會改動裡頭與 Scratch 相關的部分,mbot 的部分則依照官方的翻法,如果貴團隊同意,我可以 pull 一份給你們。希望可以在 4.0 版的時候一併處理。

「發送變量 var = value」方塊

「通訊」中,「發送變量 var = value」方塊送出資料,使用「讀取變量 var」方塊讀不到,看了一下 MeSerial 原始碼,它是用 = 判定沒錯:

float MeSerial::getValue(String key){
    String s = readDataLine();
    if(stringLength(s)>2){
        char * tmp;
        char * str;
        str = strtok_r((char*)s.c_str(), "=", &tmp);
        if(str!=NULL && strcmp(str,key.c_str())==0){
            float v = atof(tmp);
            return v;
        }
    }
    return 0;
}

不過,查看了一下發過來的資料,是使用 / 喔!… 應該是發送底層的程式碼寫錯了?…XD

版本 2.1.4.0318 ...

Serial monitor doesn't display in char mode

The code is missing to display incoming data bytes from arduino in character mode. I'd like to get the following change made.

src/ui/parts/ScriptsParts.as
public function onSerialDataReceived(bytes:ByteArray):void{
if(isByteDisplayMode) {
appendMsgWithTimestamp(HexUtil.bytesToString(bytes), false);
} else {
bytes.position = 0;
var str:String = bytes.readUTFBytes(bytes.length);
appendMsgWithTimestamp(str, false);
}
}

compiling source code 3.4.5

The mBlock 3.4.5 source code has been released now (currently as s branch off the main one). Thought I would start this thread about how to compile and run the code! I got the source code compiled with no errors, but it cannot connect to the mBot or Arduino on the serial port. Under “Connect / Serial Port“, it is just blank, no serial ports show up. The Arduino IDE can see the boards, and the released mBlock 3.4.5 software (from mBlock website) can see the boards. Only the compiled source code of mBlock here cannot see the serial ports.

I compiled the source code with the instructions here:
HOW TO COMPILE SOURCE CODE OF MBLOCK USING FLASH BUILDER.docx

And I exported the completed project as a desktop APP (including Adobe AIR). No errors, and it ran so well, I thought everything was fine! Until I found that the compiled mBlock cannot see any board connected as a serial port.

I examined the compiled-exported mBlock with a released version downloaded directly from mBlock and found the following folders were missing from the compiled-exported version:

  • /arduino directory
  • /drivers ch341 directory
  • /usbserial directory

I put those three directories into the mBlock folder of the complied-exported version and ran the program again, but still no luck. The compiled-exported mBlock version cannot see the boards on the serial ports.

Can anyone replicate or get past this step??

Thanks,
Andrew

mBlock Arduino code generation for reset time and timer incorrect in wait until

code uses uninitialized "currentTime" variable and never references "lastTime" variable in while statement: This is with release version mBlock downloaded 10/5/16

double dotRate;
dotRate = (200) / (60);

. . .
// is currently:
lastTime = millis()/1000.0;
while(!((currentTime) > ((7) / (dotRate))));

// should be:
lastTime = millis()/1000.0;
while(!((millis()/1000.0) > (lastTime + (7) / (dotRate))));

Unable to upgrade firmware or reset default program

On both Linux and Windows I'm unable to restore the firmware to default. The error only is "upload failed" on Linux and on Windows it just doesn't do anything. Downloaded the software today (2017-02-14).

mBot resets when going from full speed forward to full speed backward

Environment

mBlock 3.1 - Windows 10 - mBot powered by usb cable (no batteries)

Issue

This script
fwd-back
makes the mBot crash, probably because too much current is drawn from the usb port.

Expected behaviour

The mBot firmware should protect itself from crashing in this situation. Ensuring smoother transition from forward to backward should not be left to the user code (which is built by kids).

GPL violation, mBlock v3.4.5

Makeblock is currently violating the terms of the GPL v2 as it published a compiled version of the GPL-based software without providing its source code.

Please update the git repository to contains the source code used to build the released software. Thank you.

Catalan and 32 bits version

Despite the fact this new version is an stable version of mBlock for Linux, there is not a 32 bit version and the 64 bit version does not include Catalan language... We hope you can fix it ASAP

New Dutch translation not in version 2.2.0

Why is my Dutch translation not in the new version of mBlock (v2.2.0)?

And where are the translation files stored, so I can manually change the file on my computer?
They where in My Documents\mBlock, but that folder doesn't exist anymore.

Problem with v3.3.6

It appears that v3.3.6 no longer has the mBot Motor class that encapsulated both motors. When creating an "mBot Program" and looking at the Arduino code, you see the following code:

#include <Arduino.h>
#include <Wire.h>
#include <SoftwareSerial.h>

#include <MeMCore.h>

MeDCMotor motor_9(9);
MeDCMotor motor_10(10);
void move(int direction, int speed)
{
      int leftSpeed = 0;
      int rightSpeed = 0;
      if(direction == 1){
            leftSpeed = speed;
            rightSpeed = speed;
      }else if(direction == 2){
            leftSpeed = -speed;
            rightSpeed = -speed;
      }else if(direction == 3){
            leftSpeed = -speed;
            rightSpeed = speed;
      }else if(direction == 4){
            leftSpeed = speed;
            rightSpeed = -speed;
      }
      motor_9.run((9)==M1?-(leftSpeed):(leftSpeed));
      motor_10.run((10)==M1?-(rightSpeed):(rightSpeed));
}
double angle_rad = PI/180.0;
double angle_deg = 180.0/PI;

void setup(){
}

void loop(){
    _loop();
}

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

void _loop(){
}

However, as soon as you define a new block "test", the code changes to the following:


#include <Arduino.h>
#include <Wire.h>
#include <SoftwareSerial.h>

MeDCMotor motor_9(9);
MeDCMotor motor_10(10);
void move(int direction, int speed)
{
      int leftSpeed = 0;
      int rightSpeed = 0;
      if(direction == 1){
            leftSpeed = speed;
            rightSpeed = speed;
      }else if(direction == 2){
            leftSpeed = -speed;
            rightSpeed = -speed;
      }else if(direction == 3){
            leftSpeed = -speed;
            rightSpeed = speed;
      }else if(direction == 4){
            leftSpeed = speed;
            rightSpeed = -speed;
      }
      motor_9.run((9)==M1?-(leftSpeed):(leftSpeed));
      motor_10.run((10)==M1?-(rightSpeed):(rightSpeed));
}
                #include <MeMCore.h>

double angle_rad = PI/180.0;
double angle_deg = 180.0/PI;
void test();

void test()
{
}

void setup(){
    test();
}

void loop(){
    _loop();
}

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

void _loop(){
}

Notice that the "#include <MeMCore.h>" line gets moved after the move function. You can NOT "Upload to Arduino" as you will get an error.

mBlock 3(.1) Bluetooth communication -> DEAD

Hello all community members !

After a lot of problem, I'm back on Makeblock stuff. Well, so I got and installed mBlock 3.1 and saw it can't load mBlock 2.1.4.0313 projects...
So I made again from zero some files to test mBlock 3.1... and lost some hours to test programs and figure why mBlock 3 is not producing working programs !
I didn't find anything and should go to the sources, but I don't have more time for the moment.

I show you a simple echo program in mBlock 2 and 3 flavors. When getting troubles, we use a BlueTooth terminal to debug...
I've an Orion card, and the Me Bluetooth Dual Mode module.

mBlock 2 echo program : -> works fine : from Bluetooth terminaI, I send "in=45"+ -> I get back "out=45"
image
image

mBlock 3 echo program : -> don't work anymore : from Bluetooth terminaI, I send "in=45"+ -> I get back "out=0.00" !!!
image
image

Then, all our programs we made in the the school last year are not working anymore.
We made some of them newly from zero in mBlock 3 (and not imported them because mBlock 3 in not compatible with mBlock 2). But nothing is working. It's impossible to receive correctly datas with programs issued with mBlock 3.
They receive what the terminal send but are unable to read/extract datas.

PLEASE HELP !
Thanks a lot in advance.

Vincent MARECHAL

Code generator not generating code

I posted this on the mblock forum (screenshot in the link).

The code generator is not generating arduino code that matches up with the scratch code. After about 4-5 blocks, it refuses to add any new blocks as function calls in the arduino code, no matter what I do.

mBlock 3.3.2 Mac download is actually 3.3.1

On the mBlock website, there's a download labeled mBlock_mac_v3.3.2.zip. When you unzip it, there's an app labeled mBlock_v3.3.2, but when you look at the info on it, it says 3.3.1, and when you launch it up, mBlock complains there's an updated version to download... there isn't—that is the updated version.

So either you need to change the info to be 3.3.2 or put the actual 3.3.2 app inside the 3.3.2 .zip file.

Thanks!

Doesn't work in linux ia32

After several try-and-error Makeblock-4.0.0pre in amd64, compiles and works nicely.
Also, Makeblock-4.0.0 pre in ia32 (Inter Centrino Duo) compiles but when I type npm start starting window appears and "Loading" text, but nothing else happens.
(nodejs from git repository, I'm downloading Makeblock git )
How could I debug Makeblock?, Is ia32 architecture supported?
Thank you.

error

Hi,

I would like to use mBlock 4.0.0 under this Mint Linux
$ uname -v -p -o #66~14.04.1-Ubuntu SMP Wed Oct 19 15:05:38 UTC 2016 x86_64 GNU/Linux
with an Arduino Nano.

But after connection the serial successfully, switching to Arduino mode and clicking on "Upload to Arduino", I get the error message:
A JavaScript error occurred in the main process Uncaught Exception: Error: spawn EACCES at exports._errnoException (util.js:1026:11) at ChildProcess.spawn (internal/child_process.js:313:11) at exports.spawn (child_process.js:392:9) at Object.uploadCodeToBoard (/<censored>/mBlock/resources/app.asar/app/arduinoIDE.js:120:30) at EventEmitter.<anonymous> (/<censored>/mBlock/resources/app.asar/app/mBlock.js:86:15) at emitTwo (events.js:106:13) at EventEmitter.emit (events.js:191:7) at WebContents.<anonymous> (/<censored>/mBlock/resources/electron.asar/browser/api/web-contents.js:222:13) at emitTwo (events.js:106:13) at WebContents.emit (events.js:191:7)

0.5m Led strip 15 leds

When using the led rgb block in mBlock it sets the led count to 32, there need to be a way to change that to 15 or what you like.

How to help translating ?

HI,
I made French translation, but I would to correct some sentences and add new ones, how can I do ?

Thanks.

MeUltrasonic 的 measure 函式有問題

如果呼叫 MeUltrasonic ultrasonic_3(3); 的話,會呼叫 MeUltrasonic.cpp 中的 MeUltrasonic::MeUltrasonic(uint8_t port): MePort(port) {},因此,查看 MePort.cpp 中的

MePort::MePort(uint8_t port)
{
 s1 = mePort[port].s1;
 s2 = mePort[port].s2;
 _port = port;

//The PWM frequency is 976 Hz
#if defined(__AVR_ATmega32U4__) //MeBaseBoard use ATmega32U4 as MCU

TCCR1A = _BV(WGM10);
TCCR1B = _BV(CS11) | _BV(CS10) | _BV(WGM12);

TCCR3A = _BV(WGM30);
TCCR3B = _BV(CS31) | _BV(CS30) | _BV(WGM32);

TCCR4B = _BV(CS42) | _BV(CS41) | _BV(CS40);
TCCR4D = 0;

#else if defined(__AVR_ATmega328__) // else ATmega328

TCCR1A = _BV(WGM10);
TCCR1B = _BV(CS11) | _BV(CS10) | _BV(WGM12);

TCCR2A = _BV(WGM21) |_BV(WGM20);
TCCR2B = _BV(CS22);

#endif
}

知道是用了 mePort 陣列中索引 3:

#if defined(__AVR_ATmega32U4__) //MeBaseBoard use ATmega32U4 as MCU

MePort_Sig mePort[11] = {{NC, NC}, {11, A8}, {13, A11}, {10, 9}, {1, 0},
 {MISO, SCK}, {A0, A1}, {A2, A3}, {A4, A5}, {6, 7}, {5, 4}
};
#else // else ATmega328
MePort_Sig mePort[11] = {{NC, NC}, {11, 10}, {3, 9}, {12, 13}, {8, 2},
 {NC, NC}, {A2, A3}, {A6, A1}, {A7, A0}, {6, 7}, {5, 4}
};

#endif

如果是 Arduino Uno 的話,就是 ATmega328,因此索引 3 就是 {12, 13} 腳位。

MePort_Sig 在 MePort.h 的定義是:

typedef struct
{
uint8_t s1;
uint8_t s2;
} MePort_Sig;

接下來呼叫 MeUltrasonicdistanceCm

double MeUltrasonic::distanceCm(){
 return distanceCm(400);
}

double MeUltrasonic::distanceCm(uint16_t maxCm)
{
 long distance = measure(maxCm * 55 + 200);
 return (double)distance / 58.0;
}

long MeUltrasonic::measure(unsigned long timeout)
{
 long duration;
 MePort::dWrite2(LOW); // 這邊用 s2
 delayMicroseconds(2);
 MePort::dWrite2(HIGH); // 這邊 s2
 delayMicroseconds(10);
 MePort::dWrite2(LOW); // 這邊 s2
 pinMode(s2, INPUT);
 duration = pulseIn(s2, HIGH, timeout); // 還是用 s2?
 return duration;
}

MePortdWrite2 是:

void MePort::dWrite2(bool value)
{
 pinMode(s2, OUTPUT);
 digitalWrite(s2, value);
}

意外的發現,他都只用到 s2,也就是腳位 13,如果最後它打算 pulseIn 使用 s2,也就是 Echo 腳位用 13 的話,那麼之前應該是要呼叫 dWrite1 才對 … XD

void MePort::dWrite1(bool value)
{
 pinMode(s1, OUTPUT);
 digitalWrite(s1, value);
}

這樣觸發才是用到 12 腳位 … 也就是這原始碼有寫錯 … 還有另一個問題是,為什麼我的 mBlock 可以運作,也要一併查一下 …

我的系統是 Win8,裝過的 mBlock 版本依序是:

我現在測時使用的版本是 2.1.4.0318,mBlock 透過 Arduino IDE 代入原始碼並上傳至版子時,應該不是直接使用 ext/libraries/makeblock/src 中的程式,因為程式碼是錯的,如果是的話,照理我的也不能動 … mBlock 2.1.4.0318 在 make 時,應該是對的版本,而原始碼是卻是錯的版本 … 程式與原始碼不一致喔!

Spanish translation

I would also like to help with translations, in this case is with Spanish language since there are still some blocks that are in default (English), but i have a doubt about what file should i update.

In /source/src/locale there are files that correspoond to different languages, but there is also a file named locale.xlx that has all languages in it, what file should i update for the proper translations?.

compilation errors when using serial in Arduino mode in mBlock v3.3.1

When using serial communication in Arduino mode using a regular Arduino board, MeSerial se; is automatically placed in the script, even though its not used and the headers for it aren't included. This causes compilation errors. It's easy enough to remove that line manually, but when teaching kids that step is confusing.

How do you make extensions?

Is there any documentation how to create extensions for mBlock? I couldn't find information on it. The extension manager expects a zip file, what should be in this zip file?

I have scratch extensions I want to add to mBlock so that you can control the mBot with a leap motion or kinect controller. I see in the source files that the mBlock extensions are based on the json syntax used in scratch extensions. What are the required fields, required files?

mBlock Fails to Compile Arduino Program in Arduino Mode

When using mBlock in Arduino mode and the "Upload to Arduino" option, the compile fails with the message

"/Applications/Arduino.app/Contents/Resources/Java/hardware/arduino/cores/arduino/Arduino.h:213:26: error: pins_arduino.h: No such file or directory
5-26 18:45: Process exited with 1"

As of release 1.0 "Arduino.h" is no longer a separate file, hence the error. However, the "Edit with Arduino IDE" functions works okay.

Code Generation Error

mBlock 3.2.2 is not correctly performing variable assignments during code generation. When I use a set [variable] to [value] block, strings are not being properly quoted resulting in errors being thrown during compilation. This issue may have existed prior to this version (just noticed the issue today).

To duplicate the error, set up an mBlock or Orion program block, create a single variable, and then attempt to assign a string value to it.

Further experimentation/investigation reveals that strings must be quoted in the assignment block to be properly translated. Oddly, this is not required in pure Scratch 2.0 and I did not notice any mention of this in the mBlock Kids Maker Rocks With the Robot booklet. This needs to be documented somewhere obvious because a native Scratcher (or someone who only knows Scratch) will struggle trying to make string assignments work.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.