Intel® Makers
Intel® Edison, Intel® Joule™, Intel® Curie™, Intel® Galileo
Announcements
Welcome - This is a Peer-to-Peer Forum only. Intel has discontinued these products but you may find support from other customers on this Forum
9881 Discussions

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

idata
Community Manager
1,339 Views

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
157 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
158 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
Reply