Shop Learn P1 Docs P2 Docs
increment/decrement in BlocklyProp — Parallax Forums

increment/decrement in BlocklyProp

Does anyone how to write a project/program that will increment and decrement leds using BlocklyProp? Thanks in advance.

Comments

  • You mean turn on and off LEDs in sequence?

  • Here is my solution. Terminal was used to debug. I only turned one LED at a time, as to prevent too much amperage frying the prop. I did that once. You can easily change the start and end LEDs.

  • @Capdiamont said:
    to prevent too much amperage frying the prop. I did that once.

    How are you connecting your LEDs? You should definitely be able to turn on all those LEDs at once, as long as the total current through Vdd (or Vss) doesn't exceed 300 mA and the max current through any I/O doesn't exceed 40 mA, as stated in §7.1 of the datasheet. So if you choose resistors to limit the current to each of your 17 your LEDs to 10 mA, you'll still have 130 mA (= 300 - 17*10) to budget for the core and any other I/O, which should be plenty.

  • I don’t remember what I did years ago to burn the prop up. OP wanted an example how to do it, so I created a fairly simple and flexible way. I don’t know how many pins they wanted. I had in my mind, all kinds of effects, but resisted that urge to help out the OP.

Sign In or Register to comment.