Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Can the Arduino PID library Output negative numbers?

Status
Not open for further replies.

Justinli

Member level 4
Joined
Apr 29, 2021
Messages
76
Helped
0
Reputation
0
Reaction score
2
Trophy points
8
Activity points
413
Can the Arduino PID library Output negative numbers?
 

Hi,

I guess you already did read the according documentation....

How are the input and output variables defined? This should give at least a clue

Klaus
 

The variables are declared as signed, double, however there is a basic example
using a PWM as output, which one would think is unsigned...In example .ino
file I see no casting to unsigned.

Take a look at C code in library....


Regards, Dana.
 

The sample program in the PID library that I use has no negative numbers.
I heard that it can be done by modifying the library file.
 

Hi

It says "double", which is floating point. It always is with negative

Klaus
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top