Skip to content

Instantly share code, notes, and snippets.

View dricard's full-sized avatar

Denis Ricard dricard

View GitHub Profile
@dricard
dricard / servo motor (project 05).swift
Last active March 20, 2020 19:49
The [S4A] version of the project 05 of the starter kit. It uses a potentiometer to control the position (angle) of a servo motor.
//------------------------------------------------------------------------------
//
// 05 - servo motor v2.swift4a
// Swift For Arduino
// This code is for project 05 of the Arduino Starter Kit (called mood cue)
// It uses 1 potentiometer, 1 servo motor with a motor arm and 2 100µF capacitors
// The potentiometer is read, and the servo is positioned according to potentiometer value
// There are two constants (minimumPulseWidth and maximumPulseWidth) which can be adjusted
// depending on the servo used. The values given are for the servo SM-S2309S
//
@dricard
dricard / Blink.md
Last active March 2, 2020 22:09
A very simple S4A program that doesn't require a breadboard. Helpful to see if everything works.
@dricard
dricard / Programming the Arduino UNO using Swift For Arduino.md
Last active March 2, 2020 22:11
Introduction to the Swift For Arduino IDE.

Programming the Arduino UNO with Swift For Arduino

This is an introduction to programming a Arduino UNO board with the Swift For Arduino IDE.

In the Arduino IDE, programs are structured with two main functions:

void setup(){
    
}