Several ways to connect to get sensor data

The number of sensors has surged across the surface of the Earth and around people's lives, providing a variety of data messages around the world. These price-friendly sensors are the driving force behind the development of the Internet of Things (IoT) and our society is facing a digital revolution.


However, connecting and acquiring data from sensors is not always straightforward or so easy. Here are five tips to help ease the first war between the engineer and the transmission interface to the sensor.

Tip 1 - Start with the bus tool

In the first step, the engineer should take the first time to connect to the sensor by means of a bus tool to limit the unknown. A bus tool connects a personal computer (PC) to the sensor's I2C, SPI or other protocol that allows the sensor to "talk". A PC application associated with the bus tool provides an embedded microcontroller (MCU) driver that is known to work with the source to send and receive data and is not unknown or certified. In the working environment of the bus tool, the developer can send and receive messages to get an understanding of how the part works, before attempting to operate at the embedded level.

Tip 2 - Write the transport interface code in Python

Once the developer has tried to use the sensor of the bus tool, the next step is to write the application code for the sensor. Instead of jumping directly to the microcontroller's code, write the application code in Python. Many bus tools configure plug-ins and sample code in writing scripts, and Python is usually one of the languages ​​available in .NET. Writing an application in Python is quick and easy, and it provides a way to test the sensor in the application, which is not as complex as testing in an embedded environment. Having high-level code will make it easy for non-embedded engineers to mine sensor scripts and tests without the need for an embedded software engineer.

Tip 3 - Test the sensor with Micro Python

One of the advantages of writing the first piece of application code in Python is that by calling Micro Python, the application calls to the bus tool application programming interface (API) for easy replacement. Micro Python runs in real-time embedded software, with many sensors for engineers to understand its value. Micro Python runs on a Cortex-M4 processor and it's a great environment to debug application code from it. . Not only is it simple, there is no need to write I2C or SPI drivers here, as they are already covered in the Micro Python library.

Tip 4 - Using Sensor Vendor Code

Any sample code that can be "searched" from the sensor manufacturer, the engineer needs to go a long way to understand how the sensor works. Unfortunately, many sensor vendors are not experts in embedded software design, so don't expect to find a beautiful architecture and elegant example that can be put into production. Just use the vendor code to learn how this part works, and then the frustration of refactoring will emerge until it can be cleanly integrated into the embedded software. It may start like “spaghetti,” but using the manufacturer's understanding of how its sensors work will help reduce many of the weekends that have been destroyed before the product launch.

Tip 5 - Use a sensor fusion library

The chance is that the sensor's transmission interface is not too new, and no one has done this before. All libraries known, such as the "sensor fusion library" provided by many chip manufacturers, help developers quickly master, and even better, avoiding the reincarnation of their re-development or drastic modification of the product architecture. Many sensors can be integrated into a common type or category, and these types or categories will allow the driver to be developed smoothly and, if handled properly, are almost universal or less reusable. Look for these sensor fusion libraries and learn about their strengths and weaknesses.

Final thought

When sensors are integrated into embedded systems, there are many ways to help improve design timeliness and ease of use. When developers start designing, through a high-level abstraction and learning how sensors work before integrating sensors into a lower-level system, they will never “walk the wrong way”. The many resources that exist today will help developers “win”, without having to start from scratch.

HD Clear Film

The high-definition Hydrogel Screen Protector is made of TPU (polyurethane) material, which has high self-healing performance and anti-scratch performance. It is suitable for cutting with a Screen Protector Cutting Machine, but you need to pay attention to the angle of the blade when cutting to avoid cracking the Screen Protector.

Compared with other Screen Protectors, Hydrogel Screen Protectors have the following advantages:
1. HD Clear: The Hydrogel Screen Protector has an ultra-thin thickness of 0.14mm and high transparency. It will not affect the display effect of the mobile phone screen, and users can enjoy a clearer display effect.

2. Self-healing: The Hydrogel Screen Protector can automatically repair minor scratches or damage when encountering minor scratches, abrasions, etc., so that the screen remains perfect. Therefore, the lifespan of the screen protector can be extended.

3. Full coverage: The Hydrogel Screen Protector uses a high-permeability adhesive with strong adhesion. The flexible hydrogel film tightly fits the entire device screen without warping the surface, providing maximum protection for your screen

4. Sensitive touch and anti-fingerprint: The ultra-thin material provides a sensitive touch, which significantly improves the touch sensitivity when playing games. Built-in oleophobic and anti-fingerprint coating protects your screen from fingerprints and oil stains and is easy to clean.

HD Hydrogel Screen Protector is a powerful Screen Protector with perfect protection and repair effects, and also has the advantages of high transparency and no bubbles, which is an ideal choice for protecting your screen.

HD Screen Protector, High-Definition Screen Protector, HD Hydrogel Film, HD Clear Screen Protector, Hydrogel Film,HD Hydrogel Screen Protector

Shenzhen Jianjiantong Technology Co., Ltd. , https://www.jjthydrogelprotector.com

Posted on