Show Posts
|
|
Pages: 1 2 [3] 4 5 6
|
|
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?
|
|
|
|
|
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
|
|
|
|
|
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
|
|
|
|
|
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
|
|
|
|
|
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?
|
|
|
|
|