Category:Arduino SDK
(Redirected from Arduino SDK)
Other Skills
Using other GPIOs
void setup() {
// set as outputs
DDRB |= (1 << DDB6) | (1 << DDB7);
}
void loop() {
// set PB6 high
PORTB |= (1 << PORTB6);
delay(1000);
// set PB6 low
PORTB &= ~(1 << PORTB6);
delay(1000);
// both high
PORTB |= (1 << PORTB6) | (1 << PORTB7);
delay(1000);
// both low
PORTB &= ~((1 << PORTB6) | (1 << PORTB7));
delay(1000);
}
Internall pull up resistor
- pinMode(pushButton, INPUT_PULLUP);
Analog Pins as Digital
- digitalWrite(A0, HIGH); // 14
- digitalWrite(A1, HIGH); // 15
- digitalWrite(A2, HIGH); // 16
- digitalWrite(A3, HIGH); // 17
- digitalWrite(A4, HIGH); // 18
- digitalWrite(A5, HIGH); // 19
Advance Features
Pages in category "Arduino SDK"
The following 6 pages are in this category, out of 6 total.