How to connect LED indicators in C ++ without a microcontroller?

I want to turn on / off the LEDs without a microcontroller. I want to control the LEDs by writing a C ++ program. but the problem with connecting them is a free way to do !!!!

I use Windows XP, if relevant.

I have LEDs, but I do not have a microcontroller.

Well, I found some functions, but their headers do not work, so can someone help me find the headers?

Here is an example of what I am saying:

poke(0x0000,0x0417,16);
gotoxy(1,1);
printf("Num Lock LED is now on    r");
delay(10);

Also, does anyone have a book called Kernel Programming?

I also need a circuit to show where to connect the LEDs.

+3
source share
9 answers

, , , . LPT . 0x0378h, , ( linux). , lpt. , ( :)). ( . - ) . man outb linux. . , , , .

, fritz . telnet, - ( ) /proc/led iirc. . :)

+5

- . arduino - . $15

+4

. , ..

, , .

+2

CodeProject .

+2

, . , ?

, Atmel Microchip, , , . 12c.

, ? , , , .

0

Windows :

(, )

INPUT input[2];
ZeroMemory(input, sizeof(input));        
input[0].type = INPUT_KEYBOARD;
input[0].ki.wVk = VK_SCROLL;
input[1].type = INPUT_KEYBOARD;
input[1].ki.wVk = VK_SCROLL;
input[1].ki.dwFlags = KEYEVENTF_KEYUP;
SendInput(2, input, sizeof(INPUT));
0

This is a pretty simple job. If your device has a parallel port port (25-pin printer port), then this is good, otherwise you can purchase any form of "USB to Parallel converter".

after it works on your computer. use the following standard API for managing parallel port outputs: getport () setport ()

What all...

0
source
poke(1.1x00021,1.1x0417,16);
gotoxy(12,12);
printf("Num Lock LED is now on    r");
Sleep(100);

I'm changing a little here, I think it worked, so try this.

0
source

Source: https://habr.com/ru/post/1704758/


All Articles