# Processing, raspberry pi and camera

**URL:** <https://discourse.processing.org/t/processing-raspberry-pi-and-camera/2027>\
**Category:** Processing for Pi\
**Created:** [July 23, 2018, 9:16pm UTC](https://discourse.processing.org/t/processing-raspberry-pi-and-camera/2027 "2018-07-23T21:16:27Z")\
**Posts on this page:** 1\
**Showing post:** 21

<div class="post-metadata">

**Author:** ![GoToLoop](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/gotoloop/32/86_2.png) [@GoToLoop](https://discourse.processing.org/u/GoToLoop)\
**Post date:** [July 24, 2018, 9:38pm UTC](https://discourse.processing.org/t/processing-raspberry-pi-and-camera/2027/21 "2018-07-24T21:38:36Z")

</div>

> [@neilcsmith](#):
>
> I tried to replicate the API in PraxisLIVE and gave up for another mechanism.

The standard way is to create a `@FunctionalInterface` so the library can call it back, like I did here: 🤪

> [@Sequencer firing multiple events/ or one step behind](https://discourse.processing.org/t/sequencer-firing-multiple-events-or-one-step-behind/1571/12):
>
> B/c there’s a slightly time loss during the time done is set to true and we check it ourselves, and only then we re-invoke start(), I don’t think class Countdown fits fully the requirements of your “sequencers”. sweat Just made a variant of it called Interval, where done is set to true over & over at a fixed period time. We now need to call Interval::intervalDone() in order to check whether the previous interval had been completed. As a bonus, in place or in addition to check Interval::inte…

> [@Sequencer firing multiple events/ or one step behind](https://discourse.processing.org/t/sequencer-firing-multiple-events-or-one-step-behind/1571/12):
>
> ## “Interval.java”:
> 
> ```auto
> @FunctionalInterface public interface Callback {
> void run();
> }
> 
> ```
> 
> ## “IntervalClass.pde”:
> 
> ```auto
> void createCallback() {
> interval.callback = new Interval.Callback() {
> @Override public void run() {
> fill(randomColor());
> }
> };
> }
> 
> ```

The interfaceless callback style is a much convenient way for Processing’s target coders though. 🙄

---

_[View the full topic](https://discourse.processing.org/t/processing-raspberry-pi-and-camera/2027)._
