en-us_commands:reference:ipidreset
Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revision | |||
| en-us_commands:reference:ipidreset [2026/09/08 00:53] – 바깥 편집 127.0.0.1 | en-us_commands:reference:ipidreset [2026/09/14 20:30] (current) – external edit 127.0.0.1 | ||
|---|---|---|---|
| Line 14: | Line 14: | ||
| ===== Example ===== | ===== Example ===== | ||
| + | |||
| + | This example uses the MPINO-16A8R8T A0 value as the PID process value. When input D22 changes from LOW to HIGH, it resets the PID state once. It shows the result only in Serial Monitor. Check the A0 setting and D22 wiring against the product specifications. | ||
| <code cpp> | <code cpp> | ||
| const uint8_t PID_ID = 0; | const uint8_t PID_ID = 0; | ||
| - | const float SETPOINT_C = 45.0F; | ||
| void setup() { | void setup() { | ||
| Serial.begin(115200); | Serial.begin(115200); | ||
| - | | + | IpidSet(PID_ID, |
| - | IpidItermLimit(PID_ID, | + | |
| - | IpidReverse(PID_ID, | + | |
| } | } | ||
| void loop() { | void loop() { | ||
| - | const float temperature | + | |
| - | if (IdigitalRead(0, | + | |
| - | const float demand | + | if (isHigh && !wasHigh) IpidReset(PID_ID); |
| - | const float lastDemand | + | wasHigh = isHigh; |
| - | | + | const float currentValue |
| - | delay(20); | + | const float result |
| + | | ||
| + | delay(100); | ||
| } | } | ||
| </ | </ | ||
en-us_commands/reference/ipidreset.1788796400.txt.gz · Last modified: by 127.0.0.1
