Home Forums EasyTransfer Library Support Forum Does this interfere with SPI?

Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
  • #2188

    Hey Bill, thanks so much for these libraries!


    I’m currently using a PS2 controller and arduino with a cheap RF tx along with the Easy Transfer Virtual Wire library to send integers such as stick positions and stuff to an RF rx connected to a Dagu Wild Thumper Motor controller (basically Arduino Nano Atmega 168). Everything seems to work great.

    However, I also want sound out of my robot so I purchased a Rugged Audio Shield (http://ruggedcircuits.com/html/rugged_audio_shield.html) that I figured I could drive with the processing power of the motor controller. So far I can get the motor controller functionality to work with the PS2 controller coming in wirelessly with the Easy Transfer Virtual Wire method, and I can get the Rugged Audio Shield to play audio files if I load the board specifically for that, but I can’t get them to both work.

    The Rugged Audio Shield uses the SPI library and I am using the ICSP pins on the motor controller board to interface with the shield. Does the ET library interfere with this functionality somehow? If I include the ET.begin(details(mydata)); line the audio shield stops working. Any ideas? Thanks so much!

    ////////////PS2 Input///////////////

    //start the library, pass in the data details


    // Initialise the IO and ISR

    vw_set_ptt_inverted(true); // Required for DR3100

    vw_setup(2000); // Bits per sec


    vw_rx_start();       // Start the receiver PLL running




    //////////Rugged Audio Shield///////////

    pinMode(SSpin, OUTPUT);








    Also, for the life of me I can’t figure out where I changed the pins for rx and tx. I currently have the tx coming from D3 on my arduino to the radio and on the receiver I have it set up for D9 as input, but I can’t find where I set these pins!


    My guess is you are running out of RAM. Does the code do anything else when the audio shield stops working, something to make sure the code is still running?


    Oh I think I figured it out. I was running some demo code which included a do while loop checking activity of the audio shield and never breaking to accept new input packets. Thanks, I still can’t figure out where you can change the data receive pin for the easy transfer virtual wire setup. I’m currently using D9 but I can’t figure out where I set that since I can’t see it referenced anywhere. Thanks for the help


    ah I was able to find a vw_set_rx_pin(7); function, however I’m not sure how the default was set.


    Oh no, new issue!

    Pins 5 and 6 are hardwired to an h bridge for pwm and pins 11 and 3 are hardwired to the other h bridge on the wild thumper.

    Since I’ve attached a Rugged Audio Shield to the board that uses SPI which needs pin 11 for MOSI I cut the pin 11 connection and was planning on using a different pin for pwm, but ran into a problem. I can’t get pwm out of pins 9 and 10 anymore because the Easy Transfer Virtual Wire library which uses timer1, thus disabling my pwm abilities on pins 9 and 10! Is there any way to regain PWM capabilities back to pins 9 and 10? Could I maybe get virtual wire to use timer2 instead and then have 9 and 10 available for pwm and cut the connection for the pin 3 h bridge and reroute? Thanks

    Pins 5 and 6: controlled by timer0
    Pins 9 and 10: controlled by timer1
    Pins 11 and 3: controlled by timer2


    This is a problem with the Virtual Library itself. I would not know how to change it. I suggest contacting the writers of Virtual Wire.

Viewing 7 posts - 1 through 7 (of 7 total)
  • You must be logged in to reply to this topic.