Skip to content

Commit

Permalink
tunes ease-in drive controls to support down to 1mm movements while s…
Browse files Browse the repository at this point in the history
…till preventing parts jumping in embossed tape
  • Loading branch information
sphawes committed Apr 18, 2023
1 parent 8d410dc commit b46d758
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 16 deletions.
2 changes: 1 addition & 1 deletion photon/src/PhotonFeeder.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -361,7 +361,7 @@ bool PhotonFeeder::moveForwardSequence(uint16_t tenths_mm) {
brakePeel();

// drive forward with ease in
for(int i=150;i<255;i=i+1){
for(int i=150;i<255;i=i+3){
driveValue(true, i);
delay(1);
}
Expand Down
20 changes: 5 additions & 15 deletions photon/src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -80,24 +80,16 @@ void checkPosition()
encoder.tick(); // just call tick() to check the state.
}

void bootAnimation(){
for(int i = 0;i<3;i++){
feeder->set_rgb(true, true, true);

delay(100);

feeder->set_rgb(false, false, false);

delay(100);
}

}

//-------
//SETUP
//-------

void setup() {
pinMode(LED_R, OUTPUT);
pinMode(LED_G, OUTPUT);
pinMode(LED_B, OUTPUT);
feeder->set_rgb(false, false, false);

pinMode(SW1, INPUT_PULLUP);
pinMode(SW2, INPUT_PULLUP);
pinMode(MOTOR_ENABLE, OUTPUT);
Expand All @@ -107,8 +99,6 @@ void setup() {
feeder = new PhotonFeeder(DRIVE1, DRIVE2, PEEL1, PEEL2, LED_R, LED_G, LED_B, &encoder);
network = new PhotonNetworkLayer(&bus, &packetizer, &addressFilter, &feederFloor);
protocol = new PhotonFeederProtocol(feeder, &feederFloor, network, UniqueID, UniqueIDsize);

bootAnimation();

byte addr = feederFloor.read_floor_address();

Expand Down

0 comments on commit b46d758

Please sign in to comment.