Welcome! Log In Create A New Profile

Advanced

Thermistor sensor value without Firmware

Posted by cncandi 
Thermistor sensor value without Firmware
June 08, 2020 10:53AM
I'd like to support the value of temperature from Thermistor with Arduino Mega and Ramps 1.4
but without using any Firmware like Merlin.

Right now I use the follow code and all feature works well but I find not correct PIN
for T0 thermistor.

void loop () {

    if(Serial.available()){
        val = Serial.readString();
     }

  if (val=="ON"){
      // FAN anschalten
      digitalWrite(FAN_PIN, HIGH);
  }
  else if(val=="OFF")
  {
     digitalWrite(FAN_PIN, LOW);
  }

    
    // Temperatur anschalten
    digitalWrite(HEATER_0_PIN, LOW);

  
    // MOTOR
    // LOW=Uhrzeigersinn - HIGH=Gegenuhrzeigersinn
    digitalWrite(E_DIR_PIN, LOW);

    for (int i = 0; i < 200; i++)
    {
      digitalWrite(E_STEP_PIN, HIGH); // Motor an
      digitalWrite(LED_PIN, HIGH);
      delayMicroseconds(5000); // 100=sehr schnell bis 5000=sehr langsam
      digitalWrite(E_STEP_PIN, LOW); // Motor aus
      digitalWrite(LED_PIN, LOW);
      delayMicroseconds(5000);
    }
  delay(1000);
}
Re: Thermistor sensor value without Firmware
June 08, 2020 10:58PM
//RAMPS 1.4 Thermistor pins
#define TEMP_0_PIN A13 // Analog Input
#define TEMP_1_PIN A14 // Analog Input
#define TEMP_2_PIN A15 // Analog Input


eg [github.com]
Sorry, only registered users may post in this forum.

Click here to login