Welcome, Guest
Username: Password: Remember me

TOPIC: How to Start Programming Pedal-Pi

How to Start Programming Pedal-Pi 11 months 3 weeks ago #834

  • Ray
  • Ray's Avatar
  • Administrator
  • Posts: 453
  • Thank you received: 98
  • Karma: 24
This is a quick start guide to code audio effects for Pedal Pi. I am going to explain just the basic ideas you need to know to progress as fast as possible, enjoy the trip!:

1. What Do You Need to Know About the Hardware?
You need to know how where the hardware resources (push-buttons, toggle-switch, led, foot-switch, analog guitar input and audio signal output) are connected.

This image summarizes it all:

This image would also help you:

2. Installing the Software.
You would need to install the Operating System (Raspbian) and the Libraries (BCM2835) before you can start coding.

Installing the Operating System:
There are several options but by default we use Raspbian or Raspbian Lite.The Raspbian website has the latest OS version and the tutorials to install it:

Once you have installed Raspbian in your SD card you will need to be able to "access" it so you can start coding, there are two ways to access a pi zero:
  • Classic: By connecting an HDMI screen and a keyboard, like any other computer. Easy and fast.
  • Headless Mode: Once you have configured the network, you can access remotely the pi zero from your laptop or computer. There are several
    tutorials online for Linux and windows (link2).

Installing the BCM2835 Libraries.
Once the OS is installed and you can access it, it is time to install the BCM2835 libraries. This libraries will help us to access the GPIOs pins, SPI and PWM with simple C commands, making the coding easy and intuitive.
In the BCM2835 website there is a tutorial to install the libraries:
However, it is pretty easy, just doing:
wget http://www.airspayce.com/mikem/bcm2835/bcm2835-1.50.tar.gz;  // If there is a new release, this link should be changed.
tar xvfz bcm2835-1.50.tar.gz;
cd bcm2835-1.50;
sudo make install

To make sure that all is working fine, go to the BCM2835 installation folder and try to compile any example there, for instance:

We have prepared a version of the latest Raspbian Jessie Lite with the BCM2835 libraries installed and the Pedap-Pi codes compiled that you can download from here https://mega.nz/#!QzIh3Kya (1.5GB) this you would need to use Win32DiskImager or similar to copy this .img file into a new SD card.

3. Start Coding!
There are examples of pedals already coded and available in the forum. All this effects have "educational" purposes. The idea is to have them as a base to start improving or coding your own effects. The codes have a balance between performance and complexity for you understand them easily.

Have a look to the "How to Create, Edit and Compile any Code" for more details ;)

Going from the easy to difficult, the natural evolution is:

You can also download them all in a .zip file:

File Attachment:

File Name: Pedal-Pi-All-Effects.zip
File Size: 22 KB

(I recommend to use the examples from the zip file because they are always up to date)
Last Edit: 8 months 6 days ago by Ray.
The administrator has disabled public write access.
Time to create page: 0.150 seconds
Powered by Kunena Forum
Joomla SEF URLs by Artio