Live data from Hacker News

Chirimen, a Firefox OS-Powered IoT Single-Board Computer Developed by Mozilla

mozopenhard.mozillafactory.org

51–60 of 135 posts

Re: Chirimen, a Firefox OS-Powered IoT Single-Board Computer Developed by Mozilla

#51
Welp. Two hours in and the comments are shaping up as you'd expect on HN.

Is it really so hard to empathize with people who have different skill sets than yourself? Yes, C would be more efficient. Yes, this wouldn't be very cost effective used in a high volume product. Yes, it's a little funky to write a web page just to plonk your script tag in there.

But, if you spend all day doing front-end dev with jQuery and just want to prototype some blinky lights or a flood sensor in your basement, now you've already got all the skills you need. You're not producing a million units, you're not worried about power so much as it'll be plugged in. An evening with a soldering iron and your text editor and off you go.

Anyways. For prior art on this ecosystem, see janOS:

http://janos.io/

which is basically stripped down firefoxOS which runs your app only (none of the launcher crud and such) in god-mode. It's actually quite fun to go grab a $30 phone off of ebay, and have a nice programmable screen and sensor suite with wifi, gps, and cell connectivity. Indeed, I find it more compelling than this board they're releasing, because I like taking advantage of the cheapness of mass manufacturing. The only downside is it's difficult to impossible to break out any GPIO on phones.

Re: Chirimen, a Firefox OS-Powered IoT Single-Board Computer Developed by Mozilla

#52
post #30
post #22

Earlier quoted context omitted.

C does that too unless you sit in a tight loop polling something all the time.

