Building the Internet of Things with Raspberry Pi et al, DIY-style

How to create your own IoT gadgets and gizmos

Page File The Internet of Things (IoT) is all the rage at the moment, with dozens of manufacturers throwing out kit like remote-control lightbulbs, weather stations, thermostats and plenty more. Some of those are great products and some of them are also-rans.

Quite a lot, it turns out, are actually simple enough that you could probably build something like that at home.

That's what this new book, The Internet of Things: Do-It-Yourself at Home Projects for Arduino, Raspberry Pi and BeagleBone Black by Donald Norris, is all about. It sets out to show how you can use small computer systems and link them up to sensors, switches and relays to build your own IoT projects. The ubiquitous Raspberry Pi is one of the systems featured, but it also covers Arduino and BeagleBone Black as well.

According to the blurb, it "gets you started working with the most popular processing platforms" and covers "the basics of object-oriented programming", which sounds a pretty appealing prospect.

Beagleboard Beaglebone Black

Besides Raspberry Pi, Arduino and Beaglebone Black are covered

In the beginning

You could be forgiven from that for thinking that the book will cater for complete beginners, but while it does explain some concepts that may well be new – like abstract classes and interfaces – it's certainly not a complete programming tutorial. For instance, one of the early examples has this line of Python code:

Internet of Things book cover
data = ((adc[1]&3) << 8) + adc[2]

It's an expression that will certainly look a little bewildering to the novice, and in things like this, the book really could do with a little more explanation. In short, you will need a basic grounding in Python to get started with the Raspberry Pi examples, unless you just want to copy and paste them.

Alongside the programming, the book also looks at different types of sensor and controller that you can use, starting with a simple temperature sensor connected via an ADC and a Pi Cobbler to systems such as I2C, and interfacing LEDs or switches to the Pi's GPIO pins. It's also worth noting that the book came out before the new Pi B+, so that's not specifically covered.

Rapberry Pi Bplus RibbonCable

The book just predates the Raspberry Pi Model B+

As with the programming, though, while there is useful information – like how to make sure your I2C setup will operate within the limits of the board you're using – when it comes to some of the code examples, you'll need to follow them quite closely. For instance, the formulas to do things like calibration or the procedure for reading and writing data are only really apparent from following the code.

Technically-minded readers who can follow a datasheet and a spec will probably have no problems here but I think novices may struggle. A clear explanation, rather than – or in addition to – pages of Java code might have been better.

Extra helpings

It's not all Raspberry Pi in the book, though. There are also projects using Arduino, with both the Uno IDE and Visual Studio 2012 Express. There's a good explanation of how to use an Ethernet shield to run a web server, and controlling items using a relay board connected to the GPIO pins too. To a degree – perhaps because I've played with Raspberry Pi but not with an Arduino – I felt that this part of the book actually did a better job at demystifying Arduino for beginners than the earlier examples did with the Pi.

Visual Studio Arduino

You can code for Arduino with Visual Studio Express – the book explains how

It also included, in a project for a remote garage door opener, some useful reminders about security, which is good to see in a title like this. There's also information on setting up communications links using XBee modules and constructing your own moisture sensor to add to an irrigation system, as well as an explanation of XBee mesh networks.

Some of this, of course, has a bit of an American bent and when it comes to lighting controls, the book uses the PowerSwitch Tail II – which is for 120V. Fortunately, there is a kit version for 240 volts also available.

There are two projects included for the BeagleBone Black, including driving an LCD – again using Python from Linux – and pushing data from a sensor to the Xively web service, where you can create graphs of sensor readings rather than the simple tabular output that the rest of the book concentrates on. Finally, it wraps up with a look at using MQTT between a BeagleBone and a Raspberry Pi.

Similar topics

