+ 1
What is the best language to start arduino projects??
5 Antworten
+ 1
In the Arduino IDE you use a
C/C++ dialect, so choosing C++ should work well.
(my Opinion)
+ 1
I agree with XiLef , c++ is a nice choice because programms look very much like c/cpp. Also if you would ever try to program some other microcontrollers like STM it uses c++ also
0
thank 4 ur reply guys
0
For start arduino you need "arduino C" - easy language dedicated for Arduino.
For easy project / begginer project / You only need a few elements:
1) variable declaration:
int
byte
long
others are not oft used in simple projects
2) setup:
void setup() {
Serial.begin(9600);
pinMode(LED,OUTPUT);
}
Serial.beginn - sets bits per second for serial data transmission
pinMode(... , ...) - sets the pins as the input/output
3) pin sets
pinMode(... , OUTPUT) - for output
pinMode(... , INPUT) - for input
pinMode(... ,INPUT_PULLUP) - for input default set high
4) main loop
example:
void loop() {
digitalWrite(LED,HIGH);
delay(1000);
digitalWrite(LED,LOW);
delay(1000);
}
5) voltage setting (digital)
digitalWrite(.....,HIGH) - high - 3,3V
digitalWrite(.....,LOW) - low - 0V
6) time delay (in milisekonds)
delay(.....)
7) reading from pin
digitalRead(.....) - digital pin
analogRead(.....) - analog pin
8) operators
+ , - , / , * , == , =
9) writing a line of text
Serial.println(.....)
10) if , else
11) switch , case
12) for loop
13) change to integer
Serial.parseInt()
14) waiting for sign
Serial.available()
these elements are enough for you to build a lot of simple projects based on popular sensors, of course, "arduino C" has many other elements.
0
⚘⚘⚘