Zero-overhead Destructors in C

CNXSoft: This is another guest by Blu, this time about C programming, and specifically destructors in C programming language If you asked seasoned C++ developers what their favorite features in the C++ language might be, chances are that destructors would be on everybody’s shortlist. As many other C++ developers, I too tend to do my occasional share of C, and if there’s one feature I dearly miss in C that is destructors ‒ precisely in their capacity of automating the release of resources at the right moment. But first a disclaimer is in order: many people call simple application of destructors ‘RAII’ ‒ ‘Resource Acquisition Is Initialization’; I find this acronym unnecessarily awkward and obfuscating an otherwise straightforward concept, so you won’t see this acronym through the end of this text. Instead, I’ll be using ‘end-of-scope’ action. Traditionally, in the language of C end-of-scope (more often end-of-function) actions are achieved […]

Getting Started with ANAVI Light pHat Starter Kit with RGB LED Strip, Light Sensor

ANAVI Light pHAT is an expansion board best suited for Raspberry Pi Zero (W/WH) boards, but also working with any other Raspberry Pi boards with a 40-pin header, that can control a 12V RGB LED strip and sensors. The project’s crowdfunding has just been successfully completed on CrowdSupply with 82 pledges, but you can still pre-order the board or kits for $25 and up. The developer – Leon ANAVI – had sent me a starter kit a little while ago, and this week-end I had time to test the basic functionalities of the board. The package includes the pHAT board itself, a one meter RGB LED strip, an I2C sensor, and some stickers. The sensor is based on BH1750 ambient light intensity sensor. The light pHAT boards include a 4-pin 12V/RGB blue terminal, EEPROM, three I2C connecter, a 3.3V UART connector to access the serial console for debugging / running […]

JeVois-A33 Linux Computer Vision Camera Review – Part 2: Setup, Guided Tour, Documentation & Customization

Computer Vision, Artificial Intelligence, Machine Learning, etc.. are all terms we hear frequently those days. JeVois-A33 smart machine vision camera powered by Allwinner A33 quad core processor was launched last year on Indiegogo to bring such capabilities in a low power small form factor devices for example to use in robotics project. The company improved the software since the launch of the project, and has now sent me their tiny Linux camera developer kit for review, and I’ve already checked  out the hardware and accessories in the first post. I’ve now had time to test the camera, and I’ll explained how to set it up, test some of the key features via the provided guided tour, and show how it’s possible to customize the camera to your needs with one example. Getting Started with JeVois-A33 In theory, you could just get started by inserting the micro SD card provided with […]

Aspencore 2017 Embedded Markets Study – Programming Languages, Operating Systems, MCU Vendors, and More

Aspencore media group asked readers of their EE Times and websites to fill out an online survey about their embedded system projects. They got 1,234 respondents mostly from North America (56.3%), followed by Europe (25.2%), and Asia (10.6%). This resulted in a 102-page market study which you can download here. I’ve extracted a few slides to have a look at some of the trends. C language is still the most used language in embedded systems, but other languages like C++, Python and even assembly language are gaining traction. Operating system is more spread with Linux being the most used via Embedded Linux distributions, Debian, and Ubuntu. FreeRTOS comes in second place, while Android registers fourth with 13%. Git has finally supplanted Subversion in 2017, with all other version control software losing ground. Switching to some hardware slides, 44% used a development board to start their embedded design with ST […]

Top Programming Languages & Operating Systems for the Internet of Things

The Eclipse foundation has recently done its IoT Developer Survey answered by 713 developers, where they asked  IoT programming languages, cloud platforms, IoT operating systems, messaging protocols (MQTT, HTTP), IoT hardware architectures and more.  The results have now been published. So let’s have a look at some of the slides, especially with regards to programming languages and operating systems bearing in mind that IoT is a general terms that may apply to sensors, gateways and the cloud, so the survey correctly separated languages for different segments of the IoT ecosystem. C and C++ are still the preferred languages for constrained devices, and developers are normally using more than one language as the total is well over 100%. IoT gateways are more powerful and resourceful (memory/storage) hardware, so it’s no surprise higher level languages like Java and Python join C and C++, with Java being the most used language with 40.8% […]

How to Write ESP8266 Firmware from Scratch (using ESP Bare Metal SDK and C Language)

CNXSoft: This is a guest post by Alexander Alashkin, software engineer in Cesanta, working on Mongoose Embedded Web Server. Espressif’s ESP8266 had quite an evolution. Some may even call it controversial. It all started with ESP8266 being a WiFi module with a basic UART interface. But later it became clear that it’s powerful enough for embedded system. It’s essentially a module that can be used for running full-fledged applications. Espressif realized this as well and released an SDK. As first versions go, it was full of bugs but since has become significantly better. Another SDK was released which offered FreeRTOS ported to ESP. Here, I want to talk about the non-OS version. Of course, there are third-party firmwares which offer support for script language to simplify development (just Google for these), but ESP8266 is still a microchip (emphasis on MICRO) and using script language might be overkill. So what we […]

Top 10 Programming Languages in 2016 for Embedded Software Development

IEEE Spectrum has published a list of the top programming languages in 2016 for Web, Mobile, Enterprise, and Embedded sectors with rankings created by weighting and combining 12 metrics from 10 sources. So I thought it would be fun to have a look at the top 10 of languages used for embedded software, and the results are: As expected, C and C++ are at the top, but I’m quite surprised that “Arduino” is now considered a programming language, as it is simply based on C/C++.  When I worked as an embedded software engineer a few years ago, I personally used C, and Assembly, and to a lesser extend C++ and VHDL. I only recently started to play with Arduino code, and while I’ve heard of most other languages in the list, it’s the first time I’ve ever seen Ladder Logic, probably because it’s designed to program PLCs in industrial control […]

The Eclipse Foundation Releases Open Source Smart Home & IoT Gateway Frameworks, MQTT & oneM2M Implementations

The Eclipse Internet of Things (IoT) Working Group has released – or soon will be releasing – four open source projects for the Internet of Things with Eclipse SmartHome 0.8 framework, Eclipse Kura 2.0 IoT gateway framework, Eclipse Paho 1.2 MQTT & MQTT-SN clients, and Eclipse OM2M 1.0 implementation of oneM2M standard. Eclipse SmartHome 0.8 Eclipse SmartHome is a framework for smart home solutions that runs on embedded devices, including Raspberry Pi, BeagleBone Black or Intel Edison development boards. The latest SmartHome 0.8 release includes a new REST API and corresponding “Paper UI” administration interface, support for new devices including Sonos speakers, LIFX bulbs, Belkin WeMo devices, digitalSTROM systems, EnOcean devices (via a new OSGi EnOcean Base Driver) and others, as well as a new rule engine supporting templates for beginners, JavaScript for automation rules and graphical rule editors. You can find more details on Eclipse SmartHome page, and/or download SmartHome 0.8, […]

UP 7000 x86 SBC