Show Posts
Pages: [1] 2 3 ... 1849
1  Using Arduino / Programming Questions / Re: for () Statement question. on: Today at 02:44:52 am
Code:
32 is 2^5
No, 2^5 is 7  smiley-wink
2  Using Arduino / Programming Questions / Re: what does this statement mean? from virtualwire library on: Today at 02:42:09 am
What's the use of the asterisk inside the brackets?
To tell the compiler that the cast refers to a pointer to a type, and not to the type itself.
(the address of  a house is not the same thing as a house)
3  Using Arduino / Programming Questions / Re: what does this statement mean? from virtualwire library on: Today at 02:31:29 am
Quote
That is just abit confusing because why is the asterisk not out side the bracket like;
But the parentheses change the order in which things are done.

Code:
(uint8_t)* msg;
Says "msg is a pointer. Fetch the thing that "msg" points to, and treat that thing (whatever it is) as a "uint8_t" "

4  Using Arduino / Programming Questions / Re: what does this statement mean? from virtualwire library on: Today at 01:51:07 am
Quote
That's the basic way of declaring a pointer, if so then why has msg been declared as a pointer twice?
Why are you ignoring my answers?
You are NOT declaring a pointer.
(Why aren't you using CODE TAGS?)

Marshall Mathers has an alias.
To the people who buy his music, he is Eminem.
Do you think the IRS send a tax return to "Mr Eminem"?

Same person, different name.

Same pointer, different type.
5  Using Arduino / Programming Questions / Re: what does this statement mean? from virtualwire library on: Today at 12:40:08 am
Quote
The way u declare a pointer is;
But you're not declaring a pointer, you're telling the compiler that you want it to treat one type of pointer as another type of pointer.
6  Using Arduino / Programming Questions / Re: problem with serial communication on: July 24, 2014, 04:15:19 pm
Start here
7  Using Arduino / Programming Questions / Re: Controlling lots of leds at different interval time on: July 24, 2014, 03:54:51 pm
Quote
I do not know how to declare the ledstate[1000] array to occupy 1 bit for each of the 1000 location of the array
That's OK because you can't declare an array of anything smaller than a byte.
However, you could declare a byte array of 125 entries, and get creative with bitRead, bitWrite and the divide and modulo operators.
8  Using Arduino / Project Guidance / MOVED: Xbee radio control: Disable radio for some time on: July 24, 2014, 03:37:56 pm
This topic has been moved to Networking, Protocols, and Devices.

http://forum.arduino.cc/index.php?topic=256983.0
9  Using Arduino / Programming Questions / Re: Color Sensor question on: July 24, 2014, 03:32:48 pm
You could try pushing the serial speed to 115200
10  Using Arduino / Programming Questions / Re: what does this statement mean? from virtualwire library on: July 24, 2014, 03:20:05 pm
A pointer is a really simple concept.

If I send you a letter (the things people had to write to other people before email was invented), I put your address on the letter.

I don't put your house on the letter - that would make the postman's job way too difficult.

I write a pointer to your house on the letter.

If I increment the address on the letter, the letter goes to the house across the road.
11  Using Arduino / Programming Questions / Re: what does this statement mean? from virtualwire library on: July 24, 2014, 03:14:19 pm
Quote
What is the * for after uint8_t
I thought you said you'd read about pointers?

If the asterisk isn't there, it's just a simple variable. With the asterisk, it's a pointer (variable).
12  Using Arduino / Programming Questions / Re: Unexpected behavior with RF receiver code on: July 24, 2014, 03:11:29 pm
I'm just trying to encourage good habits.
13  Using Arduino / Programming Questions / Re: what does this statement mean? from virtualwire library on: July 24, 2014, 02:57:29 pm
Quote
what do u mean when u say arithmetic properties?
I mean a signed char holds values from -128 to +127, whereas an unsigned char holds values from 0 into 255.
Same number of different values, but different properties.

Why do you keep abbreviating the word "you"?
14  Using Arduino / Programming Questions / Re: what does this statement mean? from virtualwire library on: July 24, 2014, 02:49:34 pm
Quote
Why does the code in the virtual wire not make the pointer to point to an address of a variable?
A variable or constant, it doesn't really matter.

15  Using Arduino / Programming Questions / Re: what does this statement mean? from virtualwire library on: July 24, 2014, 02:46:34 pm
Yes, it's just a data type.

A uint8_t is a an unsigned eight bit value.
A char is also called int8_t, so is a signed eight bit value.

Signed and unsigned datatypes have slightly different arithmetical properties.
Pages: [1] 2 3 ... 1849