Page:123

## How to start programming pedalSHIELD 7 years 7 months ago #26

• JR
• Senior Member
• Posts: 77
• Karma: 6
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:
Other interesting codes submitted by users:

#### 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 7 years 3 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 7 years 3 months ago #108

 JR OFFLINE Senior Member Posts: 77 Thank you received: 31 Karma: 6 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: 7 years 3 months ago by JR. The administrator has disabled public write access.

## How to start programming pedalSHIELD 6 years 11 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 6 years 11 months ago #144

 JR OFFLINE Senior Member Posts: 77 Thank you received: 31 Karma: 6 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 6 years 11 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 6 years 9 months ago #159

 JR OFFLINE Senior Member Posts: 77 Thank you received: 31 Karma: 6 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: 6 years 9 months ago by JR. The administrator has disabled public write access.

## How to start programming pedalSHIELD 6 years 5 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: 6 years 5 months ago by jasolag. Reason: Additional info The administrator has disabled public write access.

## How to start programming pedalSHIELD 6 years 5 months ago #200

 shanemikel OFFLINE New Member Posts: 17 Thank you received: 5 Karma: 1 Only one of the switches is actually connected to an io pin, the other is there for re-routing the circut so that the original input signal is mixed with the output signal. Some effects discard the original signal in favor of the new, proccessed one (like overdrive/distortion), where some effects (like delay/reverb) need the original signal to pass through as well as the modified (in this case delayed) signal. The reasoning behind this dedicated switch, is it keeps the effects that use it much simpler (putting less work on the programmer and the arduino). I have some advice as someone who built this pedal within the month; Read through the entire forum (software AND hardware section). There is a thread here about how to code multiple effects in one sketch (program). Also, at first, I thought I had messed up the build, but really the shield just wasn't all the way pushed into the arduino, so don't be afraid to apply some pressure to get it in there. Adjusting the trimmer is an important step (the component in RV1 that is adjustable with a screwdriver). There is a sketch in the github repo for assisting with this, and a thread here on the forum. Second, try not to be too surprised or disapointed when you try it for the first time, as the arduino microcontrollers pick up and generate quite a bit of noise (there WILL be a rather prominent hiss in the processed signal). There are several different things you can try to mitigate this. Somebody has JUST posted a thread about a way to do this with a software low-pass filter (I have yet to try it), and I am going to try averaging to see how that works as well. Good Luck Last Edit: 6 years 5 months ago by shanemikel. The administrator has disabled public write access. The following user(s) said Thank You: Ray

## How to start programming pedalSHIELD 6 years 5 months ago #202

 Ray OFFLINE Moderator Posts: 706 Thank you received: 152 Karma: 44 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
 Page:123
Time to create page: 0.192 seconds
Joomla SEF URLs by Artio