LittleCodingKata: Hardware Excuse Generator with gRPC
gRPC is a very interesting lightweight middleware framework for language-neutral, cross-platform RPC.
When I heard about Natalie Silvanovich's Hardware Excuse Generator on Embedded.fm, I immediately recognised a better "Hello World" for testing out gRPC.
Introducing "The Explainer": my programming exercise to learn basic cross-language request/reply with gRPC.
I haven't completed the whole matrix of client-server possibilities yet, but here's a sampling...
Start up a server (e.g ruby version)
$ ./explainer.rb
ShiFu is waiting to explain all of your problems...
And then ask it questions. Pick a language!
# Ruby client
$ ./explain.rb "Your phone is crashing because of REASON"
Your phone is crashing because of the
PCB not being manufactured to specification
# C# client
$ mono bin/Release/explain.exe "Your phone is crashing because of REASON"
Your phone is probably crashing because of stray harmonics
# C++ client
$ ./explain "Your phone is crashing because of REASON"
Your phone is crashing because of impedance in the coil
# node.js client
$ node ./explain.js "Your phone is crashing because of REASON"
Your phone is crashing because of a lack of shielding against
alpha radiation (cosmic rays) in antenna
# Python client
$ python explain.py "Your phone is crashing because of REASON"
Your phone is crashing because of residual capacitance
caused by the USB connector
All my notes and code are available in the LittleCodingKata GitHub repository.
read more and comment..
Embedded: Specialization is for insects
embedded.fm has fast become my favourite podcast of the moment (always excepting QOTD). Great ideas shared in an inclusive and warm-fuzzy way.
Elecia's end-of-show quote always makes it worth listening right to the end. Until I heard #146's,
I'd struggled to find words to express exactly this. It's a quote from Robert A. Heinlein:
A human being should be able to change a diaper, plan an invasion, butcher a hog, conn a ship, design a building, write a sonnet, balance accounts, build a wall, set a bone, comfort the dying, take orders, give orders, cooperate, act alone, solve equations, analyze a new problem, pitch manure, program a computer, cook a tasty meal, fight efficiently, die gallantly. Specialization is for insects.
read more and comment..
LEAP#201 Yet Another Doorbell
aka door-fart according to my better half ... 555 Timer-based oscillators are not exactly the most musical creatures.
#201 is a kit build. Ridiculously cheap on aliexpress, it even came with extra components, so a bit of a bargain impulse-buy.
The kit turned out to be a simplified version of a circuit I've built before. It lacks the power control circuit, and draws about 4mA when idle - so if you actually use it, expect to be replacing batteries on a regular basis.
As always, all notes, schematics and code are in the Little Arduino Projects repo on GitHub.
Here's the start of the "ding.." on a 'scope..
read more and comment..
LEAP#200 Mini Solenoid Engine
Solenoid engines? They definitely fall into the the category of because you can.
Some people take it to a whole other level (like this V8 model).
What I have here is much more modest - a single-cylinder engine powering an impromptu-wire-art drive train. The mini-solenoid used here has a very small effective stroke - about 8mm - which necessarily constrains the gearing. I was inspired by 30GB's similar model for the layout.
As always, all notes, schematics and code are in the Little Arduino Projects repo on GitHub.
read more and comment..