Category:Arduino SDK

From ElectroDragon
Revision as of 00:09, 28 July 2020 by Chao (talk | contribs)
Jump to navigation Jump to search

Arduino Libraries

BLE

I2C Interface

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 4 pages are in this category, out of 4 total.