Rust programming language

Accelerometer as Puncho-o-meter | The “stm32-Discovery Board Sensor”- Part 3

Reading Time: 4 minutes Hello everyone, In this blog, we are going to provide you the way to use the Accelerometer Sensor of the Discovery Board as a Punch-o-meter. This is going to be the last part of the series in which we will work with Accelerometer as Puncho-o-meter. In the previous part, we have discussed the Accelerometer Sensor of the Discovery Board and we also got the readings Continue Reading

Ownership, An exciting concept of Rust (Part-2)

Reading Time: 3 minutes Hello Readers ! We already read about what is ownership and how memory allocation is done. But for completely understanding ownership, we should know what is borrowing and what are references. References and Borrowing The problem in this code is that we have to return the String to the calling function. So we can still use the String after the call to calculate_length because the Continue Reading

Carpooling Chain – Cab Booking made better

Reading Time: 3 minutes About Carpooling Chain is a decentralized blockchain solution built with the objective of eliminating the need for a central authority to book cabs. The blockchain backend for Carpooling chain is build using Substrate. Substrate is a next-generation framework for blockchain innovation. It comes with everything you need to build your blockchain.  Substrate is a completely free and open-source project. It is built using Rust and WebAssembly. Rust is designed for Continue Reading

Accelerometer as Puncho-o-meter | The “stm32-Discovery Board Sensor”- Part 2

Reading Time: 4 minutes Hi everyone, I hope you all are doing fine. So what’s in today’s blog? In today’s blog, we are going to take our findings further. We are going to get the readings of the Accelerometer Sensor in a variable and then we are going to print them on the itm console using ITM. As we are working with the Embedded Systems they make our task Continue Reading

Message Passing in Rust Threads is very helpful

Reading Time: 3 minutes Rust has been the most loved programming language for the last five years in a row. It is a low-level statically-typed multi-paradigm programming language that’s focused on safety and performance. Rust has facilities for message passing through an mpsc channel which allows various threads to communicate. Rust solves problems that C/C++ has been struggling with for a long time, such as memory errors and building concurrent programs. Due to the borrow checker, Rust can prevent data races at compile-time. Data races Continue Reading

Design Patterns in Rust Programming

Reading Time: 3 minutes The Design Patterns are programming language independent strategies for solving a common problem. By using design patterns, you can make your code more flexible, reusable, and maintainable. These solutions were obtained by trial and error by numerous software developers. Types of Design Patterns There are following types of design Patterns in Rust for solving our problems : Behavioural Creational Behavioural Patterns Behavioural design pattern are design patterns that Continue Reading

How to use Vectors in Rust?

Reading Time: 3 minutes Rust has been the most loved programming language for the last five years in a row. It is a low-level statically-typed multi-paradigm programming language that’s focused on safety and performance. Rust solves problems that C/C++ has been struggling with for a long time, such as memory errors and building concurrent programs. Due to the borrow checker, Rust can prevent data races at compile-time. Data races occur when Continue Reading

Accelerometer as Puncho-o-meter | The “stm32-Discovery Board Sensor”- Part 1

Reading Time: 4 minutes Hello everyone, I hope you are fine and learning every day. In today’s blog, we are going to discuss a Sensor of the stm32-Discovery Board. Using this Sensor we will try to make a Punch-o-meter. This is going to be a series of blogs in which each part will take you nearer to the development of Punch-o-meter using one of the Discovery Sensors. In previous Continue Reading

Test Cases in Rust are simple to write

Reading Time: 4 minutes Rust has been the most loved programming language for the last five years in a row. Rust is a low-level statically-typed multi-paradigm programming language that’s focused on safety and performance. Rust solves problems that C/C++ has been struggling with for a long time, such as memory errors and building concurrent programs. Due to the borrow checker, Rust can prevent data races at compile-time. Data races occur when Continue Reading

How to Tackle Error in Rust Programming

Reading Time: 3 minutes An Error is basically an unexpected behaviour that may lead a program to produce undesired output or terminate abruptly. Error handling is the process of handling the possibility of failure. In Rust, errors can be classified into two major categories. Recoverable UnRecoverable Recoverable Error Recoverable errors are those that do not cause the program to terminate abruptly. Such as a file not found error . Continue Reading

Working on Rust? Must know about Macros

Reading Time: 3 minutes A programmable pattern which translates a certain sequence of input into a preset sequence of output is known as Macros( which stands for macroinstructions). Macros can make tasks less repetitive by representing a complicated sequence of keystrokes, mouse movements, commands, or other types of input. In Rust, We’ve used macros like println! , but we haven’t fully explored what a macro is and how it works. The Continue Reading

How to use Pattern Matching in Rust

Reading Time: 3 minutes Rust has an extremely powerful control flow operator called Match. Pattern matching in Rust works by checking if a place in memory matches a certain pattern. Patterns can be : literal values variable names wildcards, and many other things Destructuring using Pattern Matching Pattern matching can use to destruct following items : Structures Enums Tuples  Destructuring breaks up a value into its component pieces. The syntax used is Continue Reading

Magnetometer as Compass | The stm32f3-Discovery Board Sensor-“Part-2”

Reading Time: 4 minutes Welcome everyone, hope all are doing great and learning each day. So today we are going to take this series further to the next part. In today’s blog, we are going to connect our LEDs with the Direction enum so that we can set the LED on for the particular Direction which will be based on the Magnetic Field readings. We will be working on Continue Reading