PWM Control of LED

A PWM control of an LED on BCM7, was developed for use with Simon Monk's RasPiRobot board but could be used with any circuit. Uses PWM and Raspberry Pi GPIO.

[{"id":"fde7314.d38d4d","type":"rpi-gpio out","z":"b73e866c.ea2e08","name":"LED 2 on BCM7","pin":"26","set":"","level":"0","out":"pwm","x":593,"y":81,"wires":[]},{"id":"216a7c2c.b2864c","type":"inject","z":"b73e866c.ea2e08","name":"Off","topic":"","payload":"0","payloadType":"num","repeat":"","crontab":"","once":false,"x":149,"y":79,"wires":[["fde7314.d38d4d"]]},{"id":"85150548.334f38","type":"inject","z":"b73e866c.ea2e08","name":"5%","topic":"","payload":"5","payloadType":"num","repeat":"","crontab":"","once":false,"x":162,"y":135,"wires":[["fde7314.d38d4d"]]},{"id":"db754534.4d67e","type":"inject","z":"b73e866c.ea2e08","name":"30%","topic":"","payload":"30","payloadType":"num","repeat":"","crontab":"","once":false,"x":165,"y":196,"wires":[["fde7314.d38d4d"]]},{"id":"7fc774f5.49ca3c","type":"inject","z":"b73e866c.ea2e08","name":"50%","topic":"","payload":"50","payloadType":"num","repeat":"","crontab":"","once":false,"x":167,"y":252,"wires":[["fde7314.d38d4d"]]},{"id":"c58e66c.40af618","type":"inject","z":"b73e866c.ea2e08","name":"100%","topic":"","payload":"100","payloadType":"num","repeat":"","crontab":"","once":false,"x":165,"y":310,"wires":[["fde7314.d38d4d"]]},{"id":"f3b7be45.4ccfd8","type":"comment","z":"b73e866c.ea2e08","name":"Pins","info":"** Notes: **\nYou can't have a pin in 2 flows\nIf you add a pin into a second flow with a different type then you'll need to restart node-red","x":564,"y":169.5,"wires":[]}]
Workshopshed

Flow Info

created 1 year ago

Node Types

Core
  • comment (x1)
  • inject (x5)
  • rpi-gpio out (x1)

Tags

  • PWM
  • LED
  • GPIO
  • PI
Copy this flow JSON to your clipboard and then import into Node-RED using the Import From > Clipboard (Ctrl-I) menu option