Hacker News new | past | comments | ask | show | jobs | submit login

If he really wanted to "learn to solder", one of the esp8266 devkits from the likes of sparkfun or adafruit would have served him better and been cheaper and less power hungry as well. Running an entire Linux server nonstop just to watch for a button press seems excessive.

Otoh, we've reached the point where you can reasonably run an entire Linux server just to watch a button! Awesome.

Yeah, I believe we're at some kind of inflection point here.

I'm old-school embedded. So yeah, get off my lawn you kids that need an RPi, 700Mhz of clock, and a multitasking O/S to read a GPIO pin and send 10 bytes to a server.

But man, you can pretty much run Linux on a single chip now[1], so why mess with anything else? You can tangle with some other the other embedded O/Ses out there for months, or spin up something in Linux in an afternoon.

[1] almost. I've run Linux from an RZ/A1 but with a little bit of external QSPI NOR. I'm guessing the next generation of A9/A15 SoCs will stack more DRAM and NAND flash on top to make this a no-brainer.

It's so amazing how electronics have progressed. a startup called Octavio Systemsn is now selling a single package that can run a Linux system. I wouldn't count it as running Linux on a single chip, (power system, microprocessor, RAM) because I believe there are multiple dies within the package, but still, super impressive.

Here's a link: http://octavosystems.com/2016/05/09/osd3358-new-era-integrat...

Any time I see someone messing with a Raspberry Pi I try to steer them towards the TI Sitara/AM335x line.

The schematics for all of their reference boards (aka Beaglebone Black/Green) are freely available, the chip has solid documentation, TI has a good Github+Linux repository, and you can make a really nice system out of it.

The Octavio part is nice, I'm also really interested in what NXP (cough cough Freescale) is doing with turning the iMX into a module. These are both pretty rare birds though. When I can get trays from DigiKey, we'll be cooking.



Dual-A9 is overkill for making an IoT device node, but hey if you're going to run Azure/Python/Node.js to send your 10-byte report, what the hell.

> Any time I see someone messing with a Raspberry Pi I try to steer them towards the TI Sitara/AM335x line.

I don't think I will ever forgive TI for abandoning the Galaxy Nexus when they decided to abruptly exit the Android business. Since they chose not to update the drivers, Google couldn't update the GNex later Android versions despite being a Nexus phone. Google Glass had a TI chipset and Google managed to deploy a new Android version to it (I guess via some driver-compat work-around) but I hear the setup wasn't stable. I now avoid TI wherever possible.

I was sad to see OMAP go as well. I had been working with it since OMAP1 and it did have some nice features. Sitara is pretty much an OMAP without the video DSP so I'm guessing TI just couldn't find a road into the handset market since Apple and Samsung were locking it all up.

I've since switched to the NXP/Freescale iMX family and it's pretty similar in a lot of ways.

You have a typo (well two, really), their name is Octavo Systems.

I hadn't heard of them before, I just noticed the link you posted said octavosystems.com in the url, not octavio.

That's really where I burnt the first 4 weeks of this exercise. I would go on those sites, read blogs/posts/product pages over and over, and get overwhelmed and just shut down based on the number of options.

