Foot Switch Key_1=Rapidfire On/Off

Documentation, usage tips and configuration guides for Titan Two scripts and bytecodes published by the community users.

Re: Foot Switch Key_1=Rapidfire On/Off

Postby OFC-Giorgio » Sun Jul 16, 2017 6:35 pm

Combo_run Destroy{} wrote:Thanks guys.

I just bought the three switch scythe. Saw the stinky board after but it also looks really cool.


+1


USB-3Foot-Switch2-View2_03.jpg
USB-3Foot-Switch2-View2_03.jpg (172.02 KiB) Viewed 835 times


I connected it to the prog port via this USB On The GO (OTG) cable:

USB-to-Micro-USB-Rankie-3-Pack-USB-20-Female-to-Micro-USB-Male-Converter-On-The-Go-OTG-Adapter-0.jpg
USB-to-Micro-USB-Rankie-3-Pack-USB-20-Female-to-Micro-USB-Male-Converter-On-The-Go-OTG-Adapter-0.jpg (20.62 KiB) Viewed 835 times


The foot switch outputs "1", "2" and "3" like a normal keyboard which can be mapped to buttons like e.g.:

Code: Select all
#include <keyboard.gph>
 
init {
    const uint8 map[] = {
        KEY_1,   BUTTON_1,
        KEY_2,   BUTTON_2,
        KEY_3,   BUTTON_3
    };
    keymapping(map);
}
User avatar
OFC-Giorgio
Lieutenant
Lieutenant
 
Posts: 344
Joined: Mon Sep 15, 2014 4:26 pm

Re: Foot Switch Key_1=Rapidfire On/Off

Postby J2Kbr » Mon Jul 17, 2017 2:29 pm

Cool ... also note there is no need of an actual mapping to "read" the footswitch inputs, the builtin function key_status() can be used instead. :)
ConsoleTuner Support Team
User avatar
J2Kbr
General of the Army
General of the Army
 
Posts: 20323
Joined: Tue Mar 18, 2014 1:39 pm

Previous

Return to User's Script Documentation

Who is online

Users browsing this forum: No registered users and 57 guests