APS Excellence in Physics Education Award
November 2019

Education Prize Logo
Science SPORE Prize
November 2011

NSF Logo
The Open Source Physics Project is supported by NSF DUE-0442581.

Arduino DC Motor controlled by EJS

Return to the EJS Modeling forum
Login to post to this thread

Arduino DC Motor controlled by EJS
Mirka Kouka
5 Posts

Hello,

I want to control the speed of a DC Motor using the arduino element of the EJS.

In the Initialization page I have the following command: arduino.setDigitalMode(9,3); which according to the documentation sets the mode of a digital pin 9 to PWM.

Then in the fixed relations page I have the command: arduino.writeDigital(9,speed); where speed is an integer variable with values between 0 and 255.

I get a compilation error by this second command "Some messages have been simplified; recompile with -Xdiags:verbose to get full output"

Does anyone know what's wrong with my code?

Thank you!


Current Replies - View all
Re: Arduino DC Motor cont...   (Francisco Esquembre - )
Re: Re: Arduino DC Motor ...   (Mirka Kouka - )
OSP Projects:
Open Source Physics - EJS Modeling
Tracker
Physlet Physics
Physlet Quantum Physics
STP Book