Probably a personal character fault. You're right that it is overkill. And I'll probably be tossing some more money towards SparkFun soon too - but the just from being a pure-software guy to buying/assembling the raw parts just shut me down :-(

> I would go on those sites, read blogs/posts/product pages over and over, and get overwhelmed and just shut down based on the number of options.

Welcome to engineering. Pick one and finish the project. Then look back.

Yes, running an RPi Zero to watch a button press is overkill. So what? It optimizes delivery time over efficiency. You can optimize for cost or power later if you feel like it.

Anyhow, nice job.

You know what? That's totally ok. When I first heard of the raspi platform that was what I found most exciting. It was going to take a whole world of people with common web dev skills and kick the door open for them to get into hardware. I'm glad to see that's it's completely living up to that promise.

Nooo, that's the fun part! Here's how I did it, from a pure-software guy to... that:


It's a shame that you have to defend "buying something to learn how to use it", even if it's a bit overkill for the current use.

At some point you'll want to use the Pi Zero for something else, and at that point you'll be able to use some other IoT package.

He used a Pi Zero -- cost is $5, the cheapest ESP8266 module on Sparkfun is $6.95.

While the ESP8266 would save some power, the Pi reportedly uses around 0.7W with a USB Wifi adapter, or around 6KWh/year -- so would cost less than a dollar a year to operate. So he wouldn't save huge amounts of power.


Please, please tell me where I can get five Pi Zeros for $5 each, including shipping. Because I've been hearing the "Pi0 is $5" trope for ages, yet I still haven't been able to find one, let alone at quantity, let alone at that price, let alone with free shipping.

Meanwhile, I just bought ten of these for $46.5:


Let's not kid ourselves. The Pi0 is not $5. It just pretends to be $5 for marketing.

Oh huge bump for recommending the Wemos D1. Built in USB to serial. Easy integration with arduino platform. Not magic button presses to enter flash/upload mode. A very easy way to get started with ESP8266. Worth the extra dollar or 2 per unit.

Also check out this one. A wemos made in the shape of a Uno so you can use shields and everything for only $6.


Ah yes, the big WeMos is also good, but the Uno form factor is just too monstrously large these days.

I also designed a tiny breakout board that's pretty much the size of the ESP8266 12E plus some pins (https://github.com/skorokithakis/tiny-ESP8266-breakout), but it's just that, a breakout. I definitely prefer the WeMos for most things, nowadays.

Any idea what serial chipset these use? (for USB->TTL)

Unfortunately its the CH340 USB-TTL. Serviceable but not great by any stretch. OTOH, windows won't ever brick it because it thinks its a fake.

Been meaning to have a go at rolling one of these myself using the mighty microchip MCP2221 instead.

AFAICT the FTDI bricking code was taken out of the Windows Update driver.

I'm glad it's a CH340 - I've had no problems with those, unlike Prolific or (fake) FTDI devices.

Adafruit will sell you a single Pi Zero today for $5. So there you go, you found one.


No free shipping, but their ESP8266 modules don't come with free shipping either.


Non-starter. Doesn't even matter if its free if I can only get one. If its "the" pi zero on my bench it means it gets used much differently than if its "a" pi zero.

You're moving the goalposts. Information proving that a Raspberry Pi Zero is available at $5 was provided.

The point is, the Raspberry Pi Zero is $5 and stores sell them for that amount. There is more than one vendor out there. There's also a large demand and shortage of them.

He's not. My original post said "five Pis".

Your original post said "Because I've been hearing the "Pi0 is $5" trope for ages, yet I still haven't been able to find one, let alone at quantity..."

So I was pointing out that you can find one for that price, even if not at quantity.

Yep, basically, the Pi Zero gets put onto a pedestal and admired from afar.

I don't think anyone ever marketed the Zero as being $5 after shipping, or even said it'd be $5 in every country.

I can buy a nearly endless supply of $5 Zeros at my local Microcenter, so it's not all marketing. They are manufactured in-house and for various reasons haven't kept up with demand.

Oh, they sell $5 Zeros in-store? Where is this? Are they original Pi Zeros, or are they another brand?

This sounds odd, I regularly see them going for $10+ on eBay. Why don't people just go to a Microcenter and get a few?

Many major US cities have a Microcenter. They're the most recent, name-brand Pi zero. The one with the camera ribbon attachment.

Not everyone is near a Microcenter, but there's an entire subreddit dedicated to people buying and shipping them out for people. Supposedly they don't make much if any money off it, mostly just covers gas+shipping+$5.

Interesting, I'll grab a few on my next trip, thanks for the tip!

I bought mine from Pimorni. The unit was £4.

I don't mind paying for shipping, as the shipping isn't the computer.

Pimoroni doesn't ship to my country. What does it matter if the shipping is the computer or not? I'll sell you a brand-new MacBook for $5 ($2000 shipping). The only thing that matters is the total that comes out of your wallet, and there is currently no way to get a Pi Zero for anything close to $5, at any quantity or from any provider.

I am somewhat confused by your statement. I am sorry Pimorni isn't available in your country however that just means that you can't get one for $5 as opposed to not being able to get them anywhere. Regards to shipping, my point was that the Pi and the shipping charges are two seperate things. I don't see why a Pi should be sold with free shipping just so the total amount spend is $5.

I agree that they should be ramping up production to meet the demand there is. I also find given the educational angle that 1 per order is a quite fair way to go about distribuing them given the lack of supply.

Because I can't even buy 10 and have shipping remain the same. The limit of 1 per customer means that I effectively have to pay $25 per Zero, which is completely the opposite if it costing $5.

When I'm hacking around on things, I hate to have only one. OK, it's not booting now and I don't understand. How do I quickly tell whether I fried it, the SD card is bad, or whether my code is bad? Use another one is the answer.

The point on the delivered cost being the key is that many of the boards that would also be suitable for simple tasks like this are either free/very cheap shipping, or at the worst case you can amortize the $5-10 shipping charge across 10 units instead of 1.

Exactly, I wouldn't mind paying for shipping if I could buy 10-20 units and amortize that way, but I haven't found anywhere that will let me.

I guess given this endevour was started with an educational focus the philosophy is on spreading the platform to the largest number of people, as opposed to letting a few people purchase many.

Maybe, but if I need five for what I want to do and can only buy one, it's not going to spread, since I won't use it.

Have you made contact with the RPi foundation? If you registered an interest for a larger number and state your educational goals they may well be able to help you out.

What are you looking to do with them out of interest?

But that's the thing, I don't need hundreds, I just need five or ten, so it's just amateur usage but one doesn't work (one could easily fry while experimenting).

I just make weird things out of them. My latest one is an RC car that I was hoping could get some mapping software onto, and turn fully autonomous, although an ESP8266 talking to a laptop is acceptable (and what I'm currently doing).

And a $8 USB Wifi dongle.

And a $4 USB micro adapter.

And presumably a flash chip for the FS.

Add that to the fact that I've never been able to get a Zero into my hands for less than about $15 after shipping and all that when I can find one at all. (Sparkfun's shipping is only $5 for the ESP)

Its worth learning how to use the ESP8266. Once you've mastered it, you can get them for about $2 each with free shipping on ebay and aliexpress.

What's the best resource for learning the ESP8266? I'm interested in expanding my knowledge if there's a not-too-arcane way to do it.

Get a WeMos D1 and use their examples and read the WeMos/ESP2866 forums. If you want to save $2 per project you can get a USB/TTL adapter and use plain ESPs.

I just order my ESP8266 bare bones from Banggood, about $3, free shipping and if you order them in bulk you save even more.

The ESP8266 works great as a standalone device and you can even flash it with the Arduino firmware, though I prefer NodeMCU.

ESP8266 12-F is roughly $1.80 on aliexpress, including shipping. Takes a while to arrive but these things are crazy cheap

For working with esp8266 is it necessary to learn Python? For example, to flash the firmware do I need to have Python installed? Or is there a way to do this in Lua, or in C?

In C, most esp incarnations can be used with the Arduino IDE.


For Lua, nodeMCU's got your back.


This is a pretty good way to go. I wrote the software for a 40ish node lighting control network built with NodeMCU boards. The software was C++ via the Arduino IDE, it all worked out pretty well.

Checkout NodeMCU. You can program in lua. There are some downsides, but overall my experience with NodeMCU is fairly good. Just like everyone else, I've been using them to upload sensor data (humidity, temperature, strain).

Documentation: https://nodemcu.readthedocs.io/en/dev/ esp8266 flash utility: https://github.com/nodemcu/nodemcu-flasher IDE: http://esp8266.ru/esplorer/

Tips: The cpu is responsible for everything, so if you crash it or get it into a loop the serial output will stop. Be careful with what you put in the init.lua, since it will run on startup. If you do get stuck in a boot loop simply hold down the button while pressing reset, and it will get into a recovery mode. Then use the nodemcu-flasher to reflash the chip.

I would recommend micropython on the esp8266 as then you can use the same code that was running on the pi with a few tweeks. https://github.com/micropython/micropython/tree/master/esp82... http://docs.micropython.org/en/latest/esp8266/

Is there something like esp8266 for IR diode and receiver? I am wondering if usage of IR would be better for home IoT projects. WiFi frequencies are quite crowded nowadays and I would think that it is not the case with IR. Also it probably would use less energy.

If LiFi can work, surely IR should be good enough for simple signaling? Maybe there could be also a repeater in every room connected to mains for power and WiFi to signal each other?

It maybe interesting to have IR signals somehow encrypted.

There are endless modules to attach. There is both an IR one and a 400MHz radio tx/Rx one. IR is like 50 cents, radio is like $1.50 I think on AliExpress. The radio is probably better than IR since it works pretty damn far and without LoS.

ESPs have tons of IO. You could add IR to it if you want.

Guidelines | FAQ | Support | API | Security | Lists | Bookmarklet | Legal | Apply to YC | Contact