Ĭhanging the sign of k we can reverse the control. Expressing that position from the formula above we get Where mout = 0.5 × (aout + bout) – servo’s middle position x’out – desired servo position taking into account end points defined by user. Let’s define a coefficient to adjust end points for the channel with servo Xout = aout + xin × (bout – aout) / 1023. If we take minimal and maximal digital levels of voltage being measured on a potentiometer then ain = 0, bin = 1023, and we can simplify the formula Xout = aout + (xin – ain)× (bout – aout) / (bin– ain). Then the dependency between stick xin and servo xout position is Let’s assume we have to control a servo on some channel and define end points of stick and servo as shown on Fig. In what way should they be stored? Here I have some math. What has to be stores as “user settings”? According to requirement list above these are end points and reversals for each channel.
![rc helicopter simulator pc without radio rc helicopter simulator pc without radio](https://i.ytimg.com/vi/0NGVghYMmfk/hqdefault.jpg)
Providing healthy EEPROM (which has limited number of rewrite cycles) at next turning on the transmitter will find the key and restore user settings. If its value differs from the one defined by user it means that settings have not been saved ever before and now it is time to write their default values as well as proper key. There are no any outstanding features here so I will not consider it in detail.ĮEPROM – to provide saving user’s settings into microcontroller’s memory.There is a feature here: just after the transmitter has been turned on the program checks a certain byte in memory (let’s call it the key ). In additionto VMETER.h, PIEZO.h, ENC.h standard libraries were also used: Int getPos(void) - returns the encoder’s position.
![rc helicopter simulator pc without radio rc helicopter simulator pc without radio](https://cdn.cloudflare.steamstatic.com/steam/apps/1070820/ss_3998d6589510ad27001347731bc09eb27dfe5e24.1920x1080.jpg)
![rc helicopter simulator pc without radio rc helicopter simulator pc without radio](https://www.robitronic.com/files/produktbilder/AccuRC/AccuRC_2014_10_02_09_25_13.png)
#RC HELICOPTER SIMULATOR PC WITHOUT RADIO PRO#
![rc helicopter simulator pc without radio rc helicopter simulator pc without radio](https://www.rchelicopterfun.com/images/AccuRC_SAB_500pics.jpg)
Then I defined basic functionality of the device: