Design-by-Contract (DbC) is a method that helps embedded software developers reduce the time spent debugging by ensuring each function has well-defined pre-conditions, post-conditions, side effects, and invariants. This approach creates "contracts" that must be followed for a function to operate properly, outlining what must be true before and after a function executes.
To enforce these contracts, developers can use assertions, which check that the conditions are met at runtime. If a condition isn't satisfied, the assertion signals a defect, making it easier to catch errors early. Assertions aren't used for error handling but for defect detection, ensuring that the system behaves as expected when calling functions or components.
// Example of DbC using assertions
void Dio_Init(DioConfig_t const* const Config)
{
assert(sizeof(Config) > 0);
assert(NUMBER_OF_CHANNELS_PER_PORT > 0);
assert(NUMBER_OF_PORTS > 0);
assert(Mcu_ClockState(GPIO) == true);
// The rest of the function
}
DbC can be implemented simply, often through code documentation tools like
#articles #programming
Please open Telegram to view this post
VIEW IN TELEGRAM
👍12👌4👎3
MIT researchers have developed semiconductor-free, 3D-printed logic gates, marking a significant step toward fully 3D-printed active electronics. Using a copper-doped polymer material, they created resettable fuses that mimic some functions of semiconductor-based transistors, such as switching. Although their performance doesn’t yet match silicon transistors, these devices could be used for simpler tasks, like controlling electric motors.
The biodegradable, energy-efficient fabrication method could democratize electronics production by enabling people to print functional electronics outside of specialized facilities, with potential applications in areas like spacecraft. Further research aims to enhance device complexity and performance.
#news #electronics
Please open Telegram to view this post
VIEW IN TELEGRAM
👍15👎1👌1
Embedded Systems
📰 A company's new robot can change from four wheel drive to bipedal in seconds A company called Swiss-Mile has created an innovative robot that combines legs and wheels to create, what they hope, will be the most versatile last-mile delivery robot on the…
Media is too big
VIEW IN TELEGRAM
In a recent video, Swiss-Mile engineers put their high-tech delivery robot to the test by racing it against a champion runner and the members of the team. The robot reached nearly 14 mph, securing second place and demonstrating impressive agility for a machine built for urban delivery. Equipped to shift from four wheels to two legs, the robot is designed to handle complex tasks autonomously. The video highlights its potential for agile, efficient urban deliveries, almost keeping pace with a human champion.
#news #robots
Please open Telegram to view this post
VIEW IN TELEGRAM
👍6👌2
This media is not supported in your browser
VIEW IN TELEGRAM
FlexiPi is a unique, bendable microcontroller board based on the
Features of the microcontroller:
The project is ongoing on Kickstarter and it is interesting to see how people are trying to commercialize this technology. Overall it is a useful project for engineers looking to integrate powerful microcontroller functionality into constrained or curved spaces.
#projects #raspberry
Please open Telegram to view this post
VIEW IN TELEGRAM
👍14👎4👌3
The Q8bot is a compact quadruped robot designed to minimize wiring complexity by integrating all components directly onto a custom PCB. The robot uses eight Dynamixel motors and a Seeed Studio XIAO ESP32C3 microcontroller to achieve agile, wire-free movement.
Features of the robot:
The robot's open-source design and relatively low bill of materials (around $300) make it accessible for hobbyists looking to experiment with quadruped robot movement and control.
More information:
#projects #robots #esp32
Please open Telegram to view this post
VIEW IN TELEGRAM
Please open Telegram to view this post
VIEW IN TELEGRAM
👍19👌1
Setting up a development environment for the
Fortunately, Raspberry Pi's official extension for Microsoft Visual Studio Code is a game-changer, making it easier than ever to get started with C/C++ on the Pico. This guide will give you a quick walk though the steps needed to start embedded development with Pico on Windows environment.
#articles #programming #raspberry
Please open Telegram to view this post
VIEW IN TELEGRAM
👍13
Recently, several robotics projects have been open-sourced by
The Digit 360 is a highly advanced artificial fingertip designed to provide human-level tactile sensing by capturing detailed touch data with over 18 sensing features. The sensor uses a unique optical system with more than 8 million taxels to detect fine spatial details and forces as small as 1 millinewton, allowing it to perceive vibrations, heat, and even smell.
This innovation aims to enhance AI research in physical perception, making robots and virtual interactions more responsive and realistic. Meta has open-sourced Digit 360’s code and designs to encourage further research and development across applications like prosthetics, medicine, and VR.
More information:
#news #robotics #meta #sensors
Please open Telegram to view this post
VIEW IN TELEGRAM
Please open Telegram to view this post
VIEW IN TELEGRAM
👍13👌2
Media is too big
VIEW IN TELEGRAM
Unitree Robotics, a company based in
The video opens with
This development highlights the potential of AI-powered robotics to adapt and acquire new skills quickly, a crucial capability as robots become more integral to our daily lives.
#news #robotics #artificial_intelligence
Please open Telegram to view this post
VIEW IN TELEGRAM
👍5👌2
This open-source project is designed to build a fully-functional device for recording, analyzing, and visualizing a range of cardiography signals. Powered by a
Features of the device:
This project offers valuable insights into signal processing and data analysis methods, making it a practical resource for hands-on learning and experimentation with cardiographic measurement.
#projects #raspberry
Please open Telegram to view this post
VIEW IN TELEGRAM
👍18👌2
Embedded Systems
Over a month has passed since the second
In his video, they compete to program an
Despite encountering setup and debugging obstacles, both participants successfully sync their ESP32 devices to cloud interfaces, demonstrating the unique advantages of each platform for real-time IoT applications.
#video #esp32 #programming #IoT
Please open Telegram to view this post
VIEW IN TELEGRAM
👍6👌1
SPINC is an open-source project that combines automatic AA NiMH battery charging with a desk clock functionality. It features a custom PCB with a
Features of the device:
SPINC is perfect for tech enthusiasts working with embedded systems. It demonstrates practical applications of microcontroller programming, hardware-software integration, and modern UI design using the
More information:
#projects #raspberry #lvgl
Please open Telegram to view this post
VIEW IN TELEGRAM
Please open Telegram to view this post
VIEW IN TELEGRAM
👍27👌5