Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error in Arduino code generation. #167

Open
tguneysu opened this issue Jun 8, 2017 · 0 comments
Open

Error in Arduino code generation. #167

tguneysu opened this issue Jun 8, 2017 · 0 comments

Comments

@tguneysu
Copy link

tguneysu commented Jun 8, 2017

VERSION: ardublock-all-master-beta-20170414.jar

Noticed an error in Arduino code generation.
In the picture below, the Ardu blocks used generates the Arduino code below:
ardublock_error

#include <SoftwareSerial.h>
SoftwareSerial bleShield(10,11);
void setup()
{
bleShield.begin(19200);
Serial.begin(9600);
}

void loop()
{
if (bleShield.available())
{
Serial.print("message");
Serial.print(" ");
bleShield.read()Serial.println(); // <<<--- ERROR in code generation**
}
}
...AND the line ” bleShield.read()Serial.println();” is wrong in syntax.
It should read: Serial.println(bleShield.read());

ALSO:

If the TRUE option is set to FALSE (for new line generation), the following wrong code is generated:
void loop()
{
if (bleShield.available())
{
Serial.print("message");
Serial.print(" "); // <<<--- ERROR in code generation**
bleShield.read() } // <<<--- ERROR in code generation**
}

Thanks to advise.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant