JeVois Machine Vision Camera Nails Demo Mode

JeVois is a small, open-source, smart machine vision camera that was funded on Kickstarter in early 2017. I backed it because cameras that embed machine vision elements are steadily growing more capable, and JeVois boasts an impressive range of features. It runs embedded Linux and can process video at high frame rates using OpenCV algorithms. It can run standalone, or as a USB camera streaming raw or pre-processed video to a host computer for further action. In either case it can communicate to (and be controlled by) other devices via serial port.

But none of that is what really struck me about the camera when I received my unit. What really stood out was the demo mode. The team behind JeVois nailed an effective demo mode for a complex device. That didn’t happen by accident, and the results are worth sharing.

Continue reading “JeVois Machine Vision Camera Nails Demo Mode”

Snake On A BBC Micro:bit

The first of the BBC Micro Bits are slowly making their ways into hacker circulation, as is to be expected for any inexpensive educational gadget (see: Raspberry Pi). [Martin] was able to get his hands on one and created the “hello world” of LED displays: he created a playable game of snake that runs on this tiny board.

For those new to the scene, the Micro Bit is the latest in embedded ARM systems. It has a 23-pin connector for inputs and outputs, it has Bluetooth and USB connectivity, a wealth of sensors, and a 25-LED display. That’s small for a full display but it’s more than enough for [Martin]’s game of snake. He was able to create a hex file using the upyed tool from [ntoll] and upload it to the Micro Bit. Once he worked out all the kinks he went an additional step further and ported the game to Minecraft and the Raspberry Pi Sense HAT.

[Martin] has made all of the code available if you’re lucky enough to get your hands on one of these. Right now it seems that they are mostly in the hands of some UK teachers and students, but it’s only a matter of time before they become as ubiquitous as the Raspberry Pi or the original BBC Micro.  It already runs python, so the sky’s the limit on these new boards.

Continue reading “Snake On A BBC Micro:bit”

Code Craft – Embedding C++: Timing Virtual Functions

Embedded C developers shy away from C++ out of concern for performance. The class construct is one of their main concerns. My previous article Code Craft – Embedding C++: Classes explored whether classes cause code bloat. There was little or no bloat and what is there assures that initialization occurs.

Using classes, and C++ overall, is advantageous because it produces cleaner looking code, in part, by organizing data and the operations on the data into one programming structure. This simple use of classes isn’t the raison d’etre for them but to provide inheritance, or more specifically polymorphism, (from Greek polys, “many, much” and morphē, “form, shape”).

Skeptics feel inheritance simply must introduce nasty increases in timing. Here I once more bravely assert that no such increases occur, and will offer side-by-side comparison as proof.

Continue reading “Code Craft – Embedding C++: Timing Virtual Functions”

Nvidia Brings Computer Vision And Deep Learning To The Embedded World

Today, Nvidia announced their latest platform for advanced technology in autonomous machines. They’re calling it the Jetson TX1, and it puts modern GPU hardware in a small and power efficient module. Why would anyone want GPUs in an embedded format? It’s not about frames per second; instead, Nvidia is focusing on high performance computing tasks – specifically computer vision and classification – in a platform that uses under 10 Watts.

For the last several years, tiny credit card sized ARM computers have flooded the market. While these Raspberry Pis, BeagleBones, and router-based dev boards are great for running Linux, they’re not exactly very powerful.  x86 boards also exist, but again, these are lowly Atoms and other Intel embedded processors. These aren’t the boards you want for computationally heavy tasks. There simply aren’t many options out there for high performance computing on low-power hardware.

Nvidia
The Jetson TX1 and Developer Kit. Image Credit: Nvidia

Tiny ARM computers the size of a credit card have served us all well for general computing tasks, and this leads to the obvious question – what is the purpose of putting so much horsepower on such a small board. The answer, at least according to Nvidia, is drones, autonomous vehicles, and image classification.

Image classification is one of the most computationally intense tasks out there, but for autonomous robots, there’s no other way to tell the difference between a cyclist and a mailbox. To do this on an embedded platform, you either need to bring a powerful general purpose CPU that sucks down 60 or so Watts, or build a smaller, more efficient GPU-based solution that sips a meager 10 Watts.

