Beta
×

Welcome to the Slashdot Beta site -- learn more here. Use the link in the footer or click here to return to the Classic version of Slashdot.

Thank you!

Before you choose to head back to the Classic look of the site, we'd appreciate it if you share your thoughts on the Beta; your feedback is what drives our ongoing development.

Beta is different and we value you taking the time to try it out. Please take a look at the changes we've made in Beta and  learn more about it. Thanks for reading, and for making the site better!

Ellipto: a DIY Fitness Tracker and Dashboard In 70 Lines

Soulskill posted about 2 months ago | from the health-by-hacking dept.

Hardware Hacking 32

New submitter InternetOfJim writes: "This is one of the most fun weekend projects I've done in a while — a fitness tracker for my elliptical trainer. But the real agenda was to figure out how lazy I could be via web services (Keen IO and Brace IO) and development platforms (Electric Imp). Quite lazy, as it turns out. I wound up with a working device and a nice realtime dashboard with no soldering, no backend to manage, and surprisingly little original code needed beyond the sensing and power conserving parts of the firmware and a little javascript to customize the dashboard."

cancel ×

32 comments

Sorry! There are no comments related to the filter you selected.

oh another step counter (1)

Njovich (553857) | about 2 months ago | (#47215553)

What's up with all the glorified pedometers these days? When I read 'fitness tracker' I was thinking about something that tracks your fitness, not just your steps. He could also install any of the thousands of pedometer apps on his android phone and be done with it.

Re:oh another step counter (0)

Anonymous Coward | about 2 months ago | (#47215739)

Yea, but then he wouldn't get to slashvertize all the companies and products he is involved with!

Re:oh another step counter (0)

cdrudge (68377) | about 2 months ago | (#47215799)

Because it wouldn't give a chance for the author to plug his wife's company in a Slashvertisement.

Re: oh another step counter (1)

InternetOfJim (3690891) | about 2 months ago | (#47222665)

Pedometers (devices and apps) seem to work poorly on elliptical trainers and won't work at all on bicycles. So if you want to track these activities , it's helpful to have multiple specialized trackers that know what's going on for different use cases and then combine the data in the cloud. Combining the data is a project for another day, however. I'm sure future elliptical and exercise bikes will build that functionality in. This is the general trend a lot of us expect-- lots of small, specialized devices everywhere, posting to API-accessible backends with analytics.

Warning: Slashvertisement (5, Insightful)

Anonymous Coward | about 2 months ago | (#47215637)

New submitter InternetOfJim writes:

So, the other day, my lovely wife Caroline came home with an Imp. An Electric Imp, to be precise—a WiFi sensor/actuator node in the form factor of an SD card. It’s supposed to be designed for simple development and low power consumption. Electric Imp had just completed an integration with Keen IO (Caroline’s company). Keen IO is a powerful platform for backend analytics— you just send them the data and you can build beautiful dashboards by inserting simple javascript onto an HTML page.

Stop. InternetOfJim, it's good that you came clean on the fact that this is your wife's company, but you really needed a bold "disclaimer" in both the summary and article for me to think this is anything but a self-serving post to advertise something that will profit your wife and, by obvious extension, you. The fact that this is your first /. submission only supports this.

Re:Warning: Slashvertisement (4, Insightful)

TheCarp (96830) | about 2 months ago | (#47216067)

If it was strictly an opinion piece or even a simple review, I might agree. If this was aimed at a comparison between products, absolutely. However, looking over this there is quite a bit of content, with code. Its basically a tutorial on setting up the device.

Why does someone who is basically a tutorial author need to disclose his relationship to the company?

Disclosures are to call out the appearance of conflict of interest. I see no clonflict here, in fact, whether the author was paid outright to write the piece or not seems irrelevant for the type of content. I mean lets go one step further and assume its not his wife but him, lets make him an officer of the company even. Where is the conflict in him givning examples of how to use his product on a technical level? If Jeff Bezos wrote an article on how to setup your amazon merchant account, nobody would bat an eyelash.

In short, disclaimers are for professionals who need to maintain a reputation for impartiality, not for people doing demos.

Re:Warning: Slashvertisement (0)

Anonymous Coward | about 2 months ago | (#47220641)

In short, disclaimers are for professionals who need to maintain a reputation for impartiality, not for people doing demos.

Not even close. Disclaimers are for any potential conflict of interest. Anything else is an attempt at fraud; in other words profit by deception. I love how marketing people try to rationalize their arsehat-ery.

This man has a conflict of interest and is deceiving people into making judgements that are wrong. e.g. That a third party has said this product is good. I damn well do want to know whether somebody has a financial interest in saying something.

Re:Warning: Slashvertisement (1)

TheCarp (96830) | about 2 months ago | (#47221855)

Marketing people? I have never been so insulted. Marketing?

Disclaimers are for situations where there could be any confustion. There is no confusion here. You are welcome to hold whatever standards you want though. Enjoy yours I guess.

disclaimer enough Re:Warning: Slashvertisement (2)

Fubari (196373) | about 2 months ago | (#47218251)

Cut the author some slack. The guy pointed out his connection to Keen IO & Electric Imp early in the writeup; that is disclaimer enough for me. It was a fun and interesting read and I appreciate the time he put into the writeup.

r.e. self serving: sure, but it also serves others (like myself) by being educational. I hope Keen IO makes a ton of money and goes on to create more cool things.

...but you really needed a bold "disclaimer" in both the summary and article for me to think this is anything but a self-serving post to advertise something that will profit your wife and, by obvious extension, you.

70 lines of code ... IF (5, Insightful)

BitZtream (692029) | about 2 months ago | (#47215853)

you ignore the massive libraries it uses.

I can write anything you want in a single line of code, given enough time to make a library that encapsulates all the required functionality into single function call.

Its not impressive, it just shows how you think you're impressive for using so much of someone else's hard work and acting like you did it.

Re:70 lines of code ... IF (0)

Anonymous Coward | about 2 months ago | (#47216027)

I can write anything in a single line of code; C with it all separated by semicolons;

Re:70 lines of code ... IF (1)

jellomizer (103300) | about 2 months ago | (#47216029)

My thoughts too.
The lines of code comparison is only apt if you are comparing programs that do the same for the same language.

My Python Web Server is coded in 3 lines of code... But that is because Python has a Web Server library built in. If I were to do it in C with only the standard libraries. it would probably be a few hundred lines. If I needed to do the standard libraries too, then I probably need at least a few hundred lines of assembly. Of course the assembly is often contains macros of commonly used fuctions so you really need to write the byte code.
Oh don't forget the stuff the OS is handling for you all nice and tidy, like memory management, multi-tasking, and giving you nice easy interface to your network and graphics.

My Favorite part (0)

Anonymous Coward | about 2 months ago | (#47216039)

can we build connected devices with no backend whatsoever. Yup, not even a single rented server, just these two services and a web hosting service.

No backend whatsoever. Except for the three backend servers, there's no backend server!

Re: My Favorite part (4, Informative)

InternetOfJim (3690891) | about 2 months ago | (#47216861)

I understand the concerns. I've tried to disclose appropriately and focused on two things: 1. This is a legitimately new approach. Pretty much everyone I know in the IoT and connected device world is still building a backend infrastructure and coding their own APIs, even for pure analytics apps. 2. A detailed tutorial seemed appropriate so people can see some of the ins and outs of doing this, and to show that now non-experts can do this kind of thing as a weekend project. Obviously, this doesn't eliminate code or servers. But the big win is that I don't have to deal with any of that. It's like saying Rails wasn't a big deal because all the code is on the framework, or AWS isn't a big deal because there are still servers. So look, I'm not a PR flack or something, I've been working on wireless sensors professionally for over a decade and I'm just excited to see the work get a easier, because I've spent a lot of the past 6 years building out and maintaining a scaled sensor backend before. It sucked, and I don't want to do it again if I can avoid it!

Re: My Favorite part (1)

BitZtream (692029) | about 2 months ago | (#47218819)

1. This is a legitimately new approach.

No, it isn't. I have several 'IoT' things, NONE of them use some custom backend infrastructure somewhere else.

Pretty much everyone I know in the IoT and connected device world is still building a backend infrastructure and coding their own APIs, even for pure analytics apps.

Then you're a newb with little experience who must have just recently discovered the NEST and think thats normal. You just included the backend infrastructure on the device, and for a single object. This is how pretty much everything started. Years ago.

2. A detailed tutorial seemed appropriate so people can see some of the ins and outs of doing this, and to show that now non-experts can do this kind of thing as a weekend project.

Except its not a weekend project for those who don't already have considerable know how in the area.

Obviously, this doesn't eliminate code or servers. But the big win is that I don't have to deal with any of that.

Congratulations, you've caught up to 15 years ago. Hell, I have chips with ethernet and serial interfaces that have a built in web server (and a couple other protocols I don't remember) that simply require you to send it a few serial commands to return some html when connected via ethernet. Thats from the late 90s. Just because you recently discovered libraries doesn't make it impressive.

because I've spent a lot of the past 6 years building out and maintaining a scaled sensor backend before. It sucked, and I don't want to do it again if I can avoid it!

So you think because you've only been doing one pigeon holed type of project that there is no other out there?

Its like you've never even heard of an IP camera from 15 years ago.

Worst part is that this made the front page of slashdot.

Re: My Favorite part (1)

InternetOfJim (3690891) | about 2 months ago | (#47221959)

(A) ad hominem attacks are never appropriate here, although they're all to common. Learn some commenting manners, which exist to promote better reasoning and more useful commentary. (B) I'm not talking about on-device analytics and on device dashboards. I'm talking about he full power of what you can store and calculate in the cloud, since all the data is there. In the future, I could decide to add a regression analysis combining this data with my sleep and work schedules, or plot my average cadence over time, even though I didn't calculate rollups of that while the data was being captured. With fairly small effort and coding, I could build a leaderboard and stats across thousands of users, and have regional comparisons to create competition. And i sure don't want to do all that on a battery powered constrained device in the field.

Re: My Favorite part (0)

Anonymous Coward | about 2 months ago | (#47219743)

This is what I wanted to investigateâ" can we build connected devices with no backend whatsoever. Yup, not even a single rented server, just these two services and a web hosting service. Yes, you can quibble that there is a backend, Iâ(TM)ve just outsourced it, and thatâ(TM)s fair enough. But I donâ(TM)t have to deal with it, and my team doesnâ(TM)t have to worry about it. In my solipsistic world, that means it doesnâ(TM)t exist.

Wow! What a bold statement! You are not using backend because you do not need to deal with the one you are using in your project ??? Even you send data to the backend in your code??? So when you are googling, you are not using google service because you do not need to deal with google engine. Right? Duh!

Re:70 lines of code ... IF (0)

Anonymous Coward | about 2 months ago | (#47216841)

This is 20 fucking 14.

For the price of two lunches I can order a stick of ram on newegg that doubles the total available memory of a supercomputer from 15 years ago.
My phone has a 64 bit dual core processor, 64 gigs of storage, and connectivity to a world-wide network that everyone else uses too.

Of course he uses fucking libraries. And so does everyone else. You'd look like a dumb fucking retard re-coding every basic and standard implementation. It's a waste of god damn time. (Oh? You used your OS's TCP/IP stack? Fucking loser. You didn't make that program!)

The fact that he easily built something functional with 70 lines is a testimate to progress. He didn't have to write all of the other crap because it's considered ubiquitous.

Re: 70 lines of code ... IF (1)

InternetOfJim (3690891) | about 2 months ago | (#47217137)

Ok, so one of you is accusing me of flacking for my wife's company to make a quick buck, while the other accuses me of taking credit for her company's work. Tough crowd!

Re: 70 lines of code ... IF (1)

Trogre (513942) | about 2 months ago | (#47217515)

It sometimes helps to picture the Slashdot community as a room full of Comic Book Guys. It's probably not far from reality.

FWIW, I think this is a pretty cool project.

Re: 70 lines of code ... IF (1)

BitZtream (692029) | about 2 months ago | (#47218847)

The two are not mutually exclusive, especially in such a bunk piece of slashvertising.

Best part is, last time I checked, the electric imp did everything programming wise via 'the cloud' ... which is exactly what you claim to not be using.

Did you not program it with a cloud based IDE?

Oh for fucks sake, you even used cloud backends for everything after saying you didn't need all that infrastructure.

You don't even know how it works, do you?

Re: 70 lines of code ... IF (1)

InternetOfJim (3690891) | about 2 months ago | (#47222923)

I said nothing about NOT using the cloud. It's all **about** using the cloud as much as possible to simplify the devices and to avoid unnecessarily building the same kind of backend for every project, over and over again. And to whoever said that people aren't still building custom backends, I offer examples: nest, fitbit, jawbone up, nike fuelband, automatic, WeMo, hue (light bulbs), whistle, Streetline (parking sensors), Sensys, (traffic sensors), various divisions of GE, Basis, etc. Advertising and datacenter management are the main places I know of where 3rd party analytics backends are widely used today. Not too many years ago, one required a team of probably 5-10 developers-- EEs, firmware, web app developers, a TechOps team, etc., to just get this basic functionality. Now a hobbyist could follow a tutorial like this and do it over a weekend. And there are lots of other devices with switch-based sensors or basic analog inputs that could follow this pattern and build different kinds of devices, with custom dashboards. So no need to stick to pedometers. At this point, I'm done responding-- the free flowing anger in this space makes it a tiring place to discuss anything, which is why I had previously not even submitted anything here. But I hope people have fun with this. And if you don't like something, add some missing functionality, or have an additional application, by all means send me a pull request so I can share them.

Happy Father's Day 2014 (-1, Offtopic)

gosandygo (3440057) | about 2 months ago | (#47216587)

I mentally shut this out when... (1)

istartedi (132515) | about 2 months ago | (#47219459)

I mentally shut this out when I realized debounce() and tilted() were sharing a global variable called "ignore". Yeah, let's see what happens when feature creep sends this beyond 70 lines.

Re: I mentally shut this out when... (1)

InternetOfJim (3690891) | about 2 months ago | (#47220115)

This is embedded software-- I'm passing data to an interrupt routine. This is a common design pattern, not the usual wonton misuse of globals. Can't pass parameters to an interrupt routine. In C, I might have encapsulated the global with a getter/setter, but the only benefits to that here would be to hide data via file scoping (which imp doesn't have), and to validate the value of a Boolean for.... what? I could have used a semaphore, but imp code is not interruptible, so that wouldn't do much either. I appreciate constructive coding suggestions and pull requests, so please feel free. But don't assume others are idiots based on such a crude heuristic.

Re: I mentally shut this out when... (1)

istartedi (132515) | about 2 months ago | (#47222549)

OK then, it's the environment that's stupid. Hardware and memory are cheap. Get something just a bit more expensive that permits better design. You'll be happy in the long run.

Re: I mentally shut this out when... (1)

istartedi (132515) | about 2 months ago | (#47222609)

OK, scratch that. Interrupt service routine... it's been a long time since I've done that kind of thing; but I seem to recall that even full-blown PCs have that kind of issue. It looked like some kind of scripting language to me. There are so many lame scripting environments out there, I just kind of assumed. So. I apologize.

I was skimming the text and code of course and not doing a lot of deep thinking about it. You can't do deep thinking with stuff like this you read online. You have to triage. Given that globals are a notorious anti-pattern, you might want to throw in a line (of prose) explaining why you have to do that.

Keen IO kind of freaks me out (0)

Anonymous Coward | about 2 months ago | (#47219523)

I checked into Keen Io and saw this bit about Pebble watches:

"Pebble needs to understand how users are interacting with the Pebble watch itself, including how often customers use the product, what theyÃ(TM)re using it for, and to what extent theyÃ(TM)re integrating the watch into their daily activities."

And then it goes on to all the stuff they are keeping track of. I get what they are trying to do, but is there an opt-out? Does the person buying the watch know they are being monitored? Everyone complains when mega-corp XYZ is doing big data tracking, but because the Keen IO/Pebble folks are nifty cool hipsters does that give their companies a pass?

Advert for wife's company. Lame. (0)

Anonymous Coward | about 2 months ago | (#47220175)

Filled with nonsense like "Yup, not even a single rented server, just these two services and a web hosting service" Does he know what a web hosting service is? Does he think it's a sandwich or something?

And "power consumption down to 5mA". WTF? Low power is uA, not mA.

Re: Advert for wife's company. Lame. (1)

InternetOfJim (3690891) | about 2 months ago | (#47221723)

I know quite a about low power, and have myself complained about people saying that mA is low power-- I've been building wireless sensor nodes averaging 100 uA down to an energy scavenger at nA levels -- but the key here is the part about average. The 5 uA is _while it's on the WiFi_ -- I turn almost everything off, down to low uA levels when the accelerometer shows it's idle for 10 minutes, and use the wakeup pin interrupt to get out of deep sleep when I start pedaling again.

decent project (1)

bigmo (181402) | about 2 months ago | (#47221773)

This is actually a nice little project. It is what many projects out there should be if they want to be useful to normal people. It has a fairly simple hardware component and a fairly simple software component and a fairly decent reason for being created. My kids could take this as a starting point and within a few days have something physical that they have created and be able to modify it from there to do something useful or educational or both. These are the sorts of projects that should be done in school to show non-geeks they they can make things too.

Is this a slashdot-worthy article? I think it probably belongs on hack-a-day or something like that rather than slashdot, but I don't really care. If you care then you should complain to the moderators about their submission standards and stop beating up on someone who actually did something rather than just whine about how much of an unloved genius they are.

If Electric Imp dies so do all "the cloud" goodies (2)

atrimtab (247656) | about 2 months ago | (#47225739)

Electric Imp would be interesting if open source. Alas, it's not. It's proprietary and everything is in "the cloud," so if the company dies so do all the projects and products that work with it as you lose access to the Imps that are deployed.

What I find amazing is that product's like Lockitron are totally dependent on this may not be there tomorrow proprietary cloud platform.

Check for New Comments
Slashdot Login

Need an Account?

Forgot your password?

Submission Text Formatting Tips

We support a small subset of HTML, namely these tags:

  • b
  • i
  • p
  • br
  • a
  • ol
  • ul
  • li
  • dl
  • dt
  • dd
  • em
  • strong
  • tt
  • blockquote
  • div
  • quote
  • ecode

"ecode" can be used for code snippets, for example:

<ecode>    while(1) { do_something(); } </ecode>