This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
+ (UIImage *)backgroundImageWithFrame:(CGRect)frame baseColor:(UIColor *)baseColor { | |
UIImage *colorImage; | |
CGRect bounds = frame; | |
UIGraphicsBeginImageContextWithOptions(frame.size, NO, 0.0f); | |
CGContextRef context = UIGraphicsGetCurrentContext(); | |
// Fill this path | |
[baseColor setFill]; | |
CGContextAddRect(context, bounds); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<config> | |
<joystick id="0"> | |
<axis number="0" low="Left" high="Right" /> | |
<axis number="1" low="Up" high="Down" /> | |
<button number="0" key="SN2" /> | |
<button number="1" key="SN1" /> | |
<button number="2" key="HC1" /> | |
<button number="3" key="HC2" /> | |
<button number="4" key="HC3" /> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<config> | |
<joystick id="0"> | |
<axis number="0" low="Left" high="Right" /> | |
<axis number="1" low="Up" high="Down" /> | |
<button number="0" key="SN2" /> | |
<button number="1" key="SN1" /> | |
<button number="2" key="HC1" /> | |
<button number="3" key="HC2" /> | |
<button number="4" key="HC3" /> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$(function() { | |
Parse.$ = jQuery; | |
// Initialize Parse with your Parse application javascript keys | |
Parse.initialize("APP-KEY", | |
"JAVASCRIPT-ID"); | |
// The main view for the app | |
var AppView = Parse.View.extend({ | |
el: $("#contact"), |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Parse.Cloud.define("hello", function(request, response) { | |
var sendgrid = require("sendgrid"); | |
sendgrid.initialize("USERNAME", "PASSWORD"); | |
var name = request.params.name; | |
var email = request.params.email; | |
var phone = request.params.phone; | |
sendgrid.sendEmail({ | |
to: "USER@DOMAIN.COM", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <Servo.h> | |
Servo twistServo; // Define left servo | |
Servo nodServo; // Define right servo | |
int twistPos = 0; | |
int nodPos = 0; | |
int maxNod = 180; | |
int minNod = 90; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python | |
from Adafruit_PWM_Servo_Driver import PWM | |
import time | |
pwm = PWM(0x40) | |
pwm.setPWMFreq(50) | |
twist = 200 | |
tDir = 1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <Wire.h> | |
#include <SoftwareSerial.h> | |
int tmp102Address = 0x48; | |
SoftwareSerial bleShield(2, 3); | |
long interval = 1000; | |
void setup(){ | |
Serial.begin(19200); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//example use of LCD4Bit_mod library | |
#include <LCD4Bit_mod.h> | |
//create object to control an LCD. | |
//number of lines in display=1 | |
LCD4Bit_mod lcd = LCD4Bit_mod(2); | |
//these pins can not be changed 2/3 are special pins | |
int encoderPin1 = 2; | |
int encoderPin2 = 3; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python | |
from Adafruit_PWM_Servo_Driver import PWM | |
import time | |
class ServoControl(object): | |
current = 200 | |
direction = 1 | |
def __init__(self, pwm, pin, sMax, sMin): |
OlderNewer