This snippet is valid for landscape mode in phonegap 1.7 and below (tested personally). Newer versions of phonegap return random accelerometer data breaking your game. Appmobi treats accelerometer data in a different way, CocoonJS does not seem to have accelerometer support yet (@ludei am I wrong?).
global variable accangle = 0
global variable deadzone = 15
every tick -> set accangle to clamp(-int(touch.beta/10),-75,75)
accangle > deadzone -> simulate platform pressing right
accangle < -deadzone -> simulate platform pressing left
Note: this is a really basic implementation. You may try to adjust at runtime the speed of your charachter and make it dependent from the accangle variable, but I have to warn you... it's a tricky task. The main risk is that your control system will become framerate dependent ruining your gameplay.