Programming with GPIO


My CHIP doesn’t arrive until next month, but I’m trying to learn what I can before it arrives.

I have read through the documentation page and it said there was a Python library for GPIO was “in development.” And that is about all I can find about it on the website. Would it be possible to get a preview on how development is progressing?

Serial Pulse Input?

We are currently porting libsoc and Wiring Pi. If you look up examples of using those systems, it should work the same.

In the meantime, check out one of our projects on to get something working with Python and no other libraries required.


I’ve noticed many people referencing this post as “definitive” for the announcement of WiringPi being ported to CHIP. Is there any way we can be subscribed to updates on when this happens? It’s the main thing I’m waiting on before doing any real work with mine.


There are a couple of python libraries available:

First there is my port of the Beaglebone Black GPIO code to the CHIP: CHIP IO: Library for interfacing with all the things (v0.7.1)

Second, there is my port of the Adafruit GPIO library to the CHIP, read the post carefully as it requires CHIP_IO to work: Adafruit GPIO Library for CHIP

Thirdly, there is a more arduino like python library that currently only supports GPIO on the XIO pins: I wrote a GPIO "library" for Python you guys can use!


No offense, but those links are for python libraries and they have little to do with WiringPi.

I too am waiting for wiringPi because of a project I contribute to. We use wiringPi for SPI in addition to basic GPIO, not to mention wiringPi is a C api, not python. Python isn’t useful for my project as we drive many outputs at high speed using C/C++. I’m also interested in any libraries that will handle PWM output, specifically for driving LED panels that use the HUB75 connectors (P10 panels).

I’d love to port more features to the CHIP as we’ve been adding support for more and more SBCs.


gpio pins are not working. i have attached a LED to the pin and ground.

did export gpio423
cd /sys/classes/gpio/gpio423
echo 1 > value is not doing LED on.
please help me
thanks in advanced


EDIT: Wait 423 isn’t even a GPIO is it? the XIOs go are 408-415 only The SOC pins are gpio 0-196.

If this GPIO was on the XIO chip, this chip can only source 10uA which isn’t enough to light an LED (which need over 100x that). You can either reverse your polarity so the XIO is actually sinking the current from the LED, and then echo 0 > value to turn it on:

+3.3V -> LED -> Current Limiting Resistor (330 ohm?) -> GPIO423

or you can use one of the SOC’s gpios which can source a little more current I believe, but you’ll still need the current limiting resistor.


@Materdaddy I agree that my code is not wiringPi, I presented it as an interim option. My CHIP_IO code is C underneath the Python, there is nothing stopping you from pulling the PWM code out of that and using it in your project.

Currently PWM and SPI require decive tree updates to work. I have no control right now of what NTC puts in their kernel, my theory for them shipping the kernel they did was to make delivery dates and update it in the future (I got mine in December). Right now, my kernel provides a PWM device that I can configure with my code. If you need SPI and PWM, there are threads that detail how to get them in the dts.

NTC is working hard on the kernel right now, I am monitoring their github and have learned I will have to change my code for PWM once the 4.4 kernel drops. I’m hoping that SPI will just be handled by Linux spidev.


thanks CapnBry…:slight_smile:


Yes, SPI can be handled through SPIdev.


Any status on porting WiringPi over to CHIP? Maybe a roadmap and/or github issue to subscribe to?


I too am interested in learning about C language equivalents of wiringPi. Any news would be wonderful. A reference to a Git repository would be ideal.