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.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"); | |
} |
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.*; | |
int x = 10; | |
String s = "2"; | |
x = Integer.parseInt(s); | |
println(x); | |
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
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 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
//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); |
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 "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 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
// /* | |
// * 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 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
/* | |
* 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 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
/* | |
* 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 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
/* | |
* 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 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
/* | |
* 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" |