I have done a bit of googleing, and read a bit around the forum, trying to find out how i can read a pwm signal,
i would like to read the pwm output on an rc channel, and then control a fan when the output is lower than 1100 say, in order to stop a motor getting hot when there is no airflow,
it would be cool to use an arduino to do this based on the fact i have a few lying around, and that i could easily make up some funky throttle curves etc for an old rc handset that doenst have that ability.
I have found that pulseIn can be used, but i havent been able to find any example code or anything related to RC gear, does anyone have any pointers?
Just read the values and then print them out. Then you can see the range you get and you know what numbers to use in the map statement to convert it to the values you want.
Well the led on pin 13 is now being successfully controlled by channel one on my RC set without noticebly slowing the code,
I think I have the bug, this is going to be one of those projects that will take a lot of sleepy time out of my nights,
This car is controlled through Arduino, using more or less the same code. The arduino listens to what I want the car to do, then reads a gyroscope and decides whether to let me control the car or intervene if its rotating faster than the code thinks it should be i.e. spinning out. It does this about 100 times per second you should recognise most of the code from the other links.
i have another question which might be resolved in your code,
but how can i control the servo via the arduino? i mean i have a led, with a 0-255 pwm signal based on stick position, so i have effectivly got a dimmer ,its all nice an all, but i want to know if i can manipulate the original servo pwm signal and then send it out to the servo, i know its possible with arduino because there are arduino based UAV´s all over the show,
well , i have read through the servo library notes, and it looks pretty easy to use,
Im assuming that with the last bit of code the prints out the pwm signal to serial, i cna just put that value onto the write statement and get direct control over the servo based on the stick position,
i think thats a good way to startout experimentation.
I was going to try and build some acceleration curves into the programming to allow less wheel spin in loose ground or rain, but i just ordered an Rx for my good handset, so that plan is probly not worth persuing anymore,
I am however incredibly interested in your example of the ESP for the rc car. did you get it working well ?
well, I have the servo moving according to the stick position, and my pwm controlled led working at the same time, so that prooves that i can do more than just split the servo signal with a y cable and control other stuff accodringly, now i can try my hand at amking some crude throttle curves etc,
do you have a good link to how to use the gyro ? i have a wii motion plus iic gyro sat around after taking it out of a cuad build, maybe i can use that,