Xy Plotter V2.0 - upload of GCodeParser fails


#1

i finished the build and attached to my computer
the device manager is showing “USB-SERIAL CH340 (COM9)” under Ports (COM & LPT)
I am on windows 7 64bit
I have the board set to Leonardo on COM9
Everytime I Upload it fails with a buffered memory access not supported.

below is the verbose readout on upload.
This report would have more information with
"Show verbose output during compilation"
enabled in File > Preferences.
Arduino: 1.0.6 (Windows 7), Board: "Arduino Leonardo"
Binary sketch size: 18,644 bytes (of a 28,672 byte maximum)

Forcing reset using 1200bps open/close on port COM9

PORTS {COM9, } / {COM9, } => {}

PORTS {COM9, } / {COM9, } => {}

PORTS {COM9, } / {COM9, } => {}

PORTS {COM9, } / {COM9, } => {}

PORTS {COM9, } / {COM9, } => {}

PORTS {COM9, } / {COM9, } => {}

PORTS {COM9, } / {COM9, } => {}

PORTS {COM9, } / {COM9, } => {}

PORTS {COM9, } / {COM9, } => {}

PORTS {COM9, } / {COM9, } => {}

PORTS {COM9, } / {COM9, } => {}

PORTS {COM9, } / {COM9, } => {}

PORTS {COM9, } / {COM9, } => {}

PORTS {COM9, } / {COM9, } => {}

PORTS {COM9, } / {COM9, } => {}

PORTS {COM9, } / {COM9, } => {}

PORTS {COM9, } / {COM9, } => {}

PORTS {COM9, } / {COM9, } => {}

PORTS {COM9, } / {COM9, } => {}

PORTS {COM9, } / {COM9, } => {}

Uploading using selected port: COM9

C:\Program Files (x86)\Arduino\hardware/tools/avr/bin/avrdude -CC:\Program Files (x86)\Arduino\hardware/tools/avr/etc/avrdude.conf -v -v -v -v -patmega32u4 -cavr109 -P\.\COM9 -b57600 -D -Uflash:w:C:\Users\QUOSYS~1\AppData\Local\Temp\build2052616656840759390.tmp\GCodeParser.cpp.hex:i

avrdude: Version 5.11, compiled on Sep 2 2011 at 19:38:36
Copyright © 2000-2005 Brian Dean, http://www.bdmicro.com/
Copyright © 2007-2009 Joerg Wunsch

     System wide configuration file is "C:\Program Files (x86)\Arduino\hardware/tools/avr/etc/avrdude.conf"

     Using Port                    : \\.\COM9
     Using Programmer              : avr109
     Overriding Baud Rate          : 57600
     AVR Part                      : ATmega32U4
     Chip Erase delay              : 9000 us
     PAGEL                         : PD7
     BS2                           : PA0
     RESET disposition             : dedicated
     RETRY pulse                   : SCK
     serial program mode           : yes
     parallel program mode         : yes
     Timeout                       : 200
     StabDelay                     : 100
     CmdexeDelay                   : 25
     SyncLoops                     : 32
     ByteDelay                     : 0
     PollIndex                     : 3
     PollValue                     : 0x53
     Memory Detail                 :

                              Block Poll               Page                       Polled
       Memory Type Mode Delay Size  Indx Paged  Size   Size #Pages MinW  MaxW   ReadBack
       ----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------
       eeprom        65    10     8    0 no       1024    8      0  9000  9000 0x00 0x00
                              Block Poll               Page                       Polled
       Memory Type Mode Delay Size  Indx Paged  Size   Size #Pages MinW  MaxW   ReadBack
       ----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------
       flash         65     6   128    0 yes     32768  128    256  4500  4500 0x00 0x00
                              Block Poll               Page                       Polled
       Memory Type Mode Delay Size  Indx Paged  Size   Size #Pages MinW  MaxW   ReadBack
       ----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------
       lfuse          0     0     0    0 no          1    0      0  9000  9000 0x00 0x00
                              Block Poll               Page                       Polled
       Memory Type Mode Delay Size  Indx Paged  Size   Size #Pages MinW  MaxW   ReadBack
       ----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------
       hfuse          0     0     0    0 no          1    0      0  9000  9000 0x00 0x00
                              Block Poll               Page                       Polled
       Memory Type Mode Delay Size  Indx Paged  Size   Size #Pages MinW  MaxW   ReadBack
       ----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------
       efuse          0     0     0    0 no          1    0      0  9000  9000 0x00 0x00
                              Block Poll               Page                       Polled
       Memory Type Mode Delay Size  Indx Paged  Size   Size #Pages MinW  MaxW   ReadBack
       ----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------
       lock           0     0     0    0 no          1    0      0  9000  9000 0x00 0x00
                              Block Poll               Page                       Polled
       Memory Type Mode Delay Size  Indx Paged  Size   Size #Pages MinW  MaxW   ReadBack
       ----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------
       calibration    0     0     0    0 no          1    0      0     0     0 0x00 0x00
                              Block Poll               Page                       Polled
       Memory Type Mode Delay Size  Indx Paged  Size   Size #Pages MinW  MaxW   ReadBack
       ----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------
       signature      0     0     0    0 no          3    0      0     0     0 0x00 0x00

     Programmer Type : butterfly
     Description     : Atmel AppNote AVR109 Boot Loader