Continue reading “Nvidia Brings Computer Vision And Deep Learning To The Embedded World”

Firmware Factory: Bit Fields Vs Shift And Mask

Working with embedded systems usually involves writing code which will interface with hardware. This often means working on the register level. It doesn’t matter if we’re talking about a UART, an analog to digital converter, an LCD controller, or some other gizmo. Sooner or later, you’re going to have to break out the datasheets and figure out how to talk to an external device. To succeed at this you must become a master of bit manipulation.

Hardware designers don’t like wasting space, so modes, settings and other small pieces of information are often stored as packed bits. Our processors usually access things a byte (or a word) at a time, so what is the best way to handle this? Like so many other topics in software engineering, there are multiple ways to skin this cat. In C (and its derivatives) there are two major options: shift and mask, and bit fields.

Continue reading “Firmware Factory: Bit Fields Vs Shift And Mask”

Micro:bit — BBC Gets A Million Kids Into Embedded Dev

In the Early 1980s, the BBC launched a project to teach computer literacy to a generation of British schoolchildren. This project resulted in the BBC Micro, a very capable home computer that showed a generation exactly what a computer could do. These children then went home, turned on their ZX Spectrums, and became a generation of software engineers. Still, the BBC Micro is remembered fondly.

The computer revolution is long over, but today we suffer a sea change of embedded processors and microcontrollers. With Arduinos and Raspberry Pis, the BBC has decided it’s time to put the power of an ARM microcontroller into the hands of a million 11- and 12-year olds. The result is the Micro:bit. It’s a small microcontroller board with an ARM processor, an IMU, buttons, Bluetooth and a 5×5 LED array – exactly what you need if you’re teaching a million kids how to blink an LED.

Although the BBC has finalized the design for the Micro:bit, there are no specs at all. However, a few educated guesses can be made. The USB controller is provided by Freescale, who also provide the digital compass and magnetometer. Programming is done through a web-based, Arduino-like IDE with what appears to be a decent Micro:bit specific library. The board is also mbed compatible. Bluetooth, and apparently the ARM Cortex M0 core, is provided by a Nordic nRF51822. There are only three alligator clip-compatible I/Os, and its doubtful any student will be building anything that would be too complex for an entry level ARM. It’s also 3V logic; finally, the tyranny of 5V has fallen.

The Micro:bit is best seen as a tool that enables the relatively recent addition of a computer science curriculum in UK schools. There is now a requirement for seven-year-olds to understand algorithms and create simple programs. Previously computer education in the UK has consisted of PowerPoint. Now, secondary school students will be learning Boolean logic.

While the Micro:bit is utterly useless as a tool for doing real work, education is not real work. For blinking a few LEDs, having a device react to movement, playing with Bluetooth, and other lesser evils of electronics, the Micro:bit is great. Not everyone will become the digital technologists this initiative is trying to create, but for those who have an inclination towards semicolons and electrons, this is a great introduction to technology.

2048: Embedded Edition

Embedded touch version of 2048 tile gameHow ’bout that 2048 game? Pretty addictive, huh? Almost as addictive as embedded systems are, at least if you’re [Andrew]. Armed (pun intended) with a Nucleo F4 and a Gameduino 2 shield, he decided to have a go at making an embedded version of the popular tile pusher web game.

If you’re unfamiliar with the Nucleo boards from STMicroelectronics, check out our post on the Nucleo family from a couple of months ago. The Gameduino 2 shield ships with a 4.3″ touchscreen driven by an FT800 GPU EVE. [Andrew] wrote his own driver for it and his blog post goes into great detail about its programming model and the SPI read, write, and command functions he wrote. Full code is available from [Andrew]’s repo.

He started by generating a blank screen based on clues found in the Gameduino 2 source. Pretty soon he had rendered a rectangle and then a full 2048 board. A minor difference between [Andrew]’s creation and the original is that his always creates new tiles as ‘2’ while the web game cranks out the occasional ‘4’.

We were unable to embed [Andrew]’s gameplay videos, but you’ll find two on his blog.