Latest stories

CANBus library for STM32F779-Eval board

The Controller Area Network (CAN, also known as CAN Bus) is a vehicle bus standard designed to allow electronic control units and devices to communicate with each other in applications without a host computer. STM32F779-Eval board has 3 CAN interfaces, however only the two of them have their own clock (master). For that reason the following library provides some C methods to activate and use...

USARTx DMA ring buffer for STM32F779-Eval board

I have recently been playing with UART and DMA, although i’m still getting my head around it,. DMA allows you to transfer large amounts of data through the system without getting the processor core involved. Rather than the CPU laboriously reading a byte, the writing a byte from one buffer to another, you’d give the DMA controller a pointer to the start of a source buffer, a pointer...

Using the SD Card of STM32F779NI-Eval board

Are you in need of an additional memory larger than EEPROM? Although EEPROM is a very easy and effective way of storing data on the board, the built in EEPROM only offers only a few bytes of storage. When working with larger or more advanced projects we may need to store additional data so an external memory solution. For that reason, MicroSD card enables you to do this quickly and easily. The...

The backpropagation algorithm

Backpropagation is one of the several ways in which an artificial neural network (ANN) can be trained. It is a supervised training scheme, which means, it learns from labeled training data. In simple terms, BackProp is like “learning from mistakes. “The supervisor corrects the ANN whenever it makes mistakes.” Initially, all the edge weights are randomly assigned. For every input...

L-Norms as Loss Function

In linear algebra, functional analysis, and related areas of mathematics, a norm (l-norms) is a function that assigns a strictly positive length or size to each vector in a vector space—save for the zero vector, which is assigned a length of zero. A seminorm, on the other hand, is allowed to assign zero length to some non-zero vectors (in addition to the zero vector). L1-Norm loss function is...

The problem of “Beautiful Arrays” with C Source code

An array is called beautiful if for every pair of numbers , , (), there exists an  such that . Note that can be equal to or too. Input First line of the input contains an integer T denoting the number of test cases. T test cases follow. First line of each test case contains an integer n denoting number of elements in a. Next line contains n space separated integers denoting the array a. Output...

Upgrading CNC 3020 to support USB connection

The 3020 CNC router is a popular Chinese machine for a good reason. For around 500EUR, you can have a simple CNC with a rigid all-aluminum frame, three decent stepper motors, and pretty good resolution. However, a major disadvantage of this CNC is the out-of-date electronic parts. The motor controller is using a parallel port which is not available in any new computer(PC). For that reason, it is...

K-nearest neighbours algorithm in C

In a previous post we saw the differences between K-means and K-NN. Here is step by step on how to compute K-nearest neighbors KNN algorithm. Determine parameter K = number of nearest neighbors Calculate the distance between the query-instance and all the training samples Sort the distance and determine nearest neighbors based on the K-th minimum distance Gather the category of the nearest...

Difference between K-means and K-nearest neighbor algorithm

In short, the algorithms are trying to accomplish different goals. K-nearest neighbor is a subset of supervised learning classification (or regression) algorithms (it takes a bunch of labeled points and uses them to learn how to label other points). It is supervised because you are trying to classify a point based on the known classification of other points. In contrast, K-means is a subset of...

An overview of Independent Component Analysis

1. What is ICA ? Independent Component Analysis is a technique of separating signals from their linear mixes. We could assume two signals and that are a linear combination of two signals source and , the relationships of and are shown in the following system of linear equations where , , and are the parameters determining the mixing of the signals. These parameters( ) are not known, so the...

Disclaimer: The present content may not be used for training artificial intelligence or machine learning algorithms. All other uses, including search, entertainment, and commercial use, are permitted.

Categories

Tags