Post Reply 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
RC Control for B-Robot
03-13-2020, 06:26 PM
Post: #11
RE: RC Control for B-Robot
Thanks for your patience, but it doesn't work at the moment. I've seen these values in the monitor

19:20:12.398 -> 137 239 1
19:20:12.398 -> 137 239 1

But it doesn't work nevertheless. After reading more and more code I've found this ...

int16_t chan[8] = {1100,1100,1100,1100,1100,1100,1100,1100}; // initialize to midpoint

Should this also be changed to 6 channels?
Find all posts by this user
Quote this message in a reply
03-13-2020, 06:52 PM
Post: #12
RE: RC Control for B-Robot
(03-13-2020 06:26 PM)Greengecko Wrote:  Thanks for your patience, but it doesn't work at the moment. I've seen these values in the monitor

19:20:12.398 -> 137 239 1
19:20:12.398 -> 137 239 1

But it doesn't work nevertheless. After reading more and more code I've found this ...

int16_t chan[8] = {1100,1100,1100,1100,1100,1100,1100,1100}; // initialize to midpoint

Should this also be changed to 6 channels?

No need to change this. It's just an array where the channels get stored. With 6 channels, two of these are just not used, but this won't cause any issues. I did verify the code works with a 6 channel receiver that I have (different from yours), and the only change needed was the one I already mentioned.

The throttle and steering variables are initialized to 125, then get overwriitten when there is valid data from the RC receiver. Since your variables are not 125, that indicates that the code is getting information from the receiver, which is good news.

In your debug window, do you see the data values change when you move the sticks? What is your channel mapping on your transmitter?
Find all posts by this user
Quote this message in a reply
03-13-2020, 07:36 PM
Post: #13
RE: RC Control for B-Robot
Yes it looks like that the receiver responds to some signals from the DX6, but not these I wish to have.

My channel mapping is:

1. Throttle
2. Aileron
3. Elevator
4. Rudder
5. Gear
6. AUX

I've tried a lot of mappings, but at the moment I can't find the issues...
Find all posts by this user
Quote this message in a reply
03-13-2020, 07:53 PM
Post: #14
RE: RC Control for B-Robot
(03-13-2020 07:36 PM)Greengecko Wrote:  Yes it looks like that the receiver responds to some signals from the DX6, but not these I wish to have.

My channel mapping is:

1. Throttle
2. Aileron
3. Elevator
4. Rudder
5. Gear
6. AUX

I've tried a lot of mappings, but at the moment I can't find the issues...

OK, sounds like your mapping is the same as mine. Then, in your debug window you should see:

The first value should change when you move the Elevator stick. At midstick it should be around 125.
The second value should change when you move the rudder stick. At midstick it should be around 125.

If this is not what you see, then if you describe which sticks are corresponding to the values in the debug window, we can try to figure out what's wrong. Is the third value changing at all? I'm not sure if you have the Gear channel mapped to a switch, but if you do, you can see if toggling the switch has any effect. Also, if the values are changing, what is the range you are seeing (min/max)?
Find all posts by this user
Quote this message in a reply
03-14-2020, 04:29 PM
Post: #15
RE: RC Control for B-Robot
Sorry for the late answer, yesterday I had to stop my searching the bug because I had to go to work.
Today, good news. The Robot corresponds to my receiver like it should be. The issue was a fucking little problem in the disciption of the receiver, it's not a 6CH receiver, it is a 7CH receiver. In the menu of the DX6 I saw a entry with telemetry data and this had opened my eyes to try it with 7CH in the code and it worked. Now the serial monitor shows the values when I move the sticks around.

Only one little problem, the robot is not standing still, after turning on it is moving slowly forward, but I think this is only a problem with trims and subtrims. I will try it later and let you know.

You could add this receiver to your list of tested receivers....
Find all posts by this user
Quote this message in a reply
03-14-2020, 05:44 PM
Post: #16
RE: RC Control for B-Robot
(03-14-2020 04:29 PM)Greengecko Wrote:  Sorry for the late answer, yesterday I had to stop my searching the bug because I had to go to work.
Today, good news. The Robot corresponds to my receiver like it should be. The issue was a fucking little problem in the disciption of the receiver, it's not a 6CH receiver, it is a 7CH receiver. In the menu of the DX6 I saw a entry with telemetry data and this had opened my eyes to try it with 7CH in the code and it worked. Now the serial monitor shows the values when I move the sticks around.

Only one little problem, the robot is not standing still, after turning on it is moving slowly forward, but I think this is only a problem with trims and subtrims. I will try it later and let you know.

You could add this receiver to your list of tested receivers....

Great!! Glad to hear you got it figured out. Big Grin

Yes, since the receiver interface is analog, you may need to use subtrim to set the zero points. I had that issue with one receiver.
Find all posts by this user
Quote this message in a reply
03-14-2020, 09:06 PM
Post: #17
RE: RC Control for B-Robot
Is it possible to change NORMAL/PRO mode like the smartphone interface?
Find all posts by this user
Quote this message in a reply
03-14-2020, 09:18 PM (This post was last modified: 03-15-2020 12:55 AM by closedsink.)
Post: #18
RE: RC Control for B-Robot
(03-14-2020 09:06 PM)Greengecko Wrote:  Is it possible to change NORMAL/PRO mode like the smartphone interface?

Sure, but you can just do that with dual rates in your transmitter. That's what I did. I set a switch that would limit the travel to 50% for throttle/steering in that case.
Find all posts by this user
Quote this message in a reply
03-28-2020, 10:40 PM (This post was last modified: 03-28-2020 10:48 PM by Greengecko.)
Post: #19
RE: RC Control for B-Robot
Now all is going pretty well. The last days were no time to write, but printed some things for the robot. I've added a LED lightbar, regular for a rc car and added a little Neopixel stripe with 3 LEDs. Actually my code is only for a static color, in my case green, but I hope you like my idea and we could create a code to show the LIPO power with colors from green for a fully charged battery, yellow, orange to red for a low battery. Do you like my idea?

This is the lightbar
https://www.thingiverse.com/thing:2829120

And the bumper
https://www.thingiverse.com/thing:3427987


Attached File(s) Thumbnail(s)
   
Find all posts by this user
Quote this message in a reply
04-01-2020, 10:27 AM
Post: #20
RE: RC Control for B-Robot
Cool! We are printing the parts :-D
We can adjust the code so the leds indicate the battery status. Good idea! How are you connecting the LED strip?
Visit this user's website Find all posts by this user
Quote this message in a reply
Post Reply 


Forum Jump:


User(s) browsing this thread: 1 Guest(s)