Puck bigger battery #1967
Replies: 11 comments
-
Posted at 2017-01-23 by @gfwilliams You might be surprised actually - if it's just a joypad with buttons then Puck.js will probably do pretty well (you could make it go to sleep after 15 mins of not being used). There isn't a guide at the moment, but as a quick run-down:
|
Beta Was this translation helpful? Give feedback.
-
Posted at 2017-01-23 by ChristianW I am doing exactly that right now. There is not much drain apparently. I also disconnect after some seconds of inactivity but not sure if that is actually necessary... Mainly there is a |
Beta Was this translation helpful? Give feedback.
-
Posted at 2017-01-23 by Adam79 Great thanks for the replies. I'm thinking about using a couple of these https://www.adafruit.com/products/2765 to fly a parrot minidrone ( all BLE comms). Big pipe dream with lots of coding ahead. Someone has already done alot of the hard work https://github.com/fetherston/npm-parrot-minidrone/blob/master/lib/MiniDroneBtAdapter.js |
Beta Was this translation helpful? Give feedback.
-
Posted at 2017-01-23 by @gfwilliams Nice - @christianw do you have any pictures? It'd be great to see! @adam79 sounds fun - I have a minidrone too so it'd be great to give it a try if you do it. I know I saw a talk where someone was using it with Web Bluetooth - I don't know if his code might be easier to integrate? https://github.com/poshaughnessy/web-bluetooth-parrot-drone/blob/master/js/drone.js#L387 Unfortunately Puck.js doesn't do notifications yet, but it doesn't look like you need that for normal control. |
Beta Was this translation helpful? Give feedback.
-
Posted at 2017-01-23 by ChristianW @gfwilliams: See the pictures attached. The project in a whole is a 12 x 20 LED matrix with 12 rows of 30 LEDs / meter RGB stripes in a 700 x 400 mm box. The joystick can first navigate through a little menu (currently: Tetris, Fireplace, ...some other demo...). I am about 95% finished with Tetris now. This is the puck code: https://gist.github.com/Whizzard/9ca5caeed42c0ce7659cd98231626289 I have also attached some videos from the menu, the tetris intro page (with highscore) and the fireplace simulation. Attachments: |
Beta Was this translation helpful? Give feedback.
-
Posted at 2017-01-23 by ChristianW PS: @adam79 the puck with the joystick is powered for 2-3 weeks now and mainly sleeping because of the setWatch-function in Espruino.
I would not worry right now about battery issues unless you do something battery-draining in your code. |
Beta Was this translation helpful? Give feedback.
-
Posted at 2017-01-24 by @gfwilliams @christianw good to hear about the battery! And thanks for that post - that's really cool! So at the moment the animations are done on an Arduino? Had you tried making your joystick into a BLE hid device, so you could use it with any computer? Also, just a quick warning - the pads you've soldered to on the top won't be very strong and could lift if the wires get pulled - it's probably worth trying to stop the wires wobbling around too much by holding them in with hot glue or something? |
Beta Was this translation helpful? Give feedback.
-
Posted at 2017-01-24 by ChristianW @gfwilliams: Actually the first thing was a research if a BLE(!) (not the old standard) was readily available - but not much luck here. There are 5$ HID BT devices, but they won't talk to a puck because no LE there... Thanks for the warning about the pads. Because I don't like hot glue I may secure it with a zip tie. |
Beta Was this translation helpful? Give feedback.
-
Posted at 2017-01-24 by @gfwilliams For HID, I meant this: http://www.espruino.com/Puck.js+Keyboard So Puck.js can do BLE HID directly - once it's set up you just pair it with your PC/Phone/etc and it'll act as a keyboard - you could make your joypad do arrow keys, or WSAD. Note: right now Windows HID needs the device to be bondable - which Puck.js isn't at the moment - but it should work on most other platforms. Hope that helps! |
Beta Was this translation helpful? Give feedback.
-
Posted at 2017-01-24 by ChristianW Thanks. |
Beta Was this translation helpful? Give feedback.
-
Posted at 2017-01-25 by @gfwilliams Ahh sorry - thanks - it all makes more sense now! |
Beta Was this translation helpful? Give feedback.
-
Posted at 2017-01-23 by Adam79
@gfwilliams Is there a guide available to add a bigger battery to the puck ? Looking at making a ble joypad and thinking a 2032 will soon drain.
Beta Was this translation helpful? Give feedback.
All reactions