# Control the GPIO pins using HLS C++ rather than Python

**URL:** <https://discuss.pynq.io/t/control-the-gpio-pins-using-hls-c-rather-than-python/548>\
**Category:** Support\
**Created:** [October 10, 2019, 8:28pm UTC](https://discuss.pynq.io/t/control-the-gpio-pins-using-hls-c-rather-than-python/548 "2019-10-10T20:28:15Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Hgyugnss](https://avatars.discourse-cdn.com/v4/letter/h/d2c977/32.png) [@Hgyugnss](https://discuss.pynq.io/u/Hgyugnss)\
**Post date:** [October 10, 2019, 8:28pm UTC](https://discuss.pynq.io/t/control-the-gpio-pins-using-hls-c-rather-than-python/548/1 "2019-10-10T20:28:15Z")

</div>

Hi,

Recently I decided that I should start coding in HLS C++. I do know a fair amount of HLS C++ but I do not know how to control the GPIO pins on the PYNQ-Z1 board. Could you please explain to me (in the simplest way possible) how to control the GPIO pins using HLS C++ rather than python? Some simple example code (to light up a led?) would be greatly appreciated.  
Thanks in advance to anyone who willingly can show me a way to control the GPIO pins using HLS C++.

---

<div class="post-metadata">

**Author:** ![rock](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.pynq.io/rock/32/32_2.png) [@rock](https://discuss.pynq.io/u/rock)\
**Post date:** [October 10, 2019, 8:36pm UTC](https://discuss.pynq.io/t/control-the-gpio-pins-using-hls-c-rather-than-python/548/2 "2019-10-10T20:36:37Z")

</div>

What about  
[https://pynq.readthedocs.io/en/latest/overlay\_design\_methodology/overlay\_tutorial.html#Overlay-Tutorial](https://pynq.readthedocs.io/en/latest/overlay_design_methodology/overlay_tutorial.html#Overlay-Tutorial)

---

<div class="post-metadata">

**Author:** ![Hgyugnss](https://avatars.discourse-cdn.com/v4/letter/h/d2c977/32.png) [@Hgyugnss](https://discuss.pynq.io/u/Hgyugnss)\
**Post date:** [October 12, 2019, 3:47pm UTC](https://discuss.pynq.io/t/control-the-gpio-pins-using-hls-c-rather-than-python/548/3 "2019-10-12T15:47:46Z")

</div>

Thank you and I’ll try to follow your advice. 😀

---

<div class="post-metadata">

**Author:** ![nickcamel](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.pynq.io/nickcamel/32/1650_2.png) [@nickcamel](https://discuss.pynq.io/u/nickcamel)\
**Post date:** [December 29, 2020, 9:55am UTC](https://discuss.pynq.io/t/control-the-gpio-pins-using-hls-c-rather-than-python/548/4 "2020-12-29T09:55:24Z")

</div>

It’s not obvious how [https://pynq.readthedocs.io/en/latest/overlay\_design\_methodology/overlay\_tutorial.html#Overlay-Tutorial](https://pynq.readthedocs.io/en/latest/overlay_design_methodology/overlay_tutorial.html?&_ga=2.149422262.1082967227.1609155594-79453143.1608313731#Overlay-Tutorial)  
answers OP’s question. I’m also looking for one single example/tutorial on controlling IO/LED through HLS C++ rather than the provided IP’s through Python.

I wonder if OP managed to get it working?
