0%

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!).

$29.99 for AN870 19999 Counts Digital Multimeter


Multimeter

$3.99 for 5V to 9V12V Step Up Module


USB Power Boost Module

$142 for DS213 Mini Oscilloscope


Mini DS213 Oscilloscope

$72.99 for JDS6031 Hand-held Oscilloscope 30M 200MSa/S


Hand Held Oscilloscope

$228 For Hantek Dso5102p Digital Storage Oscilloscope 100MHz 2 channels 1GSa/s


Hantek Professional Oscilloscope

$8.49 for TTGO T-Display ESP32 CP2104 WiFi bluetooth Module


ESP32 TTGO with LCD Screen

$69 for DANIU ADS5012H Digital 2.4-inch TFT Screen Anti-burn Oscilloscope 500MS/s Sampling Rate


Hand Held Oscilloscope

$11.11 for Handskit Battery Soldering Iron


Battery Operated Soldering Iron

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.

Check out the Hexo top 10 Themes by stars and especially Hexo Next.

It’s been a LONG time since my last post so my first port of call was recovering my last post which I stupidly hadn’t pushed to rmeote before my hard drive died. Then I had to play with some plugins.

Here’s some of the music I like to listen to when coding to get my blood pumping and get in ‘the zone’:

Or if I’m in a Prodigy mood (which is often) then somethng like:

If I want something a bit more vocal and hip hop style then a Prodigy remix like this is all good.:

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.

Prerequisites

Required Libraries

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:

i2cdetect -y 1

You should get the following output:

1
2
3
4
5
6
7
8
9
0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f
00: -- -- -- -- -- -- -- -- -- -- -- -- --
10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
40: 40 -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
50: -- -- -- -- -- -- -- -- -- -- 5a -- -- -- -- --
60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
70: -- -- -- -- -- -- 76 --

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…

1
2
3
4
5
6
sensor = BME280(
t_mode=BME280_OSAMPLE_8,
p_mode=BME280_OSAMPLE_8,
h_mode=BME280_OSAMPLE_8,
address=0x76
)

Great video from one of the devs responsible for Firefox’s Dev Tools which
I now much prefer using over Chromes Dev Tools.

Check out the video below for info on the future of Dev Tools and a call to arms
for extension developers to speak up about what they’d like to API-wise to
hook into Firefox Dev Tools.

Some of the links to thing mentioned in the video are:

https://www.youtube.com/watch?v=oGobLmA_WVQ