So in a recent blog I’ve covered a pair of Node-Red nodes which allow GPIO access in Node-Red on a variety of boards using the underlying ONOFF library (which loads automatically when you get the nodes). And that’s all sorted now – GPIO for all – lovely. But what of the exceedingly useful I2c?
As you do I just happened to be looking through the latest NODE offerings for Node-Red and spotted this little number – a thermostat node. Now I have my own controls for this and I’m happy with them but they’re generally done with code – and I saw this – read the explanation – it is remarkably simple and straight-forward – but looks like it will do a good job – and the example given is excellent – yes, it is added to “the script” along with a newly discovered database handler.
You might recall some time ago I wrote about using Python on the Orange Pi Zero etc to run the little SSD1306-based displays.
Despite that being successful I did have a nagging doubt about the LUMA library because later on – when doing some apt-get upgrades I got a segmentation error which I’d originally attributed to using a hard disk with the device. I now think it might be something to do with that library. Well, when my NEO PLUS2 arrived I thought I’d try again..
WELL!!! This version works and also works with the NanoPi AIR AND the NEO2 using the standard Ubuntu image (and has solved my problem with the hard drive on the NEO2)...
I’ve used the NEO and this is definitely an improvement – H5 processor, the Ethernet connector is giga-speed, 2 USB sockets, Bluetooth and WIFI (with external aerial which I hate using), 1GB RAM and 8GB eMMC on-board, the board looks like it could be a little winner – but as always it’s as much the software that matters as anything else. the board also has audio out on an (unpopulated) 2mm connector and gets it’s power from microUSB. Size is 40mm x 52mm. Starting to look good already…
I thought it might be useful for beginners to go through the installation of Raspberry Pi 2 Jessie (July 2017) and “the script” – so here goes… I’m also doing this to help a friend who had issues installing the script on a Pi late last night, most likely due to network issues…. short answer is - this works…. read on…
Of course I’ve not just been working on the pretty colours – I’ve revamped the control codes for the ESP8266-driven controller twice, discovered and fixed an OTA flaw in the code, re-hashed the Node-Red driving code, found and fixed countless other bits and pieces… and in the process taken pause for thought as to why I ever used the Dark Skies Node… you know – in other words – pretty much revamped everything just to improve a simple display.
You may have noticed that I’ve been working on my ESP8266 home control software (see the updates elsewhere along with new diagram), specifically upgrading and adding to the number of OLED and LCD displays I can handle, either by I2c or SPI.
I’ve been doing a lot of optimising and simplifying – for example with SPI – assuming that there will only be the one SPI device at once on an ESP means you don’t need the CS line which can be grounded. But there’s more….
In case you were wondering – no, I’ve not gone off the boil, I’ve been quietly beavering away on my ESP8266 code since deciding to abandon the old ESP-01 and adding fonts for displays. Right now I’m focussing on the QD-Tech boards – 120x160 but I’ll eventually migrate the use of the various icons to the other displays now that I’m not terrified of running out of space.
The 4-channel Sonoff 4CH Pro is a new product from ITEAD, available from them directly or from Amazon in the UK– though you might reasonably question why the UK Amazon price is higher in pounds than the original is in dollars.
Essentially the unit is a development of their earlier Sonoff 4CH and I’ll do some basic comparison here.
- A3 Octa-Core processor (handy for multimedia) S5P6818
- 1GB Ram
- 3.5mm audio jack
- 1GBPS Ethernet port
- MicroUSB for power
- 2 USB host ports and an additional two on the board connectors
- LCD interface
- Camera interface
- Debug UART
- TFT socket
- Built-in WIFI and antennae
You get to choose between Ubuntu, Armbian and an old (5.1) Android from Friendlyarm (why are people still using this – we’re up to version 7 now). Also though I’m pleased to see that Debian automatically resizes the SD on install – the Android installation does not – you have to do that “on your PC” and once again they make the assumption that we all have Linux PCs – which could not be further from the truth.
Android: I grabbed the Android file from their site, put it into an SD and banged that into a USB port adaptor on my Raspberry Pi to follow the (simple) procedure to resize Android. Before long I had a full Android 5.1 running complete with Bluetooth (to clarify – a Bluetooth keyboard worked perfectly, a Bluetooth mouse appeared to connect but no pointer movement). From what I’ve seen that’s more than we can currently expect from a Raspberry Pi because all the videos I’ve seen which say you CAN put Android on the Raspberry Pi, end quietly, usually along the lines of “videos are jittery right now”. That could all change in the future of course.
THEN I read about enabling developer mode and using a tool on a PC called ADB which allows for changing overscan and screen resolution WITHOUT rooting Android – I ran that and adjusted the screen size to get rid of the overscan – no problem. The result? With Kodi, a very nice setup for a media centre indeed– quite fast compared to other boards I’ve tried – and no jitter when watching video. The only issue being I’d started off with an 8GB SD card for testing – daft idea. So – I started again this time with a 64GB card. By the time I’d finished I had around 56GB left – that should keep me going for a while.
I tried running with the fan off but the heatsink gets just a tad too warm for comfort (as against “cool” with the fan on. There is a tiny amount of noise with the fan on so I’d recommend putting the unit on soft pads in a box somewhere. (Update, one of the two units I had, came with a 0.21 amp fan, the other with a much quieter 0.15amp fan - so I replaced the more powerful one (only a quid from China) and it now runs quietly.
I’ve been running this now checking out radio stations, watching TV stations and local videos – all without any issues. But check out my blog entry on the T3 for a surprise! https://tech.scargill.net/the-mighty-t3/
All in all, for media, up to now one of the better boards I’ve come across recently.
Debian: I then grabbed their Debian offering and installed that. After some updating (as it was ancient) I set up the WIFI. This was not trivial I have to say but the end result seems to be rock-solid WIFI - I've had 2 of these boards now running on and off for ages and they are just fine. I've had trouble with the WIFI with my ALEXA unit saying it is having trouble connecting - so I've had to yank the access point out of the wall a few times... throughout all of this - both units remain connected no problem at all. More than can be said for a lot of WIFI setups!! Using Debian these units run luke-warm with the fans on.
Recent updates have meant it is now possible to use the GPIO from the likes of Node-Red quite easily using these boards but I noted that there was a connector called the LVDS connector and no-where on the website does it tell you about this connector. I contacted FriendlyArm and they sent me schematics etc. In case you are messing around with GPIO and you want to make use of every last GPIO pin, you might find this interesting.