# GPIO on Jetson TX2 and synchronization

**URL:** https://discourse.processing.org/t/gpio-on-jetson-tx2-and-synchronization/22843
**Category:** Processing for Pi
**Created:** [July 26, 2020, 3:13am UTC](https://discourse.processing.org/t/gpio-on-jetson-tx2-and-synchronization/22843 "2020-07-26T03:13:02Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![darioringach](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/darioringach/32/7017_2.png) [@darioringach](https://discourse.processing.org/u/darioringach)
#### Post date: [July 26, 2020, 3:13am UTC](https://discourse.processing.org/t/gpio-on-jetson-tx2-and-synchronization/22843/1 "2020-07-26T03:13:03Z")

</div>

I am running Processing 3.5.4 on a Jeston TX2. It was also easy to access the GPIO pins. I wanted to get a digital pulse in a reliable way at the onset of given frame (code below), but it is not working well. I am monitoring the pulse and the changes on the monitor (with a photocell) using an oscilloscope. The pulse precedes the change in frame by ~40ms, which is longer than the duration of 2 frames (at 60Hz). What’s going on? Is there a way to block the code until the next VSYNC and issue the pulse right after? Thanks!

![code](https://canada1.discourse-cdn.com/flex036/uploads/processingfoundation1/original/2X/b/b1cc0034f962a4efe2b394f6c5e8b743bd6fb8ed.png)

---

<div class="post-metadata">

### Author: ![Smantik](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/smantik/32/5330_2.png) [@Smantik](https://discourse.processing.org/u/Smantik)
#### Post date: [February 28, 2021, 6:27pm UTC](https://discourse.processing.org/t/gpio-on-jetson-tx2-and-synchronization/22843/2 "2021-02-28T18:27:34Z")

</div>

I am not sure but, isn’t it better to use millis() instead of frameCount in that project? You can see methods of using millis here: [https://forum.processing.org/two/discussion/8085/i-display-images-in-sequence-but-i-see-only-the-last-one-why](https://forum.processing.org/two/discussion/8085/i-display-images-in-sequence-but-i-see-only-the-last-one-why)  
One question: how could you install processing in a Jetson? I tried so many times in Jetson Nano and I couldn’t.
