en-us_commands:reference:ipiditermlimit
Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revision | |||
| en-us_commands:reference:ipiditermlimit [2026/09/08 00:53] – 바깥 편집 127.0.0.1 | en-us_commands:reference:ipiditermlimit [2026/09/14 20:30] (current) – external edit 127.0.0.1 | ||
|---|---|---|---|
| Line 14: | Line 14: | ||
| ===== Example ===== | ===== Example ===== | ||
| + | |||
| + | This example reads the raw A0 analog value (0–1023) on MPINO-16A8R8T for the PID calculation. It shows the result only in Serial Monitor and does not drive an output. Check the A0 voltage/ | ||
| <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, | + | IpidItermLimit(PID_ID, |
| - | IpidReverse(PID_ID, | + | |
| } | } | ||
| void loop() { | void loop() { | ||
| - | const float temperature | + | const float currentValue |
| - | if (IdigitalRead(0, | + | const float result |
| - | const float demand | + | |
| - | | + | delay(100); |
| - | IanalogWritef(0, 0.0F, 100.0F, lastDemand); // Map the user's floating-point value to the analog output range and output it. | + | |
| - | delay(20); | + | |
| } | } | ||
| </ | </ | ||
en-us_commands/reference/ipiditermlimit.1788796400.txt.gz · Last modified: by 127.0.0.1
