11 ms·
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 le
by noonespecial 10y ago
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.
- ecaron 10y agoThat'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 :-(
- DanBC 10y agoIt'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.
- noonespecial 10y agoYou 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.
- bsder 10y ago> 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.
- StavrosK 10y agoNooo, that's the fun part! Here's how I did it, from a pure-software guy to... that: https://www.stavros.io/posts/emergency-food-button/ https://www.stavros.io/posts/emergency-food-button/
- Johnny555 10y agoHe 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. http://www.jeffgeerling.com/blogs/jeff-geerling/raspberry-pi-zero-power http://www.jeffgeerling.com/blogs/jeff-geerling/raspberry-pi...
- StavrosK 10y agoPlease, 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: http://m.aliexpress.com/item/32684725642.html http://m.aliexpress.com/item/32684725642.html Let's not kid ourselves. The Pi0 is not $5. It just pretends to be $5 for marketing.
- noonespecial 10y agoOh 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. http://www.aliexpress.com/item/New-WeMos-D1-R2-WiFi-uno-based-ESP8266-for-arduino-nodemcu-Compatible/32648062862.html?ws_ab_test=searchweb201556_10,searchweb201602_5_10057_10056_10055_10049_10059_10058_10017_405_404_10060_10061_10062_412,searchweb201603_2&btsid=9ddcaa0d-4b4c-4533-90b0-ad2e35847498 http://www.aliexpress.com/item/New-WeMos-D1-R2-WiFi-uno-base...
- StavrosK 10y agoAh 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 https://github.com/skorokithakis/tiny-ESP8266-breakout), but it's just that, a breakout. I definitely prefer the WeMos for most things, nowadays.
- region_alias 10y agoFor 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?
- noonespecial 10y agoIn C, most esp incarnations can be used with the Arduino IDE. https://learn.sparkfun.com/tutorials/esp8266-thing-hookup-guide/installing-the-esp8266-arduino-addon https://learn.sparkfun.com/tutorials/esp8266-thing-hookup-gu... For Lua, nodeMCU's got your back. http://nodemcu.com/index_en.html http://nodemcu.com/index_en.html
- hedgehog 10y agoThis 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.
- Cerium 10y agoCheckout 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/ https://nodemcu.readthedocs.io/en/dev/ esp8266 flash utility: https://github.com/nodemcu/nodemcu-flasher https://github.com/nodemcu/nodemcu-flasher IDE: http://esp8266.ru/esplorer/ 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.
- garybake 10y agoI 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/esp8266 https://github.com/micropython/micropython/tree/master/esp82... http://docs.micropython.org/en/latest/esp8266/ http://docs.micropython.org/en/latest/esp8266/
- joezydeco 10y agoYeah, 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.
- skaevola 10y agoIt'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-integration/ http://octavosystems.com/2016/05/09/osd3358-new-era-integrat...
- joezydeco 10y agoAny 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. http://www.cnx-software.com/2015/06/24/freescale-introduces-a-coin-sized-single-chip-module-scm-based-on-freescale-i-mx-6dual/ http://www.cnx-software.com/2015/06/24/freescale-introduces-... http://cache.nxp.com/files/32bit/doc/support_info/SINGLE-CHIP-SYSTEM-MODULES.pdf http://cache.nxp.com/files/32bit/doc/support_info/SINGLE-CHI... 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.
- hawski 10y agoIs 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.
- driverdan 10y agoESPs have tons of IO. You could add IR to it if you want.
- whamlastxmas 10y agoThere 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.