on Linux is still a bit rough, especially on ARM computers ▸ Miss a lot of things from Xcode ▸ Emacs / Vim via X11 or terminal ▸ Atom with Swift plugins is better on X86 ▸ Stick with a Linux VM if not doing heavy GPIO work
Turn on status LED 2. Perform READ on temp sensor & parse data 3. Turn off status LED Note: Status LED left on longer than actually needed so we can visually confirm sequence of events
concepts: 1. Start a new thread, blinking an LED for a few seconds (Blink Thread) 2. On main, perform a temperature read. 3. Blink Thread completes. ‣ Experienced no issues
Raspberry Pi3 let gpios = SwiftyGPIO.GPIOs(for: .RaspberryPi2) // indicator LED lit during temperature read var led = gpios[.P6]! // the LED that will blink on a separate thread var tLED = gpios[.P21]! //Clearer LED states let ON = 1 let OFF = 0
sensor - DS18B20 let probeNames = ["28-03159199a5ff"] //The probe will show up in here so long as you have 1-wire gpio enabled let probeDirectory = "/sys/bus/w1/devices/"
HEAD is now at d6fd508 Updated package name, new release Resolved version: 0.8.2 Compile Swift Module 'SwiftyGPIO' (4 sources) Compile Swift Module 'readTemp' (3 sources) Linking .build/debug/readTemp
(SPM) is broken Raspbian/Pi 3. ▸ You can probably use SPM on Raspberry Pi 2 ▸ You can use SPM on Beaglebone Black ▸ Why? armv7 architecture is well covered; armv8 is neglected for now ▸ Progress made with Ubuntu16 Xenial