Skip to content

Instantly share code, notes, and snippets.

View reefwing's full-sized avatar

David Such reefwing

View GitHub Profile
@reefwing
reefwing / AppDelegate.h
Last active December 16, 2015 04:29
Tutorial 28 - Codea Audio Player Add On (Enhanced)
//
// AppDelegate.h
// LunarLander HD
//
// Created by Reefwing Software on Saturday, 13 April 2013
// Copyright (c) Reefwing Software. All rights reserved.
//
#import <UIKit/UIKit.h>
#import "AudioAddon.h"
@reefwing
reefwing / AppDelegate.h
Created April 21, 2013 05:53
Tutorial 29 - Codea v1.5.2: Objective C Add On, iAds
//
// AppDelegate.h
// AudioDemo
//
// Used to demonstrate the audio add on and iAds add on libraries
//
// Created by Reefwing Software on Sunday, 14 April 2013
// Copyright (c) Reefwing Software. All rights reserved.
//
@reefwing
reefwing / AppDelegate.h
Last active December 16, 2015 15:49
Tutorial 30 - Codea v1.5.2: Objective C Add On, Game Center
//
// AppDelegate.h
// AudioDemo
//
// Used to demonstrate the audio, game center and iAds add on libraries
//
// Created by Reefwing Software on Sunday, 14 April 2013
// Copyright (c) Reefwing Software. All rights reserved.
//
@reefwing
reefwing / Main.lua
Created July 6, 2013 04:55
Tutorial 31 - Codea Collision Detection
--# Main
-- Asteroids
--
-- Simple app to demonstrate collision detection using
-- the built in Box2D functionality.
-- Use this function to perform your initial setup
function setup()
@reefwing
reefwing / Button.lua
Last active September 2, 2015 23:39
Lunar Lander HD
Button = class()
function Button: init(displayName)
-- displayName: Is the text displayed on your button. The button will scale up and down to fit the
-- text.
-- pos: Defines the x and y - coordinates of the button using a vector.
-- size: Is a vector which contains the width and height of the button, which is set by the
-- display name text, and is used to determine if a button has been hit.
-- action: Is the function that you want called when the button is tapped.
@reefwing
reefwing / keywords.txt
Created October 24, 2015 02:13
Syntax Colouring Map for the Honeywell HMC5883L 3 Axis Compass Magnetometer Module
#####################################################################
# Syntax Colouring Map for the Honeywell HMC5883L
# 3 Axis Compass Magnetometer Module
#####################################################################
#####################################################################
# Datatypes (KEYWORD1)
#####################################################################
HMC5883L KEYWORD1
@reefwing
reefwing / DisplayCM.ino
Created November 1, 2015 03:36
Sharp GP2Y0A02YK0F IR Distance Sensor (20-150 cm) Arduino Library
#include <GP2Y0A02YK0F.h>
GP2Y0A02YK0F irSensor;
int distance;
void setup()
{
Serial.begin(9600);
irSensor.begin(A0); // Assign A0 as sensor pin
}
@reefwing
reefwing / HB-25_Test.ino
Created December 10, 2015 07:34
Arduino Library for the Parallax HB-25 Motor Control
// HB-25 Library Test
//
// Version: 1.1
// Date: 10th December 2015
//
// Valid speed ranges for the forwardAtSpeed and reverseAtSpeed methods are
// 0 (stop) to 500 (maximum speed). For rampToSpeed and moveAtSpeed you can use from -500 (full
// reverse) to 500 (full forward). As before, a speed of 0 will stop the motor.
//
// Remember to call the begin() method in setup().
@reefwing
reefwing / BLEuno.ino
Created January 7, 2016 06:14
Bluetooth Remote Control Sketch for Bluno
/*
*
* AVA BlueTooth Manual Overide (using iOS App) - Arduino Uno
*
* Bluno integrates a BT 4.0 (BLE) module into an Arduino Uno.
* Bluno uses the TI CC2540 BT 4.0 chip.
*
* Reading temperature or humidity takes about 250 milliseconds
* Sensor readings may also be up to 2 seconds old (its a very slow sensor)
//Duinotech Wifi Scanner
//XC4614 Wifi Shield - ESP13 module
//XC4616 84x48 Dot Matrix Display
//XC4410 Uno Main board (could be any other that the shield fits on, change Serial to Serial1 on Leonardo)
// LCD VCC GND SCE RST DC MOSI SCLK
// Uno 2 3 4 5 6 7 8
#define PIN_VCC 2
#define PIN_GND 3
#define PIN_SCE 4