Clean IOT
Buy the entire series and save $20 (streaming) + $20 (download)!
5. Chasing Zombies
By Robert C. Martin & James W. Grenning, 1h 1m

This is precious! Zombies and Foxes.

Our heroes finally get rid of that horrible PC that was mucking up their development environment. Then they start working on that shift register protocol for transmitting batches from the node to the hub.

Their goal is to deal with all the Zombies. You know. Zero, One, Many, Boundaries, Interfaces, Exceptions, and Simplicity. You can read about that here if you like.

Everything is going along swimmingly until a timing issue starts the foxes up again. 0xffff. But this time, it's predictably every other read!

So -- out comes the scope again! And what they find is -- well -- you just have to see it for yourself.

4. The Pulse Stretcher
By Robert C. Martin & James W. Grenning, 1h 1m

Hmmm. Well, they haven't put the scope away yet. But it looks like the pulse stretcher is working. That means they can reliably read from the A/D converter. All those false 0xFFFFF reading should be gone.

So now it's time to create a protocol that allows them to send a batch of readings from the sensor node to the hub. This involves creating a shift register of values in the attenuated Python language that really isn't all that good at arrays.

In the end, Bob and James resort to playing TDD Ping-Pong in order to get the protocol working.

3. SPI Buss Woes
By Robert C. Martin & James W. Grenning, 1h 18m

...Um... The scope is still out...

Yeah, they're still trying to figure out this SPI buss thing. There are timing issues, and data corruption issues, and jumper switches, and...

Well, you'll just have to watch to see all the devilment our heroes get into.

They do get it all sorted out though. Well, sort of. I mean, in the end they've got a strategy for getting things working. Chuck, the hardware dude, will likely have to get involved again.

But the communications pathway works. Data moves all the way from the A/D converter, through the SPI buss, into the nodes, over the SNAP radio mesh network, around the tree, under the log, and into the Linux box.

Oh! And the development environment is starting to get better too. We still need that Portal PC; but for a lot less now.

2. Scope it.
By Robert C. Martin & James W. Grenning, 1h 31m

Oh oh.

The oscilloscope is out! Looks like our intrepid embedded warriors are trying to debug hardware. Nothing good will likely come of that!

Yup! Chuck (the hardware dude) came by and set up a nice little breadboarded circuit that connects the SPI buss to the A/D converter.

In this episode, we investigate the inner workings of that SPI buss, and eventually get the computers on the mesh network reading values from the A/D converter.

At first, things do not go well. I mean, what would you expect when a couple of software guys start fiddling with electronic hardware?

But, never fear, the lads work it all out in the end using software, intuition, speculation, trial-and-error, and even occasionally, when all else fails, reading the manual.

Did I say they worked it all out? Well, not quite. It appears that there is a small matter of a glitch!

1. Clean Internet of Things
By Robert C. Martin & James W. Grenning, 1h 23m

Are you interested in the Internet of Things?

In this series, Uncle Bob, and James Grenning (Author of Test Driven Development for Embedded C) join forces to create a distributed embedded application for the IoT.

In this series you will see us use:

  • Python.
  • Breadboards and wires.
  • Oscilloscopes.
  • Computers on a SNAP radio mesh network.
  • Analog to Digital converters.
  • SPI (Serial Peripheral Interface) Buss.
  • Linux Boxes.
  • Mac Laptops.
  • PC Laptops.
  • Tablets.

I mean to tell you that this is a mess! But it's a fun mess.

In this first episode, we explore the crazy development environment, look at some prototype code, and get a few simple functions working between the Linux server and the computers on the radio mesh network.

So, follow along and have a blast as James and I investigate the Internet of Things.