This is an attempt to make it easy to control motors with a remote control over wifi using the ESP8266 board.
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
import controlP5.*; | |
ControlP5 cp5; | |
// Control visuals | |
int controlHeight = 20; | |
int controlWidth = 200; | |
int controlPadding = 10; | |
int sMaxParticles = 10000; |
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 the Quirkbot library to your program: | |
#include "Quirkbot.h" | |
// create your Quirkbot nodes here: | |
CircuitTouch leftSensor; | |
CircuitTouch rightSensor; | |
ServoMotor servoMotor1; | |
VoltageOutput backward; | |
VoltageOutput forward; |
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
// Imprecise method, which does not guarantee v = v1 when t = 1, due to floating-point arithmetic error. | |
// This form may be used when the hardware has a native fused multiply-add instruction. | |
float lerp(float v0, float v1, float t) { | |
return v0 + t * (v1 - v0); | |
} | |
// Precise method, which guarantees v = v1 when t = 1. | |
float lerp(float v0, float v1, float t) { | |
return (1 - t) * v0 + t * v1; | |
} |
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
var pointsArray = []; | |
var points = []; | |
var maxPoints = 500; | |
function setup() { | |
createCanvas(windowWidth, windowHeight) | |
background(0) | |
stroke(255) | |
for(var i = 0; i < maxPoints; i++){ | |
pointsArray.push([windowWidth/2, windowHeight/2]) |
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
import java.util.Arrays; | |
ArrayList<PImage> images = new ArrayList(); | |
int columns = 12; | |
int rows = 12; | |
void setup(){ | |
selectFolder("Select a folder to process:", "folderSelected"); | |
} |
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 servo; | |
typedef struct motor | |
{ | |
int pin1; | |
int pin2; | |
int pin3; | |
int pin4; | |
}; |
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
from machine import Pin, ADC | |
from neopixel import NeoPixel | |
# Hardware information: | |
# Pin numbers for each hardware connected to the PixelKit ESP32 | |
NEOPIXEL_PIN = 4 | |
SIZE = 128 # Amount of leds | |
WIDTH = 16 # Number of columns | |
HEIGHT = 8 # Number of lines | |
DIAL_PIN = 36 |