## How to start programming pedalSHIELD 2 years 6 months ago #26

• JR
• Moderator
• Posts: 77
• Karma: 5
This is a short guide to start coding pedalSHIELD DUE. I am going to explain just the basic ideas you need to know to progress as fast as possible.

1. What Do You Need to Know About the Hardware?
If you know nothing about electronics it's ok!, you just need to know how the hardware resources are mapped.

Inputs:
PIN7 (PWM7): FootSwitch.
PIN2 (PWM2): Toggle button.

Outputs:
DAC0: Pedal out.
DAC1: Pedal out.
PIN3 (PWM3): LED.

2. Installing the Software.
The integrated development environment (IDE) software for Arduino DUE is needed. It is available in the Arduino Software page with all the instructions. There is also a getting started with Arduino DUE guide for further details.

With the latest 1.6.3 code check this "How to install Arduino DUE in the latest 1.6.3 Software".

Once all the software is installed the environment should look like this:

3. Start Coding!
There is a series of pedals already 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, so the codes have a balance between performance and complexity to understand.
Going from the easiest to the most difficult, the natural evolution is:

#### File Attachment:

File Name: 00.pedalSHIELD_2015-04-16.rar
File Size: 22 KB

There is a topic explaining how to include the example pedals into the Arduino Software (IDE), it gives you easy acces and fast loading.

There is also a Github repository with all the codes.

## How to start programming pedalSHIELD 2 years 2 months ago #107

 dra9his OFFLINE New Member Posts: 1 Karma: 0 What library need to add? How can I get away from '->' is not a pointer? Thanks a lot! The administrator has disabled public write access.

## How to start programming pedalSHIELD 2 years 2 months ago #108

 JR OFFLINE Moderator Posts: 77 Thank you received: 23 Karma: 5 You do nt need to install any additional libraries, all the codes are error-free and only use Arduino standard libraries. Just be sure that you are using the right Arduino software, currently the Arduino 1.5.6-r2 BETA (with support for Arduino Yún and Arduino Due boards) keep it simple Last Edit: 2 years 2 months ago by JR. The administrator has disabled public write access.

## How to start programming pedalSHIELD 1 year 10 months ago #138

 mikemac OFFLINE New Member Posts: 2 Karma: 0 int POT0, POT1, POT2; //variables for 3 pots (ADC8, ADC9, ADC10) sorry for out of topic question. i wanted to know how arduino works that POT0 is on ADC 8 without a code that states POT0 = adc8 ? thanks The administrator has disabled public write access.

## How to start programming pedalSHIELD 1 year 10 months ago #144

 JR OFFLINE Moderator Posts: 77 Thank you received: 23 Karma: 5 The POT0 is physically connected to the ADC8 of the Arduino Due board (you can check the Arduino Due pinout) When the ADCs are read in the main loop we have:POT0=ADC->ADC_CDR[10]; // read data from ADC8 At this point the ADC8 value is loaded in the POT0 variable. keep it simple The administrator has disabled public write access.

## How to start programming pedalSHIELD 1 year 10 months ago #147

 mikemac OFFLINE New Member Posts: 2 Karma: 0 but it written ADC_CDR[10] why the numer 10 refers to ADC 8 ? The administrator has disabled public write access.

## How to start programming pedalSHIELD 1 year 8 months ago #159

 JR OFFLINE Moderator Posts: 77 Thank you received: 23 Karma: 5 but it written ADC_CDR[10] why the number 10 refers to ADC 8 ? In the Arduino DUE pinout you can see that the pin marked as A8 (ADC8) is internally connected to the AD10 (Analog to Digital converter number 10). keep it simple Last Edit: 1 year 8 months ago by JR. The administrator has disabled public write access.

## How to start programming pedalSHIELD 1 year 4 months ago #198

 jasolag OFFLINE New Member Posts: 5 Karma: 1 Hi I'm a bit confused about the toggle switches. Why does the program register only 1 pin for the toggle switches when there are 2? Also, how can I use the toggle switches to switch between different effects. Also, I'm fairly new to Arduino but I'm planning to write a program that will allow the pedal to act as a tuner pedal (maybe fast LED blinks for sharp notes and no LED for flat notes, with LED on HIGH at the correct pitch). Can anyone help me with pitch recognition? Thanks Last Edit: 1 year 4 months ago by jasolag. Reason: Additional info The administrator has disabled public write access.

## How to start programming pedalSHIELD 1 year 4 months ago #202

 Ray OFFLINE Administrator Posts: 138 Thank you received: 32 Karma: 3 yes, shanemikel is completely right, in a nutshell: switch 2 (on the left): is an analog mixer (mix the input signal with the output signal) switch 3 (on the right): is a programmable (pin PMW2) There is topic explaining hot to select between effects using the switch 3. About the pitch recognition it is an interesting idea, there are several approaches to do it, there is a book called "Electronics for Guitarist" where I remember there is a chapter (or part of a chapter) dedicated to explain how it works. You can try to simplify the algorithm because it is not trivial: - Maybe adding a high gain to the input signal (like a distortion pedal) in order to make square the sinusoidal input signal and after it try to count the number of samples that the signal is high and low.... just an idea. The administrator has disabled public write access. The following user(s) said Thank You: untitled92
Moderators: JR
Time to create page: 0.672 seconds
Joomla SEF URLs by Artio
Next pedal to be Analyzed?