Show Posts
Pages: 1 2 [3] 4 5 6
31  Using Arduino / Programming Questions / Unsigned char variable to base 10 char array? on: December 10, 2011, 09:03:16 pm
Hello,

I am trying to convert an unsigned char, this variable's binary value can range 00000000 to 11111111. I need to convert it to base 10 and store it into a char array. So the char array could contain values from 0 to 255. Can anybody offer help on this?

Thanks,

-ren
32  Using Arduino / Programming Questions / Re: Muliple goto statements in c on: November 01, 2011, 07:23:54 pm
Thanks for the replies! I will check out the code and see if I can understand it.
33  Using Arduino / Programming Questions / Muliple goto statements in c on: October 31, 2011, 10:54:42 pm
Hello,

I have a question about using multiple goto statements in the same function. I am reading some code and cannot follow the execution. I think it maybe my limited understanding of goto statements. If you have a function like so
 
Void afunction(){

if(x==1) {
goto label1;
}
if(x==2){
goto label2;
}

label1:
//do something 1

label2:
//do something 2

}

if I goto label1 will label2 also be executed?
34  Using Arduino / Programming Questions / Re: Control program execution via serial input on: September 29, 2011, 12:07:11 am
Thanks winner that was what I was looking for.
35  Using Arduino / Programming Questions / Control program execution via serial input on: September 28, 2011, 10:21:41 pm
Hello,

I would like to make Arduino program that presents the user with a main menu of functions to execute. The user selects a function, it executes, and returns back to the main menu. This would halt until the user selects another function. Input and output would be via serial port. The menu would be something like below. Does anyone know of a good example of this? Or could give any advice on this?

<A> Do 1
<B> Do 2
<C> Do 3

Thanks,

-ren
36  Using Arduino / Programming Questions / Re: Convert ASCII Hex String to inidivual bytes on: July 22, 2011, 08:38:36 pm
Thanks for the replies! Thanks for the code gardner, it works great!
37  Using Arduino / Programming Questions / Convert ASCII Hex String to inidivual bytes on: July 22, 2011, 01:13:13 pm
Hello,

I have a char[] filled with HEX values. I want to split up the char [] and display the indivual bytes. How would I do that?

For example, I have a char [] filled with "68656D6D6F". I want to be able to Serial.print->68,65,6D,6D & DF or the ASCII equivalent h,e,l,l,o.

Thanks,

-ren
38  Using Arduino / Networking, Protocols, and Devices / Communicate with arduino over telephone line - max speed? on: July 22, 2011, 02:47:19 am
Hello,

I am interested in communicating with arduino over a telephone line. What is the maximum bytes per second that can be acheived? Is fsk the the fastest or are there other methods? Any example links would be appretiated also.

Thanks,

-ren
39  Using Arduino / Programming Questions / Re: Evaulate multiple pin values on a port on: July 17, 2011, 12:36:21 pm
Rob,

Thanks for the help! I used the tips you listed below to make the compare. I used PIND as opposed to PORTD to read the pin values though.

-ren
40  Using Arduino / Programming Questions / Evaulate multiple pin values on a port on: July 09, 2011, 01:32:12 am
Hello,

I want to read the pins 3-7 of portD on the Arduino 328p, then compare them to an array(?) of high/low values for each pin. Depending on what which values are high/low I want execute a procedure. Any clues on how to do this?

Thanks,

-ren
41  Using Arduino / Microcontrollers / Re: Arduino 328p - Arduino IDE \hardware\Boards.txt questions on: May 07, 2011, 06:38:22 pm
Thanks Coding Badly!
42  Using Arduino / Microcontrollers / Arduino 328p - Arduino IDE \hardware\Boards.txt questions on: May 07, 2011, 02:42:16 pm
Hello,

I have some questions about the parameters in boards.txt file. The maximum_size, how is that determine when you change the high fuse? The maximum_size is 30720 for DA(1.5kb), would the maximum_size for D8(2kb) be 30720-512=30208? Does this parameter do anything other than report when you upload a sketch?

The parameters is boards.txt must match the parameters from your bootloader correct? 

Thanks,

-ren

43  Using Arduino / Programming Questions / Re: Using a pointer to increment on: April 30, 2011, 12:03:38 am
Thanks!
44  Using Arduino / Programming Questions / Re: Using a pointer to increment on: April 29, 2011, 10:39:12 pm
I replaced the incremental pointer with an actual unsigned long int, seems to have solved my problem. However, I am still curious about one thing. When you create a pointer to increment, does the pointer increment the amount of bytes for that variable type? If I created char * ptr, that would increment 1 byte with the following statement ptr+=1, right? So what happens if you have a unsigned long *ptrlong? Would that increment 4 bytes with a statement ptrlong+=1?

Thanks,

-ren
45  Using Arduino / Programming Questions / Re: Using a pointer to increment on: April 29, 2011, 10:03:46 pm
Yes, I understand what you are saying about size. It is difficult for me to explain, but the pointer is being used a placeholder, a value in space. The point is never reached. So, without hardware limitations would it be possible to increment this pointer to a high value such as that? There shouldn't be a limitation, correct?
Pages: 1 2 [3] 4 5 6