Это видео недоступно.
Сожалеем об этом.

🔴 Fast, cheap, simple: DIY USB foot pedal (keyboard) for teleprompter, programming, gaming

Поделиться
HTML-код
  • Опубликовано: 15 мар 2018
  • I will show you how to make a cheap USB keyboard / USB foot pedal. I use it for shortcuts while programming and to control the teleprompter. We will use Arduino pro micro and make use of its USB port. I will show schematics, hardware and software. Software is free to use (github link below). DIY Arduino project for beginners.
    ATmega32U4:
    32kB flash
    2.5kB RAM
    1kB EEPROM
    16MIPS at 16MHz
    USB 2.0 port
    2.7-5.5V
    ---------------------------------------------------------------------------------------------------------------------
    Do you like my work?
    1. Hit LIKE.
    2. Hit SUBSCRIBE! Did you consider subscribing to my youtube channel and being updated when new videos are published?
    3. COMMENT below.
    4. SHARE.
    5. Support my work on Patreon: / greeneyedexplorer
    6. You can also donate directly to me via: paypal.me/rokrodic
    7. Buying through my affiliate links makes you no additional cost, but gives me a small headstart in getting new things for my explorations.
    ---------------------------------------------------------------------------------------------------------------------
    LINKS:
    GreenEyedExplorer homepage: www.rodic.si
    GreenEyedExplorer Thingiverse: goo.gl/jdyHbF
    GreenEyedExplorer GitHub: goo.gl/XtjB3h
    Songs in the background: Silent Partner - Come On In, Topher Mohr and Alex Elena - Where I am From, RUclips Audio Library.

