User Tools

Site Tools


bdev:filamentextruder_recyclebot

Warning: Undefined array key -1 in /var/www/html/dokuwiki/inc/html.php on line 1458

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
bdev:filamentextruder_recyclebot [2022/11/04 22:34]
richard
bdev:filamentextruder_recyclebot [2022/11/05 23:52] (current)
richard
Line 9: Line 9:
 #include <Wire.h> #include <Wire.h>
 #include <SoftwareSerial.h> #include <SoftwareSerial.h>
-#define dirPin 4 
-#define stepPin 3 
 #define motorInterfaceType 1 #define motorInterfaceType 1
  
  
 #define THERMISTOR_PINA A11 #define THERMISTOR_PINA A11
-#define TEMPCONTROLA 9+#define TEMPCONTROLA 10
  
 //Define the aggressive and conservative Tuning Parameters //Define the aggressive and conservative Tuning Parameters
Line 30: Line 28:
  
  
-const int stepsPinA = 0+const int stepsPinA = 11
-const int directionPinA = 1;+const int directionPinA = 12;
 const int enablePinA = 2; const int enablePinA = 2;
 +
 +
 const int stepsPinB = 3; const int stepsPinB = 3;
 const int directionPinB = 4; const int directionPinB = 4;
 const int enablePinB = 5; const int enablePinB = 5;
-const int stepsPinC = 6+ 
-const int directionPinC = 7+const int stepsPinC = 7
-const int enablePinC = 8;+const int directionPinC = 8
 +const int enablePinC = 9;
  
 const int gobuttonA = A0; const int gobuttonA = A0;
 const int stopbuttonA = A1; const int stopbuttonA = A1;
 const int speedpotA = A2; const int speedpotA = A2;
-const int gobuttonB = A3+ 
-const int stopbuttonB = A4+const int gobuttonB = A5
-const int speedpotB = A5+const int stopbuttonB = A6
-const int gobuttonC = A6+const int speedpotB = A3; 
-const int stopbuttonC = A7+ 
-const int speedpotC = A8;+const int gobuttonC = A7
 +const int stopbuttonC = A10
 +const int speedpotC = A4;
  
 int directionA = 0; int directionA = 0;
Line 106: Line 109:
  
  
 +
 +  Serial.print("");
 +  
 +  digitalWrite(stepsPinA, HIGH);
 +  digitalWrite(directionPinA, LOW);
 +  digitalWrite(enablePinA, HIGH);  
 +
 +
 +  digitalWrite(stepsPinB, LOW);
 +  digitalWrite(directionPinB, LOW);
 +  digitalWrite(enablePinB, LOW); 
 +
 +  digitalWrite(stepsPinC, LOW);
 +  digitalWrite(directionPinC, HIGH);
 +  digitalWrite(enablePinC, LOW); 
 +
 +
 +/*
   if (levelstreamon == 1) {   if (levelstreamon == 1) {
    Serial.print("A: ");    Serial.print("A: ");
Line 127: Line 148:
   } else { bfl = 0; }   } else { bfl = 0; }
  
- if (digitalRead(gobuttonA) == HIGH){+ if (digitalRead(gobuttonA) == 1){ 
 +   Serial.println("moving A");
    runnerA();    runnerA();
   }   }
Line 140: Line 162:
   } else { bfl = 0; }   } else { bfl = 0; }
  
- if (digitalRead(gobuttonB) == HIGH){+ if (digitalRead(gobuttonB) == 1){ 
 +  Serial.println("moving B");
    runnerB();    runnerB();
   }   }
  
 + if (digitalRead(stopbuttonC) ==HIGH){
 +  if (bfl == 0){
 +   if (directionC==0){directionC = 1; digitalWrite(directionPinC, HIGH); }else{directionC=0; digitalWrite(directionPinC, LOW);}
 +    Serial.print(directionC);
 +    Serial.println(" direction changed");
 +    bfl = 1;
 +   }
 +  } else { bfl = 0; }
 +
 + if (digitalRead(gobuttonC) == 1){
 +  Serial.println("moving C");
 +   runnerC();
 +  }
 +  */
 +
 +
 +  
  if(Serial.available())  if(Serial.available())
  {  {
bdev/filamentextruder_recyclebot.txt · Last modified: 2022/11/05 23:52 by richard