Balance robot PID understanding
hello all, i have been struggling part of pid code below. having hard time understandung how "out" part of pid drives motors setpoint. in code below the" out " mentioned once in code. (being new arduino) have expected see "out = drive(0,0);" to drive motors setpoint. said "out" mentioned once(except return). maybe missing has been starring me in face whole time. my goal use pid other fun things , learn. understand there other pid examples, , tutorials out there learn from, dead set understand one so if wanted make code measured how hot 1 of sensers(reading) is, , cool down. , temp wanted (target). and if used fan (out) cool down. part of pid below used drive motor of fan target temp? for of easy explaination, , appreciate can move forword. code: [select] #include "i2cdev.h" #include "mpu6050_6axis_motionapps20.h" //#include "mpu6050.h" // not necessary if using motionapps include file...