Комментарии • 92

  • @dimasgomez
    @dimasgomez 3 года назад +9

    I think I never found a tutorial project so close to perfection: simple, clear, concise and precise, both in content and detail. You have my gratitude.

  • @Ichbinrandomized
    @Ichbinrandomized 3 месяца назад +2

    Th is, I’ll maybe gonna try it

  • @realmz
    @realmz 4 года назад +1

    Word like a charm and it easy to edit the code and add keys. Thank you alot sir. Im using it for a guitar foot switch.

  • @jimtalltheislandbrothers6639
    @jimtalltheislandbrothers6639 5 лет назад +1

    Hi all. Quick update. I managed to do it in a more simplified script. This video was inspirational to get me started and I am very thankful for all your replies to my queries. See code below whci I modified from another video off youtube. In the last few lines Keyboard.press is used for triggering (KEY_LEFT_ALT) because Keyboard.press is used when other keys will be used in conjunction with say for example Ctrl key etc ... in this case I needed to press two keys. The Alt and S key. So I used Keyboard.press for the Alt key and used Keyboard.write for the S key. I had to use Keyboard.release after to stop both keys.
    }
    //---------------------------------------------------------
    // Loop
    //---------------------------------------------------------
    void loop() {


    Keyboard.begin(); //begin keyboard
    if (digitalRead(7) == 0) // if button 7 is pushed
    {
    Keyboard.write((char)0x20); // press space bar
    delay(200); // delay so you don't get 20 spacebar presses
    }
    else if (digitalRead(5) == 0){ // if button 5 is pressed
    Keyboard.write(KEY_DOWN_ARROW); // press Down arrow key
    delay(200);
    }
    else if (digitalRead(3) == 0){ //if button 3 is pressed
    Keyboard.write(KEY_UP_ARROW); // press up arrow key
    delay(200);
    }
    else if (digitalRead(8) == 0){ //if button 8 is pressed
    Keyboard.press(KEY_LEFT_ALT);delay(200); // press up alt key
    Keyboard.write ('S'); delay(200);
    Keyboard.release ('S');
    Keyboard.release (KEY_LEFT_ALT); //Press s
    }
    Keyboard.end(); //stops keyboard
    }

    • @greeneyedexplorer
      @greeneyedexplorer  5 лет назад

      Great. I am now working on new projects and new videos by now... Electric trike, arduino autonomous lawn mower... so my mind is set elsewhere at the moment :-)

  • @IlFrusce
    @IlFrusce 4 года назад +1

    I need for my little gigs an usb foot controller to easy control the backing tracks from my computer: previous track, play/stop, next track. this is what I'm looking for. love U

  • @ictrlaltdeleteu
    @ictrlaltdeleteu 4 года назад +1

    Perfect for this Quarantine. Great video!

  • @mehmehmehmeh
    @mehmehmehmeh 6 лет назад +3

    this is what im looking for, thanks

  • @crabfucka6302
    @crabfucka6302 6 лет назад +2

    Going to try & make a footswitch to use in rocksmith.

  • @jb8653
    @jb8653 3 года назад +2

    I am not familiar with programming usb in Arduino, can you program shortcuts with multiple keys (i.e. Ctrl + V)?

  • @chrislangham8545
    @chrislangham8545 7 месяцев назад +1

    Hi. Could anybody please provide me with another link for the code as the link in the video doesn't work for me. Thanks

  • @aitorcaro7172
    @aitorcaro7172 6 месяцев назад +1

    Hi, I found this video and it´s exactly what I want.
    I´m trying it with Arduino mega an I got this message:
    C:\Users\aitor\Desktop\USB-Keyboard-master\USBKeyboard\USBKeyboard.ino:11:10: fatal error: Bounce2.h: No such file or directory
    #include "Bounce2.h"
    ^~~~~~~~~~~
    compilation terminated.
    exit status 1
    Compilation error: Bounce2.h: No such file or directory
    Can you help me?

    • @greeneyedexplorer
      @greeneyedexplorer  6 месяцев назад

      Hi. Search for bounce2 arduino library on the net. Put .h and .cpp or .C files in the same folder as my files.

    • @aitorcaro7172
      @aitorcaro7172 6 месяцев назад +1

      I was testing the project with Arduino uno and then I read that it is only compatible with the Atmega32u4
      I have already bought an ATmega32U4
      Thank you

  • @For_Educational_Purpose_Only
    @For_Educational_Purpose_Only 4 года назад +1

    Sir you just made my day, thanks and keep up the good work

  • @delftsurgery4258
    @delftsurgery4258 3 года назад +2

    Thank you for sharing
    So it means, every teleprompter Apps that has bluetooth functions,your DIY Foot pedal can support? if so thank you, I found an app that converts and mirror-flip powerpoint slides for iPad and immediate use the iPad with my slides flipped in prompter ,therefore I need a bluetooth pedal keyboard to switch my slides when reading my scripts. is that possible?

    • @greeneyedexplorer
      @greeneyedexplorer  3 года назад

      Hi. It is an USB keyboard. Arduino code emulates USB keyboard. I have not tried making a bluetooth one... My keyboard emulator works via cable only. I use 5m long USB cable (ethernet cable with USB jacks at the ends)...

    • @delftsurgery4258
      @delftsurgery4258 3 года назад +1

      @@greeneyedexplorer Ok,Sir I appreciate your time to reply back... best wishes to you

    • @dimasgomez
      @dimasgomez 3 года назад +1

      @@delftsurgery4258 It is possible. Much harder project, though.

  • @VictorIbelles
    @VictorIbelles 3 года назад +1

    Hello! It is possible to make this foot switch but instead of assigning keyboard keys , assign midi ?
    To use it as a midi controller on a daw

    • @greeneyedexplorer
      @greeneyedexplorer  3 года назад +1

      Sure. You can fly to the moon if you want. Is it: www.arduino.cc/reference/en/libraries/usbmidi/
      ... just search "arduino midi library" on google...

  • @anbinhnguyen5286
    @anbinhnguyen5286 Месяц назад

    What is the latency for this setup? I have RSI but still want to play competitive FPS (will be using it for aim/fire button)

    • @greeneyedexplorer
      @greeneyedexplorer  Месяц назад +1

      It is fast, but the slowest is button press detection if you want it to be precise...

  • @Ryantang01
    @Ryantang01 2 года назад +1

    thanks for share~
    well done.

  • @bernardoavalossantos5245
    @bernardoavalossantos5245 4 года назад +1

    Hello buddy, I would like to build almost same footswitch you built, im musician and sometimes I use power point to read songs during im playing so I have no choice to use my foot for change slides, it is possible to make a footswitch that allows me to go next and previous slide and the third button for select? Thanks

    • @greeneyedexplorer
      @greeneyedexplorer  4 года назад

      Yes. Just use right codes for up/down or space/backspace for your PowerPoint and use them. Usualy space or right arrow key is for next Page and left arrow key for back. Try this combo...

  • @walidkhoury5944
    @walidkhoury5944 4 года назад +1

    Thank you so much for the tutorial. I have a question, when I assign a key to a pin (switch) and close it, it ends up sending the key multiple times, even if the switch was only pressed for one second.. Is there a way to make it only send it only one time as long as the switch is held down and only send it again when the switched is released then pressed again...etc.? The reason I ask is I'm trying to assign CTRL-Z to undo an action, and how it's currently set up the undo command gets sent multiple times :) Thanks!

    • @greeneyedexplorer
      @greeneyedexplorer  4 года назад +2

      Hi. Thank you. It can be done this way: use debounce for both keypress and release.

  • @drcoolit
    @drcoolit 5 лет назад +1

    I have not done any programming w/ these chips but was wondering if a single key can activate some code ("key press" equivalent) on KEY DOWN and then automatically enters a DIFFERENT code on release of the key ("key up" action). Thanks for any input.

    • @greeneyedexplorer
      @greeneyedexplorer  5 лет назад

      Hi. Sure. It can be done. Sky is the limit. Just check for pin state change on keypress, send anything you want and then check for the keyrelease and send other stuff you want...

    • @drcoolit
      @drcoolit 5 лет назад +1

      thank you for this information. I haven't tried to do anything yet, but having this input from you gives me some ideas. Thanks again.

  • @jkarley42
    @jkarley42 4 года назад +1

    Hello, what kind of wires should I be using for this project? Thank you for the video!

    • @greeneyedexplorer
      @greeneyedexplorer  4 года назад

      Hi. Any isolated wire. All are fine. Currents are in milliampere range.

  • @mosaiques23
    @mosaiques23 3 года назад +2

    Thanks a lot for this tutorial. In my case, I need it to use a single pedal (space bar) to start the music while I play my instrument.
    Question: The switch has three pins, one is ground, but what about the other two? It's the same what I use?

    • @greeneyedexplorer
      @greeneyedexplorer  3 года назад +1

      Hi! Thanks for the question. Switch switches one pin of the connector between the other two pins. You do not need a switch. Use a push button which returns to a non pressed state after the release...

    • @mosaiques23
      @mosaiques23 3 года назад +1

      @@greeneyedexplorer Thanks a lot for the answer. That's a shame because I have a very nice pedal switch and it's really comfortable. Can I not use it for this purpose?

    • @greeneyedexplorer
      @greeneyedexplorer  3 года назад +1

      Sure, you can use it. Try with .fell() as in example...

    • @mosaiques23
      @mosaiques23 3 года назад +1

      @@greeneyedexplorer I will not do the programming (I leave that task to someone else), I would like to now how to connect the three pins switch to the Arduino, if possible.

    • @greeneyedexplorer
      @greeneyedexplorer  3 года назад +1

      If using my code in short, one pin of the switch to chip, the other to ground. When pressed, switch should shorten the connection...

  • @xlproductionsptyltd4563
    @xlproductionsptyltd4563 4 года назад +1

    Great video. How do you do CONTROL + Arrow?

  • @mofous
    @mofous 6 лет назад +1

    Very nice. Which (momentary, I assume) foot switches did you use for this?

    • @greeneyedexplorer
      @greeneyedexplorer  6 лет назад +1

      Hi. They are ordinarily push buttons (momentary) as you have assumed correctly. So, no toggle switches. This device helps me a lot when recording videos... Thanks for the question and viewing my video.

  • @touka0074
    @touka0074 3 года назад

    Very nice bro, i would like to make a footswitch for the enter key, how can i make it, i am new arduinoer.

  • @srdjancervenjak8337
    @srdjancervenjak8337 6 лет назад +1

    Hello, can you also send multiple keys on one button press, like CTRL+ALT+Z, or arduino can send only one key per button press?

    • @greeneyedexplorer
      @greeneyedexplorer  6 лет назад +1

      Hi. It can send combinations. Example, try:
      // CTRL-ALT-DEL: Keyboard.press(KEY_LEFT_CTRL);
      Keyboard.press(KEY_LEFT_ALT);
      Keyboard.press(KEY_DELETE);
      delay(100);
      Keyboard.releaseAll()
      Please check www.arduino.cc/en/Reference/KeyboardModifiers
      You should also check the Keyboard.cpp. See how it sends character modifiers.

    • @srdjancervenjak8337
      @srdjancervenjak8337 6 лет назад

      Thanks for the help. And im guessing this wojld work also on the arduino nano?

    • @greeneyedexplorer
      @greeneyedexplorer  6 лет назад

      Sadly no. FT232 on Arduino Nano works as USB to serial converter and is recognised as such on operating system. In order for it to work in a such way you would have to write your own drivers for the operating system...

    • @srdjancervenjak8337
      @srdjancervenjak8337 6 лет назад

      Ah thats a shame... writing drivers is surtanly out of the question :))) thabks again ill order the bord now

    • @greeneyedexplorer
      @greeneyedexplorer  6 лет назад

      Yes, it is better to go the easiest way. Don't forget to subscribe, share and click like :-)

  • @dbelyaev
    @dbelyaev 5 лет назад +1

    Is there any way to do the same via Bluetooth?

  • @jimtalltheislandbrothers6639
    @jimtalltheislandbrothers6639 5 лет назад +1

    Unfortunately I am getting the error "Bounce does not name a type" ... not sure why.

    • @greeneyedexplorer
      @greeneyedexplorer  5 лет назад

      Bounce2 files (.h and .cpp) should be in the same folder as .ino file. Than it compiles. Arduino moves just .ino file in its own folder (same name as .ino file), but does not move bounce2 files...

    • @jimtalltheislandbrothers6639
      @jimtalltheislandbrothers6639 5 лет назад

      @@greeneyedexplorer Somehow, the arduino micro has been bricked and now the port is greyed out. I have tried everything in vain. I ordered an arduino leonardo as these micro boards seem very finicky.

    • @greeneyedexplorer
      @greeneyedexplorer  5 лет назад +1

      Sorry to hear that. Meanwhile you can read the comments below as someone developed code further. Maybe it gives you new ideas...

    • @jimtalltheislandbrothers6639
      @jimtalltheislandbrothers6639 5 лет назад +1

      @@greeneyedexplorer Hello. I bought an arduino leonardo and it works perfectly. One quick question though. I need to add an extra button on pin 8. This button would act as if I am pressing ALT+S. How would I go about modifying the code for that please?

    • @greeneyedexplorer
      @greeneyedexplorer  5 лет назад

      I think this should work: first send KEY_LEFT_ALT, then send "S". See Keyboard.h

  • @dsteban
    @dsteban 4 года назад +1

    Can I use this like a midi controller?

  • @srdjancervenjak8337
    @srdjancervenjak8337 6 лет назад +1

    Thanks for your info. Ill see in 30 days time what i can make of it when the arduinos arrive.
    Im wonder can you program the arduino to see what app is running and to have the button do different thing depening on what app is runing?

    • @greeneyedexplorer
      @greeneyedexplorer  6 лет назад

      No. Arduino just emulates the keyboard. In order to achieve your goal, you would have to find a program on the net which would do these program detection things and keypress rearrangements...

    • @srdjancervenjak8337
      @srdjancervenjak8337 6 лет назад

      Zdravo :) dobil sem arduinota in sem uporabil tvojo skripto za komando if (val3==LOW) { Keyboard.press(KEY_LEFT_CTRL); Keyboard.press(KEY_LEFT_ALT); Keyboard.press(121); delay(200); Keyboard.releaseAll(); } in ko stisnem gumb v windowsih pošlje komando 2x, kako se nastavi da pošlje samo 1x?

    • @greeneyedexplorer
      @greeneyedexplorer  6 лет назад

      Poizkusi še z dodatkom "delay(1000);" za releaseAll() komando. To bi moralo delovati.

    • @srdjancervenjak8337
      @srdjancervenjak8337 6 лет назад

      to pa deluje :) hvala, čakam še enkoderje da pridejo po pošti če bom še kj rabu te bom pognjavu :)

    • @greeneyedexplorer
      @greeneyedexplorer  6 лет назад

      No problem. Just ask!!!

  • @pastorigortv9227
    @pastorigortv9227 4 года назад +1

    Do you have a video of your diy teleprompter?

    • @greeneyedexplorer
      @greeneyedexplorer  4 года назад

      Hi. Good idea for a new video.

    • @pastorigortv9227
      @pastorigortv9227 4 года назад +1

      @@greeneyedexplorer I really would like to see how you made it, also if you decide to adapt your keyboard to a bluetooth version I think many people will see the video