-
-
Notifications
You must be signed in to change notification settings - Fork 14
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Pixljs Support? #25
Comments
The script may already work for the pixl.js provided that the appropriate custom firmware is built for it, but I don't have a pixl that I could actually test with, so I can't verify. Here's the custom firmware built for pixl.js if you want to try The firmware patch itself should work on Puck (Including Lite), Pixl, and Bangle (1 and 2), but the script has no special accommodations for hardware with screens |
Thanks. My pixljs hasn't arrived yet but I took some time today and built the firmware with your patch. I'm planning on starting with your script and build up from there. In a reddit post, you mentioned issues with the newest firmware. We're you able to resolve those? |
Since posting that, I've moved everything important into native code in the custom firmware, you have the |
I was able to load up the custom firmware and test the script with only a few modifications and it's working as expected. I noticed you had custom firmware for the banglejs watches but since they are using different chips, I don't think they will support the add ntag lib you created. With that said, I think we can close this. Is there any way to get the amiibo id or name from the tag? I see you have get tag info but I'm not sure how to get the values in text. |
getTagInfo returns the minimal information needed to identify an amiibo and to decrypt the nickname given. The function slices data off the full tag, so to reconstruct it you would reconstruct as follows:
After that, everything is in the same place as an encrypted tag, except for the game data. |
You are right, the banglejs2 has the same chip as the puck and pixl. It is the original bangle that has a nRF52832. I Actually own a banglejs2 so I should try the custom firmware and see if it works. The biggest changes so far I made to the script is identifying the pixl vs the puck from the BOARD and then using BTN1 instead of BTN. I could test it again but I don't think BTN was working. Beyond that, I'm hoping to print the current tag information to the LCD. Trying to wrap my head around how to convert the bytes to get the head and tail values mentioned here: To determine amiibo model type, use data from page #21 and #22. Page #21 (bytes[84..<88]) is the "head" and page #22 (bytes[88..<92]) is the "tail" - you can use these values at amiiboapi.com. |
Reopened because I want to implement at least basic support for the pixl.js (and the other capable espruino hardware) I don't have any devices with a screen, but I figure I could at minimum make use of the menu module shared across the different devices |
Instead of trying to keep one script for all the devices, I stripped out the puck specific functionality I didn't care about to reduce the bloat. Not sure if you want to re-use anything. https://github.com/christopher-roelofs/ntag215-puck.js/blob/master/pixl.js Also, based on the comments from the Espruino creator, both bangle and bangle2 don't have the same nfc functionality so I think the only official boards applicable for this are puck, pixl and the MDBT42Q Breakout |
That's unfortunate that the bangle devices don't have the NFC capability. As far as a single script for multiple boards, I use terser to minify the code and that removes dead code paths as part of the minification and optimization. So, if you set a constant to a value and then check that value, it will evaluate the if and remove that code branch entirely if the check fails. Think if it like how you might use preprocessor conditions in a language like C or C++ to only build certain code paths. |
Can pixljs support be added? It looks like the firmware patch could support several eapruino boards with the same hardware but I think pixljs has the most potential with the lcd.
The text was updated successfully, but these errors were encountered: