Skip to content

Commit

Permalink
GUI draft
Browse files Browse the repository at this point in the history
  • Loading branch information
fmhall committed Apr 16, 2019
1 parent d627f4f commit 87dcb1e
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 18 deletions.
20 changes: 10 additions & 10 deletions Arduino-slaves/arduino-board/slave.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,21 +15,21 @@ void setup()
{
// Init Serial
Serial.begin(SERIAL_BAUD);
AccelStepper stepper1(1, 3, 2);
AccelStepper stepper1(2, 3, 2);
// Wait until the arduino is connected to master
// while (!is_connected)
// {
// write_order(HELLO);
// wait_for_bytes(1, 1000);
// get_messages_from_serial();
// write_order(ALREADY_CONNECTED);
// }
while (!is_connected)
{
write_order(HELLO);
wait_for_bytes(1, 1000);
get_messages_from_serial();
write_order(ALREADY_CONNECTED);
}
stepper1.setMaxSpeed(1000);
stepper1.setSpeed(900);
}

// Define 6 steppers and the pins they will use
AccelStepper stepper1(1, 3, 2);
AccelStepper stepper1(2, 3, 2);
AccelStepper stepper2(2, 5, 4);
AccelStepper stepper3(2, 7, 6);
AccelStepper stepper4(2, 9, 8);
Expand Down Expand Up @@ -472,5 +472,5 @@ void run1(int m, int s, float t)
}
}
done = false;
}
}
}
9 changes: 1 addition & 8 deletions RaspberryPi-master/tester.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,6 @@
ser = ard1.conn
ser.reset_input_buffer()

# prompt = ser.readline()
# print(prompt)

# ser.reset_input_buffer()
# stringThing = '1'
# ser.write(stringThing.encode(encoding='UTF-8'))
# ser.reset_input_buffer()
is_connected = False
while not is_connected:
print("Waiting for arduino...")
Expand All @@ -28,7 +21,7 @@
byte = bytes_array[0]
if byte in [Order.HELLO.value, Order.ALREADY_CONNECTED.value]:
is_connected = True
print("Connected!!!!!")
print("Connected!")

write_order(ser, Order.HELLO)
write_order(ser, Order.MOTOR)
Expand Down
Binary file added draftGUI.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added pump.epgz
Binary file not shown.
Binary file added untitled_page.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 87dcb1e

Please sign in to comment.