Im trying to fill colours in my sketch but am having problems. The fills are dependent on digital pin states on an Arduino board. The Arduino board is running the Standard Firmata Sketch from Arduino IDE examples. The Processing sketch is drawing ellipses and filling the ellipses white, so looking at my code below, it seems the code see's the pin states to be low. When i give the pin 5volts i want the colour fills to be different but i cant get this to work. I have all the libraries in place so everything is fine with them.
Any Ideas, help would be appreciated.
Thanks
Sam
PImage bg; //Image variables
int y;
//Imports Arduino Libraries
import processing.serial.*;
import cc.arduino.*;
Arduino arduino;
color white = color(255, 255, 255);
color black = color(0, 0, 0);
void setup() {
//DRAW SCREEN X AND Y
size(1444, 850);
smooth();
// create a font with the third font available to the system:
PFont myFont = createFont(PFont.list()[2], 60);
textFont(myFont);
//arduino is an instance of the class Arduino, first part of below
//calls the instance via the class. Not sure about between parenthesis!
arduino = new Arduino(this, Arduino.list()[0], 57600);
for (int i = 0; i <= 13; i++) arduino.pinMode(i, Arduino.INPUT);
I have been trying to add a background image to an existing piece of code which has some ellipse. when I add the image, it covers my other shapes. Any help to help me put this image in the background instead of covering my ellipse would be really appreciated.
Thanks
// The next line is needed if running in JavaScript Mode with Processing.js
/* @pjs preload="CP.jpg"; */