Hi Rania,
Can you share some more information on how you have the motor connected, how you are currently controlling it etc. It is hard to help without those sorts of details.
Nick
--
http://nodered.org
Join us on Slack to continue the conversation: http://nodered.org/slack
---
You received this message because you are subscribed to the Google Groups "Node-RED" group.
To unsubscribe from this group and stop receiving emails from it, send an email to node-red+u...@googlegroups.com.
To post to this group, send email to node...@googlegroups.com.
Visit this group at https://groups.google.com/group/node-red.
To view this discussion on the web, visit https://groups.google.com/d/msgid/node-red/59f6ca90-2b4b-4efc-af4f-e30c39b708d5%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
[{"id":"60ac769a.ac25f8","type":"inject","z":"d4374576.4fa988","name":"","topic":"Test input","payload":"test","payloadType":"str","repeat":"","crontab":"","once":false,"x":124.83334350585938,"y":634.3334045410156,"wires":[["41e3d0a1.f3152","bdf0a359.628b2"]]},{"id":"6c02a7fe.01bcb8","type":"rpi-gpio out","z":"d4374576.4fa988","name":"Motor Pin 1","pin":"16","set":true,"level":"0","out":"out","x":1070.6665954589844,"y":521.6667022705078,"wires":[]},{"id":"9814fdaf.55dfa","type":"rpi-gpio out","z":"d4374576.4fa988","name":"Motor Pin 2","pin":"18","set":true,"level":"0","out":"out","x":1052.6665954589844,"y":614.6667022705078,"wires":[]},{"id":"41e3d0a1.f3152","type":"switch","z":"d4374576.4fa988","name":"cond.Input","property":"payload","propertyType":"msg","rules":[{"t":"eq","v":"test","vt":"str"},{"t":"eq","v":"real input from ultrasonic sensor","vt":"str"}],"checkall":"true","outputs":2,"x":342.8333740234375,"y":625.0001525878906,"wires":[["2a490a67.a12f96","379ab74a.0afaf8","287df60c.e1166a","e0e184b4.cde848","df4b6969.c12798"],[]]},{"id":"2a490a67.a12f96","type":"function","z":"d4374576.4fa988","name":"0","func":"msg.payload= \"0\";\nreturn msg;","outputs":1,"noerr":0,"x":654.6665954589844,"y":685.6667175292969,"wires":[["6c02a7fe.01bcb8"]]},{"id":"379ab74a.0afaf8","type":"function","z":"d4374576.4fa988","name":"speed 20","func":"msg.payload= \"20\";\nreturn msg;","outputs":1,"noerr":0,"x":680.6665954589844,"y":724.6667175292969,"wires":[["2e5558e1.a470a8"]]},{"id":"287df60c.e1166a","type":"function","z":"d4374576.4fa988","name":"1","func":"var one= 1;\nmsg.payload = one;\nreturn msg;","outputs":1,"noerr":0,"x":654.8333435058594,"y":641.3333969116211,"wires":[["9814fdaf.55dfa"]]},{"id":"2e5558e1.a470a8","type":"rpi-gpio out","z":"d4374576.4fa988","name":"Motor Speed (PWM)","pin":"16","set":"","level":"0","out":"pwm","x":1067.6665954589844,"y":696.6667175292969,"wires":[]},{"id":"e0e184b4.cde848","type":"delay","z":"d4374576.4fa988","name":"","pauseType":"delay","timeout":"10","timeoutUnits":"seconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"x":481.83331298828125,"y":847.0000915527344,"wires":[["88b7ed33.34008"]]},{"id":"88b7ed33.34008","type":"function","z":"d4374576.4fa988","name":"0","func":"var one= 0\nmsg.payload = one;\nreturn msg;","outputs":1,"noerr":0,"x":644.6665954589844,"y":888.3334045410156,"wires":[["9814fdaf.55dfa"]]},{"id":"df4b6969.c12798","type":"delay","z":"d4374576.4fa988","name":"","pauseType":"delay","timeout":"10","timeoutUnits":"seconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"x":464.6665954589844,"y":919.6667175292969,"wires":[["f0dc26ce.e46728"]]},{"id":"f0dc26ce.e46728","type":"function","z":"d4374576.4fa988","name":"1","func":"var one= 1\nmsg.payload = one;\nreturn msg;","outputs":1,"noerr":0,"x":647.6665954589844,"y":936.6667175292969,"wires":[["6c02a7fe.01bcb8"]]},{"id":"bdf0a359.628b2","type":"delay","z":"d4374576.4fa988","name":"","pauseType":"delay","timeout":"10","timeoutUnits":"seconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"x":479.8333435058594,"y":978.3334655761719,"wires":[["f43f07a5.1ad238"]]},{"id":"f43f07a5.1ad238","type":"function","z":"d4374576.4fa988","name":"speed 45","func":"msg.payload= \"45\";\nreturn msg;","outputs":1,"noerr":0,"x":676.6665954589844,"y":985.6667175292969,"wires":[["2e5558e1.a470a8"]]}]