Giter Site home page Giter Site logo

neotrellism4-code's Introduction

neotrellism4-code

Working to debug some ongoing problems Here is my first attempt at isolating the problem:

The following are a few snippets of code because I am not sure what I need to include. If I need to put my full code in Github, let know and i will learn how to do that and pass on the pointer.

In Mu, I do a Save and the Neotrellis lights up. When I depress any key on the Neotrellis M4 the lights extinguish I get the following "Error reported in the REPL"


Traceback (most recent call last):

File "code.py", line 154, in

File "adafruit_hid/keyboard.py", line 100, in press

AttributeError: 'int' object has no attribute '_add_keycode_to_report'

Press any key to enter the REPL. Use CTRL-D to reload.


my code snippet follows ...originally from John Park. It worked fine up until I had the problem that danh helped me with. I was able to load what I think are the recommended libraries and the Neotrellis worked. The only changes to the code were to change kbd = Keyboard from kbd = Keyboard() and

cc = ConsumerControl from cc = ConsumerControl()

to get the code to not complain about the kbd and cc. I assume because the newer versions that I loaded into lib on the CIRCUITPY device

from board import SCL, SDA import adafruit_trellism4 from adafruit_hid.keyboard import Keyboard from adafruit_hid.keycode import Keycode from adafruit_hid.consumer_control import ConsumerControl from adafruit_hid.consumer_control_code import ConsumerControlCode

...

99 for keycode in keycodes: 100 self._add_keycode_to_report(keycode)

101 self._keyboard_device.send_report(self.report)


Looking at the code in https://github.com/adafruit/Adafruit_CircuitPython_HID/blob/master/adafruit_hid/keyboard.py, I see the following:

153 if keymap[down][1] == KEY: 154 kbd.press(*keymap[down][2]) 155 else: 156 cc.send(keymap[down][2])


but I do not understand the error message about

File "adafruit_hid/keyboard.py", line 100, in press

AttributeError: 'int' object has no attribute '_add_keycode_to_report'

neotrellism4-code's People

Contributors

chuckuntulis avatar

Watchers

 avatar

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.