Software > Software

PID algorithm

<< < (2/4) > >>

[email protected]:
@ briselec so sud i put that function directly in d loop

[email protected]:

--- Quote ---[Are you also sure that high/low really corresponds to over the line / off the line?]]


what do u mean ???
i dint get it ...?
--- End quote ---

jkerns:

--- Quote ---Are you also sure that high/low really corresponds to over the line / off the line?]]


what do u mean
i dint get it ...?
--- End quote ---

Does the sensor read high when it is over the line and low when it is not? Or does it read low (or high) all the time? Does it really detect the line?

Connect an LED and write the code to turn it on when a sensor is in the high state and off when it is low. Move your robot across the line. Does the LED go on and off when it should?

(I missed the problem with the position variable not being passed to the main when I looked at your code.)

[email protected]:

--- Quote ---[/Does the sensor read high when it is over the line and low when it is not? Or does it read low (or high) all the time? Does it really detect the line?]
yes i m sure it detects the line when its over d line.....
--- End quote ---

[email protected]:


--- Quote ---[Connect an LED and write the code to turn it on when a sensor is in the high state and off when it is low. Move your robot across the line. Does the LED go on and off when it should?]

there is an led already.....
--- End quote ---

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version