![](/media/cache/img/default_profile.jpg.50x50_q85.jpg)
rev1
Diff: main.cpp
- Revision:
- 2:a17516deccae
- Parent:
- 1:459034942ff5
- Child:
- 3:0c35cd39b8b1
diff -r 459034942ff5 -r a17516deccae main.cpp --- a/main.cpp Mon Jul 13 13:00:39 2020 +0000 +++ b/main.cpp Mon Jul 13 14:41:30 2020 +0000 @@ -4,8 +4,8 @@ C12832 lcd(p5, p7, p6, p8, p11); Serial pc(USBTX, USBRX); // tx, rx -float value; -float weight; +float value; //measured value +float weight; //process variable AnalogIn pot1(p19); DigitalOut led1(LED1); DigitalOut led3(LED3); @@ -18,9 +18,9 @@ weight = value*1500 ; lcd.locate(0,0); lcd.printf("weight %.2f", weight); - if (weight > 1230 && weight < 1360) + if (weight > 1230 && weight < 1360) //process target set point { - led1 = 1; + led1 = 1; //output signal for process beacon and cylinder led3 = 0; led4 = 0; @@ -35,7 +35,7 @@ { led1 = 0; led4 = 0; - led3 = 1; + led3 = 1; // output signal for Red light on process beacon lcd.locate(0,20); lcd.printf("Missing QTY"); @@ -47,7 +47,7 @@ { led1 = 0; led3 = 0; - led4 = 1; + led4 = 1; // output signal for Blue light on process beacon lcd.locate(0,20); lcd.printf("EXCESS QTY");