X10 Community Forum

💬General Category => General Discussion => Topic started by: dhouston on November 26, 2015, 11:51:39 AM

Title: $5 computer
Post by: dhouston on November 26, 2015, 11:51:39 AM
The Raspberry Pi Zero is a new faster $5 version of their low cost computer with same computing power as the original Pi. It should have more than enough computing power for controlling X10 and other HA projects.
http://www.pcworld.com/article/3008888/hardware/raspberry-pi-zero-the-5-computer-is-here.html (http://www.pcworld.com/article/3008888/hardware/raspberry-pi-zero-the-5-computer-is-here.html)
http://abcnews.go.com/Technology/raspberry-pi-computer/story?id=35432176 (http://abcnews.go.com/Technology/raspberry-pi-computer/story?id=35432176)
(https://t1.gstatic.com/images?q=tbn:ANd9GcSUDGSpJxDL1RYnAQdMvVxWjLfbRNx7tEz4gHE67alzBVrAO3J4j_IvKIcO22KXkyHr_ptfkHoSUDM)
WiFi can be added for only a few more dollars using the ESP8266.
http://esp8266.net/  (http://esp8266.net/)
http://www.aliexpress.com/wholesale?SearchText=ESP8266 (http://www.aliexpress.com/wholesale?SearchText=ESP8266)
Title: Re: $5 computer
Post by: Brian H on November 26, 2015, 12:44:19 PM
I have seen them mentioned in a few places.
I know that MCM Electronics has some preorder sales pages. For a few bundles with the Micro SD card.
Title: Re: $5 computer
Post by: dhouston on November 26, 2015, 02:29:25 PM
While less powerful and more expensive, this might be a simpler route for X10, HA and various other things.
http://www.esp8266basic.com/store/p1/ESP_Basic_WIFI_Dev_Board.html (http://www.esp8266basic.com/store/p1/ESP_Basic_WIFI_Dev_Board.html)

It can use the ThingSpeak API (optionally running on a local server) for interfacing with things.
https://github.com/iobridge/ThingSpeak

Or for Arduino acolytes...
https://github.com/esp8266/Arduino (https://github.com/esp8266/Arduino)
Title: Re: $5 computer
Post by: Brian H on December 08, 2015, 06:44:49 AM
I found a tear down of a Raspberry Pi Zero. If anyone is interested.
https://www.youtube.com/watch?v=HH5cFqc9OcM&index=1&list=UUqp2_p4YjtaTKiHuNZv0mAQ
Title: Re: $5 computer
Post by: dhouston on December 08, 2015, 12:49:02 PM
I found a tear down of a Raspberry Pi Zero. If anyone is interested.
Interesting that both the $5 Pi Zero and $2 ESP8266 WiFi are based on SoC chips.

Regarding the ESP8266, while there are a few interpreters (LUA, ESP8266Basic), it is also supported by the ESP8266 Arduino core and by the ZBasic compiler. The latter two may be especially useful with versions of the ESP8266 that expose more of its pins, making fairly powerful applications possible using only its native chip.
Title: Re: $5 computer
Post by: stevech on December 17, 2015, 06:53:00 PM
I bought Adafruit's ESP8266, and I was lucky enough to get an RPi Zero.
The latter I really like. $5 + a $7 WiFi dongle + cell phone USB power source = 1GHz Linux computer.
I started with HDMI and a USB hub connected to keyboard/mouse.
Installed VNC so I could get rid of hub and go "headless". Works great via WiFi.
I then installed SMB and auto-mount of a file folder on my NAS. So the RPI has many GB of storage via WiFi.

This works very well. Small size, cost, lots of programming languages not crippled as are the Python and Javascript implementations for STM32F ARM boards (I have those too).

The ESP8266 boards... cheaper. Are not good in many ways, in my opinion. Having used it, I much prefer the RPi Zero.

Title: Re: $5 computer
Post by: bkenobi on January 13, 2016, 11:13:41 AM
RPi Zero and ESP8266 can't really be compared as "I like this vs that".  They don't do the same thing.  One is a Linux computer in a very small form factor (after adding a few components) and the other is a WiFi chip that can be utilized as a connected micro controller.  A better comparison would be RPi to a desktop PC and the ESP8266 to an Arduino with WiFi shield.

I've just started working with my ESP8266 (NodeMCU LoLin v3) that was delivered a few days ago.  I have not gotten very far due to network issues at home.  That said, I can already tell that the claim that these modules use Arduino IDE is a little misleading.  You can use the IDE to program for the MCU and you do use C++ code like a standard Arduino.  However, you cannot use Arduino code (something written for an UNO for instance) and simply flash it to your ESP8266.  The syntax is C++ but the actual code is different.  Thus, you can use the familiar Arduino IDE but you will have to rewrite any existing code to make it work on the new MCU.
Title: Re: $5 computer
Post by: dhouston on January 13, 2016, 11:32:25 AM
@stevech: Welcome aboard.

@bkenobi: Take a look at the ZBasic for ESP8266 compiler. I think you'll find both ZBasic & the ESP8266  extremely powerful. You'll need to look at both the manual for it as well as the regular ZBasic manual for the Atmel AVR chips as most of the latter ~280 commands can also be used with the ESP8266 which sells for less than $1. You should also browse the ZBasic Application Notes.
http://www.zbasic.net/ (http://www.zbasic.net/)
At $2 in single quantity, I can only imagine what quantity purchasers pay.
http://www.ebay.com/itm/ESP8266-Serial-WIFI-Wireless-TransceiveR-Module-Send-Receive-LWIP-AP-STA-CU-/351525185397?hash=item51d888a775:g:yugAAOSwf-VWT-o- (http://www.ebay.com/itm/ESP8266-Serial-WIFI-Wireless-TransceiveR-Module-Send-Receive-LWIP-AP-STA-CU-/351525185397?hash=item51d888a775:g:yugAAOSwf-VWT-o-)

Interestingly, the HC-05/06 Bluetooth devices appear to have as many pins (that, at least, hint at interesting features, like a USB interface) but, so far, I've only found documentation for the AT command set.
http://www.comm2excel.com/projects/bluetooth_AT_Commands.php?id=17 (http://www.comm2excel.com/projects/bluetooth_AT_Commands.php?id=17)
Title: Re: $5 computer
Post by: bkenobi on January 13, 2016, 03:48:52 PM
The ESP8266 module you linked at $2 is the original and most basic.  It only has a single GPIO which is sufficient for using it as a WiFi adapter.  Much of the reason for its popularity appears to be that it is both a WiFi board and a capable MCU on its own.  Adafruit (among others) sell a version based on the more exposed ESP8266 chip with many more GPIO's (though for a much higher price point).  For those capable of building their own silk screened boards, the module itself is still pretty cheap.
Title: Re: $5 computer
Post by: dhouston on January 13, 2016, 04:10:19 PM
Well, I didn't want to let you in on all of my secrets but...
http://www.aliexpress.com/store/product/D1-mini-Mini-NodeMcu-4M-bytes-Lua-WIFI-Internet-of-Things-development-board-based-ESP8266/1331105_32529101036.html (http://www.aliexpress.com/store/product/D1-mini-Mini-NodeMcu-4M-bytes-Lua-WIFI-Internet-of-Things-development-board-based-ESP8266/1331105_32529101036.html)
I'd like to use it with the CM15A2Z because it simplifies supplying power to the external device. However, I'll still need to handle voltage conversion for the 5V/3V3 serial lines and I really need something similar for the Bluetooth module so I may design a one-size-fits-all board with sockets for each and use the simpler, cheaper ESP8266 ESP-01 that I linked to earlier (which is actually an upgrade with twice the flash of the original). And, all can be programmed with the free version of ZBasic. (I'll be suggesting ZBasic for HC-05 Bluetooth, next.)  :)

PS: I should have mentioned these...
http://www.wemos.cc/wiki/doku.php?id=en:shields (http://www.wemos.cc/wiki/doku.php?id=en:shields).
Title: Re: $5 computer
Post by: bkenobi on January 14, 2016, 12:53:13 PM
I saw the Wemos D1 Mini yesterday for the first time.  Since that time, they added 2 new shields to the page.  That price is very attractive as is the size.  I would have purchased that over the NodeMCU if I saw this last month.

http://www.banggood.com/V3-NodeMcu-Lua-WIFI-Development-Board-p-992733.html
Title: Re: $5 computer
Post by: dhouston on January 14, 2016, 01:20:27 PM
I saw the Wemos D1 Mini yesterday for the first time.  Since that time, they added 2 new shields to the page.  That price is very attractive as is the size.  I would have purchased that over the NodeMCU if I saw this last month.

I've seen about a half-dozen versions of NodeMCU.

The mini shields give you an idea of ESP8266 capabilities and ZBasic can handle all-the-above. And, since ZBasic can import & use Arduino code, it might be possible to reuse some of your Arduino code with the ESP8266. Since I use ZBasic with Arduino hardware, I can't judge how much rewriting will be needed of your Arduino code.
Title: Re: $5 computer
Post by: bkenobi on January 14, 2016, 05:25:25 PM
ZBasic supports Arduino (C++) code?  Interesting.  I thought (from briefly reviewing the documentation) that it used an update version of Basic which is not C++ compatible.  I think I figured out my issues with my NodeMCU board last night so I may be able to make some progress with testing.  Turns out, the version I have uses a different USB->serial chip than the stock NodeMCU.  It appears that using the Wemos D1 in the settings gets the code transmitted as they use the same adapter chip.
Title: Re: $5 computer
Post by: dhouston on January 14, 2016, 05:50:43 PM
ZBasic supports Arduino (C++) code?  Interesting. 

See AN223 at...
http://www.zbasic.net/appnotes.php?osCsid=c87ec3c9a2328485cffea8c58dc52530 (http://www.zbasic.net/appnotes.php?osCsid=c87ec3c9a2328485cffea8c58dc52530)
I think you will be impressed.
Title: Re: $5 computer
Post by: dhouston on January 14, 2016, 07:41:36 PM
Turns out, the version I have uses a different USB->serial chip than the stock NodeMCU. 
Therein lies a tale. Numerous Arduino clones used counterfeit FTDI & Prolific USB-Serial ICs. Both companies moved to protect their market by adding code to their drivers that disables the clone chips. And then came the CH340G (used on your module) that sells for about $0.25 each in volume. Bye-Bye FTDI & Prolific.
Title: Re: $5 computer
Post by: dhouston on January 19, 2016, 10:12:58 AM
I saw the Wemos D1 Mini yesterday for the first time.  Since that time, they added 2 new shields to the page. 
There are now 4 user designed shields (awaiting testing/certification) as well as a blank Prototyper shield so you can build your own.

It would be nice were there a similar board (w/shields) using the HC-05 Bluetooth module which appears to have more analog and digital pins than the WiFi module.
Title: Re: $5 computer
Post by: bkenobi on January 19, 2016, 10:30:02 AM
I just wish I could get the ESP8266 to do something with the WiFi.  I flashed the blinky sketch to both the Wemos D1 and NodeMCU but beyond that I haven't been able to do anything with them.  I'm using Arduino IDE 1.6.7 with ESP8266 support from the boards manager.  Perhaps I'll try the core code at:
https://github.com/esp8266/Arduino (https://github.com/esp8266/Arduino)
Title: Re: $5 computer
Post by: dhouston on January 19, 2016, 10:44:04 AM
There are several example programs in the ZBasic for ESP8266 installation directory. They demonstrate the fundamentals (e.g. Scan for AP).