Skip to content

Instantly share code, notes, and snippets.

@armadsen
Last active August 29, 2015 14:20
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save armadsen/d1339cd7c1525efad434 to your computer and use it in GitHub Desktop.
Save armadsen/d1339cd7c1525efad434 to your computer and use it in GitHub Desktop.
Deckset Markdown file for my presentation, "Arduino and iOS" at CocoaHeads SLC, May 5, 2015.

build-lists: true autoscale: true

#Advanced Arduino ###(or Arduino and iOS)

####Andrew Madsen ####CocoaHeads SLC - May 5, 2015


#What I’ll Cover

  • Arduino <-> Peripheral Communication
  • Bluetooth 4.0
  • Communication with iOS apps
  • Beyond prototyping

#First, A Quick Recap

Arduino is an easy to use microcontroller.


#Why Arduino?

  • No boilerplate required.
  • Get up and running very quickly.
  • Tons of pre-designed peripherals.
  • Lots of easy to use libraries.
  • Open source software and hardware.
  • Huge community

#More basic info:

###https://github.com/armadsen/IntroToArduino


#[fit]Arduino <-> Peripheral Communication

  • Tons of shields are available. Most include a library to use them.
  • There are also tons of libraries for non-shield peripherals.
  • Many peripherals use SPI, i2c, RS-232, etc. Makes communication easy.

#[fit]Supporting custom peripherals.

Bit banging:

for(int ledIndex = 0; ledIndex < NUM_LEDS; ledIndex++){
  for(int x=7; x>=0; x--){
    NRF_GPIO->OUTSET = PIN;
    if(ledBar[ledIndex] & (0x01 << x)) {
      __ASM ( \
            " NOP\n\t" \
            " NOP\n\t" \
            " NOP\n\t" \
            " NOP\n\t" \
            " NOP\n\t" \
            );
      NRF_GPIO->OUTCLR = PIN;
    
    }else{
      NRF_GPIO->OUTCLR = PIN;
      __ASM ( \
            " NOP\n\t" \
            " NOP\n\t" \
            " NOP\n\t" \
            );      
    }
  }
}

Communicating with iOS

Options:

  • WiFi/Ethernet
  • Serial via lightning port (Skywire or Redpark cable)
  • Bluetooth 4.0

#Bluetooth 4.0

Often the best way to communicate with iOS devices.

Multiple options:


#[fit]Demo Time

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           .

#Beyond Prototyping

Arduino is open source hardware. Use that to your advantage. Often, your Arduino prototype will be largely reusable for your final design.

Devices like the RFduino, Light Blue Bean, etc., are available as bare parts in quantity at reasonable prices.

Beyond that, the move to "real" microcontrollers is not as hard as you think.


#Resources

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment