Skip to content

Instantly share code, notes, and snippets.

Danny Staple dannystaple

Block or report user

Report or block dannystaple

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View strip_half.lua
red = string.char(255, 0, 0)
blue = string.char(0, 0, 255)
ws2812.writergb(1, red:rep(30)..blue:red(30))
@dannystaple
dannystaple / serial_read_servo.ino
Created Dec 28, 2013
Testing/calibrating servo's with the Arduino - asks for a position and moves the servo there.
View serial_read_servo.ino
#include <Servo.h>
Servo myservo;
void setup() {
myservo.attach(3);
Serial.begin(9600);
myservo.write(90);
}
@dannystaple
dannystaple / TurtleMotors.h
Last active Dec 29, 2015
Turtle Motors for Explorer
View TurtleMotors.h
#include <Arduino.h>
class Motor {
public:
int enable;
int in1;
int in2;
void setup() {
//Set all the pins as outputs
@dannystaple
dannystaple / bluetooth_remote.ino
Last active Dec 29, 2015
Code for Bluetooth Orion Explorer 1 Tutorial
View bluetooth_remote.ino
#include "SoftwareSerial.h"
#include "TurtleMotors.h"
//Define the devices
Motor motor_left = {10, 8, 9};
Motor motor_right = {3, 4, 5};
TurtleMotors motors = {motor_left, motor_right, 255, 100};
SoftwareSerial mySerial(11, 12); // RX, TX
void setup() {
View DistanceSensor.h
#include <Arduino.h>
class SR04 {
public:
int trigPin;
int echoPin;
void setup() {
pinMode(trigPin, OUTPUT);
pinMode(echoPin, INPUT);
@dannystaple
dannystaple / hellobottle.py
Created Oct 28, 2011
Simple bottle example
View hellobottle.py
from bottle import *
@route("/test")
def test():
return "<h1>Hello!</h1>"
run(host = "localhost", port=8100)
You can’t perform that action at this time.