Here are some sample swift files to be used in the Swift for Arduino IDE.
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
contributed examples
contributed libraries
demo examples
learning examples
work in progress
.gitignore
LICENSE
README.md

README.md

examples

Here are some sample swift files to be used in the Swift for Arduino IDE (http://www.swiftforarduino.com).

##demos The intention is to demo some examples of how to do things.

traffic-light.swift shows traffic lights, timing and how to handle ints well note: it will give an abort warning, but that seems to be because the compiler cannot be sure that you're not doing a divide by zero in the flasher function. I haven't worked out how to avoid this but it shouldn't be a problem, just use care.