I need some help.
I'm new in programming.
How do you improve skills in Arduino.
Do you advise learning C++ before learning Arduino?
Here is a sketch that looks good. The compilation is great but,
notihing happend in the schematique.
Thank you for helping me
const int buttonAPin = 2; // Enter
const int buttonBPin = 4; // Menu
const int buttonCPin = 7; // Zoom in
const int ledAPin = A5;
const int ledBPin = A6;
const int ledCPin = A7;
// Variable will change:
int buttonAState = 0;
int buttonBState = 0;
int buttonCState = 0;
void setup() {
// Initialize the button pin as input:
pinMode(2, INPUT);
pinMode(4, INPUT);
pinMode(7, INPUT);
// Initialize the LED pinas an output:
pinMode(ledAPin, OUTPUT);
pinMode(ledBPin, OUTPUT);
pinMode(ledCPin, OUTPUT);
}
void loop() {
// put your main code here, to run repeatedly:
buttonAState = digitalRead(buttonAPin);
buttonBState = digitalRead(buttonBPin);
buttonCState = digitalRead(buttonCPin);
Hi veryone,
I need some help.
I'm new in programming.
How do you improve skills in Arduino.
Do you advise learning C++ before learning Arduino?
Here is a sketch that looks good. The compilation is great but,
notihing happend in the schematique.
Thank you for helping me
const int buttonAPin = 2; // Enter
const int buttonBPin = 4; // Menu
const int buttonCPin = 7; // Zoom in
const int ledAPin = A5;
const int ledBPin = A6;
const int ledCPin = A7;
// Variable will change:
int buttonAState = 0;
int buttonBState = 0;
int buttonCState = 0;
void setup() {
// Initialize the button pin as input:
pinMode(2, INPUT);
pinMode(4, INPUT);
pinMode(7, INPUT);
// Initialize the LED pinas an output:
pinMode(ledAPin, OUTPUT);
pinMode(ledBPin, OUTPUT);
pinMode(ledCPin, OUTPUT);
}
void loop() {
// put your main code here, to run repeatedly:
buttonAState = digitalRead(buttonAPin);
buttonBState = digitalRead(buttonBPin);
buttonCState = digitalRead(buttonCPin);
if (buttonAState == HIGH) {
digitalWrite(ledAPin, HIGH);
} else {
digitalWrite(ledAPin, LOW);
}
if (buttonBState == HIGH) {
digitalWrite(ledAPin, HIGH);
} else {
digitalWrite(ledAPin, LOW);
}
if (buttonCState == HIGH) {
digitalWrite(ledAPin, HIGH);
} else {
digitalWrite(ledAPin, LOW);
}
}
[IMG]http://i63.tinypic.com/213rmyq.jpg[/IMG]
Hi.
This is a question about Arduino programming, you should ask in arduino forums:
https://forum.arduino.cc/
Thank you Santiago