Community
cancel
Showing results for 
Search instead for 
Did you mean: 
idata
Community Manager
1,262 Views

Can servo motor be controlled without grove module using Intel XDK Iot Edition?

Jump to solution

If I can program it using Intel XDK Iot Edition, how can I program it. What should I import? Can you please paste the code. Thank you!

0 Kudos
1 Solution
idata
Community Manager
80 Views

Hi R@niel,

 

 

If you are using the XDK, you can use the MRAA library to manage the PWM pins on Edison. There is, in the XDK, an example code that shows how to use the Edison PWM using the MRAA library. I recommend you to check it.

 

 

Additionally, in the following site, there are a couple of example codes for servo motors that use MRAA, however the example codes are for Python: https://github.com/MakersTeam/Edison/tree/master/Python-Examples/Servo https://github.com/MakersTeam/Edison/tree/master/Python-Examples/Servo. You could check them and use them as a reference to write your own code in the XDK. Since the code is based on the MRAA library, you could adapt it to work on JavaScript easily.

 

 

Additional examples of MRAA can be found here: https://github.com/intel-iot-devkit/mraa/tree/master/examples/javascript https://github.com/intel-iot-devkit/mraa/tree/master/examples/javascript. The API documentation for JavaScript can be found here: http://iotdk.intel.com/docs/master/mraa/node/ http://iotdk.intel.com/docs/master/mraa/node/

 

 

Regards,

 

Diego

View solution in original post

1 Reply
idata
Community Manager
81 Views

Hi R@niel,

 

 

If you are using the XDK, you can use the MRAA library to manage the PWM pins on Edison. There is, in the XDK, an example code that shows how to use the Edison PWM using the MRAA library. I recommend you to check it.

 

 

Additionally, in the following site, there are a couple of example codes for servo motors that use MRAA, however the example codes are for Python: https://github.com/MakersTeam/Edison/tree/master/Python-Examples/Servo https://github.com/MakersTeam/Edison/tree/master/Python-Examples/Servo. You could check them and use them as a reference to write your own code in the XDK. Since the code is based on the MRAA library, you could adapt it to work on JavaScript easily.

 

 

Additional examples of MRAA can be found here: https://github.com/intel-iot-devkit/mraa/tree/master/examples/javascript https://github.com/intel-iot-devkit/mraa/tree/master/examples/javascript. The API documentation for JavaScript can be found here: http://iotdk.intel.com/docs/master/mraa/node/ http://iotdk.intel.com/docs/master/mraa/node/

 

 

Regards,

 

Diego

View solution in original post

Reply