Getting physical aka physical buttons

This is a great idea, I’ll have to find some old NFC cards and try it out (or buy them cheaply online).

2 Likes

I’ve got prototypes of two physical Beeminder devices–one is a button I use to mark when I got o bed, and another is a red police light that goes off if I’m in an emergency day.

I’m using Particle Photons, and just used a little box as an enclosure for the button, and 3D printed something for the emergency light.

I’m going to write up a tutorial for the button, at least. People should be able to pick up a Photon for $19, get a little button+adapter for a few bucks from Adafruit or me or whoever, and have a wifi button that connects to IFTTT to do whatever Beemindery thing you want to do. You won’t need to be a programmer, but you’ll have to plug some things into each other and join the device to your Wifi and follow some instructions.

7 Likes

Thanks! Do you have any updates on the tutorial?

Hi, are any of you actually using any of these buttons? I’m curious as to which one works best with BM at the moment in terms of the physical buttons…

2 Likes

Sadly my Flic kickstarter order is still not here ~6 months later. I’ll let folks know how they work if I ever get them. :slight_smile:

3 Likes

Hi folks!

I have a little physical button I use with Beeminder. I’m not 100% satisfied with it, but I told @dreev I’d post this quite a while ago. I’ll post what I have, and I’ll write a little bit about where I want to take it at the end.

It’s a “Particle Internet Button”. It costs about $50 and connects to the internet via Wifi. It has buttons, lights, an accelerometer, a few other things, and it’s meant for people to write little programs with to connect it to IFTTT. Silly disclaimer: you can do this with other technologies, you can do this for a bit cheaper if you do it differently, but this is how I did it.

Steps

  1. Acquire a Particle Internet Button.
  2. Make a Particle account and sign into the Web IDE where you can upload programs.
  3. Add the Particle Internet Button you acquired to your account. This will also connect it to your Wifi. I find it easiest through the Android/iOS app, but you can do it through a USB connection.
  4. In the Web IDE, select your device (on the left popout menu). Go to my Beebutton sample code, click the button labeled “raw”, and copy that. Highlight the code in the Web IDE, and paste over it. Delete the top line, #include "InternetButton/InternetButton.h.
  5. In the Web IDE, click the save button on the left popout. It will need to have a name. Remember it.
  6. In the Web IDE, click the libraries button on the left popout. Enter InternetButton into the search box. Scroll down. Click “Include in App”. Select the name you named this in the last step, and click “Add to this App”. It will do some magic behind the scenes, and then add
    // This #include statement was automatically added by the Particle IDE.
    #include "InternetButton/InternetButton.h"
  7. In the Web IDE, click the “verify” button on the left popout. After a few seconds, at the bottom of the Web IDE, it should say “Code verified! Great work.” If not, stop and post what it says, because none of the remaining steps will work.
  8. In the Web IDE, click the “flash” button on the left popout. Within a few seconds, the small light on the board of your device should stop the “cyan breathing” and instead turn magenta. If this is the first time programming the device, it may take a few minutes as it will probably perform firmware updates first.
  9. Go over to the logs section of the Particle Dashboard, and make sure it’s uploading right, before we connect it to IFTTT. Unplug and replug your device. Watch it connect to your wifi (slow green blinks on the board, to fast green blinks, to cyan breathing…) Once the cyan breathing starts, the outer ring lights will flash a few colors to show you the program has started, and now it’s waiting for input. You should be able to press down on the device and feel the buttons on the bottom click. When you press down, the ring lights should show green. When you release them all, the ring lights should quickly flash white, before turning off and waiting for more input. At that point, the button release should have already been uploaded to the Particle servers. Within a few seconds, you should see it on the dashboard view. If so, let’s continue!
  10. Sign up or log into IFTTT. Connect the Beeminder channel and the Particle channel to your account.
  11. Create a new IFTTT recipe. Select Particle as the trigger, and then “New Event Published.” The event name will be “allbuttonsreleased”. You can leave the event contents blank. Select Beeminder “Add Datapoint to Goal” as the Action. I usually use “1” as the datapoint, but you can do a bunch of fun stuff here. I set it to notify me when the recipe activates at the beginning, until I trust that everything is working together.
  12. Click your button! It should light up green while it’s pressed down, and then white after it is released, and then go back to all lights off. You should get a notification that the IFTTT recipe triggered in the webapp within a few minutes, and then it should show up in Beeminder!

Notes

I’m not a huge fan of the Internet Button itself. I like the idea, but I would have chosen different tradeoffs–I would have probably eliminated the buzzer and accelerometer, and put a nicer case on the electronics.

Setting it up in the Web IDE is pretty gross, I have to admit. I think I could bypass steps 4-6 if I made this a library with an example. Let me know if anyone wants me to do that.

There is so, so much you can do with this, however. You can send over the time, instead of a “1”, to log when you wake up or go to bed, or when you finish cleaning the house, or whatever time-based goal you have.

I think it’s almost possible to have the whole thing flash red while you’re in an emergency day.

