I just got this error when I just ran my code. Whats very odd is that it ran fine and then the next time through it gave me this error. I double checked that the font was properly loaded. Any ideas on what is causing this?
I already have some code that I am using to play with perlin noise over top of an image and reacting to mouseX and mouseY input. What I want to do now is using a photocell and an Arduino have them control the perlin noise. I am just not sure how to do this. Here is the code I already have:
float noiseScale=0.15;
PImage myImage;
float noiseVal; // took this out of the local variable and made it global
void setup()
{
size(600, 650);
smooth();
PImage img;
img = loadImage("rust_1.jpg"); //loads the stored image to the background
myImage = loadImage("rust_1.jpg");
}
void draw()
{
image(myImage, 0, 0);
color cp = get(mouseX, mouseY); //use if I want to grab
stroke(cp, 150);
for(int x=0; x < width; x++)
{
noiseVal = noise((mouseX+x)*noiseScale,
mouseY*noiseScale);
line(x, mouseY+noiseVal*150, x, height);//the higher the value the sharper the spikes
println (cp);
}
}
I have done some basic code in Processing using mouseX and mouseY in order to get images and geometry to move. I want to use IR sensors to trigger this action now and I am having a problem with how to code that into processing. I will be using an Arduino Uno board with PIR sensors.
Any ideas or thoughts would be greatly appreciated.