New repository for old PyCoffee Machine.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

23 lines
1.0 KiB

  1. // Pinout configuration
  2. const int grinderPin = 9, pumpPin = 8, boilerPin = 6, powderPin = 7, wheelPin = 10, invertWheelPin = 11, powderSensorPin = 2, vaporSensorPin = 5, tempSensorPin = 7, wheelStartSensorPin = 4, wheelEndSensorPin = 3, redLED = 13, greenLED = 12;
  3. // Milliseconds to delay between each cycle
  4. # define milliseconds 10;
  5. int timeratio = 1;
  6. void setup() {
  7. // put your setup code here, to run once:
  8. // first we set pins as I/O and initialize outputs LOW
  9. pinMode ((grinderPin, pumpPin, boilerPin, powderPin, wheelPin, invertWheelPin, redLED, greenLED), OUTPUT);
  10. pinMode ((powderSensorPin, vaporSensorPin, tempSensorPin, wheelStartSensorPin, wheelEndSensorPin), INPUT);
  11. digitalWrite((grinderPin, pumpPin, boilerPin, powderPin, wheelPin, invertWheelPin, redLED, greenLED), LOW);
  12. // timeratio easily allows to determine how many cycles are required to make 1s pass (ms * ratio = 1s)
  13. timeratio = 1000/milliseconds;
  14. // initialize serial:
  15. Serial.begin(9600);
  16. }
  17. void loop() {
  18. // put your main code here, to run repeatedly:
  19. }