Welcome! Log In Create A New Profile

Advanced

My firmware modifications: feedback and arduino IDE testing support

Posted by ErikDeBruijn 
My firmware modifications: feedback and arduino IDE testing support
April 08, 2009 10:35AM
I've gone through a lot of trouble finding out why the trunk g-code interpreter hung, because I never got anything back from it. Everything appeared to run fine. Eventually it appeared that the \n isn't added when you use the arduino IDE (0015)! This wasn't the case for Zach & Marius Kintel's branch that handled buffering.

Anyway, if you still want to be able to issue manual G-Codes, change this:

Index: process_string.pde
===================================================================
--- process_string.pde (revision 2769)
+++ process_string.pde (working copy)

//our command string
@@ -109,7 +109,7 @@
- if (serial_count && c == '\n')
+ if (serial_count && (c == '\n' || (c == '.')))



Also, this allows you to have some status information to be able to see that *something* is happening!

# svn diff GCode_Interpreter.pde stepper_control.pde
Index: GCode_Interpreter.pde
===================================================================
--- GCode_Interpreter.pde (revision 2769)
+++ GCode_Interpreter.pde (working copy)
@@ -11,7 +11,8 @@
#include
#include "WProgram.h"
#include "parameters.h"
-#include "pins.h"
+#include "/home/erik/Shared/RepRap/pins_erik.h"
+//#include "/home/erik/Shared/RepRap/pins.h"
#include "extruder.h"


@@ -37,7 +38,9 @@
ex[0] = &ex0;
Serial.begin(19200);
Serial.println("start");
-
+#ifdef STATUS_LED_PIN
+ pinMode(STATUS_LED_PIN,OUTPUT);
+#endif
//other initialization.
init_process_string();
init_steppers();
Index: stepper_control.pde
===================================================================
--- stepper_control.pde (revision 2769)
+++ stepper_control.pde (working copy)
@@ -1,5 +1,5 @@
#include "parameters.h"
-#include "pins.h"
+#include "/home/erik/Shared/RepRap/pins_erik.h"
#include "extruder.h"

//init our variables
@@ -310,6 +310,10 @@

void enable_steppers()
{
+#ifdef STATUS_LED_PIN
+ digitalWrite(STATUS_LED_PIN,HIGH);
+#endif
+
#ifdef SANGUINO
if(target_units.x != current_units.x)
digitalWrite(X_ENABLE_PIN, ENABLE_ON);
@@ -369,6 +373,10 @@

void disable_steppers()
{
+#ifdef STATUS_LED_PIN
+ digitalWrite(STATUS_LED_PIN,LOW);
+#endif
+
#ifdef SANGUINO
//disable our steppers
digitalWrite(X_ENABLE_PIN, !ENABLE_ON);


Regards,

Erik de Bruijn
[Ultimaker.com] - [blog.erikdebruijn.nl]
Sorry, only registered users may post in this forum.

Click here to login