I’m not a huge fan of it requiring power via a cable rather than a battery. There’s a socket on the inside that indicates that they were thinking about battery power–but this device is pretty new. I haven’t heard if they’re going to be adding a battery pack, or if it was abandoned during development.

Anyway, this sort of thing is one of the things I do for a living. After really getting hooked on Beeminder, I took a look and didn’t see any embedded Beeminder devices. I started working on some tutorials, and then realized–none of the existing options are really great, so I was in a bit of paralysis as I started working on a “Beeminder Kit” to extend one of the cheap off-the-shelf units to be awesome for Beeminder, and then Spark released their Internet Button… which isn’t perfect, but is probably “good enough.”

Please let me know if you have any questions, comments, ideas… I still may make a “Beebutton kit” depending on how things go.

7 Likes

Wow. I’m not a hardware type of guy, but I’d play with some of these ideas if I could. Anybody knows where I can buy NFC tags cheaply in Europe? (Shipping costs from the US are ridiculous.)

1 Like

@mbork, try http://www.robotshop.com/eu/en/catalogsearch/result/?___store=eu_en&q=nfc or rapidnfc.com

Looks like they ship locally in the EU. I’ve never used them, but a buddy on Twitter pointed me there.

1 Like

Go to your local library and check their used book sales.
Many of them use NFC tags for book tracking.

And you get a ‘free’ book.

Also, check your credit cards & transport cards / tickets.
NFC tags are in everything these days.

2 Likes

I too have an internet button for beeminding, but I’ve gone a few (ok, a lot) steps further with the functionality:

  1. It’s not perfect and (at the moment) requires something running on a server of mine to be accurate (the beeminder IFTTT triggers need some more support), but I’ve mapped each of the 11 leds to one of my beeminder goals. If the goal is green, the led is green, etc. The goal is to make the whole button green.
  2. Each of the four buttons map to a different beeminder goal (the button closest to the LED that represents the goal, of course.
  3. Pressing all buttons goes into a “pomodoro” mode, where the internet button displays green lights in a cricle, slowly turning them off as the 25 minutes count down. It sends a message to IFTTT at the start and at the end of the pomodoro, and beeminds a pomodoro when done.

I’m working on publishing the code and maybe some instructions on using it, if folks are interested. It is fantastically helpful, I’ve never had as many of my goals green before.

7 Likes

I’m generally interested in these things, but find that I don’t feel like stashing buttons everywhere, and neither am I terribly happy pulling up my smartphone to scan things. I thought there was a ring sized NFC reader available (which could make NFC reading less reliant on a smart phone), but googling tells me I’m probably wrong about that. I suppose it could be possible to build something with https://dangerousthings.com/shop/simple-pn532/ though (and hopefully these things will shrink further).

When that is said, I found this to be very interesting - if the act of just touching something/anything could be the trigger: http://arstechnica.com/gadgets/2015/11/disneys-smartwatch-prototype-can-identify-and-track-everything-you-touch/

I’m also thinking that this “micro-radar” chip could do similar stuff, even without touching: https://www.xethru.com/

2 Likes

This sounds amazing! Any chance we could see a picture in the meantime?

Sad to report bad news, but it seems like Flic is bogus.

I ordered mine back in February and they arrived last week. Sadly, they won’t pair with my phone. Their FAQ says it should work with “Selected Android devices using Android 4.4 or later with Bluetooth 4.0.” but it doesn’t say what “selected devices” means. I guess mine isn’t one despite meeting the other requirements? I emailed their support a week ago and haven’t heard back.

Has anyone had a similar or different experience with Flic?

I have a friend who has one, his works fine, "It requires a fairly recent bluetooth low-power phone"
Does your phone meet the specs?

1 Like

Also, does any one have any experience with btt.tn?

14 days later I’ve heard back from Flic and their response was just to ask if my problem magically solved itself. Wait 'em out – Now that’s a customer support strategy!

They did at least confirm that my phone (Nexus 5) should work with Flic. I’m trying to get them to tell me their mailing address for returns but they’re not replying to that request. I’m worried they are going to say I didn’t return the Flics within the deadline and then I’m going to have to argue that their delay in replying to the return request email shouldn’t count against my time limit and they’re going to say that’s my problem, etc., etc.

I ordered a flic myself just recently - should get here this week, I think. Here’s hoping it works a little better than yours has… I will share how it goes. My phone is a Moto X which definitely works with the low energy bluetooth stuff.

Ah yeah good luck! Definitely let us know. :slight_smile:

Got it today. So far,

  1. It is not the color I ordered
  2. The battery was stone dead
  3. I had to put the new battery in and out 4 times before it started up correctly
  4. It wouldn’t connect to my phone until the umpteenth try.

So I’m not too impressed yet… we’ll see how things go when I start to actually use it for something.

1 Like

Yikes that is a bummer.

Flic finally got back to me and told me to upgrade my Android OS version even though the Flic app told me not to. So I did that and the Flic app is still telling me to not upgrade the OS version. But I was finally able to get one to pair to my phone…

2 Likes