Connecting to programmer: .avrdude: Send: . [1b]
avrdude: Send: S [53]
avrdude: Recv: . [cc]

avrdude: Recv:
avrdude: Send: V [56]
avrdude: Recv: . [cc]
avrdude: Send: v [76]
avrdude: Recv: . [cc]
avrdude: Recv:
avrdude: Send: p [70]
avrdude: Recv: . [cc]
Found programmer: Id = “Ìÿ(”; type = Ì
Software Version = Ì.

I was able to switch the device driver to Makeblock but that didn’t work.
I switched the board to an UNO and the upload works but the GRemoteFull doesn’t seem to move anything. I tried the stepper example programs and I can move the X and y. I am stuck on how to proceed.


#2

oh it is a orion board :frowning: so I should use the uno setting. Still don’t understand why I can’t get the remote to move the axis the way the example code does.


#3

so if I leave the motors in port 1 and 2, move y limits to 6, move servo to 3, move x limits to 4 and make use the new GCodeParser below I can get the GRemote to work

#include <Servo.h> //include the Servo library;
#include <Makeblock.h>
#include <SoftwareSerial.h>
#include <Wire.h>
// define the parameters of our machine.
float X_STEPS_PER_INCH = 48;
float X_STEPS_PER_MM = 40;
int X_MOTOR_STEPS = 100;

float Y_STEPS_PER_INCH = 48;
float Y_STEPS_PER_MM = 40;
int Y_MOTOR_STEPS = 100;

float Z_STEPS_PER_INCH = 48;
float Z_STEPS_PER_MM = 40;
int Z_MOTOR_STEPS = 100;

//our maximum feedrates
long FAST_XY_FEEDRATE = 2000;
long FAST_Z_FEEDRATE = 2000;

// Units in curve section
#define CURVE_SECTION_INCHES 0.019685
#define CURVE_SECTION_MM 0.5

// Set to one if sensor outputs inverting (ie: 1 means open, 0 means closed)
// RepRap opto endstops are not inverting.
int SENSORS_INVERTING = 1;

// How many temperature samples to take. each sample takes about 100 usecs.

/****************************************************************************************

  • digital i/o pin assignment
  • this uses the undocumented feature of Arduino - pins 14-19 correspond to analog 0-5
    ****************************************************************************************/

int X_STEP_PIN = mePort[PORT_2].s2;//the Step pin connect to Base Board PORT2 SLOT2
int X_DIR_PIN = mePort[PORT_2].s1;//the direction pin connect to Base Board PORT2 SLOT1
int X_ENABLE_PIN = 4;
int X_MIN_PIN = mePort[PORT_4].s2;
int X_MAX_PIN = mePort[PORT_4].s1;

int Y_STEP_PIN = mePort[PORT_1].s2;//the Step pin connect to Base Board PORT1 SLOT2
int Y_DIR_PIN = mePort[PORT_1].s1;//the direction pin connect to Base Board PORT1 SLOT1
int Y_ENABLE_PIN = 4;
int Y_MIN_PIN = mePort[PORT_6].s2;
int Y_MAX_PIN = mePort[PORT_6].s1;

MePort port(PORT_3);
int Z_STEP_PIN = port.pin2();//attaches the servo on PORT_3 SLOT2 to the servo object
int Z_DIR_PIN = port.pin1();;
int Z_ENABLE_PIN = 4;
int Z_MIN_PIN = mePort[PORT_6].s2;
int Z_MAX_PIN = mePort[PORT_6].s1;
int Z_ENABLE_SERVO = 1;
#define COMMAND_SIZE 128

char commands[COMMAND_SIZE];
byte serial_count;
int no_data = 0;

Servo servo;

int currentPosServo = 90;
int targetPosServo = 90;
bool comment = false;
void setup()
{
//Do startup stuff here
Serial.begin(115200);
if(Z_ENABLE_SERVO==1){
servo.attach(Z_STEP_PIN);
}
//other initialization.
init_process_string();
init_steppers();
process_string(“G90”,3);//Absolute Position
Serial.println(“start”);
}

void loop()
{
//Serial.println(Z_MIN_PIN);
char c;
//read in characters if we got them.
if (Serial.available() > 0)
{
c = Serial.read();
no_data = 0;
//newlines are ends of commands.
if (c != ‘\n’)
{
if(c==0x18){
Serial.println(“Grbl 1.0”);
}else{
if (c == ‘(’){
comment = true;
}
// If we’re not in comment mode, add it to our array.
if (!comment)
{
commands[serial_count] = c;
serial_count++;
}
if (c == ‘)’){
comment = false; // End of comment - start listening again
}
}

	}
}else
{
	no_data++;
	delayMicroseconds(100);

//if theres a pause or we got a real command, do it
if (serial_count && (c == '\n' || no_data > 100))
{
	//process our command!
	process_string(commands, serial_count);
	//clear command.
	init_process_string();
}

//no data?  turn off steppers
if (no_data > 1000){
	disable_steppers();
}
    }

// return;
// delay(5);
// int dPos = abs(currentPosServo-targetPosServo);
// if(currentPosServo<targetPosServo){
// currentPosServo += dPos>8?6:1;
// }else if(currentPosServo>targetPosServo){
// currentPosServo -= dPos>8?6:1;
// }

}


#4

Hi! @djrozwick
Please download the newest firmware and software.
http://learn.makeblock.cc/xy2/


Best regards!


#5