C :: Dragon Board Serial Monitor Programming Menu
Apr 2, 2014
I am working on my senior project and my currect task is to make a menu. I dont know what the best way to do it. my code is not complete and i am completely lost. code found below:
Code:
#include <hidef.h> /* common defines and macros */#include "derivative.h" /* derivative-specific definitions */
#include "lcd.h"
#include<menu.h>
void main(void) {
char *msg1 = "Menu";
[code].....
View 4 Replies
ADVERTISEMENT
Nov 30, 2013
my a book or website where I can make a transition from console programming to GUI programming. I'm totally confused about this. I know how to program in console and can make a whole program based on console. I also know the OPP programming, but it's clear that nobody uses console programming anymore.
View 10 Replies
View Related
Aug 19, 2013
I am trying to write a menu program that will be broken down into a series of calls to function for each of the menu items. Two of the menu items will be simple programs which I wrote.
I want two of the functions to run one of the two programs I am trying to include as items in the menu.
So far I am only familiar with variables, loops, if statements, and I just learned how to write functions.
The problem I am have is that I don't quite understand how to write a function that will run one of the two programs. Also I am having a hard time writing the program in away that would allow the user to select the menu items.
View 2 Replies
View Related
Apr 7, 2014
I'm creating a program that is based on a menu system. Basically each menu is its own user-defined function. The problem is at each menu you can input 'b' to go to the previous menu. I just have it call the function of that menu.
However, do the functions need to complete themselves eventually? If I just keep calling functions will I just keep going further and further deeper into ever running functions?
If so how do I avoid this and yet keep the option to go back to a previous menu/function?
View 2 Replies
View Related
Jul 12, 2012
How can you get a monitor out of sleep mode in c#?
I tried the following, but then the monitor wakes up and falls back to sleep mode immediately.
Code:
uint SC_MONITORPOWER = 0xF170;
uint WM_SYSCOMMAND = 0x0112;
SendMessage(this.Handle, WM_SYSCOMMAND,
(IntPtr)SC_MONITORPOWER, (IntPtr)(-1));
View 1 Replies
View Related
Jan 13, 2014
I am developing an application which monitors file changes and also registry key changes during a driver installation. I have used this code from internet, but doesn't works.
public void WmiChangeEventTester() {
try {
WqlEventQuery query = new WqlEventQuery(
"SELECT * FROM RegistryValueChangeEvent WHERE " +
"Hive = 'HKEY_LOCAL_MACHINE'" +
@"AND KeyPath = 'SOFTWARESchneider ElectricDMODBUS' AND ValueName='CurrentVersion'");
[Code] ....
View 7 Replies
View Related
Jul 15, 2012
I am working on a parallel processing server/client app with a multi-threaded server and several data processing clients, each their own process. I am trying to optimize some of the parameters, such as the size of the chunks that are read, processed, and output, and also some of the timeout values and such. I can track the time to finish a given task well enough, but it would be really nice to be able to track the cpu use. When CPU use is near 100% (on all cores) for the entire run, that is a good sign. I have noticed that with some combinations of parameters, CPU drops quite a bit for long stretches, which is not such a good sign. This app process large input files (2.5GB-65GB so far) and needs to be stable for long periods of time.
Other than sitting and staring at the task manager all day, is there a good way to track/log the CPU usage over runs that take many hours? I know that there are some apps like Everest that chart CPU use, but it would be nice to have something that would write to the same log file I am already using for other program output.
View 1 Replies
View Related
Apr 7, 2014
This is what I have so far, it gives me a nice menu to select from and it all works but after I make a selection it closes the program. I tried to return to it but it won't work for me
#include <stdio.h>
int main() {
int choice;
int deposit;
int balance = 500; {
printf(" CHOOSE FROM THE FOLLOWING
[code]....
View 14 Replies
View Related
Nov 5, 2013
works fine without the for loop.... if i use for loop...it doesnt give the output...
Code: #include<iostream>
#include<conio.h>
#include<fstream>
[Code]....
View 3 Replies
View Related
Sep 9, 2014
What I'm trying to do is have the user input a hex number this number will then be converted to a char and displayed to the monitor this will continue until an EOF is encountered.I have the opposite of this code done which converts a char to a hex number. The problem I'm running into is how do i get a hex number from the user I used getchar() for the char2hex program. Is there any similar function for hex numbers?
this is the code for the char2hex program
#include <stdio.h>
int main(void) {
char myChar;
int counter = 0;
while(EOF != (myChar = getchar())) {
if (myChar == '')
[Code] .....
This is what i want to the program to do except it would do this continuously
#include<stdio.h>
int main() {
char myChar;
printf("Enter any hex number: ");
scanf("%x",&myChar);
printf("Equivalent Char is: %c",myChar);
system("pause");
return 0;
}
View 1 Replies
View Related
Apr 22, 2013
I am currently starting to attempt to make a program that can move my cursor to certain colors on my monitor. The problem is this seems like it will be 10x harder than I first thought.
View 4 Replies
View Related
Feb 10, 2015
am trying to create a service that will try to create a service that will monitor a folder. Whenever a new file gets created, I am trying to read the contents of new file and copy contents (with same file) at a new location.
The problem I am facing is that only first file that gets its name copied and a file created at a new location, but without any contents. The subsequent files do not get created at all.
My Services.cs looks like this:-
public partial class Service1 : ServiceBase
{
public Service1()
{
[Code]....
View 7 Replies
View Related
Sep 15, 2014
I have two menu items. When item 1 is disabled, I want item 2 to be disabled as well. In the OnUpdate handler of menu item 1, I have tried to use "t_pMenu = pCmdUI->m_pMenu;", "t_pMenu = pCmdUI->m_pSubMenu;" and "t_pMenu = pCmdUI->m_pParentMenu;" but I always get NULL t_pMenu. How can I achieve this purpose?
Code:
void CDummyView::OnUpdateMenuItem1(CCmdUI* pCmdUI)
{
if(m_bShowMenuItem1) {
pCmdUI->Enable(TRUE);
[Code]....
View 14 Replies
View Related
Jul 19, 2013
I'm writing a version of the classic Snake game. However, my board is not printing correctly. The right hand border is in the incorrect location. Also, when I randomly generate where the food ('X') is located, it only generates on the edges of the boundaries.
#include <iostream>
#include <cstdlib>
using namespace std;
const int ROWS = 21;
constint COLS = 61;
[code].....
View 5 Replies
View Related
Feb 7, 2014
I'm programming tic tac toe but the board is not showing numbers, and it is simply stating the winner without any input: (the win conditions are not complete, but it shouldn't matter).
#include <iostream>
#include<string>
using namespace std;
//Write a two-player tic-tac-toe game; use enums when possible to represent the values of the board
char ticBoard[3][3];
char board[10];
void showBoard();
bool moveIsValid(int m);
int whoWon(); // 0 tied, 1 p1, 2 p.2
[Code] ....
View 6 Replies
View Related
Mar 14, 2013
void(..)
bool(..)
Direct to the board[8][8].
View 7 Replies
View Related
Jan 27, 2014
This is the text of exercise 4 of chapter 12 of PPP; Draw a checkers board: 8-by-8 alternating white and red squares.
Is there a way to use the loop for doing that code to minimize the size of the code?
View 9 Replies
View Related
Feb 22, 2015
Im trying to make a Tic Tac Toe board for an assignment. Right now it compiles fine but when I enter an x or o it does not update the board it just prints out the '.'s that the board is initialized to. Also, when I get to player 2 the board will printout twice so its 6 rows or 3 columns. The project uses a main to ask who starts then goes to a play function that asks for inputs and calls the makeMove function to place the x's and o's and the print function to display the updated board.
bool Board::makeMove(int rowIn, int columnIn, char currentPlayer) {
if (playBoard[rowIn][columnIn] == '.') {
playBoard[rowIn][columnIn] = currentPlayer;
return true;
[Code] ....
View 14 Replies
View Related
Dec 6, 2013
I Cant get my checkers game board to refresh every time i make a move. i have system("cls") But it does nothing of the sort.. To move a pice ive created an illusion which swaps one pieces appearance with another :
void getpiecetomove(int startx,int starty, int endx, int endy) {
boardpiece tmp;
//Regular Moves Pieces
tmp = board[startx][starty];
board[startx][starty] = board[startx+1][starty+1];
board[startx+1][starty+1] = tmp;
system("cls");
}
View 7 Replies
View Related
Mar 7, 2013
Okay so this is part of a small uni module around the arduino board. The task is to simulate traffic lights at a junction. At the moment my code below runs through the sequence with 2 seperate lights. When one set of lights turns RED , the other turns GREEN.In my main loop method I need to add a button for a crossing. I want to be able to check if the button is pressed at each of the delays but do not want to have to hold it down.I have thought about putting it at the top of the loop but then the program will only check if button is pressed in that point therefore the user will have to hold it down?
Code:
int green1 = 13 ;
int amber1 = 12 ;
int red1 = 11 ;
int green2 = 6 ;
int amber2 = 7 ;
int red2 = 8 ;
}
[code]....
View 5 Replies
View Related
May 25, 2014
How to reset the board in order to play again without spots already taken.
#include <iostream>
#include<cstdlib>
#include<ctime>
using namespace std;
char location[10] = {'0','1','2','3','4','5','6','7','8','9'};
int displayMenu(int &player, int &win);
[Code] .....
View 1 Replies
View Related
Sep 13, 2014
/* This is what I have so far what i am trying to do is to initialize the arrays at zero and output the board to the screen. Part of the problem is the user has the option of the board size. All this is suppose to do is to output the board to the screen. I am having problems understanding 2D Arrays.
*/
using namespace std;
int main() {
const int BOARD_MAX = 10; // Maxinum Board size.
const int BOARD_MIN = 3; // Minimum Board size.
array = [COL];
array [ROW];
[Code] ....
View 5 Replies
View Related
Oct 15, 2013
Assignment on making a program like candy crush but it is called as number crush.
View 3 Replies
View Related
Apr 2, 2013
Every time the timer clicks it should show a text letter like (T) for tortoise and (H) for hare that moves around the board when the user hits go on the GUI.
View 12 Replies
View Related
Oct 24, 2013
I am required to create a simple candy crush game.
I am this stage where I am required to print the 'box' for navigation purpose at the center of the board once the program initializes.
Here is the code:
Code:
#include <stdio.h>
#include <stdlib.h>
#include <time.h>
//FUNCTION: Draw the Board
[Code].....
I understand that the sequence could be to clear the screen and print the whole board with the indicated marker.
*Yes I am required to move the box in later part of the program but for now, I just need to get the box to show up at coordinate
Code: board[5][5]
I am stuck ...
View 11 Replies
View Related
Mar 13, 2013
Is there any standard USB protocol which i can follow to send data to my embedded board(and vice versa). I have no clue on USB programming using c,is there any example code i could follow,
View 4 Replies
View Related