Possible to control DEVO 10 using PC via USB?

More
12 Jun 2013 13:41 #10846 by vo
Hello, it's my first time here.

I have a project where I would like to autonomously control an aircraft from my ground PC. The aircraft is bound to a DEVO transmitter, so I figured it would be really cool to be able to plug that DEVO transmitter into my PC via USB and send it serial "stick position" commands which in turn control the aircraft. Essentially, using the PC as the "trainer", and then if something doesn't work right I can override the PC by flicking a switch on the DEVO transmitter.

Just wanted to get an idea if this is something that makes sense to do? Is there a better way to achieve the same results? Has someone done this before? I will be happy to share my source code if I am successful :)

Please Log in or Create an account to join the conversation.

More
12 Jun 2013 14:01 #10847 by PhracturedBlue
Replied by PhracturedBlue on topic Possible to control DEVO 10 using PC via USB?
You can do this using a USB->UART converter plugged into the serial port (using the nightly builds)
Also, I just added the ability to use your Tx as an HID device. It may be possible to reverse that code and send data to the Tx, but it isn't something I'm planning to work on.

Please Log in or Create an account to join the conversation.

More
12 Jun 2013 14:07 #10849 by vo
Thanks for the response, I think I saw some threads about using the trainer port as a USART here on the forum so I may give it a shot.

Is that the UART you're talking about or is there another one available on most DEVO Tx? I have a DEVO 10.

Please Log in or Create an account to join the conversation.

More
12 Jun 2013 14:07 #10850 by FDR

PhracturedBlue wrote: You can do this using a USB->UART converter plugged into the serial port (using the nightly builds)

Really? How can you send commands to the tx?

Now that deviation has PPM in, my other idea would be to use the audio output of the PC to send PPM to the trainer port, just like Walkera's Android app does to the Magic Cube...

Please Log in or Create an account to join the conversation.

More
12 Jun 2013 14:20 #10852 by PhracturedBlue
Replied by PhracturedBlue on topic Possible to control DEVO 10 using PC via USB?
No FDR is right, I have no idea what I was thinking. Of course you can't send commands via the UART today. My mind seems to be in the cloud. Sorry for getting your hopes up.
Still, it should be possible to transmit via the HID interface I just set up by extending its definition and hooking into the ppmin code.

Please Log in or Create an account to join the conversation.

More
12 Jun 2013 14:40 - 12 Jun 2013 14:58 #10854 by vo
So to clarify, I couldn't possibly write code for Deviation that would allow the use of a pin on the trainer port (GPIO_USART1_RX) as an input?

It seems you could just do something like this in usart_setup():
nvic_enable_irq(NVIC_USART1_IRQ);
gpio_set_mode(GPIO_BANK_USART1_RX,GPIO_MODE_INPUT,GPIO_CNF_INPUT_FLOAT, GPIO_USART1_RX);
usart_set_mode(USART1, USART_MODE_TX_RX)
USART_CR1(USART1) |= USART_CR1_RXNEIE;

Then you should be able to implement the interrupt handler for RX to handle commands from the USART right?
Last edit: 12 Jun 2013 14:58 by vo.

Please Log in or Create an account to join the conversation.

More
12 Jun 2013 15:29 #10857 by PhracturedBlue
Replied by PhracturedBlue on topic Possible to control DEVO 10 using PC via USB?
There is PPMIn as FDR mentioned. so you could use your audio-out headphone jack to generate a PWM signal that gets read into Deviation as a signal. That is supported (though I don't know if such an audio program exists for the PC)
Currently the code works by converting the Tx pin to work as an input for the PWM signal. The reason is that on the Devo8, the Rx pin is not connected to the audio jack. I believe the Devo10 is different in this regard though.

Please Log in or Create an account to join the conversation.

More
12 Jun 2013 15:36 #10858 by vo
I will try with the DEVO 10 to see if I can receive data via the RX pin and I will report my results here.

Please Log in or Create an account to join the conversation.

Time to create page: 0.050 seconds
Powered by Kunena Forum