Documents

Ch WiringPi Package is Ch binding to WiringPi, a pin based GPIO access library written in C for the BCM2835 used in Raspberry Pi. All C/C++ programs using WiringPi related C functions can readily run in Ch interpretively without compilation. Furthermore, the WiringPi utility program gpiocan be conveniently used for scripting inside Ch programs to control GPIO.

The traditional software development method in Raspberry Pi using WiringPi through gcc, Makefile, a text editor without debugging capability through a lengthy compile/link/execute/debug cycle is cumbersome, especially for beginners. Ch WiringPi makes learning electronics using Raspberry Pi simple, easy, and fun with its user-friendly ChIDE, scripting, debugging, and plotting capabilities. It breaks the barrier and allows anyone to join the Maker Revolution with coding in Raspberry Pi, Pi Zero, and Pi Zero W.

Open Source Package
Ch WiringPi Package is included in C-STEM Studio for Raspberry Pi. However, you can download the open source code for Ch WiringPi Package below:

Application Examples
The following three programs demonstrate the simplicity of Ch WiringPi. Each program accomplishes the same thing — set pin 0 as an output, then repeatedly set the pin high, delay for 500 ms, set the pin low, delay 500 ms using a while-loop. The first program blink.c is a C program, which can be compiled using gcc or run in Ch directly. The second program blink2.ch is a Ch program.

Ch is a very high-level language (VHLL) for script computing. The third program blink3.ch uses the utility program gpioin a Ch script program, which can be invoked like bash or csh scripts.

These sample programs can be found in the folder /usr/local/ch/package/chwiringPi/demos/ in C-STEMbian.