Other stories you might like

  • UK science suffers as lawmakers continue to dither over Brexit negotiations

    Horizons Europe carrot dangled amid protocol wrangling

    A report from the UK House of Commons' European Scrutiny Committee has blamed delays in Brussels for choking off revenue streams to British institutions and businesses.

    The UK departed the European Union following a 2016 referendum. One of the results was that UK businesses were no longer able to tender for lucrative contracts within the bloc.

    The Brexit Divorce Bill uncomfortably laid out the facts back in 2018. The satellite navigation system Galileo was one victim despite substantial involvement from the UK in its development. Another was the Copernicus Earth monitoring programme; the UK was infamously snubbed when the European Space Agency (ESA) handed out six juicy contracts to institutions from the Continent.

    Continue reading
  • Warehouse belonging to Chinese payment terminal manufacturer raided by FBI

    PAX Technology devices allegedly infected with malware

    US feds were spotted raiding a warehouse belonging to Chinese payment terminal manufacturer PAX Technology in Jacksonville, Florida, on Tuesday, with speculation abounding that the machines contained preinstalled malware.

    PAX Technology is headquartered in Shenzhen, China, and is one of the largest electronic payment providers in the world. It operates around 60 million point-of-sale (PoS) payment terminals in more than 120 countries.

    Local Jacksonville news anchor Courtney Cole tweeted photos of the scene.

    Continue reading
  • Everything you wanted to know about modern network congestion control but were perhaps too afraid to ask

    In which a little unfairness can be quite beneficial

    Systems Approach It’s hard not to be amazed by the amount of active research on congestion control over the past 30-plus years. From theory to practice, and with more than its fair share of flame wars, the question of how to manage congestion in the network is a technical challenge that resists an optimal solution while offering countless options for incremental improvement.

    This seems like a good time to take stock of where we are, and ask ourselves what might happen next.

    Congestion control is fundamentally an issue of resource allocation — trying to meet the competing demands that applications have for resources (in a network, these are primarily link bandwidth and router buffers), which ultimately reduces to deciding when to say no and to whom. The best framing of the problem I know traces back to a paper [PDF] by Frank Kelly in 1997, when he characterized congestion control as “a distributed algorithm to share network resources among competing sources, where the goal is to choose source rate so as to maximize aggregate source utility subject to capacity constraints.”

    Continue reading
  • How business makes streaming faster and cheaper with CDN and HESP support

    Ensure a high video streaming transmission rate

    Paid Post Here is everything about how the HESP integration helps CDN and the streaming platform by G-Core Labs ensure a high video streaming transmission rate for e-sports and gaming, efficient scalability for e-learning and telemedicine and high quality and minimum latencies for online streams, media and TV broadcasters.

    HESP (High Efficiency Stream Protocol) is a brand new adaptive video streaming protocol. It allows delivery of content with latencies of up to 2 seconds without compromising video quality and broadcasting stability. Unlike comparable solutions, this protocol requires less bandwidth for streaming, which allows businesses to save a lot of money on delivery of content to a large audience.

    Since HESP is based on HTTP, it is suitable for video transmission over CDNs. G-Core Labs was among the world’s first companies to have embedded this protocol in its CDN. With 120 points of presence across 5 continents and over 6,000 peer-to-peer partners, this allows a service provider to deliver videos to millions of viewers, to any devices, anywhere in the world without compromising even 8K video quality. And all this comes at a minimum streaming cost.

    Continue reading
  • Cisco deprecates Microsoft management integrations for UCS servers

    Working on Azure integration – but not there yet

    Cisco has deprecated support for some third-party management integrations for its UCS servers, and emerged unable to play nice with Microsoft's most recent offerings.

    Late last week the server contender slipped out an end-of-life notice [PDF] for integrations with Microsoft System Center's Configuration Manager, Operations Manager, and Virtual Machine Manager. Support for plugins to VMware vCenter Orchestrator and vRealize Orchestrator have also been taken out behind an empty rack with a shotgun.

    The Register inquired about the deprecations, and has good news and bad news.

    Continue reading
  • Protonmail celebrates Swiss court victory exempting it from telco data retention laws

    Doesn't stop local courts' surveillance orders, though

    Encrypted email provider Protonmail has hailed a recent Swiss legal ruling as a "victory for privacy," after winning a lawsuit that sees it exempted from data retention laws in the mountainous realm.

    Referring to a previous ruling that exempted instant messaging services from data capture and storage laws, the Protonmail team said this week: "Together, these two rulings are a victory for privacy in Switzerland as many Swiss companies are now exempted from handing over certain user information in response to Swiss legal orders."

    Switzerland's Federal Administrative Court ruled on October 22 that email providers in Switzerland are not considered telecommunications providers under Swiss law, thereby removing them from the scope of data retention requirements imposed on telcos.

    Continue reading
  • Japan picks AWS and Google for first gov cloud push

    Local players passed over for Digital Agency’s first project

    Japan's Digital Agency has picked Amazon Web Services and Google Cloud for its first big reform push.

    The Agency started operations in September 2021, years after efforts like the UK's Government Digital Service (GDS) or Australia's Digital Transformation Agency (DTA). The body was a signature reform initiated by Prime Minister Yoshihide Suga, who spent his year-long stint in the top job trying to curb Japan's reliance on paper documents, manual processes, and faxes. Japan's many government agencies also operated their websites independently of each other, most with their own design and interface.

    The new Agency therefore has a remit to "cut across all ministries" and "provide services that are driven not toward ministries, agency, laws, or systems, but toward users and to improve user-experience".

    Continue reading
  • Singaporean minister touts internet 'kill switch' that finds kids reading net nasties and cuts 'em off ASAP

    Fancies a real-time crowdsourced content rating scheme too

    A Minister in the Singapore government has suggested the creation of an internet kill switch that would prevent minors from reading questionable material online – perhaps using ratings of content created in real time by crowdsourced contributors.

    "The post-COVID world will bring new challenges globally, including to us in the security arena," said Minister for Defence Dr Ng Eng Hen at a Tuesday ceremony to award the city-state's 2021 Defense Technology Prize.

    "For operations, the SAF (Singapore Armed Force) has to expand its capabilities in the digital domain. Whether for administrative or operational purposes, I think that we will need to leverage technology to the maximum," he declared.

    Continue reading

Biting the hand that feeds IT © 1998–2021