Pages: [1]   Go Down
Author Topic: Is HIGH = 1 and is pin in pinMode a char?  (Read 717 times)
0 Members and 1 Guest are viewing this topic.
Central MN, USA
Online Online
Tesla Member
***
Karma: 65
Posts: 6932
Phi_prompt, phi_interfaces, phi-2 shields, phi-panels
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi fellow programmers,

I just started working on arduino. It's fantastic. On the other hand, my past experience using C is haunting me over the following issues:
1) Where are the definitions of all the constants like HIGH? Is it a unsigned char or else and is its value 1?

2) How about datatypes of the standard functions' arguments like the pin in the pinMode(pin, HIGH)? Is it a char, or int, signed or not?

Where do I find these things? I need some of the above for proper calculations. Thanks.

REP MOVSD 8-)
Logged


Denver
Offline Offline
God Member
*****
Karma: 19
Posts: 778
Inactive - PM
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

You'll find most of those answers here . . .
http://arduino.cc/en/Reference/Extended
Logged

"Data is not information, information is not knowledge, knowledge is not understanding, understanding is not wisdom."
~ Clifford Stoll

Connecticut, US
Offline Offline
Edison Member
*
Karma: 2
Posts: 1036
Whatduino
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Your main tab of a script is automatically granted an invisible #include <WProgram.h> and all your functions in all tabs are automatically and invisibly prototyped so you don't have to fuss with header files quite as much.  The compiler includes headers from your Arduino's ./hardware/cores/arduino folder. Hope that helps your research.
Logged

Central MN, USA
Online Online
Tesla Member
***
Karma: 65
Posts: 6932
Phi_prompt, phi_interfaces, phi-2 shields, phi-panels
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Thanks BroHogan. I'm still reading the reference hoping to find the last bit of useful info. I guess I will start to read the user manual for more.

Thanks halley. I found all I wanted are included in the wiring.h. Like the HIGH is just a macro defined as 0x1 and the pin in the pinMode(unsigned char pin, unsigned char HIGH). Peace in mind now  ;D
Logged


Pages: [1]   Go Up
Jump to: