What is Arduino exactly?

I've seen C++ and C mixed together while coding in Arduino.

So is Arduino the IDE? and the language is C part C++

meanwhile check out my crappy weather station I've just finished writing, i use a BOSH BMP085 sensor with Wiznet to deliver a basic weather station

http://110.175.97.110:1234

(South Australia, Adelaide, Clearview)
http://www.weatherzone.com.au/sa/adelaide/clearview (official info to compare to)

So what am i coding in? hybrid C/C++ ?

C++ is a superset of C. The language of Arduino is C++.

Craig - It's working. Consider adding a location; weather info for 'noplace in particular' isn't very useful. :slight_smile:

Unless you cause it to behave differently, the Arduino IDE compiles your code as C++.

lol, the location is my bedroom, um South Australia (Adelaide) :stuck_out_tongue: - but...

the question was, and you've answered it, C++ - i'll be honest i hate C++ as long as i get away with C (on the whole) looking code i'll be happy, my first program i wrote
was written in C when i was 8 (22 years ago) and i like C, not C++ i used Object Pascal (for objects) maybe i need to write a Pascal compiler lol..

anyway so it's C++ huh - thanks.

Somewhere in South Australia, I am guessing. Based on the 240V and the IP address.

Oh, and the temperature. It's 29C in Adelaide apparently, whereas it's a bit cooler where I am.

Look for the house with the bedroom light off.

(edit) ninja'd! But I worked it out before he posted.

lol, the bedroom light is a Cree 3 watt LED underdriven via a PNP 2222a transistor :slight_smile: and a 5v linear regulated supply :stuck_out_tongue:

Yeah well, it is 3:39pm light will be off :slight_smile: lol - so can i say i code in C++ even though it looks identical to C? lol

You can say that if you want to.

A reasonably simple program in C++ will look the same as one in C. Well, put it this way, with some restrictions the same code will compile in C and C++.

But if you are doing this, for example:

Serial.println ("hello");

Then you are using C++.

Serial is an instance of the class HardwareSerial, and you are calling a member function of that instance.

And classes are a C++ thing. :slight_smile:

Sorry to disappoint you.

awwww, yeah you're right Serial. <<object :frowning:

grrrrr lol

can i say i code in C++ even though it looks identical to C?

I am capable of writing C programs in several languages. C, C++, Java, Perl, ... :slight_smile:

I've grown up on a diet of Pascal and Object Pascal, C++ (objects look scary) but C i can handle, PHP i can handle, C++ and objects that look like object::fsdfsdf scare me :stuck_out_tongue:

Begin
Writeln('Please no C++');
End.
lol

or

<?php echo "Please no C++ \n"; ?>

or

printf(" Really no!");

lol, it's not that i don't like C++ just that i've been spoilt with objectpascal

EG.

Var
 S: String;
 Key,B: Byte;
 N: Integer;
begin
 S:=Edit1.Text;
 Key:=55;
 For N:=1 to Length(S) do
  Begin
    B:=Ord(S[N]);
    B:=B Xor Key;
    S[N]:=Chr(B);
  End;
  LoadLibrary
 Edit1.Text:=S;

for (n=0; n<StrLen; n++)
{
int b = 0;
int key = 55;

// B:=Ord(S[N]); //ord is the Decicmal of Ascci value, eg, A = 65; so abcde becomes 65 66 67...
// B:=B Xor Key; // xor 55 with 65 (A or whatever)
// S[N]:=Chr(B); //replace string back with the XOR'ed version

}

how would you do that in C/C++ ?

The 'English' descriptions Begin End; XOR, it's all pretty much explained to you as you code, where as with C++ you have to remember so very specific info - i'm spoilt lol

I know exactly what you mean. I spent 10+ years programming in Turbo Pascal. C seemed really strange at first. But, you adjust ...

If you can handle C as you say, then what makes C++ so scary? Its not as bad as you think. I don't think its bad at all.

Almost seems like BASIC with semicolons & { }s at this point.