hardware

Fixed identifier for a machine (uuid.getnode)

最后都变了- 提交于 2020-02-19 09:50:27
问题 I'm trying to find something I can use as a unique string/number for my script that is fixed in a machine and easily obtainable(cross-platform). I presume a machine would have a network card. I don't need it to be really unique, but the necessary is it should be fixed in a long run and as rare as possible. I know MAC can be changed and I'd probably make a warning about it in my script, however I don't expect anyone to change MAC each morning. What I came up with is uuid.getnode() , but in the

Polling the right way?

僤鯓⒐⒋嵵緔 提交于 2020-01-30 14:16:10
问题 I am a software/hardware engineer with quite some experience in C and embedded technologies. Currently i am busy with writing some applications in C# (.NET) that is using hardware for data acquisition. Now the following, for me burning, question: For example: I have a machine that has an endswitch for detecting the final position of an axis. Now i am using a USB Data acquisition module to read the data. Currently I am using a Thread to continuously read the port-status. There is no interrupt

Multithreading: What is the point of more threads than cores?

走远了吗. 提交于 2020-01-27 03:15:33
问题 I thought the point of a multi-core computer is that it could run multiple threads simultaneously. In that case, if you have a quad-core machine, what's the point of having more than 4 threads running at a time? Wouldn't they just be stealing time from each other? 回答1: The answer revolves around the purpose of threads, which is parallelism: to run several separate lines of execution at once. In an 'ideal' system, you would have one thread executing per core: no interruption. In reality this

How to debug after implementation? My code that works perfectly in simulation shows strange behaviour in hardware

蹲街弑〆低调 提交于 2020-01-25 07:35:11
问题 My code for a reaction tester works perfectly and as it should in simulation. But when I move it to my FPGA device it just stalls as soon as I press the start button and I cannot figure out what goes wrong as it is working perfectly in simulation. The concept is, when reset is pressed display Hi on the screen, when start is pressed, pick a random value from LFSR and count up to max value, thus making it a random delay. When max count for this reg is reached turn on the led, start the timer

Change Active Sound Card on the Fly

老子叫甜甜 提交于 2020-01-24 05:29:12
问题 I currently have speakers set up both in my office and in my living room, connected to my PC via two sound cards, and would like to switch the set of speakers I'm outputting to on the fly. Anyone know an application or a windows API call that I can use to change the default sound output device? It is currently a bit of a pain to traverse the existing control panel system. 回答1: That topic is covered in depth here Easily Change or Switch the Default Audio Sound Output in Vista or XP. Note that

Arm Board Bring Up

我们两清 提交于 2020-01-23 17:39:06
问题 Can anybody tell me where I can find information related to How to Bringup any arm board? I am looking for an overview as I am novice in ARM related stuffs. Any link/document will do ...It will be gr8 help if i can look for a case-study any arm based board can be considered..I am looking for just a case study...simple in few steps?? 回答1: Every single ARM "board" will be different. Read the datasheet for the ARM chip you have, that should have a section near the start about booting. Also, read

How to get CPU Level 1 cache (primary cache) information?

允我心安 提交于 2020-01-23 10:51:26
问题 I've tried to get CPU cache information by using WMI and it works great, but only for Level 2 and Level 3 cache, so my question is, how to get CPU Level 1 cache information ? 回答1: You can use the Win32_CacheMemory WMI class, try this code: {$APPTYPE CONSOLE} uses SysUtils, ActiveX, ComObj, Variants; procedure GetWin32_CacheMemoryInfo; const WbemUser =''; WbemPassword =''; WbemComputer ='localhost'; wbemFlagForwardOnly = $00000020; var FSWbemLocator : OLEVariant; FWMIService : OLEVariant;

How to write data to a graphics card without using BIOS?

你。 提交于 2020-01-21 02:48:04
问题 I want to make an (extremely simple) operating system. I am currently learning about graphics cards. This is what I know so far (please correct me if I am wrong): A graphics card has two modes: a text mode, and a graphics mode. You can write data to a graphics cards using BIOS (instead of accessing the graphics card directly). What I want to do is to write directly to the graphics card's video memory without using BIOS (because I want to understand how things work). So I have the following

unsupported operand type(s) for %: 'bytes' and 'str'

非 Y 不嫁゛ 提交于 2020-01-17 04:25:11
问题 I receive the error in the following line: command = input("please type command.example open 1") #call the serial_connection() function ser.write(b"%d\r\n"%command) Essentially I want the input written by the user and parse it into ser.write, without asking for the input and directly putting the string into ser.write such as: ser.write(b'close1\r\n') worked fine, the problem only occurred when i try to use the result of the input as a string to include in ser.write A bit more of the code: ser

Does LWJGL (bare) use software or hardware rendering?

空扰寡人 提交于 2020-01-15 03:43:05
问题 Does the bare LWJGL distribution use hardware rendering or software rendering? 回答1: LWJGL always uses hardware rendering. Since it is a games library, it just quits if no hardware rendering is available. From the LWJGL wiki: "Made the library throw an exception when hardware acceleration is not available on Windows. No point in running at 5fps is there? "(LWJGL wiki) There is a command-line switch org.lwjgl.opengl.Display.allowSoftwareOpenGL but I don't think you can force it to use software