Multiple programs on AVR atmega [closed] - embedded

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 6 years ago.
Improve this question
I want to make my Atmega robot to operate multiple modes (line following, obstacle avoidance, direct guidance from PC ) How can I load these separated programs on flash and how to select one of them when restarting the robot?

The easiest way is to make one big program with all the functionality of all the modes. On startup, in main() check if certain buttons are pressed, then choose which mode you are going to operate in. Then only use the functions and control mechanisms for that mode from then on. The rest of the code just sits there unused, but it would anyway in any other scheme.
There isn't an easy way to break the code into several different complete programs. For example, the vector table is fixed to be where it is. You would have to have the interrupt handlers check to see which mode is active then call the appropriate function for that mode.

Related

Communicate between 2 applications [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 5 years ago.
Improve this question
I have written a basic VB winform application (in visual studio) that control the lights. I published and create an install package so I can install this on other PCs.
My questions is how to sync these applications to communicate with one another so if I turn a light on, on one PC, other PC will sense that and display it on thier application.
I can use timer to see if there are any action every 15 second, but I don’t think this is efficient way.
Take a look at this question that involves sending information between computers over a network. You could have the program send what it did to the lights so that the other programs can update themselves.
I'd suggest you look at writing the status to a file accessible to all on the network, use the filewatcher class to detect changes to the file, and when the file changes read it from all PCs to see the current status of everything.
ref: https://msdn.microsoft.com/en-us/library/system.io.filesystemwatcher(v=vs.110).aspx
another option would be to use UDP broadcasting

Interact with my running application [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 6 years ago.
Improve this question
Given:
A list-based application with an advanced user-system based on two applications:
Main-Tool
Displays all Entrys with possible filters
Create entrys
Delete entrys
Edit entrys
Filter entrys to only see specific ones
...you get the point
Creation-Tool
Reads specific informations out of a file and opens the same mask as the Main-Tools creation function as a separated application.
The Problem:
So I have my Creation-Tool and the Main-Tools function to create entrys as well. So each time i am changing a thing on the creation mask, i have to do it in two applications.
The Solution:
There has to be a way to call functions of my application from the outside.
The Question:
How can i get rid of the second application? The Main-Application has more informations (Logged in user for example) than the Creation-Tool, so i want to get rid of the Creation-Tool. Having a second application that calls my main application is okay.
What you want to do is to move all of your functionality into a separate library. Using inter-process communication would require both programs to be running. Whereas if you had two programs that shared the same dll, that would solve your duplicate code issue and each program can be run independently. Once you have all your functionality separated from the user interface and moved into it's own dll, then consolidating the UI of both applications into one will be much easier.

How do I hook into the WndProc of another application in Vb.Net [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 8 years ago.
Improve this question
I am trying to simulate some clicking on a flash control on a window belonging to another executable using the AutoIT COM Object.
Since it is a long-running script I'd like to keep the system usable by normal (read: physical) means meanwhile. I first taught of a virtual machine, then I remembered that WndProc hooking exists.
Now I'd like to simulate clicks with fake WM_* messages instead of using AutoIt because it hijacks the mouse, in order to be able to run the automation in background without the mouse moving by itself and my current active window (i.e. notepad) losing focus.
My problem is that I have no idea on how to achieve the WndProc hooking in Vb.Net. People says a Dll injection is needed but in my previous Realbasic experience I did it in plain win api.
(To write messages I don't know, but to read worked.)
Ps. I've checked and no similar question seems to address this (at least in vb.net).

Direct screen pixel/framebuffer access [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 3 years ago.
Improve this question
I'd like to try and create a program playing a game. I.e. "a bot".
I want to be able to directly access the pixels on the screen. I.e. have my program "see" a game and then "make a move"(or at least draw a picture of what move it would make).
Both Windows and Linux advice is appreciated, though my guess is that it should be easier to do on Linux.
I'm guessing this could be done with some X/Gnome call?
I'm not afraid of C, even complex samples are welcome.
SDL is a cross-platform library that allows you to directly access framebuffer pixels. You can learn about accessing the pixels on screen through the pixel access example on the documentation wiki.
Generally speaking, bots don't see the game graphics but see the underlying data structure instead, unless you are trying to do something related to computer vision.

How do I write Visual Basic Code to read the input from a barcode scanner? [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 8 years ago.
Improve this question
I want to write software in visual basic that reads the barcode of various items into my program. Any suggestions for how to do this?
If you have a hardware barcode scanner to hand it will almost certainly imitate a keyboard, and send the barcode as keystrokes (no special code required, just a textbox and it will put it in there once it is focused).
If you go to the manufacturers website, you will find exactly what it does, and even special barcodes for programming your scanner (such as sending newlines at the end of barcodes, etc).
Otherwise, see my comment to your question above.
You don't need code to read the barcode scanner. It usually comes into the system exactly like it came from the keyboard. Make your app work for the keyboard and you are there.