As you may be aware if you’ve read other posts on my blog including my post on the CJMCU 8128 setup and MQ sensors usage I’m a huge fan of BangGood.com.
BangGood.com are a company that offer the cheapest electronics for makers and hobbyists I’ve found. Sometimes GearBest beats them but BangGood by far is the place I get my electronics and equipment from for any of my projects.
So here’s a list of the latest coupons and deals from BangGood as of August 2019 (if you’re reading this after this date these links usually still work!).
If you’d like me to make this a regular thing let me know. I don’t just make this post for the hell of it. I just used one of the links to get myself this USB soldering iron which I originally lost a few weeks back.
Dogfooding it as they say.
Anyway - hope someone finds these useful and leave comment below if you want more of these offers.
I was about to give up on Hexo after finding new plugins I wanted to use but weren’t working and stopped the generation of my blog. I narrowed it down (easily) to the ancient Hexo Paper Box theme I’d been using since the beginning.
So I did what anyone would do. Check out the Hexo themes section. Unfortunately its search feature is about all it has. No filtering based on popularity, newness or anything else.
So with a bit of Google-Fu I managed to find a great link that helped me find the Next theme.
Here’s a few great sites that will help you get your Hexo installation get up to speed:
Awesome Hexo - a site for listing some of the best Hexo plugins filtered by users.
Hexo top 10 Themes - the top 10 themes by number of stars (this is how I found Hexo Next).
The Hexo Next theme I chose comes with a HUGE amount of customisation options for both Western and Chinese users along with theme-specific plugins you could find useful including minification, caching, etc.
THere’s even theme selection for code blocks making it ideal for developer blogs.
Whats best of all though? No more errors on hexo generate.
The CJMCU 8128 breakout board includes a great trio of environment sensors that pretty much cover all the bases when it comes to sensing your local environment and has a few overlaps especially with temperature. I’ve only seen it avialable so far at Baggood.com.
In the picture below you can see each of the three sensors labelled:
What’s on Board
These relatively cheap sensors include 3 main modules - with links to their data sheets:
Its worth mentioning the temperature values returned by each of these sensors are all different and sometimes by a few degrees so you could either use all 3 and pick an average of the 3 or pick the one which has the smallest reported variance according to its datasheet. Which at the time of writing would be the HDC1080.
Having said that I’d still recommend checking the temperature’s reporting against other sensors you may have and deciding for yourself.
Hooking up to a Raspberry Pi 3
You only need to hook up the 5 of the 8 pins provided for all 3 sensors to work on a Raspberry Pi connected using the i2C bus with pins VCC and GND being self-explanatory. Although VCC should go to 3.3V supply pin on the Raspberry Pi. The SDA and SCL pins shoyuld go to the corresponding SDA/SCL i2c GPIO pins. The last pin to notice is the WAK pin which according to the documentation should go to a free Ground pin. CCS811 datasheet[PDF]. The WAK(E) pin is used to wake a sleeping sensor from a hibernated low-power state. To make the module sleep you would put logic high to pin WAK and to wake the module you’d put logic low or Ground to that pin. As the whole breakout board uses only a tiny amount of power anyway and this post is about being connected to a Raspberry Pi I’ve chosen to hook up the WAK pin to GND to keep it permanently awake.
If you were using this on an ESP32 or ESP8266 where you wanted to take advantage of low power states then its worth looking further into this by checking the datasheets for each sensor.
See below for a photo of one connected and working with my home setup.
I’ve created a repo with an example that uses all three of the onboard sensors based off submodules of existing libraries that are out there for each. Adafruit have Python libraries for the CCS811 and BME280. With SDL having an example Python script for the HDC chip.
You can reach the repo with an example that combines all 3 of the submodules here.
There are other libraries you an use as the above uses Python mainly but especially in the case of the BME280
That library is what I am using with my own IoT setup at home with the small change of including and using Artik Python libraries to send my data to Samsung Artik for displaying the data in a dashboard format.
Ensuring the Breakout is Connected Correctly
You can run the i2cdetect command with the following arguments:
This stage is important as the default address for the BME/P 280 is 0x77 but in the CJMCU board it is as you can see above 0x76. Thankfully the Adafruit library comes with the ability to set the address on instantiation of the sensor class. See below…