Skip to content

Instantly share code, notes, and snippets.

// Starting with the connected camera from BowlerStudio
println(cameraCHDK)
//Create the default detector using "haarcascade_frontalface_default.xml"
IObjectDetector detector = new HaarDetector("haarcascade_smile.xml")
// Create the input and display images. The display is where the detector writes its detections overlay on the input image
Mat inputImage = new Mat()
Mat displayImage = new Mat()
// Loop checking the camera for faces
while(true){
cameraCHDK.getLatestImage(inputImage,displayImage); // capture image
import com.neuronrobotics.bowlerstudio.tabs.*;
new CameraTab(cameraCHDK, new HaarDetector());
bowler.killAllPidGroups();
// die die die
@acamilo
acamilo / hubCTL.ino
Created June 11, 2015 15:49
Code to accept servo signals and controllthe hubmotor
void setup() {
Serial.begin(115200);
#define pin 23
#define pmax 500
#define pmin -500
#define zero 1492
#define INCOM 6
#define EN 8
#define CWCCW 7
@acamilo
acamilo / gameController.groovy
Last active August 29, 2015 14:28 — forked from madhephaestus/.gitignore
Bowler Studio Game Controllers
import com.neuronrobotics.sdk.addons.gamepad.IJInputEventListener;
import net.java.games.input.Component;
import net.java.games.input.Event;
ServoChannel srvfront = new ServoChannel (dyio.getChannel(0));
ServoChannel srvdrive = new ServoChannel (dyio.getChannel(11));
IJInputEventListener listener = new IJInputEventListener() {
@Override public void onEvent(Component comp, Event event1,float value, String eventString) {
int front,drive;
@acamilo
acamilo / gameController.groovy
Created February 3, 2016 20:51
Bowler Studio Game Controllers
import com.neuronrobotics.sdk.addons.gamepad.IJInputEventListener;
import com.neuronrobotics.sdk.addons.gamepad.BowlerJInputDevice;
import net.java.games.input.Component;
import net.java.games.input.Event;
import net.java.games.input.Controller;
import net.java.games.input.ControllerEnvironment;
BowlerJInputDevice g=null;// Create a variable to store the device
//Check if the device already exists in the device Manager
if(DeviceManager.getSpecificDevice(BowlerJInputDevice.class, "jogController")==null){
@acamilo
acamilo / CarlTheRobot.xml
Created April 8, 2016 01:22
Carl The Hexapod
<root>
<mobilebase>
<driveType>walking</driveType>
<cadEngine>
<git>https://gist.github.com/bcb4760a449190206170.git</git>
<file>ThreeDPrintCad.groovy</file>
</cadEngine>
<driveEngine>
<git>https://gist.github.com/bcb4760a449190206170.git</git>
@acamilo
acamilo / jimmy.xml
Created April 8, 2016 01:22
jimmy copy of CarlTheWalkingRobot
<root>
<mobilebase>
<cadEngine>
<git>https://gist.github.com/2e08db0887e365607fe283815284c128.git</git>
<file>ThreeDPrintCad.groovy</file>
</cadEngine>
<driveEngine>
<git>https://gist.github.com/2e08db0887e365607fe283815284c128.git</git>
<file>WalkingDriveEngine.groovy</file>
</driveEngine>
@acamilo
acamilo / udpconnect.groovy
Last active April 10, 2016 19:37
connecty via udp
//Your code here
import com.neuronrobotics.sdk.pid.*;
import com.neuronrobotics.sdk.common.*;
import com.neuronrobotics.sdk.network.*;
import java.net.InetAddress;
BowlerAbstractConnection connection = new UDPBowlerConnection(InetAddress.getByName("192.168.1.10"),1952);
GenericPIDDevice dev = new GenericPIDDevice(connection);
Log.enableInfoPrint();