We are about to switch to a new forum software. Until then we have removed the registration on this forum.
Hey everyone, i know this is probably a really simple thing to do but after a couple of days running into a brick wall i was wondering if i could just ask for some help. Basically I'm trying to get a button connected through the arduino/ firmata to activate my control p 5 button, which currently works like a switch going through iterations to change a wave form. I am getting 0/1 signal from the pin but can't make it trigger the button or increase the current value of the iteration to effect anything. sorry i know most of the questions on this site are from people doing much more complicated things, but any help is appreciated
Answers
if it helps i've been trying to use if (arduino.digitalRead(2) == Arduino.HIGH) { wave3Iteration++;
to no avail will keep looking tho
Hello ! Please send your code ! - it's a kind of proof that you tryed something by yourself and it's easier for us to help you from somewhere instead of nowhere -
Hey thanks for the quick response and sorry for the wall of code i'm still trying to figure out the best way to upload it and make it easier to read as the formatting is a bit weird and this is all pretty new to me (gonna try to get it on github or something in the morning). the bit im really stuck with is
if (arduino.digitalRead(2) == Arduino.HIGH) { wave3Iteration ++; println (arduino.digitalRead(2)); }
I have tried several other things variations on that idea but that is kind of where i'm stuck with making the button activate the button, i was reading input signal but i haven't found the probably very simple way of making it interact with the cp5 button function.
I think it has uploaded to the Arduino the sketch "standardFirmata" from Firmata example. With wave3Iteration ++, when you press the button after 1 second the countour is very fast, we need a state variable. Not works well in mouseMoved
Hey, cheers and yeah i know thats bad place to put it had it in the wave button area but moved it to the bottom when i pasted it over, but the other two things have got me thinking, ive just got back from work so gonna wait till the morning but your right i probably need a variable set up based off the input from the arduino and some kind of delay as well maybe so it has more time to read? will give it a go, thanks for the suggestions :D
arduino with "standardFirmata" sketch, in Processing try this
int state=0;
debouncing for button not necessary