Bitwise operations in C

In our first lesson (/start-working-with-atmel-avr-microcontrollers/), we got acquainted with the working principle of microcontrollers. But, of course, it's not very convenient to simply write numbers in binary or hexadecimal form in registers. What if you need to change only one bit on a port, without touching the others? Change its value from 0 to 1 or vice versa? We'll answer that question a little later.

The principle of working with Atmel microcontrollers (AVR)

Microcontroller - a device, a microchip, designed to control other devices. The microcontroller contains a processor, memory, as well as peripheral devices. In fact, the controller "toggles its pins" - sends pulses of different duration to the pins.

Using QwtPlotSpectroCurve

Using QwtPlotSpectroCurve (first familiarize yourself with QwtPlotCurve here) you can display information that requires representation in three dimensions; create pseudo 3D graphs on a two-dimensional plane. The third dimension will be conveyed through color gradients - these graphs are called spectrograms. Unlike the QwtPlotSpectrogram component, you control each point on the curve, rather than intervals. The QwtPlotSpectroCurve component is less functional but more logical for graph plotting.

The MVC principle in web programming

MVC principle in web programming (Model - View - Controller) is one of the most successful ideas to date. The MVC principle is intuitive at first glance, but not very simple when delving into it. First, let's consider what it is intended for.

Rotating the scene in OpenGL using the mouse (Qt)

To study the material of the article "Rotating a Scene in OpenGL Using the Mouse", you first need to study the material of this article.

The idea is very simple - intercept the mouse event, determine the mouse pointer movement speed, and based on this, calculate the scene rotation angle. Essentially the same as in the previous example, but the rotation is not done by a timer, but by a mouse event (mouse movement with a pressed button).

Gift for a girl made with your own hands

If you want to surprise someone dear to you, you can make them a homemade gift. For example, embroider a cross-stitched napkin. Or grow a cactus. Or throw away a cactus (well, who knows what they expect from you :)). Or finally throw away some trash.

Three-channel thermometer with ds18b20

Once I had to create a three-channel thermometer with ds18b20. I can't help but share with those in need.... However, in fairness, it should be noted that the firmware was written overnight, so it's not very readable.... But the device works - that's the main thing :).

Using a Timer in Qt

For using the timer in Qt, the class QTimer is intended. First, you need to set the time after which it will trigger. You also need to define a slot that will handle the signal emitted when the timer overflows. Thus, a mandatory condition for using QTimer is the ability to use signals and slots, which means that the class that uses the timer must be a descendant of QObject. Let's create a simple clock as an example.

Rotation of a scene in OpenGL (QT)

So, we already know how to initialize an OpenGL window in QT. (/podklyuchenie-opengl-v-qt/) Now let's learn how to rotate the scene. In short, to rotate the scene in OpenGL, you need to call the function void glRotated(GLdouble angle, GLdouble x, GLdouble y, GLdouble z). The angle parameter sets the rotation angle from the current position; x, y, z describe the rotation vector, in other words, they determine the direction of rotation. You can also change the position of the vector's origin.

Connecting OpenGL in QT

Let's consider an example of connecting the OpenGL graphics library to a QT project. I will try to provide the most accessible information for a quick start. Here we will only consider the example of connection and rendering of a simple scene. In the following notes, we will add camera rotation and so on.

Including QwtPlotGrid in Qwt (QwtPlot)

For easier perception of information, for reading charts, you can enable the grid. This is done using the QwtPlotGrid class. Everything is as usual: the object needs to be created, configured, and attached to the qwtplot.