#Drone using Raspberry PI 5 as flight controller, with radiomaster pocket and elrs.

1 messages · Page 1 of 1 (latest)

tulip galleon
#

I have no idea where to look for help anymore, maybe here ?
I've been testing different variables for 3 weeks now and still something is wrong, like I don't fully understand how data transfer works.
I was thinking of building a drone based on raspberry pi and pwm signals for my thesis. However, I am stuck on decoding channels from the radiomaster pocket. Most work fine, but I have a problem with channels 13 and 14, which send values at 880ms, outside my control range. Because I am using the 1000ms - 2000ms range (default is 988 - 2012) to generate pwm signals to esc. I don't even have a clue what these channels are for, I've probably clicked through all the settings and these values never change. I've tried truncating the receive channels in python but then the array changes and instead of leaving my 4 it leaves channels 13,14,15,16 which I don't know what they are for anyway.
I am using mode 2: ch1: rud, ch2- throttle, ch3- elevator, ch4- ail (RTEA)
Activity structure: Radiomaster pocket - ELRS to happymodel txco - following uart serial line to Raspberry PI, then converting values in ms to gpiozero values. I tried assigning a button to channel 13 for example, e.g. ‘SA’, which takes values from 1000ms(LOW) - 2000ms(HIGH), but in the terminal it is still at its 880ms.

Decoded channel values: from channel 1 do channel 16 [1500, 999, 1500, 1500, 999, 1503, 1503, 1503, 1503, 1503, 1503, 1503, 880, 880, 2012, 1411]

velvet timberBOT
# tulip galleon I have no idea where to look for help anymore, maybe here ? I've been testing di...

✨AI-Generated response✨

Channels 13 and 14 are likely AUX channels, not the main stick channels (1-4). The value of 880ms you are seeing might be the default "low" value for these AUX channels. ExpressLRS supports up to 16 channels, with channels 1-4 being the main stick channels and channels 5-16 being AUX channels.

The behavior of AUX channels depends on the Switch Modes configuration. It's likely you are using "Hybrid" or "Wide" mode where AUX channels update at a slower rate than the main stick channels.

To control AUX channels effectively, you need to configure your radio's mixer and understand how the selected switch mode maps AUX channels. You may need to assign switches or pots to those AUX channels in your radio's mixer to see their values change. For finer control over channels 5-16 you may need to use "Wide" switch mode.


If this wasn't helpful, please follow up in #help-and-support for ELRS help or #general-quad-help for other things.
-# {'cause': 'thread creation'}

dim oriole
#

So you're using a crsf decoder on the pi? Do you need all 16 channels?

#

Why not simply ignore them in your code?

robust bough
#

True though, ignoring them sounds like a good idea. When I intercepted the rx to fc connection with raspberry pi to modify the rx input, channels 13 to 16 were gibberish all the time. Dunno why to this day. Hopefully you just don't need channels 13 and 14, and if you don't, continue on

dim oriole
#

They are only used in some of the Full Res switch modes, the rest of the time they should be at crsf minimum

#

See the info the bot gave

#

@marble mural what channels are sometimes used for link stats, and in what switch modes?

#

Is it ch11/12?

marble mural
#

Aux11/12

#

Ch 15/16

#

!modes

tulip galleon
#

I tried to cut channels `def unpack(packedValues: list[int]):

 if len(packedValues) == 22:
     
     bitString = ''.join(f'{byte:08b}' for byte in packedValues)
     
     #
     for i in range(16):
         startBit = i * 11
         endBit = startBit + 11
         rawValue = int(bitString[startBit:endBit], 2)  
         rcChannelValues[i] = int((rawValue * 5) / 8 + 1500)  
 else:
     print('error: Frame payload less than 22 baits!')``` but,  it printed me channels 13,14,15,16 idk why. tommor I'll  again
dim oriole
robust bough
tulip galleon
#

its not full code,

dim oriole
tulip galleon
tulip galleon
dim oriole
#

!lua

velvet timberBOT
# dim oriole !lua

✨AI-Generated response✨

To use the Lua script, you will first need to install it on your radio. You can find the instructions and download link in the Lua Script documentation.


If this wasn't helpful, please follow up in #help-and-support for ELRS help or #general-quad-help for other things.
-# {'cause': 'context menu answer', 'triggering_user': 'hyp0dermik_44282'}

tulip galleon
#

I have changed the frequency to 100hz FULL and switch mode to 16CH RATE/2 and surprisingly it is fine, no junk channels, when set to 8ch no data has been picked up or I can't do it. I continue to have a problem with pwm on esc but that's another topic. Thank you for your help.