Skip to content

Instantly share code, notes, and snippets.

#include <AFMotor.h> // Enables the Motor library
// Basic setup
AF_DCMotor motor1(1); // Motor 1 is connected to the port 1 on the motor shield
int ballSensor = A0;
int scoopSensor = A1;
int isRunning = 0;
int isReseting = 0;
int isBallReady = 0;
@ReidCarlberg
ReidCarlberg / gist:5687402
Created May 31, 2013 19:32
Samples for the Force.com Developer Workshop
Developer Console Demo
1) SOQL Query
Select Id, Name From Account
Select Id, Name, Owner.Name From Account
Select Id, Name, Owner.Name From Account Limit 5
1) Follow the getting started instructions for AngularHerokuBootstrapPHP.
http://www2.developerforce.com/mobile/getting-started/html5/#angularjs-heroku
2) Update the app definition (in Index.php) -- replace this line near the top of the script section in index.php
var app = angular.module('AngularSFDemo', ['AngularForce', 'AngularForceObjectFactory', 'Contact', 'Account']);
3) Update routes (app.js) -- add this line to the "routes" declaration at the top.
when('/accounts', {controller: AccountListCtrl, templateUrl: 'partials/account/list.html'}).
@ReidCarlberg
ReidCarlberg / I2C WiFly J-Bot
Created November 28, 2011 19:50
Simples Possible Tester with WiFly
#include <Wire.h>
// (Based on Ethernet's WebClient Example)
#include "WiFly.h"
#include "Credentials.h"
@ReidCarlberg
ReidCarlberg / Train Controller v1
Created November 28, 2011 20:51
Train Controller
/*
Part of this Sketch are from Michael Blank's work, parts are from Reid Carlberg.
See comments.
*/
// 23. November 2009
// works well with LMD18200 Booster !!!!!
/*Copyright (C) 2009 Michael Blank
@ReidCarlberg
ReidCarlberg / SimpleRobot
Created November 28, 2011 19:40
Basic J-Bot Code
#include <Wire.h>
#include <AFMotor.h> // Enables the Motor library
#include <Servo.h> // Enables the Servo library
// Basic setup
Servo PingServo;
AF_DCMotor motor1(1); // Motor 1 is connected to the port 1 on the motor shield
AF_DCMotor motor2(2); // Motor 2 is connected to the port 2 on the motor shield
int minSafeDist = 11 ; // Minimum distance for ping sensor to know when to turn
http://bit.do/lightningdays
http://developerforce.github.io/lightning-connect-tutorial
http://developerforce.github.io/lightning-process-builder-tutorial
http://developerforce.github.io/lightning-components-tutorial
http://developerforce.github.io/lightning-app-builder-tutorial
@ReidCarlberg
ReidCarlberg / tesselCameraChatter.js
Last active August 29, 2015 14:03
Tessel Salesforce Chatter Camera Climate
/*
by Reid Carlberg
Last update: November 20, 2014
Questions? Ask me on Twitter. https://Twitter.com/ReidCarlberg
Basic use case: monitor range finder. When something is close, snap a picture, post to Salesforce Chatter.
Sign up for a free developer edition to try this code
http://developer.salesforce.com/signup
You'll need to setup a Connected App in your developer edition for OAuth2 stuff. Detailed instructions:
@ReidCarlberg
ReidCarlberg / printer-gateway
Created May 10, 2014 11:16
3D Printer Farm Management with Salesforce1 - Code
var http = require('http');
var request = require('request');
var nforce = require('nforce');
var http = require('http'),
faye = require('faye');
var client;
//salesforce settings
var sfuser = "user@some.name";
var http = require("http");
var Cylon = require('cylon');
var copter1 = Cylon.robot({
connection: {name: 'ardrone', adaptor: 'ardrone', port: '192.168.1.1'},
device: {name: 'drone', driver: 'ardrone'},
reidStart: function(my) {
console.log("reidStart");
my.drone.takeoff();