|
|
- // Pinout configuration
- 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;
-
- // Milliseconds to delay between each cycle
- # define milliseconds 10;
- int timeratio = 1;
-
- void setup() {
- // put your setup code here, to run once:
- // first we set pins as I/O and initialize outputs LOW
- pinMode ((grinderPin, pumpPin, boilerPin, powderPin, wheelPin, invertWheelPin, redLED, greenLED), OUTPUT);
- pinMode ((powderSensorPin, vaporSensorPin, tempSensorPin, wheelStartSensorPin, wheelEndSensorPin), INPUT);
- digitalWrite((grinderPin, pumpPin, boilerPin, powderPin, wheelPin, invertWheelPin, redLED, greenLED), LOW);
- // timeratio easily allows to determine how many cycles are required to make 1s pass (ms * ratio = 1s)
- timeratio = 1000/milliseconds;
- // initialize serial:
- Serial.begin(9600);
- }
-
- void loop() {
- // put your main code here, to run repeatedly:
-
- }
|