2 thoughts on “Some Trinket Tutorials

  1. alex

    Very useful tutorials, I learn a lot from there.
    Still I am not able to do something with my project, I need to send keyboard commands like
    CTRL + PageUp , CTRL+PageDown and CTRL+V , I tried also with decimal codes and nothing happened my code is below, please your tips/advance are welcome.

    Thank you in advance !

    #include “TrinketKeyboard.h”

    uint8_t button1 = 0;
    uint8_t button2 = 2;

    uint8_t value1 = HIGH;
    uint8_t value2 = HIGH;
    void setup() {

    pinMode(button1, INPUT);
    pinMode(button2, INPUT);

    }

    void loop() {

    value1 = digitalRead(button1);

    if (value1 == LOW)
    TrinketKeyboard.pressKey(KEYCODE_MOD_LEFT_CONTROL,KEYCODE_ARROW_UP);
    TrinketKeyboard.pressKey(0,0);

    value2 = digitalRead(button1);

    if (value2 == LOW)
    TrinketKeyboard.pressKey(KEYCODE_MOD_LEFT_CONTROL,KEYCODE_PAGE_UP);
    TrinketKeyboard.pressKey(0,0);

    }

    Reply

Leave a Reply to Jay Bowden Cancel reply

Your email address will not be published. Required fields are marked *