Please post what you're working on! #4392
Replies: 2 comments
-
Posted at 2016-12-06 by @gfwilliams Here are two simple pages that I did before:
It's very easy to just view-source on them and see what's going on... Posted at 2016-12-07 by Ollie I've got this - "Are you pucker?" an "are you human" verification check. Struck me that this sort of tech could do two factor auth of sorts, even though here I'm just checking for humans, it could be ideal for a highly secretive forum dedicated to Puck owners ;) https://olliephillips.github.io/areyoupucker/ Very unfinished but the comms with Puck work. At least for me. You can grasp the idea. It's hosted on Github, so as HTML and JS it's totally hackable I expect, but someone could make this more secure going serverside I imagine. Horrid code is down to me editing it in place on github. Seemed easiest when I started out :/ Posted at 2016-12-08 by @gfwilliams Wow, nice! I guess if you wanted to use this for something personal, you could store a secret 'key' on the Puck itself that modified the code sent to it. I guess you'd still need something server-side though. Posted at 2016-12-08 by Ollie Thanks Gordon. I've tidied it up and finished it. Correct sequence enables the form submission. Has to use GET being Github pages - POST not supported. Hope it's useful to people. Posted at 2016-12-09 by user70974 I'm making a compass, with an LED that indicates when you're facing north Posted at 2016-12-21 by user71469 I'm pretty new to coding in general, so please excuse me if I have missed something obvious. I am able to turn each of the LEDs on and off using a webpage: Red:
Green:
Blue:
Nifty. I assume that using PWM or some other technique, I could pass RGB values to the Puck and get any color to display. I built the webpage and have sliders doing all kinds of fancy stuff... but I can't figure out how to send the RBG values to the Puck. In other words, instead of on/off, how do I send rgb(80, 128, 199) (which is #50DAC7) to the three LEDs? I think that this and this are moving me in the right direction, but I am not a coder and thus can't figure out how to apply it to my problem. For anyone curious, what I have so far is attached. Comments are welcome! Attachments: Posted at 2016-12-21 by @gfwilliams Yes, I think However if you wanted to access stuff directly (rather than using that module) then the second link you posted would work great. I just posted an update on that thread - the problem reported there was fixed in the 1v90 firmware. So, if you're using an up to date firmware, you can modify your code to do:
You just need to make sure that you tweak the 3 numbers in that string to be what you want - they range between 0 and 1. Just to add: When you're using PWM and lighting LEDs it'll be running the battery down quite a bit (probably 100x faster than it does when it's idle). It's probably worth adding a button that does Hope that helps! Posted at 2016-12-24 by @joakim I'm giving my parents a Qigong button for Christmas. They perform Qigong every morning, by playing an MP3 file of an old Chinese sage offering instructions in Engrish with traditional Chinese music in the background. They just play the MP3 file on their mobile phones, which takes a while to get set up, and sounds horrible. My gift will be a Puck with the Yin/Yang symbol painted on it. When they press the button, it will (hopefully) connect to my dad's Mac and play the MP3 file over our living room speakers. I'm thinking of using Node and noble on the Mac to receive the signal and play the MP3 file. Should be a fun project and a nice gift :) Posted at 2016-12-24 by benddennis @joakim Sounds like a cool project. I'd thought about doing something similar, though more of a soundboard-type project for work. Hadn't heard of noble before. Will check that out. Posted at 2016-12-25 by @joakim @benddennis You should check out https://github.com/audiojs as well, looks like a nice set of audio utilities for Node. I love how such a simple interface as a button can open up for so many interesting ideas. Must be really cool to use Puck.js if you're just getting started with programming, it's a magic button! It's of course just as much fun for those of us who like to create interesting stuff with code :) (Edit: Moved the rest of my comment a new post in Projects as it got quite long..) Posted at 2016-12-26 by benddennis @joakim I tweaked your code to create a Seinfeld clip randomizer as a PoC. Works as expected. https://enlightendata.github.io/ Posted at 2016-12-26 by thedamos A color changing night light I made for my daughter: https://github.com/somacdivad/puckjs-nightlight. We found that the night light looks best when the silicon cover is removed and then just set on top of the Puck in order to better diffuse the light from the LEDs. This makes turning the night light on and off a little bit more difficult, so I will update the project soon with code for using a second Puck as a remote control. Posted at 2016-12-26 by Andrewmk @TheDAMOS - have you seen this http://forum.espruino.com/conversations/297639 ? It makes the LEDs dimmer but gives a lovely diffused glow. Also difficult to turn on and off though... Andrew Posted at 2016-12-26 by Fisu I built a reaction game for the Puck. Each turn you have to beat the fastest reaction time. After turning on, a random amount of time will pass, then a blue LED will flash. Click the button as fast as possible. Green LED indicates a new fastest time. Another click starts a new turn. Gets quite addictive! Fastest time can be reset by holding the button down for 3 seconds. Posted at 2016-12-26 by @joakim @benddennis Hehe nice! My node version is done. @fisu The reaction game was just as addictive as you said! Nice one :) By the way, I can recommend Netlify for hosting Web Bluetooth Puck projects with HTTPS, as an alternative to GitHub Pages. It's free and easy to connect to git repositories on GitHub/GitLab/Bitbucket/etc. Just Posted at 2016-12-26 by Ollie @fisu Nice! I've tried it. Posted at 2016-12-26 by Tobi Hey, Posted at 2016-12-27 by Fisu @tobi great variations on the game! The double-click in the advanced game is a really interesting twist. I seem to get faster times when the LED remains on, compared to my game where the LED flashes. Posted at 2016-12-27 by @allObjects @tobi and @fisu, soon you need an external, replaceable button... the one in the puck will not be able to withstand die-hard, addicted players... ;-) Posted at 2016-12-27 by Tobi @fisu: about being faster - I subtract the debounce time in the reaction time calculation, this makes you faster. @allObjects: could be true, I added how to use an external button in my README: https://gitlab.com/tobiaska123/puck.js-reaction/ - this will it easier for you to see the color ;) Posted at 2016-12-27 by thedamos For anyone who is interested, I've updated my night light project to support a second puck as a remote control: https://github.com/somacdivad/puckjs-nightlight. I started to work on adding support for automatic night light activation based on low ambient light, but have had some problems with some funky reading from my Puck after the LEDs have been turned on and off again. Once I have that figured out, I have a few other more advanced project ideas I will post here once they come to fruition :). Posted at 2016-12-27 by @allObjects @TheDAMOS, I noticed the funky light readings as well after running LEDs. I wrote a Morse Code interpreter on top of a light change detector detecting ONs and OFFs of short and long pulses of light shined at the puck. To show that the interpreter is active, I blinked the RED led every few seconds and that mis-triggered the ON/OFF detection... :/ I'm sure you came across this conversation about DvDtDetector for detecting sudden value changes for switching/triggering (on Puck: Light Intensity Changes) which also shows a cross development approach in HTML5 document and browser to avoid the slowing down and battery consuming upload of code after every change... ;) For a detail, I had puck uncovered / not covered with the silicon cap. I tried with different LEDs, but depending on the amount of ambient light, it still mis-triggered. A different or modified cap could help with the sensing part somehow shielded from the impact of the LEDs without narrowing detection angle not too much. I though do not know which part does the light detection. Is it the IR LED/part that has a built in detection?... because it uses two (2) pins of the BLE module. Putting a tube / straw on it that protrudes the cap and has a lens at the other end could work. For lens a (half) glass perl (half way pushed in) could do the light catching. The tube should reflect light on the inside wall but not let light through the wall. A metal tube or or kind of tube with aluminum foil inside should work to provide enough dynamics in light intensity guided to the detector. Posted at 2016-12-28 by Ron @allObjects @TheDAMOS I think the problem could be related to the fact that the light sensor is (in? on?) the red LED, according to the reference: https://www.espruino.com/Reference#l_Puck_light:
I'll post my projects soon - I'm working on a module for using the Puck as an interface: a scroll wheel, e.g. to control volume through BLE HID (works already), and a simple API to control the LEDs, e.g.:
This mostly works too, but I'm seeing some strange bugs related to the event emitter that I haven't cracked yet. Posted at 2016-12-28 by thedamos My guess is that the sensor works as described in this article by measuring current induced by the photodiode when exposed to light. From that article:
That would explain the choice of the red LED - it detects more of the spectrum than the other LEDs. The article also notes the following:
So, there you go. Don't turn it on. For the simple night light project, I ended up using a second Puck as the ambient light sensor to turn the puck acting as the night light on and off. This is a decent work-around but certainly could be less than ideal for many projects. It is unfortunate that maintaining accurate light sensor readings looks like it requires sacrificing physical feedback on the puck, at least using whats on board. One possible solution in some situations could be to use the load function, which restarts the puck and reloads the script from flash. According to the docs load() does not perform a full hardware reset, but it might reset the light sensor readings. Posted at 2016-12-31 by benddennis I put together a simple color-coded compass using the Puck's magnetometer. It's admittedly less robust and doesn't contain much sophisticated math, but it more or less matches readings from my smartphone's compass app. See attached file. Color Codes Possible enhancements:
See this thread for more sophistication: http://forum.espruino.com/conversations/297915/ Attachments: Posted at 2016-12-31 by ClearMemory041063 @benddennis a fine job on the compass. Posted at 2017-01-03 by Ollie @bendennis I have solid green when I try this. Console reports bearings within the green range, but I don't think they should be. I'm changing all orientations. Posted at 2017-01-04 by benddennis @ollie Did you use the same offsets (x0, y0, and z0) or adjust them based on your own puck's readings? I took 4 separate readings (turning every 90 degrees +/-), and then averaged The X, Y, and Z values. I did this per a suggestion by from another post @gfwilliams. Posted at 2017-01-04 by Ollie I didn't adjust anything - wasn't aware I needed to TBH. I'll check out the post you link and give it another shot. Posted at 2017-01-04 by @gfwilliams Wow! There's some great stuff here! @joakim nice idea! Also, really fun to see it painted :) I wonder if you could just set up a shortcut key on the Mac, and then turn the Puck into a BLE HID Keyboard that did that shortcut? It'd mean you didn't need node running (but at the moment a constant BLE connection would use up the battery faster). @tobi @fisu I love those reaction testers :) I wonder if you could use Eddystone or NFC to broadcast your score in the form of a URL? @TheDAMOS @allObjects yes, the light detection uses the red LED. I go to some lengths to try and make sure you still get the same light readings even if you'd previously turned the red LED on - however there was never any code in there to cope with what happened if you used PWM on it while reading the light, and that could have caused some issues? I love the night light idea though. It's just nice and simple. You might find the battery doesn't last too long though - with the red LED on you're looking at ~100 hours I think. @benddennis nice compass! I guess one option would be to auto-calibrate (store the maximum + minimum compass readings and then subtract the center reading). It'd get confused if you took it near a magnet, but I guess the button could re-start the calibration. Posted at 2017-01-04 by tc I made a Media Controller, please take a look :D http://forum.espruino.com/conversations/298144/ Posted at 2017-01-05 by Ron @tc You just beat me to posting this :) I had a similar idea I've been building in the recent days, especially rotation for volume control. Mine's here: https://github.com/rsmeral/puck.js/ I modularized it into these
The VolumePlayPause demo is quite fat (especially due to Lights being fat) - when I load it through the Web IDE, it gives me Out of memory error, but when loaded through CLI, it works OK. Most likely the difference is in minification. Posted at 2017-01-05 by tc @ron yours great!!!! Posted at 2017-01-05 by CanyonCasa @ron, nice work. I would suggest "near" and "far" events as "close" can be confused with the verb close as in shut or end, often associated with streams. Posted at 2017-01-06 by Ron @CanyonCasa Thanks, good point! Fixed. Posted at 2017-01-08 by catmapper I'm working on a wearable watch light meter for manual photography. I shoot film with cameras that don't have built in exposure meters and it would be nice to have one on my wrist. Doesn't have a display yet but I can use my iPhone to read the value via Adafruit's Bluefruit console. I just got this prototype working about 10 minutes ago :D Code is here: https://gist.github.com/maxogden/1d9715a448f64513507623090f27c437 Warning: I'm a software person, not a hardware person :) I have the Puck's battery holder hot glued to the bottom of the circuit board to act as a pivot point so I can depress the entire watch face to have the puck's momentary button switch engage. It even works one-handed if I have the watch on snugly and flex my wrist upwards. Posted at 2017-01-09 by @gfwilliams Nice! I think this is the first project I've seen where someone's connected external circuitry to it! Posted at 2017-01-13 by hansamann Hi Gordon & Community, I am currently looking into a eHealth prototype using the puck. The idea is that elderly people wear the puck as akind of necklace and it can be used for things like:
This is also the reason I am looking into the http proxy with EspruinoHub. I want puck to scan for ble beacons every few seconds, then the closest beacon should be reported to an HTTP api. The same for button presses or the fall detection. This is very early, we're just beginnging to look into it. From a technical point of view, I think it is very much possible. Could I get some comments and ideas from @gfwilliams and the rest of the community? Posted at 2017-01-13 by Ollie There's no accelerometer on board. I was trying to do something to detect speed using the magnetometer, but didn't have a lot of luck. Changes in orientation are easy, speed in a direction not so easy. I'd be interested if other people have had more success with this. Posted at 2017-01-13 by Ron @hansamann Great idea! There's no accelerometer though, only magnetometer. That could still be used for fall detection with lower reliability, through sudden changes in rotation. Perhaps a machine learning algorithm could distinguish a fall from noise. For location detection, maybe you could reverse the logic - have logic on the hub scan for Pucks, not the other way around. It would save the battery, and not add any extra hardware, since for your original scenario, you already need hubs spread around for the Pucks to connect to as proxies. What sucks with NFC API now is that the only type of content that can be set is a URL, but that still works. Posted at 2017-01-13 by @gfwilliams Sounds like a good idea... So you actually want to use the Pucks themselves to effectively triangulate where someone is? If you're just after reporting signal strengths back down WiFi I'd seriously consider using the hub directly though, rather than a Puck (as keeping scanning for nearby beacons will drain the battery relatively quickly). Posted at 2017-01-13 by hansamann thx for pointing that out, I am thinking of adding one. Is there an accelerometer that you would recommend based on great APIs that are available on espruino? I think these adxl accelerometers are cheap, but of course even the smallest board adds to the overall size. But this is where the 3d files come in handy, as I can design a bigger enclosure with the same fitting puck in the middle for example. so, wiht an accelerometer - I would every few ms check for the gravity and if that dramatically decreases, your either in an elevator or falling... any ideas? Posted at 2017-01-13 by hansamann thx, great feedback. You're right, I already need multiple BLE proxies (raspberry PIs), so why not reverse the logic. so the puck would be a beacon in this case, I assume. Makes sense, I will think it through. Posted at 2017-01-13 by hansamann Hi @gfwilliams, I might reverse the logice based on the feedback received, but the idea was to scan for the strongest beacon every minute or so. The code that does this is fairly simple and worked fine in a simple test. see below. In this scenario, an home for elderly or our setup for an event, we're effectively able to control the BLE devices in the environment. So per section that I want to have a location reported, I would place one beacon right now. But again, maybe I am just turning this around, I need to think about it. In the end it needs to be fairly simple to setup and demonstrate, I might still have tendency to go with the scanning on the puck directly.
@gfwilliams do you have a recommendation for the accelerometer that I need to connect as well as for doing free-fall detection? Posted at 2017-01-13 by @gfwilliams I don't I'm afraid... I imagine you want a low power one that has a programmable IRQ line on it (eg, that can be programmed to detect freefall). Posted at 2017-01-13 by Ollie For your use case the magnetometer might be sufficient, given how it is to be worn.. Between set times (so not triggered by sleeping) if there was not much movement from magnetometer that would suggest wearer immobile. So this would pick up people who had fallen, but also those who who were incapacitated for other reasons - asleep, sick, laid up in bed etc etc. Just a thought. Posted at 2017-01-13 by @joakim Couldn't there be false positives caused by a fluctuating magnetic field that the magnetometer picks up (or something like that, I'm not educated on magnetism)? It could appear as if the wearer was active, even though the person was immobile. Also, isn't this a field many are trying to get into ("e-Health")? There could be accelerometers out there that specialise at detecting falls. Posted at 2017-01-13 by Ollie I guess. The readings fluctuate a little even in a stationary device. But when I was messing with it you had to be moving it about to get large movements in readings. So a threshold might be safe. Just trying to work with what we've got :) Posted at 2017-01-16 by hansamann Looks like the ADXL345 is nice and it has FF free fall detection. I am a bit troubled with activating it, but I am sure it will work in the end. thx a lot! Posted at 2017-01-16 by hansamann Thx for the thoughts, you're right that probably the accelerometer is the best choice of course. ADXL345 has free fall detection, I am currently investigating this. The problem is that the puck is such a nice package, even a lanyard can be attached. Now the extra cables for the accelerometer will require new 3d printing for another case, etc. Posted at 2017-01-16 by @gfwilliams I guess you might be able to make a small PCB that sits on top of Puck.js and contains the accelerometer? At least the silicone is pliable enough that you could get an extra 2mm or so in there without too much trouble. Posted at 2017-01-19 by Eric Would a simple vibration detector be suitable for zero battery drain option at a push? Another method could be based on a magnet mounted on rubber bands that would oscillate following a abrupt stop. Use the magnetometer to learn the polarity variances following various motions. Not as solid state but may have some experimental legs in it? Posted at 2017-01-21 by Ollie Web Bluetooth gateway Control multiple pucks in console mode, relay a master's instructions to connected slaves and I've just got MQTT subscriptions working over websocket - control puck via topic subscribed to over MQTT. https://github.com/olliephillips/webbleMQ It's a bit like an Espruino Hub but in the browser, not on a Pi. More planned with MQTT, including publishing and subscribing to each other in a master/slave fashion and an announced mode - an MQTT topic that lists listening pucks so we can control(hack) each other's Not especially practical I guess, but the web bluetooth connections persist with browser in background, and I seem to think when computer sleeps, so maybe a bit useful. Please note it's not secure. Although the WS connection is WSS the topics are on a public eclipse MQTT server. While the topic is fair contrived - someone would be hard pressed to guess it - it's obscurity only. Posted at 2017-01-24 by Ollie MQTT publishing over websocket added. Tested with two Pucks connecting and publishing on topics of their own. Edit: 'announced mode' available too now. Connected devices advertise their presence every 10 seconds on Posted at 2017-01-26 by Ollie I've had some decent results with this over MQTT, the Mosquitto browser client (via websocket) library is much better than I'd hoped for. Posted at 2017-01-30 by billsalt Hi All, Bottom line - code attached for Nordic's LBS peripheral side - my first puck.js project. Shipped it off today. Enjoy (I sure did)! Attachments: Posted at 2017-01-31 by OwenBrotherwood Easy hacking of espruino on Windows 10 with documentation
espruino/EspruinoDocs#322 (comment) Posted at 2017-01-31 by @gfwilliams @billsalt thanks! Glad it went so well for you! So you're not actually using Espruino on the PCA10028 itself (it is possible :) ) - but you're having the Nordic demo code connect to Puck.js? Posted at 2017-01-31 by billsalt Correct. I implemented the peripheral side of the Nordic LED/Button Service on the Puck.js and am using the PCA10028 to drive the relays and function as the central. Posted at 2017-02-01 by OwenBrotherwood hansamann
I just received my puck.js and note an indention half way up the black case that seems to fit the flexible white cover. I was also pleasantly surprised at finding the small pin intentions in the bottom of the black case to allow for keeping the nice package and either permanent or temporary pins going out of the bottom to a possible extra black package payload area with same diameter or possible other forms. I look around to see what people are using them for. Edit: Edit: Edit: Edit: Edit: Edit: Attachments: Posted at 2017-02-01 by Adam79 X post from Projects http://forum.espruino.com/conversations/299586/ Posted at 2017-02-02 by @gfwilliams The accelerometer has been asked a few times. I'm wondering if I could come up with a small, thin PCB that contained an accelerometer and could be soldered on. Seems like a lot of effort though, and you can still have a lot of fun with the magnetometer. I do have a few spare cases here. However the design files are online - you could have a lot more fun by just 3D printing yourself a new case that was exactly as you wanted it, and then fitting the existing silicone cover over it. Posted at 2017-02-02 by Ollie
Excellent, I wondered if you'd made these available. Thanks! Posted at 2017-02-02 by OwenBrotherwood triangulation of workers with edison beacons to help people find people in a business where people keep moving desk and the address book cannot keep up. Posted at 2017-02-02 by Ollie Just looking at the files. Oddly I can't load them into Slic3r or Fusion 360. They load. But there's nothing there. Edit: Ignore, must have been a bad download first go Posted at 2017-02-02 by OwenBrotherwood I had actually tested the 3D images last week: ok for Windows 10 3D Builder. Posted at 2017-02-02 by Ollie Thanks - got it. Bad download Posted at 2017-02-02 by OwenBrotherwood A quick look at the 3D file(s) Edit Attachments: Posted at 2017-02-02 by OwenBrotherwood
I have two choices, Freescale MMA8653FC (why is a "bit" complicated) and BNO055 as I have heard it is easy https://learn.adafruit.com/adafruit-bno055-absolute-orientation-sensor/overview https://www.tindie.com/search/#q=BNO055 As such, mag and accel in one small tight package and is "interesting" if it works. This package is nice and square https://www.tindie.com/products/onehorse/tca9548a-i2c-multiplexer/?pt=full_prod_search This package is nice and round with processor https://www.tindie.com/products/FabLab/the-sensable-thing-pico-platinchen/?pt=full_prod_search https://www.tindie.com/products/onehorse/bno-055-9-axis-motion-sensor-with-hardware-fusion/ Posted at 2017-02-02 by Ollie Started a print on bottom.stl and hadn't clocked the subtle camber on the design in the file - so that went well :) I look to be 10 - 15 degrees out. What's the correct adjustment to match it to an axis. Posted at 2017-02-03 by OwenBrotherwood @hansamann https://www.thethingsnetwork.org/forum/t/elderly-care-lorawan-products/3863/2 Posted at 2017-02-03 by Spocki Go for the Sentral Coprozessor. Ultralow power consumption. https://www.tindie.com/products/onehorse/ultimate-sensor-fusion-solution/?pt=ac_prod_search Posted at 2017-02-03 by OwenBrotherwood The 9250 was in my sights until someone recommended the bosh Posted at 2017-02-03 by @gfwilliams @ollie Argh, really? Sorry about that - my 3D printer's not up to it so I just sent it away and never noticed it was off-axis. I did the original designs, but then Seeed re-did them in STP because they thought that's what was needed for the moulds. I haven't had time to dig around in the STP yet but you could probably export a new one directly from the STP if needed? If you do it'd be great if you could give me a PR? Posted at 2017-02-03 by Ollie Yes, the STP file looks to be good. I'll send over a PR with another STL Posted at 2017-02-05 by OwenBrotherwood Not working on this but would love to see a puck.js watch with https://www.adafruit.com/products/1643 my 8 yr old daughter keeps steeling my puck.js to play with, and if I ever got time, I would make a watch for her for "play and learn" Edit neopixel 12 http://www.thingiverse.com/thing:424381 https://www.espruino.com/Digital+Dice Attachments: Posted at 2017-02-05 by @MaBecker Hi @OwenBrotherwood, Yes, working with neopixel is much fun. Check issue #1023, for now Pucks can not handle them. Posted at 2017-02-05 by OwenBrotherwood thanks MaBe a puck.js watch allows for a constant advertisement for the great puck.js for people who ask what it is, and also a means to control the telly when the kids have it on too loud. a method to put the puck-on-wrist to different modes using mag and button to control mode I watch espruino/Espruino#1023 and put it on a list of great things to come Posted at 2017-02-05 by @allObjects ...just think about the power... a neo pixel white full power draws about 60mA... so three hands with one color each full bright is 60+mA... since this is way over the expected draw of 20mA where the capacity is calculated for an average cell, it lasts for about 10..15 minutes, if at all, because the voltage drop with such a current may brown out puck and more so the neo pixel logic. Light power consumption got much better over its life cycle from incandescent to FL to LED, it is still behaves power hungry... Last but not least this was the reason early (red) LED watches where you had to press a button to show the time changed to LCD, and LCD is still better than e-ink / e-pager for displays that update 'constantly'. Posted at 2017-02-05 by OwenBrotherwood yes: power is gonna be an issue. Edit Posted at 2017-02-05 by @MaBecker Oh yes, power is important .... You can use a USB powerbank, if mobile, or a USB power supply. USB 5V to NP 5V DC Power and USB GND to NP GND like in this example by Gordon http://www.espruino.com/WS2811 Posted at 2017-02-05 by OwenBrotherwood Hmmm, with all the power needs, may have to go for a puck-pendant-watch: which actually could make things a lot easier as the button may present interesting problems if as a wrist watch https://learn.adafruit.com/sound-reactive-neopixel-peace-pendant Posted at 2017-02-05 by OwenBrotherwood In general, if one can make some "trinket" videos of the puck.js, one can give some meaning for micro controllers in wearables and funny things for female gender which is a focus at the moment in the organisation for coding for children I teach in my spare time. There is a 10% 90% split in gender where the females are the lesser part. Posted at 2017-02-08 by @MaBecker inspired by @Catmapper wearable watch light meter Posted at 2017-02-08 by @MaBecker inspired by @Catmapper wearable watch light meter. Combined PuckJS_stapholder.stl and bottom.stl with a slicer tool to create a Puck.Js watch case for 18mm nato watch straps Attachments: Posted at 2017-02-08 by @MaBecker Puck.JS on nato watch straps Attachments: Posted at 2017-02-08 by catmapper @mabe WOW that is so cool!!! you should put it up on thingiverse. I am definitely going to be printing one of these out. could you do a 22mm version as well? I noticed there are various cheap watch straps on ebay that range from 14 - 22mm Posted at 2017-02-08 by Ollie Nice @MaBecker. Share the files! Edit: I should have scanned up the thread a bit - they are there! Posted at 2017-02-08 by @MaBecker Puck.js watch is now on thingiverse for 18mm and 22mm straps Posted at 2017-02-09 by Wilberforce I think the user interface needs work.... I can't tell if that mean sunset or sunrise ;-) Posted at 2017-02-09 by OwenBrotherwood Great @MaBecker : I can see we read the same things. Posted at 2017-03-30 by elefas Hi! I am currenly developing an app where a Puck.js is acting as a host for receiving data from nearby ruuvitags. https://github.com/pleft/puckjs_ruuvitag_scanner Posted at 2017-03-30 by @gfwilliams Nice! Thanks for posting up! Just so you know, you can now link directly so it auto-loads in the Web IDE: https://www.espruino.com/ide/#https://raw.githubusercontent.com/pleft/puckjs_ruuvitag_scanner/master/PuckjsRuuvitagScanner.js Posted at 2017-03-30 by elefas
Wow cool feature! Thanks! Posted at 2017-04-11 by cryptobias Just a little project I did to get familiar with the Puck, but maybe it's interesting to someone nonetheless. A self-calibrating volume control knob using the magnetometer and bluetooth hid. To use it, upload the script, lay the Puck flat on the table, spin it slowly one or two times to calibrate the magnetometer readings. Then press the Puck once and spin it to control the volume of the devices it is connected to via bluetooth (if it is supported). There are some problems with detecting overflow, but it works ok. Beware, this is polling the magnetometer with 10 Hz, so it might drain the battery if you keep it running. Posted at 2017-04-15 by furuskog Im trying to connect to a MI FlowerCare sensor. Im having a issue thoe.
I get error disconnected it seems that the flower sensor gets disconnected (I get error disconnected) :) in order to save battery there is a automatic disconnect after like 2 secs. Is there something I can do? Is my code correct ? I got the values using the gatttool on a raspberry Pi. I also found some clues here: https://github.com/open-homeautomation/miflora/blob/master/miflora/miflora_poller.py, Any sudgestions? (Update)
Outputs ::::::: Before watering
After watering
So now I'm wondering if I can get the moister value from the data ArrayBuffer? Posted at 2017-04-18 by @gfwilliams @cryptobias thanks! That's really cool! I had always wanted to try something like that. Thanks for using the IDE link too :) @furuskog odd about the disconnect. I'll try and release 1v92 some time this week, and it may fix those. Maybe just see if the value from If you have other problems, please could you post in a new thread though? It makes it easier to help you out properly without also responding to everyone else in this conversation :) Posted at 2017-04-18 by furuskog @gfwilliams ok will do Posted at 2017-05-17 by jefure Hello everybody, I create connected a cheap ground moisture sensor to a puck.js and created a node-red flow to notify me when the plant get dry. You can read the whole thing here . I also created a guide how to run EspruinoHub using systemd which is here . Posted at 2017-05-18 by furuskog @jefure thank you very much I will look in to that this when my soil sensors arrive from eBay Posted at 2017-05-22 by @gfwilliams That's great - thanks for letting us know! It's really nice to see a post showing how to set something like that up from beginning to end. Posted at 2017-06-20 by Thinkscape Maybe not as sexy as some other projects, but here it goes I'm working on a better way to heat my apartment using electric oil heaters, pucks and Wemo plugs.
Posted at 2017-07-14 by Kiffee I've create a Puck Decision Engine. https://github.com/Kiffee/Puck.JS-Decision-Engine Pretty simple starter project. Posted at 2017-07-17 by @gfwilliams Neat idea! A bit like a magic 8 ball :) Posted at 2017-08-20 by Fisu Hi all. I've just created a web app that can use Puck.js to help users type, as an alternative to traditional keyboard entry. Maybe useful for those with reduced mobility. Once connected to Puck.js from the menu bar button, a single click starts the row selector. Another click will select the row and start iterating through the letters in the row. Also works without Puck.js by using the keyboard's space bar instead. ClickType web app Posted at 2017-08-21 by @gfwilliams Nice - that's really neat! It's really cool to see it being used as an accessibility device. With something like this there's loads of scope for making novel controllers - for instance car air pressure sensors are dead easy to wire up (power/gnd/signal) and you could then use suck/blow to control it for people who can't move anything. Out of interest, was this made for someone in particular to use? Posted at 2017-08-21 by Fisu No, I didn't make it for anyone in particular. Perhaps if I had known someone that could use it, I would have spent more time improving it. I just got the idea after playing with the Puck and realising that there could be many uses for people with disabilities. Posted at 2018-06-11 by Sdellava Hi everybody. I need read/write some data from a standard ISO 7816 smart card. Normally a PC use a USB smart card reader. I'm wondering if someone tried to use the UART to interact directly with the smart card chip. Thanks for any suggestion Posted at 2018-06-11 by @gfwilliams I don't see a reason why you couldn't do that. If you found a description of what you needed to send (or even better, some C code that did what you need) then we could help you write the JavaScript for it. Please could you start a new thread for that though? This one is getting huge and is ideally for posting up things that users have created with Puck.js :) Posted at 2018-06-12 by J{a}SON i'm hoping to get my first complete working version of a synthesizer using a few micro controllers, and a puck as a midi controller. it will use the light sensor as a theremin, and the button as a wobble controller. i also added a 20 watt per channel stereo amplifier shield, so it can fill a room with sound. i'll add some details when back from my business trip this week. |
Beta Was this translation helpful? Give feedback.
-
Posted at 2018-09-23 by asez73 Hello,
Posted at 2018-09-24 by @gfwilliams Wow, that's excellent! Please could I put that in the Espruino boards repository? Image of what it looks like attached. Just some notes for anyone else trying this:
Attachments: Posted at 2018-09-25 by asez73 Hi, Attachments: Posted at 2018-09-25 by @gfwilliams Thanks! Just added here: https://github.com/espruino/EspruinoBoard/tree/master/Pixl.js/other And GitHub has a neat built-in 3D file viewer that works for the STL! https://github.com/espruino/EspruinoBoard/blob/master/Pixl.js/other/pixljs.stl Posted at 2018-09-25 by @allObjects nice... for my 3d printing exercises of 'holdings' for a pixl I created this PixlPlug.stl file (in Tinkercad). Attachments: Posted at 2018-10-26 by user95170 Hi, I'm about to enter a 25-hour hackathon over the weekend, and I'm planning on using four puckjs buttons to send simple click messages to a web bluetooth website and receive messages to light up the LEDs on the pucks. Posted at 2019-05-14 by user97702 Busy with many projects but one people may find interesting is a strain gauge with puck.js Posted at 2019-06-21 by Jennygrist . Posted at 2019-06-21 by Robin Fri 2019.06.21 Hello Jenny, These tutorials might provide one choice using ultrasonic:
Otherwise I.R. beam (optical) break, such as a TV remote signal, or the radar RCWL-0516 Microwave (radio) Radar Sensor come to mind. Posted at 2019-08-14 by HarryCaper Hi, It arrived this morning, and after a little hiccup I got it working. I needed to turn on location services (bluetooth was already on) on my android phone to detect the DfuTarg in order to flash the firmware. Then with the help of the "DIY Hands-free music control with Puck.js" YouTube video, I was able to put together the code snippet below, which on a short button press sends the right arrow key (Play Books = next page) and on a longer press sends the left arrow key (Play Books = previous page) And I'm in business :-) It seems a shame to use such a versatile device for such a simple thing, but it is going to make reading so much easier on my neck and wrists. Perhaps there are others out there who also need something to help them read hands free.
Posted at 2019-08-27 by @gfwilliams That's brilliant - thanks for sharing it and posting your code up! Honestly, this is exactly the sort of thing it's designed for: making it easy and fun to create things. Posted at 2019-10-05 by DBovey Working on a pixl+multi for a first project to learn JS: a universal conference badge, as geeky as possible. I'm not used AT ALL to the object and event-driven aspects of JS (my only programming experience is C on micro-controllers). @gfwilliams: would it be possible to opensource the pixl+multi, including HW? Obviously the schematic is quite different from the nodeconf badge and I'm a bit lost. Posted at 2019-10-05 by Robin Sat 2019.10.05 @dbovey I just googled: 'nodeconf badge espruino' has the links to hardware and software you seek or, if you are after the Pixl source, from the main web site beneath the 'Information' heading:
A good starting point:
Posted at 2019-10-07 by @gfwilliams @robin I'm pretty sure that's the older badge. @dbovey yes, absolutely. It is all published already - https://github.com/nearform/nceubadge2018/tree/master/sch is what you need I believe. There's a link on the Pixl.js multicolour page but it's not very obvious - I'll make sure I tweak that. JS's callbacks/promises can definitely take a while to get to grips with if you're coming from something like C, but it's worth it. They're really powerful when you're there. The badge sounds like a fun project though - please let us know how you get on! PS. I'm afraid I don't think there are enough posts specific to the multicolour badge to warrant adding a new forum for them yet - there'd only be about 3 posts in there! If you have any questions the Pixl.js forum (as you have used) is definitely the right place. Posted at 2019-10-07 by DBovey Thank you for your answers! I hadn't found the 2018 badge on github, only the 2017 one (which wasn't marked 2017). Posted at 2019-10-07 by Robin Mon 2019.10.07
Was the intent to include in the Espruino documentation or into a personal account? While most supporting documentation is welcome, not all might be appropriate. What specifically was to be included in the .pdf mentioned? Post a correlated page link that might clue us in to the content intended to be part of the solution. Please explain. Posted at 2019-10-08 by @gfwilliams I think @dbovey means to include PDF versions of the schematics and board layout - it makes it much easier to check stuff without having to have Eagle. I've just done that for you now. Posted at 2019-11-02 by ChristianW Currently I'm working on a sort of bicyle computer using a Pixl.js Posted at 2019-11-04 by @gfwilliams That sounds great - please could you post up some pictures when it's done? :) Posted at 2019-11-04 by ChristianW @gfwilliams sure - will do. Just waiting for the acrylic case I ordered last week - maybe I'll get something finished this week. Will use a RJ45 connector with the socket mounted to the VM (velomobile) so I can take it out for updates or inspection... Posted at 2019-12-28 by JonBray I'm also looking at doing a health app of sorts - turns out that quite a lot of people with type 1 diabetes get very sweaty when they're having a hypoglycaemic episode. So I'm looking to create a galvanic skin response reader (with DroidScript android app to do the alerting). I've got a GSR from Seeedstudio which needs 3.3V to power it - can I do this from one of the digital IOs (which means I can turn it off when not reading to save power?) Alternatively, am I right in thinking that skin capacitance varies with moisture in the same way that resistance does? IOW can I dispense with the separate GSR altogether and just use capsense? The other part of this project (unfortunately the end-user I have in mind has deteriorating eyesight) is a simple bit of code (actually running on the Android) which counts the number of consecutive button presses and then performs tasks based on this (so 1 click is open google assistant, 2 clicks is say time, 4 clicks to phone a particular number, 5 clicks is get GPS location and send an email with a link to that location on google maps etc) Kudos for inventing this extremely cool bit of kit BTW - my first attempts faltered when I realised how awkward it was going to be to put arduino plus bluetooth breakount plus GSR plus battery back in wearable form that was technophobe-friendly! Has anyone done a 3D design for a star-trek communicator badge yet? :-) Posted at 2019-12-28 by @allObjects I created a separate conversation - Powering / control power of sensors / peripherals by Espruino pins - to focus on this subject and keep this reference or pointer conversation as concise as possible. I like to put one or few liners here with a link to the full blown, detailed conversation. [Edited... which explains why following two posts may make you feel you missed something...]. Posted at 2019-12-28 by JonBray Thanks; that makes sense and its handy to know the max current; I've posted on the Seeedstudio board as well so hopefully they will come back with the max current drain. I hadn't thought of using multiple pins; good idea. And I had no idea that it was important to set the pins to input before powering off, so glad I asked here before continuing! Just checking, do I do that with something like: pinMode("D1", "output"); as per the Digital Dice tutorial? Specifically, should it be input_pulldown or input_pullup (Sorry, I'm sure you were clear in line 4 of your answer to someone with a bit more electronics knowledge than I have!)? Thanks Jon Posted at 2019-12-28 by Robin Sat 2019.12.28
I personally don't like driving external chips/modules using the micro itself, as all those electrons need to flow somewhwere and therefore like to cook (shorten the life expectancy somewhat - but by how much might be unknown) the micro with dissipated heat when driven by those pins. I like to keep things extremely cool, and dissipate heat with buck converters or voltage regulators. As @allObjects has successfully done, it would be possible, but with at least two I/O pins under the following assumptions: As no datasheet link for the GSR was provided, I took the first five star Google response and ended with this:
So, if that is the device/module, then at least 20mA will be required (at least by the LM324 as no module datasheet is available)
Which Espruino board was intended to be used? > 'Alternatively, am I right in thinking that skin capacitance varies with moisture in the same way that resistance does?' Curiosity started me searching, but realized to find the definitive answer will take me too far down this rabbit hole. Short answer - yes but too many factors to consider
Posted at 2019-12-29 by JonBray Thanks - and yes, that's the correct GSR device. I've got no shortage on pins I can use for this (as there isn't going to be anything else connected to the espruino). I was planning on using the Puck BTW. Yes, my vision started to blur a little when investigating skin capacitance too! I guess all I really need is for a reliably measurable change in capacitance as the skin gets sweatier - it doesn't need to be linear, it just needs a cut-off point where it sends an alert. So I think I'll try that first in the interests of reducing the number of components available to stick into my poor patient zero! Thanks again to both of you! I'll let you know what works. Posted at 2019-12-29 by Robin Sun 2019.12.29
See comments in the destination link below: Jon, @user106970 it would make sense to start a unique new thread for future answers. This thread was intended to describe an idea, and we have now inadvertantly hijacked this one. @allObjects started a new thread see #133 link to handle general observations using the same technique you were after. There is a lengthy discussion on pin sourcing for the nRF52 (Puck) chips. Posted at 2020-03-09 by dandelany Hi all! I've been working on a project to create a DIY smartwatch, and have started playing with a Puck and an Espruino MDBT42Q breakout - such neat little devices! I'm still working on designing something that will fit in a watch form-factor, but I recently used the MDBT42Q to put together this little self-contained handheld prototype so I can start hacking on it :) I wrote it up on this Hackaday page, more build logs to come! https://hackaday.io/project/170205-rubble-watch Thanks, Gordon, for a great platform - Espruino really is a lot of fun. Attachments: Posted at 2020-03-10 by @allObjects Neat! ...and to get rid of the the mechanical / button stuff, you can add a touch panel, such as: https://www.ebay.com/itm/Factory-Outlet-1-4-inch-Resistive-Touch-Panel-Screen-with-Soldering-FPC/292819160320 ... It is a bit larger than you need, but there may be others around... even capacitive one. The resistive though are 'passive' - no noticeable power draw. - on the other hand, the touch panel could be activated the same time as the display comes on. Posted at 2020-03-10 by @gfwilliams That looks great! If you didn't go for a touchscreen are some nice thin switches like are used on the Pico - you could maybe get 2 down each side of the LCD. It's not 'official', but I'm still doing http://forum.espruino.com/conversations/332911 - so please could you drop me an email and I'll give you a coupon code for the Espruino shop? It might help with the next version ;) Posted at 2020-03-19 by dandelany Thanks allObjects! And thanks Gordon, that's very kind, I'll email you. I have a Fitbit with a touchscreen which always makes me feel like I have fat fingers, so I think I'm gonna stick with physical switches :) I'll look into some mini ones like the Pico - seems like Digikey has a good selection. Still trying to decide if I can pull off a usable watch with off-the-shelf breakouts etc., or if I'm finally gonna have to bite the bullet and learn how to design a PCB.... Posted at 2020-03-19 by @allObjects Issue with touch screens of fit-bands and a-like is that they do not have many areas... usually just one, and bangle.js has two: left and right. Posted at 2020-07-21 by DanTheMan827 Right now I'm messing around with emulating the NTAG215 NFC specification, it turned out to actually be fairly straightforward to get the basic stuff working. Posted at 2020-10-26 by user120213 Hello all! Thanks for the awesome hardware! Posted at 2020-10-26 by @gfwilliams Wow, really nice! You're actually using the magnetometer rather than accelerometer/gyro? Posted at 2020-10-26 by user120213 Yes, the gyro is what I intitally wanted to use. But it gives me random high value readings (even with no motion at all), which seem odd to me, so I switched to the magnometer. Posted at 2021-07-12 by ChristianW Since I have collected a number of Puck.js devices and some MDBT42s there is the current need to improvise a cycle track lap counter for some 2..8 riders on a 250 m cycle track.
Simple tests were very promising. I will have to check if passing at 50-60 km/h at 5-8 m distance carrying 8 Pucks all advertising will work flawlessly just to be sure... Question here (I am not so much into the internals/Espruino architecture): Posted at 2021-07-26 by @gfwilliams That's great! Are you using an MDBT42 with external aerial? If not, you could maybe get away with just a Pixl.js (which still has the same bluetooth).
Yes, it should be fine - as long as you're not using Bluetooth to talk to the Pixl? One thing to watch out for is to get the Posted at 2021-07-26 by ChristianW Thanks, @gfwilliams.
The The crux is:
First it worked on the assumption that contact is lost for some seconds on the far side of the lap so the next time someone passes it counts a new lap. Or maybe I'll make Posted at 2021-07-26 by @gfwilliams Are you willing to share your code? Maybe you could put it in a new post and I might be able to take a look at the setScan handler and see if I can offer any pointers? If you're not already, using the 'filter' as a second argument to it should help to reduce overhead by allowing espruino itself to filter out un-needed packets.
This happens is Ctrl-C is sent (which the IDE does automatically if it doesn't get a response) when the device is busy processing events - so yes, that's probably related. Either some JS code is taking a very long time to process, or there's so much Bluetooth traffic it's spending all its time handling it. Posted at 2021-07-26 by ChristianW Sure. Thanks. I'm already refactoring some of the code. One single puck advertising full blast will cause about 20-30 events / second on the receiver side. Currently it is hard to trigger the error message. It just happened at some time while testing the device "in the field". |
Beta Was this translation helpful? Give feedback.
-
Posted at 2016-12-06 by @gfwilliams
Everyone's starting to get their Pucks now, and they're looking for fun things to do - please post up what you've been working on, however big or small!
There are two main tutorials that I reckon will help everyone get some fun projects going:
And if you have a link to a Web Bluetooth on github.io that people can try out on their Pucks, that'd be amazing!
Beta Was this translation helpful? Give feedback.
All reactions