Forum Replies Created

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • avatarmsmallwood20
    Participant

    Hi again,

    I’m glad that you like the project and I would be glad to share it with others, I’m currently typing up a report and a presentation on how this project was developed over time, such as steps and errors that I faced for my class. So it would great to share it with others for different insights on the project its self.

    avatarmsmallwood20
    Participant

    Hi again,

    I got the code to work and it has successfully synced to my laptop, I had to redownload the 1Sheeld library!
    Thank you so much for your help! 🙂

    avatarmsmallwood20
    Participant

    Hi again,
    So I was using the online editor for Arduino, so deleting the library didn’t seem to be an option so I decided to try it again on the downloadable version of Arduino software. And came across another error, I looked through my C: drive folder where it was directing me and couldn’t find the file.

    “Arduino: 1.8.9 (Windows 10), Board: “Arduino Leonardo”
    C:\Users\MAYASM~1\AppData\Local\Temp\ccFeKWSU.ltrans1.ltrans.o: In function loop’:
    C:\Users\Maya Smallwood\Desktop\Project\GamePad/GamePad.ino:16: undefined reference to
    GamePad’
    C:\Users\Maya Smallwood\Desktop\Project\GamePad/GamePad.ino:21: undefined reference to GamePad’
    C:\Users\Maya Smallwood\Desktop\Project\GamePad/GamePad.ino:26: undefined reference to
    GamePad’
    C:\Users\Maya Smallwood\Desktop\Project\GamePad/GamePad.ino:31: undefined reference to `GamePad’
    collect2.exe: error: ld returned 1 exit status
    exit status 1
    Error compiling for board Arduino Leonardo.
    This report would have more information with
    “Show verbose output during compilation”
    option enabled in File -> Preferences.

    avatarmsmallwood20
    Participant

    Hi Amr, I’ve tried the code that you provided and it gave me the following error below, Also, I tested out the website code and the led light attached lights up, however, I’m going to see if I can acquire jumpers to fit into the 1sheeld RX and TX pins as did the website pictures and program.

    “Multiple libraries were found for “Keyboard.h”
    Used: /home/builder/opt/libraries/latest/keyboard_1_0_2
    Not used: /home/builder/opt/libraries/latest/bluefairy_1_0_0
    Using library keyboard_1_0_2 at version 1.0.2 in folder: /home/builder/opt/libraries/latest/keyboard_1_0_2
    Using library HID at version 1.0 in folder: /home/builder/.arduino15/packages/arduino/hardware/avr/1.6.23/libraries/HID
    /tmp/ccBy66mc.ltrans1.ltrans.o: In function loop’:
    /tmp/129203869/GamePad/GamePad.ino:17: undefined reference to
    GamePad’
    /tmp/129203869/GamePad/GamePad.ino:22: undefined reference to GamePad’
    /tmp/129203869/GamePad/GamePad.ino:27: undefined reference to
    GamePad’
    /tmp/129203869/GamePad/GamePad.ino:32: undefined reference to `GamePad’
    collect2: error: ld returned 1 exit status
    exit status 1 ”

    avatarmsmallwood20
    Participant

    Hi Amr,

    This is the code that I have written when I tried to upload it originally it didn’t upload.

    #include <OneSheeld.h>
    #include <Keyboard.h>

    void setup()
    {
    OneSheeld.begin();
    Serial.begin(9600);
    Keyboard.begin();
    }

    void loop()
    {
    //up arrow
    if (GamePad.isUpPressed())
    {Keyboard.press(0xDA);}
    else
    {Keyboard.release(0xDA);}
    //Down arrow
    if(GamePad.isDownPressed())
    {Keyboard.press(0xD9);}
    else
    {Keyboard.release(0xD9);}
    //left arrow
    if(GamePad.isLeftPressed())
    {Keyboard.press(0xD8);}
    else
    {Keyboard.release(0xD9);}
    //right arrow
    if(GamePad.isRightPressed())
    {Keyboard.press(0xD7);}
    else
    {Keyboard.press(0xD7);}
    //delay(30);
    }

Viewing 5 posts - 1 through 5 (of 5 total)