Skip to content

Instantly share code, notes, and snippets.

View phoenixperry's full-sized avatar

Phoenix Perry phoenixperry

View GitHub Profile
import java.io.*;
import java.util.Scanner;
String[] stuff;
//this array holds all data bouncing in - I used a file yours will be slightly different
void setup(){
size(200,200);
stuff = loadStrings("data.txt");
}
import java.util.*;
int x = 10;
String s = "2";
x = Integer.parseInt(s);
println(x);
This code will give you the bug:
ofSerial serial
void ofApp::setup(){
//this is the strange line. If I don't explicity call the ofSerial construtor all hell breaks loose. The error is Thread 1: EXC_BAD_ACCESS//(code=1, address 0xffffff4).
serial.listDevices();
serial. setup(0, 9600);
}
void ofApp::update(){
//This code works.
ofSerial serial;
int sensorPadValue;
void ofApp::setup(){
//this is the strange line. If I don't explicity call the ofSerial construtor all hell breaks loose. The error is Thread 1: EXC_BAD_ACCESS//(code=1, address 0xffffff4).
serial = new ofSerial();
serial->listDevices();
serial->setup(0, 9600);
#include "application.h"
//#include "spark_disable_wlan.h" // For faster local debugging only
#include "neopixel.h"
// IMPORTANT: Set pixel COUNT, PIN and TYPE
#define PIXEL_PIN D2
#define PIXEL_COUNT 2
#define PIXEL_TYPE WS2812B
Adafruit_NeoPixel strip = Adafruit_NeoPixel(PIXEL_COUNT, PIXEL_PIN, PIXEL_TYPE);
// /*
// * This is a minimal example, see extra-examples.cpp for a version
// * with more explantory documentation, example routines, how to
// * hook up your pixels and all of the pixel types that are supported.
// *
// */
//
// #include "application.h"
// //#include "spark_disable_wlan.h" // For faster local debugging only
// #include "neopixel.h"
/*
* This is a minimal example, see extra-examples.cpp for a version
* with more explantory documentation, example routines, how to
* hook up your pixels and all of the pixel types that are supported.
*
*/
#include "application.h"
//#include "spark_disable_wlan.h" // For faster local debugging only
#include "neopixel.h"
/*
* This is a minimal example, see extra-examples.cpp for a version
* with more explantory documentation, example routines, how to
* hook up your pixels and all of the pixel types that are supported.
*
*/
#include "application.h"
//#include "spark_disable_wlan.h" // For faster local debugging only
#include "neopixel.h"
/*
* This is a minimal example, see extra-examples.cpp for a version
* with more explantory documentation, example routines, how to
* hook up your pixels and all of the pixel types that are supported.
*
*/
#include "application.h"
//#include "spark_disable_wlan.h" // For faster local debugging only
#include "neopixel.h"
/*
* This is a minimal example, see extra-examples.cpp for a version
* with more explantory documentation, example routines, how to
* hook up your pixels and all of the pixel types that are supported.
*
*/
#include "application.h"
//#include "spark_disable_wlan.h" // For faster local debugging only
#include "neopixel.h"