We are about to switch to a new forum software. Until then we have removed the registration on this forum.
Hi, I'm fairly new to processing and programming in general. I have an Arduino that is sending numbers from 0 to about 20000 to processing. I am using a program that loops a println of a string that reads and updates the input from the Arduino.
void draw() {
while (myPort.available() > 0) {
String inBuffer = myPort.readString();
if (inBuffer != null) {
println(inBuffer);
}
This will continually print numbers based on the input from the Arduino, inBuffer being string that changes with the Arduino output. What I want to do is have the program look to see if the numbers 0 or 1 appear twice in a row and if they do, trigger one set of code, otherwise trigger another set of code.
Comments