# Increasing the number of objects being drawn for a command

**URL:** https://discourse.processing.org/t/increasing-the-number-of-objects-being-drawn-for-a-command/16026
**Category:** Electronics (Arduino, etc.)
**Created:** [December 1, 2019, 10:52pm UTC](https://discourse.processing.org/t/increasing-the-number-of-objects-being-drawn-for-a-command/16026 "2019-12-01T22:52:05Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![richardw1102](https://avatars.discourse-cdn.com/v4/letter/r/b2d939/32.png) [@richardw1102](https://discourse.processing.org/u/richardw1102)
#### Post date: [December 1, 2019, 10:52pm UTC](https://discourse.processing.org/t/increasing-the-number-of-objects-being-drawn-for-a-command/16026/1 "2019-12-01T22:52:05Z")

</div>

I am creating the game pong on processing, I would like to increase or add more balls if a button is pressed (currently have it running through arduino). I have the values being read over to processing however whenever I wright my if statement (if Button == 255) … the balls are added however when let go of the button they are removed. How do i keep the balls on the screen when remove my finger off the button?

---

<div class="post-metadata">

### Author: ![Lexyth](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/lexyth/32/7403_2.png) [@Lexyth](https://discourse.processing.org/u/Lexyth)
#### Post date: [December 1, 2019, 11:09pm UTC](https://discourse.processing.org/t/increasing-the-number-of-objects-being-drawn-for-a-command/16026/2 "2019-12-01T23:09:34Z")

</div>

Please don‘t post duplicates.

---

<div class="post-metadata">

### Author: ![jeremydouglass](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/jeremydouglass/32/20_2.png) [@jeremydouglass](https://discourse.processing.org/u/jeremydouglass)
#### Post date: [December 19, 2019, 7:12pm UTC](https://discourse.processing.org/t/increasing-the-number-of-objects-being-drawn-for-a-command/16026/3 "2019-12-19T19:12:31Z")

</div>


