Posts

Showing posts from July, 2018

Lectures

Here are some links to past lectures about Swift for Arduino... The first talk, launching Swift for Arduino at Swift London... https://skillsmatter.com/skillscasts/10773-swift-for-arduino-an-experimental-compiler Here's a lecture about the dimmer switch... https://skillsmatter.com/skillscasts/12236-home-made-homekit-apple-controlled-dimmer Demo of the dimmer after the talk... https://twitter.com/mariosge90/status/1012608724475801600?s=21 Demo of the dimmer in action at home... https://youtu.be/ybakczc3qIk Blog piece about the dimmer... https://medium.com/@carl_the_dev/how-i-accidentally-made-a-dimmer-switch-with-a-raspberry-pi-and-an-arduino-c6251848d629

It's all about speed...

Image
Early in development, someone asked me how fast Swift for Arduino was, compared to the standard IDE. I recently did a speed test and the answer is... "fast"! On this speed test it's 10% faster.  The test was simple, digitalWrite on then off, on off, on off, etc. 8 times, then measure the results with a Saleae logic analyser. Here's the test running on a classic Arduino IDE... And now on Swift for Arduino... ...  this, on a plain, unmodified, out of the box Arduino UNO, in a simple test and using the standard pin functions for flipping pins, Swift For Arduino took 3.8us (3.8 microseconds) and the classic Arduino  IDE took 4.2us (4.2 microseconds). Without any modification, without any tricks and on a normal test, Swift for Arduino, writing using Swift code is 10% faster than the standard Arduino IDE using C code. We are very pleased with the results!  😀 UPDATE: Tested on version 4.0 of Swift for Arduino, this is even faster! It now flips pi

Getting started with Swift for Arduino

Here is the introduction video about how to get started with Arduino, including working from a freshly unboxed Arduino UNO and downloading the Swift for Arduino IDE onto your mac. https://www.youtube.com/watch?v=H8xvEcB2EDQ&t=11s

Ever wondered how AnalogWrite actually works?

On our youtube channel I've got a cute video (because it has my daughter in it in the background) showing how analogWrite works on the arduino, what PWM is and the output on an oscilloscope. https://www.youtube.com/watch?v=T4GtZv1xv1E

Controlling your accessory using HomeKit

This is a slight diversion from Arduino programming. Here I repost a piece I wrote about how to present your accessory as a HomeKit accessory (only for use in non commercial/hobbyist projects). I spent ages making a really good dimmer switch using Swift for Arduino to program a "breadboard arduino" but then needed a way to control it easily from our phones at home. And here it is!  We have iPhones so HomeKit was a natural choice. It required a raspberry pi 2 and network connection to act as the server for HapJS. HAP-NodeJS

Arduino without an Arduino

No, I'm not talking about the dodgy knock offs you can get with "Arduino" in the wrong font, or the more genuine, fair play Arduino variants that build on the platform as an open source project and make their own clones, without breaking any of Arduino's rules... I'm talking about creating the essence of an Arduino UNO on your breadboard without going out and buying an Arduino UNO for each project. They are meant as really good prototyping platforms and the socket with the microcontroller in is not hard soldered for a reason, they also make excellent programmers for an Atmega328p! Arduino is a platform of many variants and those variants are all microcontrollers, ways of you learning and prototyping microcontroller technology without as much difficulty as used to be the case. The essence of an Arduino UNO is an atmega328p microcontroller. That's the thing that's interpreting voltages, outputing line levels. That's the processor that you&