EDIT: OK, so I think I'm a numpty - I didn't have the lib files for keyboard etc loaded (I had loaded them so long ago on my CPX I had forgotten they weren't standard). But now it says there's not enough space on there? I can't find out how much space is supposed to be available on the NEO Trinkey, but I ASSUME it's more than 16kb (what i think I need with libs and payload and whatnot). Any suggestions?
~~~
Hi, I work in education IT. We end up enrolling a LOT of Chromebooks. It's been suggested we use a "RubberDuckey" (a keyboard automation tool). Well, being the tinkerer I am, I figured I could get it up and running on a custom microcontroller (The Neo Trinkey specifically). So, I used some code found here to get up and running on a CPX that I own personally whilst I waited for the 28 new Trinkey's to arrive.
By the time they got here, I had a useful enrollment script all up and running on my CPX, worked like a charm. Hmowever, I've just started translating my code to work on the Trinkey, and (according to the blinking lights), it's throwing an "OTHER" error at line 11 (It runs GREEN, then a long YELLOW, then a short YELLO followed by an equally short CYAN) of this code. The odd part is, I didn't change that line, nor did I change any lines that were related to the keyboard. I've left the removed lines in as comments, and my only additions are the three general imports below the time import comment.
Can anyone help me understand why that's bombing out? I know I'll have to change the button names and the light address(s), but I can't see what needs to change here to get past line 11 so that the code will fail at the points I expect it to (like the buttons). :/
Thank you for your time!
Trouble getting RubberPython software running on a Neo Trink
Moderators: adafruit_support_bill, adafruit
Please be positive and constructive with your questions and comments.
- curiousdev88
- Posts: 8
- Joined: Wed Feb 13, 2019 2:48 pm
- tannewt
- Posts: 3315
- Joined: Thu Oct 06, 2016 8:48 pm
Re: Trouble getting RubberPython software running on a Neo T
Please post your full code and the full error text so we can take a look at the specifics.
- curiousdev88
- Posts: 8
- Joined: Wed Feb 13, 2019 2:48 pm
Re: Trouble getting RubberPython software running on a Neo T
Thank you for the reply! I did link to my full code, as well as posting the error message given off by the Trinkey (there is no error given over serial that I could see). But regardless - I believe my issue is related to available space on the Trinkey. How much space should be available after flashing on a Neo Trinkey? It seems like I only have 8 kb left after a fresh flash. That seems small enough as to be prohibitive of use with libraries.
- curiousdev88
- Posts: 8
- Joined: Wed Feb 13, 2019 2:48 pm
- tannewt
- Posts: 3315
- Joined: Thu Oct 06, 2016 8:48 pm
Re: Trouble getting RubberPython software running on a Neo T
It should be about 40+ kb. The full area is 64k but some of it is taken up by the filesystem itself. It's worth trying a `storage.erase_filesystem()` from the REPL to start fresh.
Your BANNED didn't show for me. I tend to use gist.github.com instead.
Your BANNED didn't show for me. I tend to use gist.github.com instead.
- curiousdev88
- Posts: 8
- Joined: Wed Feb 13, 2019 2:48 pm
Re: Trouble getting RubberPython software running on a Neo T
Wow, 40k? That would be PLENTY. I'll try the erase thing, and see if that helps.
Here's the code - I bet it would run if I could fit the libraries on there. Not sure what happened to my BANNED - still in moderation maybe.
https://gist.github.com/truevox/ed0682e ... 7ed8911e9f
Thank you!!!!
Here's the code - I bet it would run if I could fit the libraries on there. Not sure what happened to my BANNED - still in moderation maybe.
https://gist.github.com/truevox/ed0682e ... 7ed8911e9f
Thank you!!!!
- curiousdev88
- Posts: 8
- Joined: Wed Feb 13, 2019 2:48 pm
Re: Trouble getting RubberPython software running on a Neo T
Yep, that seems to have done the trick! I now have (A VERY PLUSH AND SPACIOUS) 40k available! THANK YOU!!!
- curiousdev88
- Posts: 8
- Joined: Wed Feb 13, 2019 2:48 pm
Re: Trouble getting RubberPython software running on a Neo T
Perhaps I spoke too soon. Even with the three libraries in their correct spot, it's still erroring out at the "kbd = Keyboard()" line very early on, and seeing nothing in REPL. Any ideas where I'm going wrong? I didn't change that part of the code from the original.
- tannewt
- Posts: 3315
- Joined: Thu Oct 06, 2016 8:48 pm
Re: Trouble getting RubberPython software running on a Neo T
I don't see anything wrong at the start of that script. I'd suggest trying smaller versions of code.py. Maybe one with print() to verify that serial can work.
Try the latest alpha if you haven't too.
Try the latest alpha if you haven't too.
- curiousdev88
- Posts: 8
- Joined: Wed Feb 13, 2019 2:48 pm
Re: Trouble getting RubberPython software running on a Neo T
Even commenting out EVERYTHING after that one line still causes it to throw at that line. What do you mean by the Alpha?
- tannewt
- Posts: 3315
- Joined: Thu Oct 06, 2016 8:48 pm
Re: Trouble getting RubberPython software running on a Neo T
The alpha is the latest released version of CircuitPython. It is labelled as unstable but is pretty stable now: https://circuitpython.org/board/neopixel_trinkey_m0/
Please be positive and constructive with your questions and comments.