ArduinoCommander : PWM JavaScript generator

ArduinoCommander: PWM JavaScript generator

With "PWM JavaScript generator" advanced feature you can use all JavaScript power in order to get PWM output you wish. Type JavaScript script body and use it to generate PWM output dynamically.

Usage:

  • Type script title (is used as display name)
  • Type JavaScript script body

Script body should contain "generate" function that return float values between 0 and 255 (0v and 5v output). The function is invoked in infinite loop and delay between invocation depends on device performance. The script is validated on "OK" button click.

Get further information on Rhino documentation page.

Example: (generates sin output between 0v and 5v with period 5 seconds)

function generate() {

  return 127 + 127 * Math.sin(

    new Date().getTime() / 5000 * 2 * Math.PI);

}


You can try this feature for 10 seconds after pin mode set or purchase and use without limitations.  

PS. It's very comfortable to use this feature with "save and load pins configuration" feature.

© 2002-2013. Anetto Software.