PDA

View Full Version : What on Earth could it be?



Rabbitz
23-06-2018, 09:27 AM
A back burner project is in the "analysis paralysis" phase.

Still waiting on some bibs and bobs.

What nonsense am I up to?

27072

I guess time will tell....


:cool:

Dedman
23-06-2018, 01:56 PM
Still going for world domination I'm guessing....

Rabbitz
23-06-2018, 03:18 PM
SSSSSH Deddy, don't give it all away...


:)


I wonder if this helps?

27075


:rolleyes:;)

Old Tooth Hopkins
23-06-2018, 03:37 PM
DIY Footswitch?

Rabbitz
23-06-2018, 04:02 PM
Give the man a Kewpie Doll!

Now for the big question, what will it (hopefully) do?

Dedman
23-06-2018, 07:15 PM
ABY? :confused:

Rabbitz
23-06-2018, 07:30 PM
Well I got off my corpulent backside and ducked down to Jaycar to get the bits I needed.

It is a footswitch array with a micro-controller to send commands to RiffStation to control the transport commands while my hands are occupied with a guitar.

The pedal is built.

The micro-controller assembly is in its housing.

Just fussing with the coding. To be honest it isn't that difficult but like most of us my memory ain't what it should be so relearning C++ is a bit of a strain.

Although it has reminded me of the reasons I got out of software...

:)

Once that is done I need to pretty it up a bit.

Dedman
23-06-2018, 08:47 PM
you lost me after "It is a footswitch array...." :p

Rabbitz
24-06-2018, 04:44 AM
How's about its a foot switch with four buttons to control RiffStation?

:D

Rabbitz
24-06-2018, 08:23 AM
Riffstation Controller v1.0 is together.

Well it was easier than I thought.

For those who are interested it is based on a Pro Micro micro-controller (ATMega 32U4) which sends key stroke info via the USB port to Riffstation.

I have four control switches Step Back (<<), Return to Start (|<<), Pause/Play (||/>), Step Forward (>>).

Compiled in the Arduino IDE.

If anyone wants the code, just ask and I'll post it, well I'll tidy it up, add comments and post it :)

27080

27079

Rabbitz
01-07-2018, 06:42 PM
This is the Arduino Sketch Code. The four switches are momentary switches and have a common ground. They are wired to pins 2,3,4, and 5 of the Pro Micro.

/* This code sends the transport control commands for Riffstation to the USB port while pretending to be a keyboard.
* If Riffstation has focus and you close one of the four switches then Riffstation will Start/Stop/Rewind/Fast Forward.
*/

#include <Keyboard.h>

// Pins 2 to 5 of the footswitch connected to the Pro Micro respectively:
int footpadPins[4] = {2, 3, 4, 5};

void setup()
{
for (int i=0; i<4; i++)
{
pinMode(footpadPins[i], INPUT_PULLUP); // Set all foot pad pins as inputs and invoke pull up resistors

}
}



void loop() {
//pin 2 Keypad Right Arrow (step Backwards)
if (digitalRead(footpadPins[0]) == LOW){
Keyboard.write(0xD8);
delay(250);
}

//pin 3 Space (Return to Start)
if (digitalRead(footpadPins[1]) == LOW){
Keyboard.print(" ");
delay(500);
}

//pin 4 Enter (Pause/Start)
if (digitalRead(footpadPins[2]) == LOW){
Keyboard.print("\n");
delay(500);
}

//pin 5 Keypad Right Arrow (Step Forward)
if (digitalRead(footpadPins[3]) == LOW){
Keyboard.write(0xD7);
delay(250);
}
}

Enjoy