Giter Site home page Giter Site logo

shrimpkey's People

Contributors

sdmeijer avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

shrimpkey's Issues

Problem with USB initialisation logic?

I have been attempting to build a breadboard analog to the ShrimpKey but ran into a problem which seems to originate with the code in this repo or something I'm missing about the wiring selections.

Thought there must be something wrong with my wiring, or the components. Finally worked back to a test-build against the original rancidbacon repo and reference wiring example at...
http://code.google.com/p/vusb-for-arduino/source/browse/#hg%2Flibraries%2FUsbKeyboard
...and found the UsbKeyboardDemo1 example actually worked, so there couldn't be a fundamental issue with the components or layout.

However, I've so far been unable to proceed from here to getting the ShrimpKey code working. The issue I face is that the USB initialisation doesn't establish an addressable USB keyboard - issues visible in dmesg on a Lubuntu-based laptop;

Specifically you see errors like this in dmesg...
new low-speed USB device number 99 using ohci_hcd
device descriptor read/64, error -110
unable to enumerate USB device on port 2

Switching to Rancidbacon's original, the identification works fine and keyboard events can be sent successfully. You see instead...
new low-speed USB device number 99 using ohci_hcd
generic-usb 0003:4242:E131.0009L input,hidraw0: USB HID v101 Keyboard [rancidbacon.com UsbKeyboard as /devices/pci0000:00/0000:00:13.0/usb2/2-2/2-2:1.0/input/input18

To get the system working I have D+ attached to PD2 through 68Ohm and to ground through reversed 3.6v 500mW zener, I have D- attached to PD4 through 68Ohm, to VCC through 2.2KOhm and to GND through reversed 3.6v 500mW zener, in addition to taking V5 power from the USB pins.

Of course there are different wiring defaults in your case, but switching the D- 68Ohm connection to your preferred PD3, and the 2.2kOhm to your preferred PD7 doesn't work, sadly.

I tried starting with ShrimpKey.ino and settings.h from your repo, combined with rancidbacon's UsbKeyboard. To get this to compile, I merged the changes from your UsbKeyboard.h back into the original, and fixed issues with const PROGMEM as per http://gnuski.blogspot.co.uk/2013/02/must-be-const-vusb-libraries-for.html I then verified the original rancidbacon demo still worked (which it does, though it generates spurious 'enter' Key events compared to the original, owing to some edit or another (does a ShrimpKey normally generate enter events as a heartbeat?). However, the ShrimpKey example cannot be made to work (my test circuit is set up with a conventional button and pull-up on PD9 to avoid issues around the conductivity).

However in all cases (using your code direct, using rancidbacon's UsbKeyboard library, or their library with your UsbKeyboard merges) I can't get the USB device to be recognised when running the ShrimpKey sketch.

Any suggestions what to try? Are there initialisation steps which you can see in UsbKeyboardDemo1 which need to be replicated?

It's feasible that the issue arises from the compiler environment somehow interacting with your code, so note that I'm using Arduino 1.0.5 for Linux 32-bit downloaded from arduino.cc (the version packaged with Ubuntu Saucy has an issue with assembler flags on any v-usb builds).

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.