Most embedded applications consist of a tight loop of constant polling. People slow things down by using delays... But if you use the wrong sort of delay (read: the most popular one https://www.arduino.cc/en/Reference/Delay ), you'll end up executing nops instead of powering down the processor

What would then be the right way to sleep? I've always wanted to do something like 'sleep until event and do absolutely nothing till them', but end up using the delay every time.

Re: Chirimen, a Firefox OS-Powered IoT Single-Board Computer Developed by Mozilla

#53

Welp. Two hours in and the comments are shaping up as you'd expect on HN. Is it really so hard to empathize with people who have different skill sets than yourself? Yes, C would be more efficient. Yes, this wouldn't be very cost effective used in a high volume product. Yes, it's a little funky to write a web page just to plonk your script tag in there. But, if you spend all day doing front-end dev with jQuery and jus…

IMHO, this project is coming ahead of its time. I don't think it's going to gain traction due to the fact that the hardware requirements for the overhead imposed by the underlying web stack will make it too expensive.

Re: Chirimen, a Firefox OS-Powered IoT Single-Board Computer Developed by Mozilla

#54
post #9

Earlier quoted context omitted.

> I think IoTs with web interfaces aren't a bad idea. I think it is. The internet-of-things does not need to suffer from massive power consumption and hard to implement on the micro-controller scale protocols. It needs something much more along the lines of encrypted UDP than that it needs to use 'web technologies'. Imagining a stack made on 'web technologies' running off power harvested over a relatively long period…

I had in mind more things like routers, home automation management consoles, etc. which have had web interfaces for a very long time, but it doesn't take all that much power to do it[1], unless you want to run a full Linux kernel and JS and all that other bloat which tiny IoTs don't need. [1] http://www-ccs.cs.umass.edu/shri/iPic.html (images also mirrored at http://cc2.savs.hcc.edu.tw/~chuavv/smallest/iPic/ipic.html…

Indeed. Basic web technologies - client-side HTML, CSS and JavaScript (and I mean writing them directly, not via absurdly wasteful layers of JS frameworks) - are a great tools for adding UIs to connected devices. You don't need that much resources for a HTTP server if you already have TCP/IP connectivity, and you also don't need much resources to output some rudimentary HTML or to process POST requests.

It's also a pretty cool tool for adding UIs to software you code locally. Embedding a HTTP server is simple in most languages, and for some cases, a web interface will be much simpler than building an equivalent from "native" UI components.

--

Incidentally, one of the best demonstrations I saw of that was in the book Land of Lisp. The book teaches you Common Lisp by guiding you through writing a few games. At some point, you end up embedding in your game a very simple HTTP server - and suddenly, you get to have interactive graphics (via SVG) without the author having to teach you lots of stuff about some random UI library.

Re: Chirimen, a Firefox OS-Powered IoT Single-Board Computer Developed by Mozilla

#55
post #8

I never understood why people want to use browser technologies for the internet of things.

Browsers allowed developers to bring new things to customers quickly, because it was the only decent way of developing application that could work with Windows. It was the only way good open source software could "breach" how microsoft was doing business and putting barriers to the internet. The problem is that now, we should move on, and use something else than a browser. Maybe it involves inventing an alternative t…

> It was the only way good open source software could "breach" how microsoft was doing business and putting barriers to the internet.

Maybe I'm missing out on a big chapter of the history of computing, but I don't recall Open Source done via webapps until very recently. Most of the things browsers did were things that mattered only to businesses - like easier software updates, and much more control over the customers and their data. And the latter reasons are why web technologies are popular today.

Re: Chirimen, a Firefox OS-Powered IoT Single-Board Computer Developed by Mozilla

#56

Welp. Two hours in and the comments are shaping up as you'd expect on HN. Is it really so hard to empathize with people who have different skill sets than yourself? Yes, C would be more efficient. Yes, this wouldn't be very cost effective used in a high volume product. Yes, it's a little funky to write a web page just to plonk your script tag in there. But, if you spend all day doing front-end dev with jQuery and jus…

I agree, and I come from an old-school C and embedded background. If you do it in C, you have the opposite problem: interacting with the hardware is easy, speaking to a web API becomes a huge pain.

There's an "impedance mismatch", which has to be overcome somewhere. And computing power is getting cheaper and cheaper. We're at the point where if you have a little board in a case with some I/O connectors, the CPU will be the least expensive part. Casework and connectors will make up a surprisingly large part of the cost, often costing whole dollars!

Edit: also, debugging your C microcontroller program can be quite a pain, even once you have a correctly configured in-circuit debugger.

Re: Chirimen, a Firefox OS-Powered IoT Single-Board Computer Developed by Mozilla

#57
post #30

Earlier quoted context omitted.

Most embedded applications consist of a tight loop of constant polling. People slow things down by using delays... But if you use the wrong sort of delay (read: the most popular one https://www.arduino.cc/en/Reference/Delay ), you'll end up executing nops instead of powering down the processor

What would then be the right way to sleep? I've always wanted to do something like 'sleep until event and do absolutely nothing till them', but end up using the delay every time.

From what I searched, it's dependant on your microcontroller, so there is no generic way to do this (since different Arduinos have different microcontrollers).

For a very low power project I had, I basically found a lib that did deep sleep correctly for my microcontroller (an ATTiny), then you sleep for a significative period of time each time (for example, 500ms), and check if the event happened when sleep ends. That results in a consumption under 10uA.

It is obviously very dependant of what you want to do, some applications can't afford to check only every X ms.

And be careful too, you need to put everything possible behind your microcontroller, to be able to disable things during sleep (otherwise, you are just powering the rest of your circuit for nothing).

Re: Chirimen, a Firefox OS-Powered IoT Single-Board Computer Developed by Mozilla

#58
post #30

Earlier quoted context omitted.

Most embedded applications consist of a tight loop of constant polling. People slow things down by using delays... But if you use the wrong sort of delay (read: the most popular one https://www.arduino.cc/en/Reference/Delay ), you'll end up executing nops instead of powering down the processor

What would then be the right way to sleep? I've always wanted to do something like 'sleep until event and do absolutely nothing till them', but end up using the delay every time.

Unfortunately there's no easy answer to the correct solution. One method is to setup interrupt service routines and put the mcu to sleep the rest of the time. There are a couple libraries that provide convenient interfaces to AVR's sleep lib e.g http://playground.arduino.cc/Code/Enerlib

The basic idea is that it is possible to put the chip into lower-power mode... but you need a way to wake it up after that. That could be an interrupt, watchdog timer... etc

Another thing to note is that for most applications the mcu's power consumption will be negligible with respect to the peripherals', so the average person shouldn't care much.

Post reply on HN