Skip to content

Commit d4372b1

Browse files
committed
0.1.2 PID_RT
1 parent e83ffeb commit d4372b1

File tree

8 files changed

+31
-5
lines changed

8 files changed

+31
-5
lines changed

libraries/PID_RT/PID_RT.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,15 @@
11
//
22
// FILE: PID_RT.h
33
// AUTHOR: Rob Tillaart
4-
// VERSION: 0.1.1
4+
// VERSION: 0.1.2
55
// PURPOSE: PID library for Arduino
66
// URL: https://github.com/RobTillaart/PID
77
//
88

99

1010
#include "PID_RT.h"
1111

12+
1213
PID_RT::PID_RT()
1314
{
1415
reset();
@@ -140,4 +141,5 @@ bool PID_RT::setInterval(uint32_t interval)
140141
return false;
141142
}
142143

144+
143145
// -- END OF FILE --

libraries/PID_RT/PID_RT.h

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,14 @@
22
//
33
// FILE: PID_RT.h
44
// AUTHOR: Rob Tillaart
5-
// VERSION: 0.1.1
5+
// VERSION: 0.1.2
66
// PURPOSE: PID library for Arduino
77
// URL: https://github.com/RobTillaart/PID_RT
88

9+
910
#include "Arduino.h"
1011

12+
1113
class PID_RT
1214
{
1315
public:
@@ -87,4 +89,5 @@ class PID_RT
8789
bool _POI = true; // Proportional On Input - Error
8890
};
8991

92+
9093
// -- END OF FILE --

libraries/PID_RT/README.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,17 +7,20 @@
77

88
Arduino library for PID controller
99

10+
1011
## Description
1112

1213
The PID_RT class allows the user to instantiate a PID controller.
1314

15+
1416
## Interface
1517

1618
### Constructor
1719

1820
- **PID_RT()** minimal constructor.
1921
- **PID_RT(float sp, float Kp, float Ki, float Kd)** constructor that sets minimal parameters to get started.
2022

23+
2124
### Core
2225

2326
- **void reset()** resets internals to startup.
@@ -27,12 +30,14 @@ The PID_RT class allows the user to instantiate a PID controller.
2730
- **float getOutput()** get the last calculated output value.
2831
- **bool setK(float Kp, float Ki, float Kd)** Set the initial P I D parameters as a group.
2932

33+
3034
### Start Stop
3135

3236
- **void start()** // enable the PID controller to compute new output values.
3337
- **void stop()** disable the PID controller **compute()**.
3438
- **bool isRunning()**
3539

40+
3641
### Additional parameters
3742

3843
- **bool setInterval(uint32_t interval)** set the interval between 2 **compute()** calls. Returns **true** if changed, otherwise **false**.
@@ -53,6 +58,7 @@ The PID_RT class allows the user to instantiate a PID controller.
5358
- **bool isPropOnInput()** read back setting.
5459
- **bool isPropOnError()** read back setting.
5560

61+
5662
### debugging calls
5763

5864
Might be obsolete in future.
@@ -61,6 +67,7 @@ Might be obsolete in future.
6167
- **float getLastError()** read the last error.
6268
- **uint32_t getLastTime()** read the last.
6369

70+
6471
## Operations
6572

6673
See examples.

libraries/PID_RT/examples/PID_basic/PID_basic.ino

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
// connect a potmeter to A0
1212
// play :)
1313

14+
1415
#include "PID_RT.h"
1516

1617
PID_RT PID;
@@ -20,6 +21,7 @@ const int PWM_PIN = 3; // UNO PWM pin
2021
int op = 0;;
2122
float input = 0;
2223

24+
2325
void setup()
2426
{
2527
Serial.begin(115200);
@@ -34,6 +36,7 @@ void setup()
3436
op = analogRead(A0);
3537
}
3638

39+
3740
void loop()
3841
{
3942
input = analogRead(A0);
@@ -48,4 +51,5 @@ void loop()
4851
}
4952
}
5053

51-
// -- END OF FILE --
54+
55+
// -- END OF FILE --

libraries/PID_RT/keywords.txt

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,33 +3,40 @@
33
# Datatypes (KEYWORD1)
44
PID_RT KEYWORD1
55

6+
67
# Methods and Functions (KEYWORD2)
78
reset KEYWORD2
89
setPoint KEYWORD2
910
getSetPoint KEYWORD2
1011
compute KEYWORD2
1112
getOutput KEYWORD2
13+
1214
start KEYWORD2
1315
stop KEYWORD2
1416
isRunning KEYWORD2
17+
1518
setReverse KEYWORD2
1619
getReverse KEYWORD2
1720
setInterval KEYWORD2
1821
getInterval KEYWORD2
22+
1923
setOutputRange KEYWORD2
2024
getOutputMin KEYWORD2
2125
getOutputMax KEYWORD2
26+
2227
setK KEYWORD2
2328
setKp KEYWORD2
2429
setKi KEYWORD2
2530
setKd KEYWORD2
2631
getKp KEYWORD2
2732
getKi KEYWORD2
2833
getKd KEYWORD2
34+
2935
setPropOnInput KEYWORD2
3036
setPropOnError KEYWORD2
3137
isPropOnInput KEYWORD2
3238
isPropOnError KEYWORD2
39+
3340
getInput KEYWORD2
3441
getLastError KEYWORD2
3542
getLastTime KEYWORD2

libraries/PID_RT/library.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
"type": "git",
1616
"url": "https://github.com/RobTillaart/PID_RT"
1717
},
18-
"version":"0.1.1",
18+
"version": "0.1.2",
1919
"license": "MIT",
2020
"frameworks": "arduino",
2121
"platforms": "*"

libraries/PID_RT/library.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
name=PID_RT
2-
version=0.1.1
2+
version=0.1.2
33
author=Rob Tillaart <[email protected]>
44
maintainer=Rob Tillaart <[email protected]>
55
sentence=Arduino PID library

libraries/PID_RT/test/unit_test_001.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ unittest_setup()
2828
{
2929
}
3030

31+
3132
unittest_teardown()
3233
{
3334
}
@@ -97,6 +98,8 @@ unittest(test_compute)
9798
assertEqual(1, 1);
9899
}
99100

101+
100102
unittest_main()
101103

104+
102105
// --------

0 commit comments

Comments
 (0)