Pulse h bridge with xbee and DeviceCloud

I’m really stuck trying to figure out how to pulse an h bridge to control a latching solenoid. I can set the pins for polarity and then I figure I should use a PWMA pin at %100 duty for 500 ms (or thereabout) to activate the solenoid. I know I’m probably making this too complicated. I just can’t get my brain around it.

I greatly appreciate any advice.

I’ll post an answer to my own question since I figured it out… I used do_command and set_setting with the following:

       5
       4
       5
       5
      
    Wait 1
      
       4
       4

I didn’t know I could use a wait.

Hopefully this will help someone since I could not find an answer anywhere.