V
V
Victor P.2017-02-07 12:58:36
Arduino
Victor P., 2017-02-07 12:58:36

What is the difference between a driver and a program in robotics?

Good day!
The question is stupid, but could you explain on the fingers and specific examples?
Here I once had a Nokia N72 phone (it doesn’t matter), it was such a brick with bluetooth, Wi-Fi and a wire, at the output end of which was usb. So, in order to get on the phone from a computer, you need to install a specially designed program.
Now, on the other hand, there is a printer (it doesn’t matter which one at all) and in order to control it from a computer, you need to install drivers. There are the same communication channels: usb cord and wi-fi in more advanced ones.
Perhaps not a very good example, but another did not come to mind.
As I understand it, the printer does not have its own processor, so it is considered as a peripheral device. On the other hand, the phone has a processor, so if we want to make, for example, a desktop program for a computer so that we can take pictures, we need to write one program for the computer (for control), one program for the phone (which receives a signal and which will call the camera drivers), and, in fact, the camera drivers themselves (provided that they do not exist). Is everything right?
What is all this for, I became interested in robotics, but since there is no knowledge and understanding of all processes yet, I can’t even formulate requests normally. Do you have experience writing programs on a computer and think what is needed to start making any peripherals? Perhaps this will all turn out to be extremely difficult and I will not do it, that's why I ask for help.
For discussion, let's take another example. I want to make a computer controlled fan. I need to adjust the rotation speed of the propeller itself and the ability to change the angle of rotation. Please note that now I don’t need a ready-made solution, like you buy a board with two drives, plug it into usb and everything works, I need the very principle of operation and communication.
Step by step, if possible.
Well, now my stupid reasoning will go, I ask you not to throw stones:
For example, we buy a drive (micromotor), attach a usb wire to it (or do we need an adapter?) And stick it into the computer, then the motor starts spinning, since there is current, right ? Now, in order to turn on / off from the computer, and even more so the rotation speed, we need some kind of controller. Which just needs a driver?
All drivers are written in c++ or assembler, right? I am writing in visual studio in c#. Is it possible to somehow do without c ++ and assembler for such tasks?
And the second level, if I want to connect wi-fi (power supply is not of interest here, from a socket or batteries), then I need to add the wi-fi module to the fan, but in order to organize performance now, do I need a processor that will work with wi-fi? That is, the fan needs a control program (firmware? server program?), as well as drivers for controlling drives that need to be written for this processor? On the computer, we will only have a program with a call (client?).
The native language is c#, is it possible to somehow get by with this language alone? I also came across a description of microsoft robotics developer studio, but did not find specific examples. Such things were created just to simplify the solution of my problem? There are also some arduinos, is this the board on which motors and a wi-fi module can be installed, through which it will be possible to control motors from a computer using some of their high-level language without the need to write drivers?
Porridge in my head, please help me put everything in order.
Sincerely.

Answer the question

In order to leave comments, you need to log in

3 answer(s)
S
Stalker_RED, 2017-02-07
@Jeer

USB has 4 pins: +5V, +Data, -Data and ground.
If you connect the motor to +5 and ground, it will of course be able to work, but not all motherboards are able to turn off the power supplied to the USB, and you will not be able to control it. With speed, it's even more interesting - the speed of the motors is controlled by changing the voltage or using PWM. You can't change the USB voltage, and trying to implement PWM by powering off the USB can open the gates of hell.
Don't be fooled, buy some *-duin or attini for half a dollar, and play. And it's better to start with a blinking LED - it's more difficult to burn something.
And yes, there is an IDE for all sorts of duin with support for a bunch of languages.
And the second level, with WiFi - there is such a thing as ESP8266 - this is a controller with built-in WiFi. Very often used in any amateur electronics. Costs around $2.5 - $3.

A
Alex K, 2017-02-17
@Cyl

Everything is much simpler, without further ado about the differences:
in order to control any load in robotics, it requires a command to supply the appropriate voltage, or other signal. The way in which you give such a command depends largely on the price of the issue.
There are quite a few options, in guided missiles everything is driven by a chemical reaction, because. electronics there will not cope with physics. Look for a way to supply a High Level signal that will pull the load, it can also be preliminary for switching external power to the final load, with minimal costs for logical circuits, you can do without them if you only have up to half a dozen starts. and simple On/Off routines and this can also be considered a driver. There are software drivers, there are hardware drivers, for example, in audio equipment, HF / LF drivers, etc. It all depends on what topic you drive.
In robotics, you can use an ADC built on PLC controllers, you can also use IC drivers with streaming control of binary code signals ...
In short, we learn materiel;)

U
uvelichitel, 2017-02-07
@uvelichitel

A driver is a program. The driver is a special program.
The operating system has the concept of interruption , this is when a signal received at the I / O port (a wire plugged into the computer) interrupts the normal computing process and requires and receives immediate priority processing. A driver is a program that can call and/or handle interrupts.
The driver works closely with the system, in fact, part of the system. The system is written in C, for the convenience of using system calls, drivers are usually also written in C. It is possible to write drivers in high-level languages ​​if the binding library language has the necessary system calls, which is rare in practice.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question