Skip to content

Instantly share code, notes, and snippets.

#include <CapacitiveSensor.h>
CapacitiveSensor capSensor = CapacitiveSensor(4,2);
boolean isOn = false;
long prevTimeChanged = 0;
void setup() {
// open a serial connection
import processing.serial.*;
Serial myPort; // The serial port
int xPos = 1; // horizontal position of the graph
String valoresArduino[];
void setup () {
size(800, 300);
println(Serial.list());
import processing.serial.*;
Serial myPort; // The serial port
float valorArduinoA = 0;
float valorArduinoB = 0;
String valoresArduino[];
long prevTimeColorChanges = 0;
int pushButton = 3;
int lastButtonState = 0;
boolean isOn = false;
void setup() {
Serial.begin(9600);
pinMode(pushButton, INPUT);
lastButtonState = digitalRead(pushButton);
}
int pushButton = 3;
int lastButtonState = 0;
boolean isOn = false;
long prevTimeTrigger = 0;
void setup() {
Serial.begin(9600);
pinMode(pushButton, INPUT);
#include <CapacitiveSensor.h>
CapacitiveSensor capSensor = CapacitiveSensor(4,2);
const int numReadings = 10;
long readings[numReadings]; // the readings from the analog input
int index = 0; // the index of the current reading
long total = 0; // the running total
long average = 0; // the average
#include <CapacitiveSensor.h>
CapacitiveSensor capSensor = CapacitiveSensor(4,2);
boolean isOn = false;
long prevTimeChanged = 0;
void setup() {
// open a serial connection
int xPosition = 0;
int yPosition = 0;
int totalStepsCircle = 25; // number steps to complete the circle
int centerX = 500; // half the frame lenght
int centerY = 500; // half the frame lenght
int radius = 250;
int currentStep = 0;
@pral2a
pral2a / gist:10007689
Last active August 29, 2015 13:58
ACS712 - Arduino (test)
#define ACS712_SENSITIVITY5 0.185
#define ACS712_SENSITIVITY20 0.100
#define ACS712_SENSITIVITY30 0.066
#define ADCREF 5.0
void setup() {
// initialize serial communication at 9600 bits per second:
Serial.begin(9600);
}

#The KUKA Robot Programming Language ##Movement The KUKA robot can move from point A to point B in three main ways:

PTPPoint-to-Point – Motion along the quickest path to an end point. This motion requires the developer to set one point.

LIN - Linear – Motion at a defined velocity and acceleration along a straight line. This motion requires the developer to set one point. The robot uses the point defined in the previous move as the start point and the point defined in the current command as the end point and interpolates a straight line in between the two points.

CIRCCircular – Motion at a defined velocity and accerlation along a circular path or a portion of a circular path. This motion requires the developer to set two points, the mid-point and the end point. Using the start point of the robot (defined as the end point in the previous motion command) the robot interpolates a circular path through the mid-point and to the end point.