Index: reprap/firmware/Arduino/Single_Arduino_SNAP/Single_Arduino_SNAP.pde =================================================================== --- reprap/firmware/Arduino/Single_Arduino_SNAP/Single_Arduino_SNAP.pde (revision 1642) +++ reprap/firmware/Arduino/Single_Arduino_SNAP/Single_Arduino_SNAP.pde (working copy) @@ -42,9 +42,9 @@ #define VALVE_ENABLE_PIN 16 //NB: Conflicts with Max Z!!!! // how many steps do our motors have? -#define X_MOTOR_STEPS 400 -#define Y_MOTOR_STEPS 400 -#define Z_MOTOR_STEPS 400 +#define X_MOTOR_STEPS 200 +#define Y_MOTOR_STEPS 200 +#define Z_MOTOR_STEPS 200 //our library includes. #include @@ -91,7 +91,7 @@ //route the command to the proper object. if (dest == EXTRUDER_ADDRESS) - process_thermoplast_extruder_snap_commands_v1(); + process_thermoplast_extruder_snap_commands_v1(); else if(dest == X_ADDRESS || dest == Y_ADDRESS || dest == Z_ADDRESS) process_cartesian_bot_snap_commands_v1(); Index: reprap/firmware/Arduino/library/ThermoplastExtruder/ThermoplastExtruder.cpp =================================================================== --- reprap/firmware/Arduino/library/ThermoplastExtruder/ThermoplastExtruder.cpp (revision 1642) +++ reprap/firmware/Arduino/library/ThermoplastExtruder/ThermoplastExtruder.cpp (working copy) @@ -111,16 +111,15 @@ (temptable[i][1] - temptable[i-1][1]) / (temptable[i][0] - temptable[i-1][0]); - if (celsius > 255) - celsius = 255; - break; } } - // Overflow: We just clamp to 0 degrees celsius - if (i == NUMTEMPS) - celsius = 0; + // Overflow: Set to last value in the table + if (i == NUMTEMPS) celsius = temptable[i-1][1]; + // Clamp to byte + if (celsius > 255) celsius = 255; + else if (celsius < 0) celsius = 0; return celsius; } Index: reprap/firmware/Arduino/library/ThermoplastExtruder/ThermistorTable.h =================================================================== --- reprap/firmware/Arduino/library/ThermoplastExtruder/ThermistorTable.h (revision 1642) +++ reprap/firmware/Arduino/library/ThermoplastExtruder/ThermistorTable.h (working copy) @@ -10,6 +10,7 @@ // r2: 1600 // beta: 3480 // max adc: 315 +#if 0 #define NUMTEMPS 20 short temptable[NUMTEMPS][2] = { {1, 922}, @@ -33,5 +34,43 @@ {289, 29}, {305, -45} }; +#endif +#define NUMTEMPS 32 +short temptable[NUMTEMPS][2] = { + {210, -10}, + {224, 0}, + {238, 10}, + {252, 20}, + {266, 30}, + {281, 40}, + {296, 50}, + {310, 60}, + {325, 70}, + {339, 80}, + {354, 90}, + {368, 100}, + {383, 110}, + {397, 120}, + {411, 130}, + {425, 140}, + {439, 150}, + {452, 160}, + {465, 170}, + {478, 180}, + {491, 190}, + {503, 200}, + {516, 210}, + {528, 220}, + {539, 230}, + {551, 240}, + {562, 250}, + {573, 260}, + {583, 270}, + {593, 280}, + {602, 290}, + {610, 300}, +}; + + #endif Index: reprap/firmware/Arduino/library/ThermoplastExtruder_SNAP_v1/ThermoplastExtruder_SNAP_v1.cpp =================================================================== --- reprap/firmware/Arduino/library/ThermoplastExtruder_SNAP_v1/ThermoplastExtruder_SNAP_v1.cpp (revision 1642) +++ reprap/firmware/Arduino/library/ThermoplastExtruder_SNAP_v1/ThermoplastExtruder_SNAP_v1.cpp (working copy) @@ -100,8 +100,10 @@ //extruder.heater_high = snap.getByte(2); extruder.heater_low = 64; extruder.heater_high = 255; - extruder.target_celsius = calculateTemperatureForPicTemp(snap.getByte(3)); - extruder.max_celsius = calculateTemperatureForPicTemp(snap.getByte(4)); + extruder.target_celsius = snap.getByte(3); + extruder.max_celsius = snap.getByte(4); +// extruder.target_celsius = calculateTemperatureForPicTemp(snap.getByte(3)); +// extruder.max_celsius = calculateTemperatureForPicTemp(snap.getByte(4)); break; // tell the host software how hot we are. Index: reprap/host/src/org/reprap/devices/GenericExtruder.java =================================================================== --- reprap/host/src/org/reprap/devices/GenericExtruder.java (revision 1642) +++ reprap/host/src/org/reprap/devices/GenericExtruder.java (working copy) @@ -727,7 +727,8 @@ if (temperature == 0) setHeater(0, 0, lock); else { - setHeater(power0, power1, t0, t1, lock); +// setHeater(power0, power1, t0, t1, lock); + setHeater(power0, power1, (byte)(temperature), (byte)(temperature*1.06), lock); } } @@ -1069,7 +1070,8 @@ double resistance = calculateResistance(rawHeat, calibration); - currentTemperature = calculateTemperature(resistance); +// currentTemperature = calculateTemperature(resistance); + currentTemperature = rawHeat; Debug.d(material + " extruder current temp " + currentTemperature); lastTemperatureUpdate = System.currentTimeMillis(); @@ -1206,7 +1208,8 @@ byte [] reply = getPayload(); if (reply == null || reply.length != 3) throw new InvalidPayloadException(); - return reply[1] < 0 ? reply[1] + 256 : reply[1]; +// return reply[1] < 0 ? reply[1] + 256 : reply[1]; + return reply[2] < 0 ? reply[2] + 256 : reply[2]; } /**