Wirelessly Controling a PWM reference Signal

Hey guys,

I hope someone may already have had a similar idea/issue. I want to create a PWM reference singal for a motor controller. The value of this reference signal should be sent wirelessly via a first wixel from my computer to the 2nd wixel. There a PWM signal corresponding to this value should be created and then be sent to the motor controller via the defined I/O-Pin.

So the first part of sending a value (byte or no.) from my computer via wixel_1 to wixel_2 is already existing with the wireless_serial app. There also is a PWM-app. But i miss the part where i can read the signal coming in on the RX-line of wixel_2, storing it in the RAM and then changing the PWM frequency according to it.

Does anyone know if this is easily feasible with just fusing the two already existing apps or will this be a major issue to programm?

If I do have to do it by myself, can someone point me into the right direction. How can I read a e. g. number, which is transmitted over the USB-line of wixel_1, then transmitted wirelessly to wixel_2, and store this in the RAM of wixel_2. If i could do that the rest would be a piece of cake (at least according to my imagination :smiley: ). But I could not manage to do that until now… and I have already spent quite some hours just to read myself into the material.

Thank you very much in advance for your advice.

Cheers

Hello.

You should be able to make a modified version of the wireless serial app that sends a PWM signal based on data it receives over the radio. In case it is hard for you to locate the parts of the code that read data from the radio, you should look for the code that calls radioComRxReceiveByte(). If the Wixel is in UART-to-Radio mode then that code can be found in the uartToRadioService function. Be sure to read the documentation of radioComRxReceiveByte and the radio_com library so you can understand when it is OK to call that function. That documentation can be found here:

pololu.github.io/wixel-sdk/

You might also want to look at how the shiftbrite app works; it receives commands over the radio and translates them into signals for shiftbrite LED controllers.

–David