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
Next revision
Previous revision
bdev:filamentextruder_recyclebot [2022/11/04 22:33]
richard
bdev:filamentextruder_recyclebot [2022/11/05 23:52] (current)
richard
Line 1: Line 1:
 ====== Filament extruder recyclebot ====== ====== Filament extruder recyclebot ======
  
 +====== filabotmega.ino ======
  
  
Line 8: 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 29: 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 105: 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 126: Line 148:
   } else { bfl = 0; }   } else { bfl = 0; }
  
- if (digitalRead(gobuttonA) == HIGH){+ if (digitalRead(gobuttonA) == 1){ 
 +   Serial.println("moving A");
    runnerA();    runnerA();
   }   }
Line 139: 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.1667601231.txt.gz · Last modified: 2022/11/04 22:33 by richard